summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2000-01-03 15:28:05 +0000
committernyan <nyan@FreeBSD.org>2000-01-03 15:28:05 +0000
commit1d91115edd58dad4b64dff8bfb94651ffb803799 (patch)
tree0568e03edc81808789858bc2ba8bdb41a08ab729 /sys/boot
parent12750741225484aa642de485db158821253092c9 (diff)
downloadFreeBSD-src-1d91115edd58dad4b64dff8bfb94651ffb803799.zip
FreeBSD-src-1d91115edd58dad4b64dff8bfb94651ffb803799.tar.gz
Fixed to get the BIOS geometry.
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/pc98/libpc98/biosdisk.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/boot/pc98/libpc98/biosdisk.c b/sys/boot/pc98/libpc98/biosdisk.c
index 3c548bd..fd3fa4a 100644
--- a/sys/boot/pc98/libpc98/biosdisk.c
+++ b/sys/boot/pc98/libpc98/biosdisk.c
@@ -958,15 +958,16 @@ bd_getbigeom(int bunit)
{
#ifdef PC98
- int unit = 0x80;
int hds = 0;
+ int unit = 0x80; /* IDE HDD */
u_int addr = 0xA155d;
+
while (unit < 0xa7) {
- if (*(u_char *)PTOV(addr) & ((1 << unit) & 0xf))
- if (++hds == bunit)
+ if (*(u_char *)PTOV(addr) & (1 << (unit & 0x0f)))
+ if (hds++ == bunit)
break;
if (++unit == 0x84) {
- unit = 0xa0;
+ unit = 0xa0; /* SCSI HDD */
addr = 0xA1482;
}
}
OpenPOWER on IntegriCloud