shithub: 9ferno

ref: b502a62da2ec6058923db94f87ecc2d29db2fa77
dir: /man/3/boot/

View raw version
boot \- reboot under program control
.B bind -a #B /dev
.B /dev/boot
.B /dev/kexec
.B /dev/mem
.I Boot
serves a directory containing three files that control a reboot of the system.
The files can only be opened by the host owner
.IR eve (10.2)).
.B Boot
is a write-only file that accepts 4 bytes representing a kernel address, high-order byte first.
The system will transfer control to that address, which is assumed to be the start of low-level reboot code.
There is no return from the write on success or failure.
.B Kexec
is a write-only file to which an uncompressed kernel image can be written, a chunk at a time.
When the file is closed, the system will transfer control to the start of the image, which again
is assumed to be low-level reboot code.
.B Mem
copies data to and from kernel memory, taking the current file offset as an address therein.
.I Boot
flushes caches as necessary to ensure that writes to kernel memory through any
of these files will be visible when subsequently executed as instructions.
.B /os/port/devboot.c
.IR tftp (2),
.IR cons (3)
Invalid addresses are diagnosed, but otherwise there is no error return.