1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00
freebsd/sys/amd64
Luigi Rizzo 60cf2c1254 Export a (machine dependent) kernel variable bootdev as
machdep.guessed_bootdev, and add code to sysctl to parse its value
and give a (not necessarily correct) name to the device we booted
from (the main motivation for this code is to use the info in the
PicoBSD boot scripts, and the impact on the kernel is minimal).

NOTE: the information available in bootdev is not always reliable,
so you should not trust it too much.  The parsing code is the same
as in boot2.c, and cannot cover all cases -- as it is, it seems to
work fine with floppies and IDE disks recognised by the BIOS. It
_should_ work as well with SCSI disks recognised by the BIOS.
Booting from a CDROM in floppy emulation will return /dev/fd0 (because
this is what the BIOS tells us).
Booting off the network (e.g. with etherboot) leaves bootdev unset so
the value will be printed as "invalid (0xffffffff)".

Finally, this feature might go away at some point, hopefully when we
have a more reliable way to get the same information.

MFC-after: 5 days
2002-03-10 20:08:44 +00:00
..
acpica Fix typo in function name. 2002-01-10 03:26:46 +00:00
amd64 Export a (machine dependent) kernel variable bootdev as 2002-03-10 20:08:44 +00:00
conf Re-enable WITNESS for GENERIC. Since the 5.x branch is mostly about 2002-02-13 18:47:50 +00:00
include Add needed includes of machine/smp.h, remove nested include in sys/smp.h 2002-03-07 04:43:51 +00:00
isa Back out all the pmap related stuff I've touched over the last few days. 2002-02-27 09:51:33 +00:00
pci The Libretto L series has no $PIR table, but does have a _PIR table. 2002-01-20 03:28:29 +00:00
Makefile Update pathnames for creation of tags file. 2001-12-05 01:23:21 +00:00