summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/gptboot/gptboot.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2003-11-10 19:06:09 +0000
committerbde <bde@FreeBSD.org>2003-11-10 19:06:09 +0000
commit4eec3808af89a67e483da72033ae89ffd382105e (patch)
treeb08d4dbce91606fa6dcb08a218a3fb811f040da6 /sys/boot/i386/gptboot/gptboot.c
parent5563abd4bb716bb57f87a6bf862118fd028f85d0 (diff)
downloadFreeBSD-src-4eec3808af89a67e483da72033ae89ffd382105e.zip
FreeBSD-src-4eec3808af89a67e483da72033ae89ffd382105e.tar.gz
Fixed loss of setting of the RB_BOOTINFO flag in rev.1.43. Fixed wrong
comment about this flag in rev.1.61. It is not historical like the comment said; it is the flag that says that most of what is laboriously put in the bootinfo struct is actually there. Newer kernels were bootable by even the broken boot2 without losing anything except the symbol table, but older kernels need at least the memory sizes. Restoring the "|" with RB_BOOTINFO that was lost in rev.1.43 costs 5 bytes. The fix can be done in only 4 bytes by fixing some code that was removed in rev.1.61 (put RB_BOOTINFO back in in the initial value of "opts" and fix RBX_MASK to not clobber it.)
Diffstat (limited to 'sys/boot/i386/gptboot/gptboot.c')
-rw-r--r--sys/boot/i386/gptboot/gptboot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c
index f3daec7..5d84f0d 100644
--- a/sys/boot/i386/gptboot/gptboot.c
+++ b/sys/boot/i386/gptboot/gptboot.c
@@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$");
#define RBX_NOINTR 0x1c /* -n */
#define RBX_DUAL 0x1d /* -D */
#define RBX_PROBEKBD 0x1e /* -P */
-/* 0x1f is reserved for the historical RB_BOOTINFO option */
+/* 0x1f is reserved for the RB_BOOTINFO flag. */
/* pass: -a, -s, -r, -d, -c, -v, -h, -C, -g, -m, -p, -D */
#define RBX_MASK 0x2005ffff
@@ -359,7 +359,7 @@ load(void)
bootinfo.bi_esymtab = VTOP(p);
bootinfo.bi_kernelname = VTOP(kname);
bootinfo.bi_bios_dev = dsk.drive;
- __exec((caddr_t)addr, opts & RBX_MASK,
+ __exec((caddr_t)addr, RB_BOOTINFO | (opts & RBX_MASK),
MAKEBOOTDEV(dev_maj[dsk.type], 0, dsk.slice, dsk.unit, dsk.part),
0, 0, 0, VTOP(&bootinfo));
}
OpenPOWER on IntegriCloud