Here's the summary of our discussion about booting the OS and how it is done in the minicomputer world. This is not about integrating a new HAL into the BIOS; its just about how the BIOS should load and execute an OS from disk/net/... .
- The "unintellingent" approach: c/h/s et al
David Kennedy dkennedy@engsoc.carleton.ca, said that he boots his Next with the following command: bsd(0,0,0) [kernelname] but made not clear what "kernelname" means (passed to a secondary loader?).
I booted (before its death) my Sun/CV (68k, SysV) with a command like b sd(0,0,0); syntax is clear.
- The "we load an intermediate loader" approach: OpenBoot, ...
James Laferriere, babydr@nwrain.net, said he boots his Sparc 4/xx series with a command like: /sbus/esp@0,800000/sd@3,0:a
This is Sun OpenBoot 3.x syntax, as far as I understand, from Sun's OpenBoot 3.x Command Reference Manual, section The Device Tree. (www.sun.com) James states that the BIOS understands UFS(Solaris type) filesystems, too; but it seems to me that this is only true for the secondary boot program. The primary OpenBoot boot code does not understand more than TFTP and simple I/O. Quote from Sun: "Often, the program loaded and executed by the boot process is a secondary boot program whose purpose is to load yet another program. This secondary boot program may use a protocol different from that used by OpenBoot to load the secondary boot program. For example, OpenBoot might use the Trivial File Transfer Protocol (TFTP) to load the secondary boot program while the secondary boot program might then use the Network File System (NFS) protocol to load the operating system. Typical secondary boot programs accept arguments of the form: filename -flags where filename is the name of the file containing the operating system and where -flags is a list of options controlling the details of the start-up phase of either the secondary boot program, the operating system or both."
Pros: Bootcode in the EPROM can be small and simple, and need to know only the Right Things; but in contrast to the conventional lilo-style boot, you can have a real comfortable boot prompt, with fq path name to the kernel etc.
Cons: If your hdd or whereever you load the second loader from is broken you got a problem.
With a litte extensions to the BIOS (network!), this is a fancy lilo.
- The "we waste some space on hd only for our kernels" approach: BSD, DOS+loadlin
A simple filesystem on a special partition.
Pros: We do not need to know anything of a complex filesystem; but we can use different kernel images.
Cons: Where are the pros, I have all those with lilo already. Stupid thing.
- The "we implement a complex fs, network, cdrom, tape, ... <fill in your favorite killer device driver, at least 512k in size>" approach:
Ok, why not just implement it in the firmware of your harddisk? Imagine, an ext2fs harddisk :-). This is the bootrom-on-my-nic-approach.
What we wanted (David Kennedy): - Network boot - Boot from any partition - Booting a Linux kernel directly/Filesystem support, so we can easily specify above Linux kernel - A powerful BIOS UI (most likely command-line driven) - Extended hardware diagnostics in flash ROM
To conclude, I think the only interesting thing is to improve lilo; without replacing the entire BIOS, I do not see any possibility to make things like diskless boot etc. work without Boot EPROMS on NICs. The best thing IMHO is to adopt OpenBoot for 80x86 machines. It has a well-thought concept, an UI (huh, forth :-), you can write your own hardware diagnostics, and with the secondary-loader-approach, you can do the other things as well.
--- OpenBIOS -- http://www.linkscape.net/openbios/ openbios-request@linkscape.net Body: un/subscribe Problems? dcinege@psychosis.com
On Fri, 27 Feb 1998, Florian Wunderlich wrote:
Here's the summary of our discussion about booting the OS and how it is done in the minicomputer world. This is not about integrating a new HAL into the BIOS; its just about how the BIOS should load and execute an OS from disk/net/... .
A very good summary. Too bad I'm snipping most of it :)
To conclude, I think the only interesting thing is to improve lilo; without replacing the entire BIOS, I do not see any possibility to make things like diskless boot etc. work without Boot EPROMS on NICs.
Other bootloaders (Norton's Sytem Commander, I belive it is called, and OS/2s, and others) actually use a partition on the disk. It would be nice to see a version of LILO that did the same, and used that extra space to support various filesystems.
The best thing IMHO is to adopt OpenBoot for 80x86 machines. It has a well-thought concept, an UI (huh, forth :-), you can write your own hardware diagnostics, and with the secondary-loader-approach, you can do the other things as well.
I agree, for a few reasons. OpenBoot does seem to be fairly well done, and more importantly it is a developed standard. We really shouldn't rush out to invent a standard when we have an already existing one that seems to have promise.
Off-the-wall idea #132: How much legacy BIOS support do we really need *just* to boot DOS to the point that it loads config.sys and/or autoexec.bat? If we supported just that much, and then had a program you ran (first) in DOS that basically put a legacy BIOS in as if the real BIOS had been shadowed, then we have the best of both worlds. A great BIOS with that supports all the nice boot-stuff w/o too much legacy code, but available legacy code when you need it for DOS.
Granted, emergency repairs to DOS/Win95 will be a pain (your rescue boot disk will have to have the BIOS program on it), but most people who will use this will do so for the OpenBoot support, which means they have another OS to help them along.
-- Chris Arguin | "...All we had were Zeros and Ones -- And Chris.Arguin@unh.edu | sometimes we didn't even have Ones." +--------------+ - Dilbert, by Scott Adams http://leonardo.sr.unh.edu/arguin/home.html |
--- OpenBIOS -- http://www.linkscape.net/openbios/ openbios-request@linkscape.net Body: un/subscribe Problems? dcinege@psychosis.com
Chris Arguin wrote:
Off-the-wall idea #132: How much legacy BIOS support do we really need *just* to boot DOS to the point that it loads config.sys and/or autoexec.bat? If we supported just that much, and then had a program you ran (first) in DOS that basically put a legacy BIOS in as if the real BIOS had been shadowed, then we have the best of both worlds. A great BIOS with that supports all the nice boot-stuff w/o too much legacy code, but available legacy code when you need it for DOS.
I can answer that,
Int 10h, function Eh teletype ouput mostly trivial for serial port redirect, done for you with most vga cards Int 11h get equipment config trivial Int 12h mem size trivial Int 13h function 0,1,2 disk read write reset not trivial, probably don't need write for boot, some dos need funct 8 Int 16h function 0,1 keyboard poll and read mostly trivial for serial port redirect, don't know about PC keyboard Int 1Ah function 0,1,2,3 RTC ok if only stub code to return a valid constant - must not return nonsense Int 19h Bootstrap trivial
You also need the adapter scan stuff if you intend to use vga or disk controllers with on-board bios.
Jim
--- OpenBIOS -- http://www.linkscape.net/openbios/ openbios-request@linkscape.net Body: un/subscribe Problems? dcinege@psychosis.com
Jim Stewart wrote:
Chris Arguin wrote:
Off-the-wall idea #132: How much legacy BIOS support do we really need *just* to boot DOS to the point that it loads config.sys and/or autoexec.bat? If we supported just that much, and then had a program you ran (first) in DOS that basically put a legacy BIOS in as if the real BIOS had been shadowed, then we have the best of both worlds. A great BIOS with that supports all the nice boot-stuff w/o too much legacy code, but available legacy code when you need it for DOS.
I can answer that,
Int 10h, function Eh teletype ouput mostly trivial for serial port
redirect, done for you with most vga cards Int 11h get equipment config trivial Int 12h mem size trivial Int 13h function 0,1,2 disk read write reset not trivial, probably don't need write for boot, some dos need funct 8 Int 16h function 0,1 keyboard poll and read mostly trivial for serial port redirect, don't know about PC keyboard Int 1Ah function 0,1,2,3 RTC ok if only stub code to return a valid constant - must not return nonsense Int 19h Bootstrap trivial
Why any legacy BIOS support? The answer to this question, in my opinion, highly depends on the hardware and operating systems that are going to be supported.Are those operating systems Intel x86 compatible, then the operating systems fall into three categories:
* real-mode OSs (eg. MS-DOS and the like) * 286-protected mode OSs * 386 protected mode OSs o using segmented model o using flat model
To access PCI BIOS functions, only 386 flat model 386 protected mode OSs (32-bit OSs) do NOT use INT 1Ah. However the calling program does execute a far call to the BIOS entry point. PCI BIOS supports both 16-bit and 32-bit calls.At the other hand if there should be extensive testing in the OpenBIOS (POST), then you are already implementing lots of low-level routines, up to a certain level quite the same as the ints.
You also need the adapter scan stuff if you intend to use vga or disk controllers with on-board bios.
Jim
Can't do without ROM scan if you intend to use video above CGA, SCSI or other adapters with onboard ROM.
-------------------------------------------------------------------------------------------- Alle Metzlar Matrix Technologies P.O. Box 40, NL 1724 ZG Oudkarspel The Netherlands Tel: (+31) 226 316889 Fax: (+31) 226 312157 EMail: matrix@xs4all.nl WWW: http://www.xs4all.nl/~matrix/ (Matrix Technologies' BIOS Web) -------------------------------------------------------------------------------------------- Author of: Het BIOS boekje, Uitg. Pim Oets, ISBN 90-5722-013X Das BIOS Buch, Franzis' Verlag, ISBN 3-7723-4832-7 Die BIOS CD-ROM, Franzis' Verlag, ISBN 3-7723-8612-1 --------------------------------------------------------------------------------------------