aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2021-04-13 20:30:20 +0100
committerMichael Brown <mcb30@ipxe.org>2021-04-13 20:42:55 +0100
commit8ca43ccbc1984d60e50711ea326ca59ac03985d2 (patch)
tree36eec3856114d9aee452701e009b4b352873c267
parent3ae83222ce611afacd98419c0073aa98fb97f9e7 (diff)
downloadipxe-8ca43ccbc1984d60e50711ea326ca59ac03985d2.zip
ipxe-8ca43ccbc1984d60e50711ea326ca59ac03985d2.tar.gz
ipxe-8ca43ccbc1984d60e50711ea326ca59ac03985d2.tar.bz2
[int13] Do not report INT 13 extension support for emulated floppies
The INT 13 extensions provide a mechanism for accessing disks using linear (LBA) rather than C/H/S addressing. SAN protocols such as iSCSI invariably support only linear addresses and so iPXE currently provides LBA access to all SAN disks (with autodetection and emulation of an appropriate geometry for C/H/S accesses). Most BIOSes will not report support for INT 13 extensions for floppy disk drives, and some operating systems may be confused by a floppy drive that claims such support. Minimise surprise by reporting the existence of support for INT 13 extensions only for non-floppy drive numbers. Continue to provide support for all drive numbers, to avoid breaking operating systems that may unconditionally use the INT 13 extensions without first checking for support. Reported-by: Valdo Toost <vtoost@hot.ee> Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/arch/x86/interface/pcbios/int13.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/x86/interface/pcbios/int13.c b/src/arch/x86/interface/pcbios/int13.c
index 30530e1..d6c4d7e 100644
--- a/src/arch/x86/interface/pcbios/int13.c
+++ b/src/arch/x86/interface/pcbios/int13.c
@@ -678,10 +678,10 @@ static int int13_get_disk_type ( struct san_device *sandev,
* @ret cx Extensions API support bitmap
* @ret status Status code / API version
*/
-static int int13_extension_check ( struct san_device *sandev __unused,
+static int int13_extension_check ( struct san_device *sandev,
struct i386_all_regs *ix86 ) {
- if ( ix86->regs.bx == 0x55aa ) {
+ if ( ( ix86->regs.bx == 0x55aa ) && ! int13_is_fdd ( sandev ) ) {
DBGC2 ( sandev, "INT13 extensions installation check\n" );
ix86->regs.bx = 0xaa55;
ix86->regs.cx = ( INT13_EXTENSION_LINEAR |