summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/libi386/bootinfo64.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-11-05 18:58:33 +0000
committerjhb <jhb@FreeBSD.org>2001-11-05 18:58:33 +0000
commit094cb29b1151595b1d62c786f4f942d3a11fe157 (patch)
tree0052d165cb914858205c5e81032180dff27ccb6e /sys/boot/i386/libi386/bootinfo64.c
parentc077e35a66d15f941c73fdf96aeb87b7a6387c51 (diff)
downloadFreeBSD-src-094cb29b1151595b1d62c786f4f942d3a11fe157.zip
FreeBSD-src-094cb29b1151595b1d62c786f4f942d3a11fe157.tar.gz
Add a device driver for the BIOS device for CD-ROM's booted via El Torito
no emulation mode. Unlike other BIOS devices, this device uses 2048 byte sectors. Also, the bioscd driver does not have to worry about slices or partitions.
Diffstat (limited to 'sys/boot/i386/libi386/bootinfo64.c')
-rw-r--r--sys/boot/i386/libi386/bootinfo64.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/sys/boot/i386/libi386/bootinfo64.c b/sys/boot/i386/libi386/bootinfo64.c
index 9b1368c..8e5c752 100644
--- a/sys/boot/i386/libi386/bootinfo64.c
+++ b/sys/boot/i386/libi386/bootinfo64.c
@@ -277,21 +277,30 @@ bi_load(char *args, int *howtop, int *bootdevp, vm_offset_t *bip)
bootdevnr = 0;
switch(rootdev->d_type) {
+ case DEVT_CD:
+ /* Pass in BIOS device number. */
+ bi.bi_bios_dev = bc_unit2bios(rootdev->d_kind.bioscd.unit);
+ bootdevnr = bc_getdev(rootdev);
+ if (bootdevnr != -1)
+ *howtop |= RB_CDROM;
+ break;
+
case DEVT_DISK:
/* pass in the BIOS device number of the current disk */
bi.bi_bios_dev = bd_unit2bios(rootdev->d_kind.biosdisk.unit);
bootdevnr = bd_getdev(rootdev);
- if (bootdevnr != -1)
- break;
- printf("root device %s invalid\n", i386_fmtdev(rootdev));
- return(EINVAL);
-
+ break;
+
case DEVT_NET:
break;
default:
printf("WARNING - don't know how to boot from device type %d\n", rootdev->d_type);
}
+ if (bootdevnr == -1) {
+ printf("root device %s invalid\n", i386_fmtdev(rootdev));
+ return (EINVAL);
+ }
free(rootdev);
*bootdevp = bootdevnr;
OpenPOWER on IntegriCloud