From 10301a9ee604a4cab5fd245beb408c83ff30049f Mon Sep 17 00:00:00 2001 From: hpa Date: Wed, 17 Aug 2005 05:11:10 +0000 Subject: [PATCH] Add localboot API call --- NEWS | 2 ++ comboot.doc | 40 ++++++++++++++++++++++++++++++++++++++++ comboot.inc | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+) diff --git a/NEWS b/NEWS index e38f0b4..5b1bc03 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,8 @@ Changes in 3.10: * Fix PCI handing (ethersel etc) on several old chipsets (and VMWare.) * Try to deal with systems with broken EBIOS. + * New API call to do "localboot". + * New API call to query features. Changes in 3.09: * gcc4 compilation fix. diff --git a/comboot.doc b/comboot.doc index ee2ca07..8680b71 100644 --- a/comboot.doc +++ b/comboot.doc @@ -460,6 +460,8 @@ AX=000Ch [2.00] Perform final cleanup ISOLINUX: 0000h Normal cleanup + EXTLINUX: 0000h Normal cleanup + All other values are undefined, and may have different meanings in future versions of SYSLINUX. @@ -583,3 +585,41 @@ AX=0013h [3.08] Idle loop call any periodic activities required by the filesystem code. At the moment, this is a no-op on all derivatives except PXELINUX, where it executes PXE calls to answer ARP queries. + + Note: it's safe to call this API call on previous SYSLINUX + versions (2.00 or later); it will just harmlessly fail. If + API call INT 22h, AX=0015h, bit 1 is set, there is no reason + (but safe) to call this routine. + + +AX=0014h [3.10] Local boot [PXELINUX, ISOLINUX] + Input: AX 0014h + DX Local boot parameter + Output: Does not return + + This function invokes the equivalent of the "localboot" + configuration file option. The parameter in DX is the same + parameter as would be entered after "localboot" in the + configuration file; this parameter is derivative-specific -- + see syslinux.doc for the definition. + + +AX=0015h [3.10] Get feature flags + Input: AX 0015h + Output: ES:BX pointer to flags in memory + CX number of flag bytes + + This function reports whether or not this SYSLINUX version and + derivative supports specific features. Keep in mind that + future versions might have more bits; remember to treat any + bits beyond the end of the array (as defined by the value in + CX) as zero. + + Currently the following feature flag is defined: + + Byte Bit Definition + ---------------------------------------------------- + 0 0 Local boot (AX=0014h) supported + 1 Idle loop call (AX=0013h) is a no-op + + All other flags are reserved. diff --git a/comboot.inc b/comboot.inc index dfe57b6..a065192 100644 --- a/comboot.inc +++ b/comboot.inc @@ -652,6 +652,28 @@ comapi_idle: clc ret +; +; INT 22h AX=0014h Local boot +; +%if IS_PXELINUX || IS_ISOLINUX +comapi_localboot: + mov ax,P_DX + jmp local_boot +%else +comapi_localboot equ comapi_err +%endif + +; +; INT 22h AX=0015h Feature flags +; +comapi_features: + mov P_ES,cs + mov P_BX,feature_flags + mov P_CX,feature_flags_len + clc + ret + + section .data int21_table: int21 00h, comboot_return int21 01h, comboot_getkey @@ -687,7 +709,21 @@ int22_table: dw comapi_maxshuffle ; 0011 maximum shuffle descriptors dw comapi_shuffle ; 0012 cleanup, shuffle and boot dw comapi_idle ; 0013 idle call + dw comapi_localboot ; 0014 local boot + dw comapi_features ; 0015 feature flags int22_count equ ($-int22_table)/2 APIKeyWait db 0 APIKeyFlag db 0 + +; +; This is the feature flag array for INT 22h AX=0015h +feature_flags: +%if IS_PXELINUX + db 1 ; Have local boot, idle not noop +%elif IS_ISOLINUX + db 3 ; Have local boot, idle is noop +%else + db 2 ; No local boot, idle is noop +%endif +feature_flags_len equ ($-feature_flags) -- 2.7.4