summaryrefslogtreecommitdiff
path: root/sys/src/9
AgeCommit message (Collapse)Author
2021-01-18audiohda: Add AMD Starship/Matisse HD Audio Controller (thanks uramekus)cinap_lenrek
2021-01-17pc, pc64: add minimal HPET driver to measure LAPIC and TSC frequenciescinap_lenrek
This adds the new function pointer PCArch.clockinit(), which is a timer dependent initialization routine. It also takes over the job of guesscpuhz(). This way, the architecture ident code can switch between different timers (i8253, HPET and XEN timer).
2021-01-17usbehci: use 64-bit base address, remove resetlck, simplify scanpci()cinap_lenrek
2021-01-17usbuhci: remove resetlk, simplify scanpci()cinap_lenrek
2021-01-17usbohci: use 64-bit io base address, disable interrupts before reset, remove ↵cinap_lenrek
resetlck
2021-01-10pc, pc64: revert addition of pcireset() call to pcicfginit()cinap_lenrek
Revert the change, as it causes system lockups on bootup on some systems with USB OHCI controllers, suspected to be caused by BIOS/SMM accessing the device as BIOS handover has not been executed yet. We might bring that back when the problem has is better understood.
2020-12-27devvga: implement screen tilting, remove panning and overlayscinap_lenrek
Tilting allows using left/right rotated or invetrted display orientation. This can be changed at runtime such as: echo tilt right > /dev/vgactl This removes the old panning and vga overlays as they are only implemented with some ancient vga controllers.
2020-12-23devproc: allow anyone to change user of its own processes to "none"cinap_lenrek
2020-12-22kw: use ethermii.c from port/ (thanks stuart)cinap_lenrek
2020-12-22kernel: avoid palloc lock during mmurelease()cinap_lenrek
Previously, mmurelease() was always called with palloc spinlock held. This is unneccesary for some mmurelease() implementations as they wont release pages to the palloc pool. This change removes pagechainhead() and pagechaindone() and replaces them with just freepages() call, which aquires the palloc lock internally as needed. freepages() avoids holding the palloc lock while walking the linked list of pages, avoding some lock contention.
2020-12-21kernel: make addbroken() static, remove misleading Proc* argumentcinap_lenrek
2020-12-21pc, xen: move fpu setup/fork/save/restore handlers to pc/fpu.ccinap_lenrek
2020-12-21kernel: update procsave() comment, we'r not holding up->rlock anymorecinap_lenrek
2020-12-20kernel: handle tos and per process pcycle counters in port/cinap_lenrek
we might as well handle the per process cycle counter in the portable part instead of duplicating the code in every arch and have inconsistent implementations. we now have a portable kenter() and kexit() function, that is ment to be used in trap/syscall from user, which updates the counters. some kernels missed initializing Mach.cyclefreq.
2020-12-19kernel: remove Proc* argument from procsetuser() functioncinap_lenrek
2020-12-19devsons: remove #c/pgrpidcinap_lenrek
The process group id is essentially a unique id of the namespace but it was never well documented nor is it used by any program.
2020-12-17ether2114x: make sure pci bar0 is I/Ocinap_lenrek
2020-12-17ether2114x: vetting the driver for pc64cinap_lenrek
the tulip driver is used in microsofts hypver-v as the legacy ethernet adapter for pxe booting. to make the driver work on pc64, we need to store the Block* pointers in a separate array instead of stuffing them into buffer address 2 of the hardware descriptor. also, enable the driver in the pc64 kernel.
2020-12-13kernel: implement per file descriptor OCEXEC flag, reject ORCLOSE when ↵cinap_lenrek
opening /fd, /srv and /shr The OCEXEC flag used to be maintained per channel, making it shared between all the file desciptors. This has a unexpected side effects with regard to channel passing drivers such as devdup (/fd), devsrv (/srv) and devshr (/shr). For example, opening a /srv file with OCEXEC makes it impossible to be remounted by exportfs as it internally does a exec() to mount and re-export it. There is no way to reset the flag. This change makes the OCEXEC flag per file descriptor, so a open with the OCEXEC flag only affects the fd group of the calling process, and not the channel itself. On rfork(RFFDG), the per file descriptor flags get copied. On dup(), the per file descriptor flags are reset. The second modification is that /fd, /srv and /shr should reject the ORCLOSE flag, as the files that are returned have already been opend.
2020-12-12sdiahci: assume 64-bit PCIWADDR()cinap_lenrek
2020-12-12sdiahci: enable pci busmaster before ahciconfigdrive() (fix qemu crash)cinap_lenrek
enable pci busmaster before set the fis-receive-enable bit in the port command register. not doing so triggers a crash in qemu like: address_space_unmap: Assertion `mr != NULL' failed. as qemu tries to process the dma command list as soon as we set that flag and busmaster dma needs to be enabled at this point.
2020-12-11pc, pc64: make sure write combining is supported in MTRR's before setting itcinap_lenrek
2020-12-11pc, pc64: ignore MTRR's when MTRRCap.vcnt and MTRRCap.fix are zerocinap_lenrek
Bhyve returns 0 in MTRRCap register, so we can use that instead on relying on cpuid only to see if MTRR's are supported. That way we can get rid of the sanity check in memory.c.
2020-12-10pc, pc64: work around bhyve all uncached MTRR'scinap_lenrek
2020-12-08pc, pc64: cleanup cpuidentify() and some commentscinap_lenrek
2020-12-08pc, pc64: add *nomtrr= kernel parametercinap_lenrek
2020-12-08pc64: preserve reserved bits in CR0/CR4 for amd64 in mtrr setstate()cinap_lenrek
On AMD64, CR0/CR4 are 64-bit registers, with the upper half reserved. So use uintptr type to store the register values to get 32 bit on 386 and 64 bit on AMD64.
2020-12-08pc: move ldmxcsr() prototype to fpu.ccinap_lenrek
2020-12-08devmouse: remove redundant checkSigrid
2020-12-06pc64: assign fpsave/fprestore only once in fpuinit()cinap_lenrek
2020-12-06pc64: AMD64 mandates SSE support, remove the check in fpuinit()cinap_lenrek
2020-12-06xen: use pc/fpu.ccinap_lenrek
2020-12-06pc, pc64: move all fpu specific code from main.c to fpu.ccinap_lenrek
2020-12-06xen: fix for the last avx changesSigrid
2020-12-06amd64: FP: back to static size for allocation and copyingSigrid
2020-12-06amd64: FP: always use enough to fit AVX state and align to 64 bytesSigrid
2020-12-06amd64, vmx: support avx/avx2 for host/guest; use *noavx= in plan9.ini to disableSigrid
2020-12-05pc/dma, pc/sdide: use uintptr for physical address instead of ulongcinap_lenrek
2020-12-05pc, pc64: allocate dma bounce buffer right after xinit()cinap_lenrek
2020-12-05pc, pc64: exclude memory regions with unusual MTRR cache attributescinap_lenrek
Use the MTRR registers to exclude memory ranges that do not have the expected cache attributes: RAM -> writeback UMB -> uncached UPA -> uncached
2020-11-29pc, pc64, xen: rewrite interrupt handling codecinap_lenrek
This implements proper intrdisable() support for all interrupt controllers. For enable, (*arch->intrassign)(Vctl*) fills in the Vctl.enable and Vctl.disable pointers with the appropriate routines and returns the assigned vector number. Once the Vctl struct has been linked to its vector chain, Vctl.enable(Vctl*, shared) gets called with a flag if the vector has been already enabled (shared). This order is important here as enabling the interrupt on the controller before we have linked the chain can cause spurious interrupts, expecially on mp system where the interrupt can target a different cpu than the caller of intrenable(). The intrdisable() case is the other way around. We first disable the interrupt on the controller and after that unlink the Vctl from the chain. On a multiprocessor, the xfree() of the Vctl struct is delayed to avoid freeing it while it is still in use by another cpu. The xen port now also uses pc/irq.c which has been made generic enougth to handle xen's irq scheme. Also, archgeneric is now a separate file to avoid pulling in dependencies from the 8259 interrupt controller code.
2020-11-22pc, pc64: move common irq handling code out of trap.ccinap_lenrek
Move the common irq handling code out of trap.c into pc/irq.c so that it can be shared between 386 and amd64 ports.
2020-11-21pc, pc64: fix grub multibootcinap_lenrek
It appears that our IDT overlaps with the data structures passed from grub in multiboot load. So defer setup of the interrupt table after the multiboot parameters have been processed.
2020-11-21ether8169: fix interrupt panic before init, defer initialization until attachcinap_lenrek
The driver used to register the interrupt handler just after reset, tho the Ctlr struct, including the buffer descriptor arrays where only allocated on attach. This moves most of the reset/init out of pnp function and into attach. This also means we can error out and even retry on the next attach. The logic of the reseter kproc has been changed: now it is only started once the first initialization completely succeeded. This avoids the strange qlock passing. Implement a shutdown function so the device gets halted for /dev/reboot. Assume 64 bit physical addresses for dma. Check that pci bar0 is actually I/O.
2020-11-21pc, pc64: implement disabling of msi interruptscinap_lenrek
2020-11-21pc, pc64: new MTRR code supporting AMD TOM2 MSR and fixed mtrr rangescinap_lenrek
The new MTRR code handles overlapping ranges and supports AMD specific TOM2 MSR. The format in /dev/archctl now only shows the effective cache ranges only, without exposing the low level registers.
2020-11-21pc, pc64: disable all pci devices for /dev/rebootcinap_lenrek
Make sure all pci busmaster activity is disabled, including MSI/MSI-X interrupts, before switching control to the new kernel.
2020-11-21pc, pc64: disable all pci devices in pcicfginit()cinap_lenrek
Make sure all pci busmaster activity is disabled, including MSI/MSI-X interrupts. Drivers will later reenable once taking control of a device.
2020-11-21kernel: add portable pcimsienable()/pcimsidisable(), disable MSI/MSI-X on ↵cinap_lenrek
pcidisable()/pcireset() This avoids some duplication in the pci support code and allows pcireset() to diable MSI and MSI-X interrupts when disabling or reseting a device.
2020-11-21etherm10g: remove duplicated pci capability enumcinap_lenrek