diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-01-24 15:13:11 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-01-24 15:13:11 -0800 |
commit | c656897fd2f4ca76e5d6e2a871a858588de0d312 (patch) | |
tree | abe137e0a15f38449b6e355563fd74233d210671 | |
parent | d0c3ada6595e3d86f41c27b5a9b5ea6e399edfe9 (diff) | |
download | syslinux-elf-c656897fd2f4ca76e5d6e2a871a858588de0d312.tar.gz syslinux-elf-c656897fd2f4ca76e5d6e2a871a858588de0d312.tar.xz syslinux-elf-c656897fd2f4ca76e5d6e2a871a858588de0d312.zip |
New API call: read disk.
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | comboot.doc | 23 | ||||
-rw-r--r-- | comboot.inc | 25 |
3 files changed, 48 insertions, 1 deletions
@@ -18,6 +18,7 @@ Changes in 3.35: To install ldlinux.sys in a subdirectory, pass the -d directory option to the SYSLINUX installer. + * New API call: read disk. Changes in 3.31: * The simple menu system (menu.c32 and vesamenu.c32) now diff --git a/comboot.doc b/comboot.doc index e7627793..c99522ec 100644 --- a/comboot.doc +++ b/comboot.doc @@ -362,8 +362,10 @@ AX=000Ah [2.00] Get Derivative-Specific Information [SYSLINUX, EXTLINUX] Input: AX 000Ah + CL 9 (to get a valid return in CL for all versions) Output: AL 31h (SYSLINUX), 34h (EXTLINUX) DL drive number + CL sector size as a power of 2 (9 = 512 bytes) [3.35] ES:BX pointer to partition table entry (if DL >= 80h) Note: This function was broken in EXTLINUX 3.00-3.02. @@ -413,6 +415,7 @@ AX=000Ah [2.00] Get Derivative-Specific Information Input: AX 000Ah Output: AL 33h (ISOLINUX) DL drive number + CL 11 (sector size as a power of 2) [3.35] ES:BX pointer to El Torito spec packet Note: Some very broken El Torito implementations do @@ -718,3 +721,23 @@ AX=0018h [3.30] Query custom font This call queries if a custom display font has been loaded via the "font" configuration file command. If no custom font has been loaded, AL contains zero. + + +AX=0019h [3.35] Read disk [SYSLINUX, ISOLINUX, EXTLINUX] + Input: AX 0019h + EDX Sector number + ESI Reserved - MUST BE ZERO + EDI Reserved - MUST BE ZERO + CX Sector count + ES:BX Buffer address + Output: None + + Read disk blocks from the active filesystem (partition); for + disks, sector number zero is the boot sector. For ISOLINUX, + this call reads the CD-ROM. + + For compatiblity with all systems, the buffer should + *neither* cross 64K boundaries, *nor* wrap around the segment. + + This routine reports "boot failed" (and does not return) on + disk error. diff --git a/comboot.inc b/comboot.inc index 5fda9687..fcaa3a7a 100644 --- a/comboot.inc +++ b/comboot.inc @@ -466,6 +466,7 @@ comapi_derinfo: mov P_DL,al mov P_ES,cs mov P_BX,PartInfo + mov P_CL,SECTOR_SHIFT %elif IS_PXELINUX mov ax,[APIVer] mov P_DX,ax @@ -482,6 +483,7 @@ comapi_derinfo: mov P_DL,al mov P_ES,cs mov P_BX,spec_packet + mov P_CL,SECTOR_SHIFT %endif clc ret @@ -769,7 +771,27 @@ comapi_userfont: mov P_AL,al ret - +; +; INT 22h AX=0019h Read disk +; +%if IS_SYSLINUX || IS_MDSLINUX || IS_ISOLINUX || IS_EXTLINUX +comapi_readdisk: + mov esi,P_ESI ; Enforce ESI == EDI == 0, these + or esi,P_EDI ; are reserved for future expansion + jnz .err + mov eax,P_EDX + mov bp,P_CX + mov es,P_ES + mov bx,P_BX + call getlinsec + clc + ret +.err: + stc + ret +%else +comapi_readdisk equ comapi_err +%endif section .data @@ -818,6 +840,7 @@ int22_table: dw comapi_runkernel ; 0016 run kernel image dw comapi_usingvga ; 0017 report video mode change dw comapi_userfont ; 0018 query custom font + dw comapi_readdisk ; 0019 read disk int22_count equ ($-int22_table)/2 APIKeyWait db 0 |