Changeset View
Changeset View
Standalone View
Standalone View
stand/powerpc/kboot/host_syscall.S
/* | /* | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#include <machine/asm.h> | #include <machine/asm.h> | ||||
ENTRY(host_exit) | |||||
li %r0, 1 # SYS_exit | |||||
sc | |||||
trap | |||||
END(host_exit) | |||||
ENTRY(host_read) | ENTRY(host_read) | ||||
li %r0, 3 # SYS_read | li %r0, 3 # SYS_read | ||||
sc | sc | ||||
bso 1f | bso 1f | ||||
blr | blr | ||||
1: | 1: | ||||
li %r3, 0 | li %r3, 0 | ||||
blr | blr | ||||
Show All 21 Lines | |||||
END(host_llseek) | END(host_llseek) | ||||
ENTRY(host_open) | ENTRY(host_open) | ||||
li %r0, 5 # SYS_open | li %r0, 5 # SYS_open | ||||
sc | sc | ||||
bso 1f | bso 1f | ||||
blr | blr | ||||
1: | 1: | ||||
li %r3, 0 | li %r3, -1 | ||||
bdragon: BTW this bug also affects FreeBSD 12's loader.kboot -- it would try and open fd 0 and read from… | |||||
blr | blr | ||||
END(host_open) | END(host_open) | ||||
ENTRY(host_close) | ENTRY(host_close) | ||||
li %r0, 6 # SYS_close | li %r0, 6 # SYS_close | ||||
sc | sc | ||||
blr | blr | ||||
END(host_close) | END(host_close) | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |
BTW this bug also affects FreeBSD 12's loader.kboot -- it would try and open fd 0 and read from it, causing the console to go crazy.