]> git.lizzy.rs Git - plan9front.git/commit
kernel: implement portable userinit() and simplify process creation
authorcinap_lenrek <cinap_lenrek@felloff.net>
Sun, 26 Jan 2020 18:01:36 +0000 (19:01 +0100)
committercinap_lenrek <cinap_lenrek@felloff.net>
Sun, 26 Jan 2020 18:01:36 +0000 (19:01 +0100)
commit8d51e7fa1a1dbcbde513c2b756d504c879598907
tree4cd1a3aaab346ac990bc9058e8cc4928258be6ae
parent60bb408acca3b48b17f9158132849b894ad9f234
kernel: implement portable userinit() and simplify process creation

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.
53 files changed:
sys/src/9/bcm/init9.s [deleted file]
sys/src/9/bcm/main.c
sys/src/9/bcm/mkfile
sys/src/9/bcm64/main.c
sys/src/9/bcm64/mkfile
sys/src/9/bcm64/trap.c
sys/src/9/cycv/main.c
sys/src/9/cycv/mkfile
sys/src/9/cycv/trap.c
sys/src/9/kw/fns.h
sys/src/9/kw/init9.s [deleted file]
sys/src/9/kw/main.c
sys/src/9/kw/mkfile
sys/src/9/kw/syscall.c
sys/src/9/mtx/main.c
sys/src/9/mtx/mkfile
sys/src/9/mtx/trap.c
sys/src/9/omap/fns.h
sys/src/9/omap/main.c
sys/src/9/omap/mkfile
sys/src/9/omap/syscall.c
sys/src/9/pc/main.c
sys/src/9/pc/mkfile
sys/src/9/pc/mp.c
sys/src/9/pc/trap.c
sys/src/9/pc64/main.c
sys/src/9/pc64/mkfile
sys/src/9/pc64/trap.c
sys/src/9/port/initcode.c
sys/src/9/port/portdat.h
sys/src/9/port/portfns.h
sys/src/9/port/portmkfile
sys/src/9/port/proc.c
sys/src/9/port/sysproc.c
sys/src/9/port/userinit.c [new file with mode: 0644]
sys/src/9/ppc/initcode [deleted file]
sys/src/9/ppc/main.c
sys/src/9/ppc/mkfile
sys/src/9/ppc/trap.c
sys/src/9/sgi/main.c
sys/src/9/sgi/mkfile
sys/src/9/sgi/trap.c
sys/src/9/teg2/fns.h
sys/src/9/teg2/init9.s [deleted file]
sys/src/9/teg2/main.c
sys/src/9/teg2/mkfile
sys/src/9/teg2/syscall.c
sys/src/9/xen/main.c
sys/src/9/xen/mkfile
sys/src/9/xen/trap.c
sys/src/9/zynq/main.c
sys/src/9/zynq/mkfile
sys/src/9/zynq/trap.c