Date: Tue, 31 Jul 2001 11:21:41 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: John Baldwin <jhb@FreeBSD.org> Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: RE: cvs commit: src/sys/boot/i386/boot2 Makefile boot1.s boot2.c Message-ID: <XFMail.010731112141.jhb@FreeBSD.org> In-Reply-To: <200107311950.f6VJoAh19115@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 31-Jul-01 John Baldwin wrote: > jhb 2001/07/31 12:50:10 PDT > > Modified files: > sys/boot/i386/boot2 Makefile boot1.s boot2.c > Log: > 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 Without this, IBM machines can not boot off the CD-ROM, so I'd like people to test this out. In theory it would be nice to get this in 4.4, though that may not be practical. Note that this is only for CD booting, and if we get "no emulation" style booting working, we can remove this. For anyone looking for a fun x86-intensive project, cdldr is such a "no emulation" boot loader. It uses the same exact algorithm that pxelder is: that is, it is tacked onto the front of a loader binary to form a 'cdboot' binary. The CD then sucks this entire cdboot binary into memory when it starts up. cdldr then relocates the loader binary and starts up the loader much like boot2 starts it. This all works. In fact, we even make it into the main() function of the loader itself. Unfortunately, the first function call we make from main() blows up with (I think) a stack fault that leads to a double fault and then a fatal reset. Note that we do use the stack to call main() itself, and that pxelder is identical in its function and doesn't have this problem. (Do a diff of pxeldr.s and cdldr.s to see how close they are.) If that problem can be fixed, then the only other roadblocks left are hacking up a disk driver (you can crib from biosdisk in libi386 for this) that looks like a BIOS disk except that it uses 2048 byte sectors (instead of 512) and you explicitly probe it by passing in the passed in BIOS device number if KARGS_FLAGS_CD is set in the smae place KARGS_FLAGS_PXE lives. -- John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010731112141.jhb>