summaryrefslogtreecommitdiff
path: root/sys/src/9/bcm/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.
2022-08-109/port: allow kiloprocs -- allocate procs lazilyOri Bernstein
Treallocate the small data structures around procs eagerly, but use malloc to allocate the large proc data structures when we need them, which allows us to scale to many more procs. There are still many scalability bottlenecks, so we only crank up the nproc limit by a little bit this time around, and crank it up more as we optimize more.
2021-04-25bcm: try ATAGS/DTB pointer from R2 on entrycinap_lenrek
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-25bcm, bcm64: add support for device tree parameter passingcinap_lenrek
the new raspberry pi 4 firmware for arm64 seems to have broken atag support. so we now parse the device tree structure to get the bootargs and memory configuration.
2019-05-13bcm, bcm64: preserve memsize across reboots, avoid trashing atags while ↵cinap_lenrek
parsing cmdline we override atag memory on reboot, so preserve the memsize learned from atag as *maxmem plan9 variable. the global memsize variable is not needed anymore. avoid trashing the following atag when zero terminating the cmdline string. zero memory after plan9.ini variables.
2019-04-11bcm: move CONFADDR parsing into bootargs.c, simplify initcode start() args ↵cinap_lenrek
handling
2019-04-11kernel: get rid of PTR2UINT() and UINT2PTR() macroscinap_lenrek
2018-10-31bcm: fix /dev/reboot text/data corruption (thanks richard miller)cinap_lenrek
- clean dcache before turning off caches and mmu (rebootcode.s) - use WFE and inter-core mailboxes for cpu startup (rebootcode.s) - disable SMP during dcache invalidation before enabling caches and mmu (in armv7.s)
2018-10-28bcm: simplify reboot codecinap_lenrek
- synchronize rebootcode installation - handle the 1MB identity map in mmu.c (mmuinit1()) - do not overlap CONFADDR with rebootcode, the non boot processors are parked there. - make REBOOTADDR physical address
2018-10-20bcm: import changes for raspi2/3 from richard millercinap_lenrek
2017-10-29kernel: introduce devswap #¶ to serve /dev/swap and handle swapfile encryptioncinap_lenrek
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-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-16kernel: remove obsolete comment regarding Mntcache size in */main.ccinap_lenrek
2014-03-15kernel: interpret service= boot parameter to set "cpuserver" variablecinap_lenrek
2014-03-04pc64: fix segattachcinap_lenrek
the comment about Physseg.size being in pages is wrong, change type to uintptr and correct the comment. change the length parameter of segattach() and isoverlap() to uintptr as well. segments can grow over 4GB in pc64 now and globalsegattach() in devsegment calculates len argument of isoverlap() by s->top - s->bot. note that the syscall still takes 32bit ulong argument for the length! check for integer overflow in segattach(), make sure segment goes not beyond USTKTOP. change PTEMAPMEM constant to uvlong as it is used to calculate SEGMAXSIZE.
2014-02-28bcm kernel: add *kernelpercent option for cmdline.txtstanley lieber
2014-01-12added a segment for segattach(2) that gives access to the raspberry pi's ↵Matthew Veety
gpio header.
2013-04-14reduce software cursor flickeringcinap_lenrek
the software cursor starts flickering and reacts bumby if a process spends most of its time with drawlock acquired because the timer interrupt thats supposed to redraw the cursor fails to acquire the lock at the time the timer fires. instead of trying to draw the cursor on the screen from a timer interrupt 30 times per second, devmouse now creates a process calling cursoron() and cursoroff() when the cursor needs to be redrawn. this allows the swcursor to schedule a redraw while holding the drawlock in swcursoravoid() and cursoron()/cursoroff() are now able to wait for a qlock (drawlock) because they get called from process context. the overall responsiveness is also improved with this change as the cursor redraw rate isnt limited to 30 times a second anymore.
2013-01-26add raspberry pi kernel (from sources)cinap_lenrek