summaryrefslogtreecommitdiff
path: root/sys/src/9/zynq/main.c
AgeCommit message (Collapse)Author
2023-04-08kernel: Clear secrets on rebootcinap_lenrek
The idea is that when we reboot, we zero out memory written by processes that have the private flag set (such as factotum and keyfs), and also clear the secrmem pool, which contains TLS keys and the state of the random number generator. This is so the newly booted kernel or firmware will not find these secret keys in memory.
2022-08-129: compute available kernel pages using sizeof(Proc*)Ori Bernstein
procs come from the dynamic pools, so we don't need to remove the memory used by possible procs from the total available.
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-01-26kernel: implement portable userinit() and simplify process creationcinap_lenrek
replace machine specific userinit() by a portable implemntation that uses kproc() to create the first process. the initcode text is mapped using kmap(), so there is no need for machine specific tmpmap() functions. initcode stack preparation should be done in init0() where the stack is mapped and can be accessed directly. replacing the machine specific userinit() allows some big simplifications as sysrfork() and kproc() are now the only callers of newproc() and we can avoid initializing fields that we know are being initialized by these callers. rename autogenerated init.h and reboot.h headers. the initcode[] and rebootcode[] blobs are now in *.i files and hex generation was moved to portmkfile. the machine specific mkfile only needs to specify how to build rebootcode.out and initcode.out.
2019-07-17usbehci: introduce dmaflush() function to handle portable cache invalidation ↵cinap_lenrek
for device drivers
2018-06-14zunq: add sdram drivercinap_lenrek
2018-02-11kernel: move devether and wifi to port/cinap_lenrek
the only architecture dependence of devether was enabling interrupts, which is now done at the end of the driver's reset() function now. the wifi stack and dummy ethersink also go to port/. do the IRQ2->IRQ9 hack for pc kernels in intrenabale(), so not every caller of intrenable() has to be aware of it.
2017-11-04kernel: introduce per process FPU struct (PFPU) for more flexible machine ↵cinap_lenrek
specific fpu handling introducing the PFPU structue which allows the machine specific code some flexibility on how to handle the FPU process state. for example, in the pc and pc64 kernel, the FPsave structure is arround 512 bytes. with avx512, it could grow up to 2K. instead of embedding that into the Proc strucutre, it is more effective to allocate it on first use of the fpu, as most processes do not use simd or floating point in the first place. also, the FPsave structure has special 16 byte alignment constraint, which further favours dynamic allocation. this gets rid of the memmoves in pc/pc64 kernels for the aligment. there is also devproc, which is now checking if the fpsave area is actually valid before reading it, avoiding debuggers to see garbage data. the Notsave structure is gone now, as it was not used on any machine.
2017-10-29kernel: introduce devswap #¶ to serve /dev/swap and handle swapfile encryptioncinap_lenrek
2017-06-28zynq: simplify initcode stack setup (just do it in init0 when the stack is ↵cinap_lenrek
mapped)
2017-06-12kernel: add support for hardware watchpointsaiju
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-07-07all kernels: declare _tas() to prevent pulling in libc version (for libmemdraw)cinap_lenrek
2015-06-11zynq: increase kernel memory for graphicscinap_lenrek
2015-04-13zynq: invalidate cache before booting cpu1cinap_lenrek
sometimes, machine would crash on boot because of data cache inconsistency. invalidating the cache before booting cpu1 fixes it.
2015-03-06zynq: do mpinit() early so cpu1 debug prints do not intermixcinap_lenrek
2015-02-14zynq: do fixed mapping for ocm memory on boot and make kaddr() and paddr() ↵cinap_lenrek
work with it map the whole ocm memory on boot so we can translate physical to virtual addresses and back for uncached memory using KADDR() and PADDR(). replace ualloc() with ucalloc() returning virtual address. physical address can be acquired with PADDR() now. as ocm is now always mapped, use KADDR() instead of tmpmap() for mp bootstrap.
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.
2014-12-30zynq: enable prefetch hints and drop-prefetchcinap_lenrek
2014-12-29zymq: lilu dallas, multicorecinap_lenrek
implement multiprocessor support.
2014-12-24zynq: active.machs = 1cinap_lenrek
2014-12-24zynq: set mainmem->maxsize so kernel malloc() wont fail after 4MBcinap_lenrek
2014-12-24added zynq kernelaiju