diff options
author | jhb <jhb@FreeBSD.org> | 2001-07-31 19:50:09 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-07-31 19:50:09 +0000 |
commit | 198dfe1ce372964cd0190a0caa7d115f92f9da6c (patch) | |
tree | af96aaeb4aebec2c07287668b0913f3a584ec6e7 /sys/boot/i386/gptboot/gptboot.c | |
parent | 153539de08c0558a99102fb2b3091f7b7ab7eb51 (diff) | |
download | FreeBSD-src-198dfe1ce372964cd0190a0caa7d115f92f9da6c.zip FreeBSD-src-198dfe1ce372964cd0190a0caa7d115f92f9da6c.tar.gz |
Add in a hack to support IBM "El Torito" CD-ROM booting BIOS's which expect
the first sector of the emulated floppy to contain a valid MS-DOS BPB that
it can modify. Since boot1 is the first sector of boot.flp, this resulted
in the BIOS overwriting part of boot1: specifically the function used to
read in sectors from the disk.
Submitted by: Mark Peek <mark@whistle.com>
Submitted by: Doug Ambrisko <ambrisko@ambrisko.com>
PR: i386/26382
Obtained from: NetBSD, OpenBSD (the example BPB)
MFC after: 1 month
Diffstat (limited to 'sys/boot/i386/gptboot/gptboot.c')
-rw-r--r-- | sys/boot/i386/gptboot/gptboot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c index ef3f504..d7f5721 100644 --- a/sys/boot/i386/gptboot/gptboot.c +++ b/sys/boot/i386/gptboot/gptboot.c @@ -34,6 +34,7 @@ #include <btxv86.h> +#include "boot2.h" #include "lib.h" #define RBX_ASKNAME 0x0 /* -a */ @@ -739,7 +740,7 @@ drvread(void *buf, unsigned lba, unsigned nblk) printf("%c\b", c = c << 8 | c >> 24); v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS; - v86.addr = 0x704; /* call to xread in boot1 */ + v86.addr = XREADORG; /* call to xread in boot1 */ v86.es = VTOPSEG(buf); v86.eax = lba; v86.ebx = VTOPOFF(buf); |