summaryrefslogtreecommitdiff
path: root/sys/src/9/pc64/squidboy.c
AgeCommit message (Collapse)Author
2021-11-26kernel: support large 64-bit pci membars, increase pc64 VMAPSIZE to 1TBcinap_lenrek
This makes vmap()/vunmap() take a vlong size argument, and change the type of Pci.mem[].size to vlong as well. Even if vmap() wont support large mappings, it is nice to get the original unruncated value for error checking. pc64 needs a bigger VMAP window, as system76 pangolin puts the framebuffer at a physical address > 512GB.
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).
2019-08-29pc64: map kernel text readonly and everything else no-executecinap_lenrek
the idea is to catch bugs and make kernel exploitation harder by mapping the kernel text section readonly and everything else no-execute. l.s maps the KZERO address space using 2MB pages so to get the 4K granularity for the text section we use the new ptesplit() function to split that mapping up. we need to set EFER no-execute enable bit early in apbootstrap so secondary application processors will understand the NX bit in our shared kernel page tables. also APBOOTSTRAP needs to be kept executable. rebootjump() needs to mark REBOOTADDR page executable.
2017-11-08pc64: set ts flag before schedinit()cinap_lenrek
2017-03-11pc kernel: avoid AP's spinning in syncclock(), don't wait for thunderbirdsargocinap_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
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-02-15pc64: move VMAP into its own PDP (for vmware)cinap_lenrek
modifying the kernel pdp (CPU0PDP) hangs vmware. so we initialize the pdp with KZERO and KZERO+1GB map in l.s and never change it. (except when removing the zero double map which seems to work). VMAP has its own pdp now allowing to map 512GB of physical address space. this simplifies the code a bit and gives nice virtual addresses.
2014-02-01add experimental pc64 kernelcinap_lenrek