Add CD-ROM mode query to the COM32 interface
authorH. Peter Anvin <hpa@zytor.com>
Fri, 10 Oct 2008 22:01:19 +0000 (15:01 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Fri, 10 Oct 2008 22:01:19 +0000 (15:01 -0700)
Report the booting mode of ISOLINUX through the COM32 interface.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
com32/include/syslinux/config.h
core/comboot.inc
doc/comboot.txt

index 82225c1..6983f8a 100644 (file)
@@ -97,7 +97,7 @@ union syslinux_derivative_info {
     uint8_t filesystem;
     uint8_t ah;
     uint8_t sector_shift;
-    uint8_t ch;
+    uint8_t cd_mode;
     uint8_t drive_number;
     uint8_t dh;
     uint16_t _pad;
index ca11852..810d825 100644 (file)
@@ -604,6 +604,10 @@ comapi_derinfo:
 %elif IS_ISOLINUX
                mov P_ES,cs
                mov P_BX,spec_packet
+               mov ax,[BIOSType]
+               sub ax,bios_cdrom
+               shr ax,2
+               mov P_CH,al             ; Mode (el torito/cbios/ebios)
 %endif
 %endif
                clc
index 42078ed..8c4a868 100644 (file)
@@ -441,6 +441,10 @@ AX=000Ah [2.00]    Get Derivative-Specific Information
        Output: AL      33h (ISOLINUX)
                DL      drive number
                CL      11 (sector size as a power of 2) [3.35]
+               CH      mode [3.73]
+                       0 = El Torito
+                       1 = Hybrid (hard disk), CBIOS mode
+                       2 = Hybrid (hard disk), EBIOS mode
                ES:BX   pointer to El Torito spec packet
                FS:SI   pointer to initial ES:DI value [3.53]
 
@@ -798,6 +802,9 @@ AX=0019h [3.50] Read disk [SYSLINUX, ISOLINUX, EXTLINUX]
        This routine reports "boot failed" (and does not return) on
        disk error.
 
+       Note: for ISOLINUX in hybrid mode, this call uses simulated
+       2048-byte CD-ROM sector numbers.
+
 
 AX=001Ah [3.50] Cleanup, shuffle and boot to flat protected mode
        Input:  AX      001Ah