summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/fns.h
AgeCommit message (Collapse)Author
2016-12-15pc64: implement simple write combining for framebuffers with the PATcinap_lenrek
on some modern machines like the x250, the bios arranges the mtrr's and the framebuffer membar in a way that doesnt allow us to mark the framebuffer pages as write combining, leading to slow graphics. since the pentium III, the processor interprets the page table bit combinations of the WT, CD and bit7 bits as an index into the page attribute table (PAT). to not change the semantics of the WT and CD bits, we preserve the bit patterns 0-3 and use the last entry 7 for write combining. (done in mmuinit() for each core). the new patwc() function takes virtual address range and changes the page table marking the range as write combining. no attempt is made on invalidating tlb's. doesnt matter in our case as the following mtrr() call in screen.c does it for us.
2016-05-01pc: use fpsave() instead of fpenv() to capture fp exception contextcinap_lenrek
2015-08-05pc, pc64: remove unused psaux driver, cleanup devkbdcinap_lenrek
the psaux driver is not used in any kernel configuration and theres no userspace mouse daemon. i8042auxcmds() is wrong as access to the user buffer can fault and we are holding an ilocks. little cleanups in devkbd.
2015-08-05devkbd: disable mosue/keyboard on shutdown, disable ps2 mouse on init, ↵cinap_lenrek
remove kbdenable()/kbdinit() on vmware, loading a new kernel sometimes reboots when wiggling the mouse. disabling keyboard and mouse on shutdown fixes the issue. make sure ps2 mouse is disabled on init, will get re-enabled in i8042auxenable(). keyboard isnt special anymore, we can just use the devreset entry point in the device to do the keyboard initialization, so kbdinit()/kbdenable() are not needed anymore.
2014-12-22pc, pc64, xen: change return type of intrdisable() to voidcinap_lenrek
intrdisable() will always be able to unregister the interrupt now, so there is no reason to have it return an error value. all drivers except uart8250 already assumed it to never fail and theres no need to maintain that complexity.
2014-12-19pc, pc64: untangle acpireset() from mpshutdown()cinap_lenrek
mpshutdown() used to call acpireset() making it impossible to build a kernel without archacpi. now, mpshutdown() is a helper function that only shuts down the application processors that gets used from mpreset() and acpireset(). the generic machine reset code in exported by devarch's archreset() function that is called by mpreset() and from acpireset() as a fallback. so the code duplication that was in mpshutdown() is avoided.
2014-11-10pc, pc64: provide access to embedded controller with #P/ec filecinap_lenrek
2014-11-02pc, pc64: implement acpi reset (for efi)cinap_lenrek
x230 booted in efi only (no csp) mode hangs when traditional i8042reset() keyboard reset is tried. so we try acpireset() first which discoveres and writes the acpi reset register.
2014-10-21pc, pc64: make mtrr() callable from interrupt context and before mpinitcinap_lenrek
to make it possible to mark the bootscreen framebuffer as write combining in early initialization, mtrr() is changed not not to error() but to return an error string. as bootscreen() is used before multiprocessor initialization, we have to synchronize the mtrr's for every processor as it comes online. for this, a new mtrrsync() function is provided that is called from cpuidentify() if mtrr support is indicated. the boot processor runs mtrrsync() which snarfs the registers. later, mtrrsync() is run again from the application processors which apply the values from the boot processor. checkmtrr() from mp.c was removed as its task is also done by mtrrsync() now.
2014-07-09pc, pc64: initial machine check architecture supportcinap_lenrek
2014-05-11pc, pc64: handle sse simd exceptionscinap_lenrek
2013-09-09mp/pci: msi support for hypertransport platformcinap_lenrek
2013-05-26keep fpregs always in sse (FXSAVE) format, adapt libmach and acid files for ↵cinap_lenrek
new format we now always use the new FXSAVE format in FPsave structure and fpregs file, converting back and forth in fpx87save() and fpx87restore(). document that fprestore() is a destructive operation now. change fp register definition in libmach and adapt fpr() acid funciton. avoid unneccesary copy of fpstate and fpsave in sysfork(). functions including syscalls do not preserve the fp registers and copying fpstate from the current process would mean we had to fpsave(&up->fpsave); first. simply not doing it, new process starts in FPinit state.
2013-05-22sse kernel support (sources)jpathy
2013-05-08Add RDRAND Support for /dev/randomjpathy
2013-01-13remove non standard COM3 (eia2) serial port from i8250 uart.cinap_lenrek
access to non standard serial port COM3 at i/o port 0x200 causes kernel panic on some machines (Toshiba Sattelite 1415-S115). also, some machines have gameport at 0x200. i readded uartisa to the pcf and pccpuf kernel configurations so one can use plan9.ini to add non standard uarts like: uart2=type=isa port=0x200 irq=5
2012-11-23ratrace: fix race conditions and range checkcinap_lenrek
the syscallno check in syscallfmt() was wrong. the unsigned syscall number was cast to an signed integer. so negative values would pass the check provoking bad memory access from kernel. the check also has an off by one. one has to check syscallno >= nsyscalls instead of syscallno > nsyscalls. access to the p->syscalltrace string was not protected from modification in devproc. you could awake the process and cause it to free the string giving an opportunity for the kernel to access bad memory. or someone could kill the process (pexit would just free it). now the string is protected by the usual p->debug qlock. we also keep the string arround until it is overwritten again or the process exists. this has the nice side effect that one can inspect it after the process crashed. another problem was that our validaddr() would error() instead of pexiting the current process. the code was changed to only access up->s.args after it was validated and copied instead of accessing the user stack directly. this also prevents a sneaky multithreaded process from chaning the arguments under us. in case our validaddr() errors, we cannot assume valid user stack after the waserror() if block. use up->s.arg[0] for the noted() call to avoid bad access.
2012-09-30guesscpuhz(), apm suspendcinap_lenrek
use fastclock timer (pit2) to measure cpufreq in guesscpuhz(). this gives a bigger period minimizing the danger of overrun as pit2 runs at the constant maximum period of 0x10000 ticks. also use smaller loop increments (1000) and bigger maximum loop upper bound. move the loops < ... check to the bottom of the loop so we get the effective count *before* adding the next loop increment. ilock() while doing measurements in guesscpuhz() to prevent accidents with other processors reading fastclock or doing guesscpuhz() in parralel. export new i8253reset() function for apm to reset the timers after a apm bios suspend.
2012-08-31rdmsr/wrmsr become tryrdmsr/trywrmsr, we can should check for trapcinap_lenrek
2012-08-24add unified sigsearch() function to look for bios data structurescinap_lenrek
replace the various functions that searched for bios data structures by a single sigsearch() one in pc/memory.c that will probe the various bios data areas. also, a new checksum() function was added that is to be used to validate the structures found.
2012-05-04kernel: use monitor/mwait instruction on pc multiprocessor for idlehandscinap_lenrek
2012-02-11pci: add pcicapcinap_lenrek
2011-11-11pc kernel: remove i8253linkcinap_lenrek
2011-07-20pc/trap: cleanup exception handlingcinap_lenrek
2011-07-19reading from/writing to non-existant MSRs via /dev/msr no longer crashes the ↵aiju
system
2011-07-12segdesc: add /dev/^(ldt gdt) supportcinap_lenrek
2011-05-18sb16: new approach, works in qemucinap_lenrek
2011-05-16added basic MSI and PCI capabilities supportaiju
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen