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.)
This commit is contained in:
parent
5563abd4bb
commit
4eec3808af
@ -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));
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user