diff options
author | kato <kato@FreeBSD.org> | 2000-08-31 10:24:06 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 2000-08-31 10:24:06 +0000 |
commit | c7d77e4693be48e5d6a80023b21ac47381232b42 (patch) | |
tree | 5d620db5e13216b2eb3d042749d02bb5896a491a /sys | |
parent | ed0f07d9dd6b385bdf4112d9942c821fb92d7695 (diff) | |
download | FreeBSD-src-c7d77e4693be48e5d6a80023b21ac47381232b42.zip FreeBSD-src-c7d77e4693be48e5d6a80023b21ac47381232b42.tar.gz |
The INT 1B BIOS call is used to obtain geometries of SASI/IDE hard
drives. Some IDE cards don't set propler information into BIOS work
are and their sector size were always recognized as 256 bytes/sector.
Pointed out by: jagarl@creator.club.ne.jp
Diffstat (limited to 'sys')
-rw-r--r-- | sys/boot/pc98/boot0.5/disk.s | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/boot/pc98/boot0.5/disk.s b/sys/boot/pc98/boot0.5/disk.s index 9366744..9d0db21 100644 --- a/sys/boot/pc98/boot0.5/disk.s +++ b/sys/boot/pc98/boot0.5/disk.s @@ -178,8 +178,22 @@ sasi_loop: testb %al, %dl jz no_sasi_unit movb $0x80, %dh - addb %ah, %dh - movb %dh, daua(%si) + addb %ah, %dh # %dh = DA/UA + movb %dh, daua(%si) # Store DA/UA + + # Try new sense command + push %ax + push %cx + movb %dh, %al + movb $0x84, %ah + int $0x1b + pop %cx + pop %ax + jc err_newsense + movw %bx, %dx + jmp found_sasi_unit + +err_newsense: movw $0x457, %bx # capacity & sector size of IDE HDD call read_biosparam orb %ah, %ah |