summaryrefslogtreecommitdiff
path: root/sys/src/9/pc64
AgeCommit message (Collapse)Author
2017-03-11pc kernel: give cpu servers as many image cache strctures as processescinap_lenrek
2017-03-11pc kernel: avoid AP's spinning in syncclock(), don't wait for thunderbirdsargocinap_lenrek
2017-03-01pc64: enable cputemp drivermischief
works on on x301 and t420.
2016-12-17pat write combinding support for 386 kernel, honor cpuid bitscinap_lenrek
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-11-17pc64: check if vmap() range fits in VMAPLEN window, remove unneeded ↵cinap_lenrek
vmapsync(), rename fault386() to faultamd64()
2016-08-27kernel: switch to fast portable chacha based seed-once random number generatorcinap_lenrek
2016-05-05pc64: add etheryuk drivercinap_lenrek
2016-01-14pc64: move idle() routine after CALL main(SB) as the comment suggestscinap_lenrek
2016-01-13pc/pc64: backing out new mp startup code (caused issues with ramnode)cinap_lenrek
apparently, this causes some quadcore ramnode vm to hang on boot, even tho all cores successfully started up and are operational. i suspect some side effect from timersinit()... this would also mean *notsc= would break it (syncclock() would continue)... its unclear. i'm reverting this for now until the problem is better understood.
2016-01-11pc/pc64: bring up ap's one after another, use idlehands() while waiting for ↵cinap_lenrek
thunderbirdsarego when testing in qemu, launching each ap became slower and slower because all the ap's where spinning in syncclock() waiting for cpu0 to update its mach0->tscticks, which happens only much later after all cpu's have been started up. now we wait for each cpu to do its timer callibration and manually update our tscticks while we wait and each cpu will not spin but halt while waiting for active.thunderbirdsarego. this reduces the system load and noise for timer callibration and makes the mp startup linear with regard to the number of cores.
2016-01-05kernel: change active.machs from bitmap to char array to support up to 64 ↵cinap_lenrek
cpus on pc64
2015-11-30kernel: cleanup exit()/shutdown()/reboot() codecinap_lenrek
introduce cpushutdown() function that does the common operation of initiating shutdown, returning once all cpu's got the message and are about to shutdown. this avoids duplicated code which isnt really machine specific. automatic reboot on panic only when *debug= is not set and the machine is a cpu server or has no display, otherwise just hang.
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.
2015-07-10wifi: adjust transmit rate on error (for etheriwl), small mkfile changescinap_lenrek
Wnode gets two new counters: txcount and txerror and actrate pointer that will be between minrate and maxrate. driver should use actrate instead of maxrate for transmission when it can provide error feedback. when a driver detects a transmission failed, it calls wifitxfail() with the original packet. wifitxfail() then reduces wn->actrate. every 256th packet, we optimistically increase wn->actrate before transmitting.
2015-07-07pc64: use unsigned long for kmapindex and mmu counts avoiding signed integer ↵cinap_lenrek
division
2015-07-07all kernels: declare _tas() to prevent pulling in libc version (for libmemdraw)cinap_lenrek
2015-06-28etherwpi: Intel PRO Wireless 3945abg driver based on openbsd's if_wpi ↵cinap_lenrek
(thanks aap)
2015-06-28pc, pc64: toggle bit 2 in port 0x61 to reset and enable PCI SERR# nmi's, ↵cinap_lenrek
print nmi status
2015-04-08pc, pc64: extend initial memory map for qemu multiboot datacinap_lenrek
qemu puts multiboot data after the end of the kernel image, so to be able to KADDR() that memory early, we extend the initial identity mapping by 16K. right now we just got lucky with the pc kernel as it rounds the map to 4MB pages.
2015-03-25pc, pc64: state dependency to usbehci.h in mkfilescinap_lenrek
2015-03-22usbohci: ensure Ed and Td alignment, fix for amd64cinap_lenrek
2015-02-20pc, pc64: simplify intrdisable()cinap_lenrek
2015-02-18pc, pc64: fix intrdisable() MaxIrqLAPIC -> MaxVectorAPIC (thanks mischief)cinap_lenrek
2015-02-14usbehci: initial support for usb on zynq, remove uncached.hcinap_lenrek
the following hooks have been added to the ehci Ctlr structore to handle cache coherency (on arm): void* (*tdalloc)(ulong,int,ulong); void* (*dmaalloc)(ulong); void (*dmafree)(void*); void (*dmaflush)(int,void*,ulong); tdalloc() is used to allocate descriptors and the periodic frame schedule array. on arm, this needs to return uncached memory. tdalloc()ed memory is never freed. dmaalloc()/dmafree() is used for io buffers. this can return cached memory when when hardware maintains cache coherency (pc) or dmaflush() is provided to flush/invalidate the cache (zynq), otherwise needs to return uncached memory. dmaflush() is used to flush/invalidate the cache. the first argument tells us if we need to flush (non zero) or invalidate (zero). uncached.h is gone now. this change makes the handling explicit.
2015-02-07pc64: enable uartisa in default configstanley lieber
2015-02-07kernel: reduce Page structure size by changing Page.cachectl[]cinap_lenrek
there are no kernels currently that do page coloring, so the only use of cachectl[] is flushing the icache (on arm and ppc). on pc64, cachectl consumes 32 bytes in each page resulting in over 200 megabytes of overhead for 32gb of ram with 4K pages. this change removes cachectl[] and adds txtflush ulong that is set to ~0 by pio() to instruct putmmu() to flush the icache.
2015-01-09igfx: implement hardware cursorcinap_lenrek
this can even be used with the vesa driver, just enable the cursor after mode switch like: echo hwgc igfxhwgc >/dev/vgactl
2015-01-09igfx: work in progress intel graphics drivercinap_lenrek
this driver can modeset lvds on x200s and x230. everything else is completely untested. no hardware cursor implemented. no vgadb entries are provided.
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-22pc, pc64: fix intrdisable() to remove the Vctl entry even tho we can't ↵cinap_lenrek
disable the interrupt on apic
2014-12-22pc, pc64, xen: simplify #P/irqalloccinap_lenrek
2014-12-19pc64: enable devaoe and sdloop in kernel configurationcinap_lenrek
2014-12-19pc, pc64: adjust mpshutdown() comment to reflect the current statecinap_lenrek
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-12-17pc, pc64: remove old B.COM command line parsing and just pass tokenized ↵cinap_lenrek
BOOTLINE to /boot/boot as argv[] this change allows command line passing to /boot/boot from qemu like: qemu -kernel 9pcf -append "-u glenda tcp"
2014-12-16kernel: remove obsolete comment regarding Mntcache size in */main.ccinap_lenrek
2014-12-14kernel: get rid of /boot/boot parametrizationcinap_lenrek
there is no use for "bootdisk" variable parametrization of /boot/boot and no point for the boot section with its boot methods in the kernel configuration anymore. so mkboot and boot$CONF.out are gone. move the rules for bootfs.paq creation in 9/boot/bootmkfile. location of bootfs.proto is now in 9/boot/bootfs.proto. our /boot/boot target is now just "boot".
2014-12-13pc, pc64: untangle embedded controller (ec) dependency from devarchcinap_lenrek
2014-12-06pc, pc64: add and enable ethervirtio drivermischief
many thanks to cinap_lenrek, erik quanstrom and david du colombier for feedback and testing.
2014-11-20pc, pc64: preserve last KB of conventional memory (might contain bios tables)cinap_lenrek
we add new function convmemsize() that returns the size of *usable* conventional memory that does some sanity checking and reserves the last KB below the top of memory pointer. this avoids lowraminit() overriding potential bios tables and sigsearch() going off the rails looking for tables at above 640K.
2014-11-15pc64: get rid of fixed 8MB INIMAP and dynamically map KZERO-end in l.scinap_lenrek
traditionally, the pc kernel mapped the first 8MB of physical address space. when the kernel size grows beyond that memory mapping, it will crash on boot and theres no checking in the build process making sure it fits. with the pc64 kernel, it is not hard to always map the whole kernel memory image from KZERO to end[], so that the kernel will always fit into the initial mapping.
2014-11-10pc64: fix comment description of pc64 kernel configurationcinap_lenrek
2014-11-10pc, pc64: provide access to embedded controller with #P/ec filecinap_lenrek
2014-11-09kernel: remove implicit Proc* argument from procctl()cinap_lenrek
procctl() is always called with up and it would not work correctly if passed a different process, so remove the Proc* argument and use up directly.
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-11-02pc, pc64: more sanity checking for lowraminit()cinap_lenrek
2014-11-01pc64: remove unused pdballoc and pdbfree counters from mach structurecinap_lenrek
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.