summaryrefslogtreecommitdiff
path: root/comboot.inc
diff options
context:
space:
mode:
authorhpa <hpa>2002-10-25 06:47:20 +0000
committerhpa <hpa>2002-10-25 06:47:20 +0000
commitf805675eef4b2119d252465a211b643f79d17c7e (patch)
treef9fb4f2b050fda09e4587d955fee6c57c7987930 /comboot.inc
parentf4d22c42e89a52644c9453e246a20749d62470af (diff)
downloadsyslinux-f805675eef4b2119d252465a211b643f79d17c7e.tar.gz
LDLINUX: Fix "kaboom" bug when booting off hard disksyslinux-2.00-pre15
Provide an API call for "perform final cleanup"
Diffstat (limited to 'comboot.inc')
-rw-r--r--comboot.inc22
1 files changed, 22 insertions, 0 deletions
diff --git a/comboot.inc b/comboot.inc
index d7b03a70..15b25fce 100644
--- a/comboot.inc
+++ b/comboot.inc
@@ -479,6 +479,27 @@ comapi_serialcfg:
ret
;
+; INT 22h AX=000Ch Perform final cleanup
+;
+comapi_cleanup:
+%if IS_PXELINUX
+ ; Unload PXE if requested
+ test dl,3
+ setnz [KeepPXE]
+ call unload_pxe
+%elif IS_SYSLINUX
+ ; Restore original FDC table
+ mov eax,[OrigFDCTabPtr]
+ mov [fdctab],eax
+%endif
+ ; Reset the floppy disk subsystem
+ xor ax,ax
+ xor dx,dx
+ int 13h
+ clc
+ ret
+
+;
; This stuff should really be in the data section...
;
%macro int21 2
@@ -513,6 +534,7 @@ int22_table:
dw comapi_pxecall ; 0009 call PXE stack
dw comapi_derinfo ; 000A derivative-specific info
dw comapi_serialcfg ; 000B get serial port config
+ dw comapi_cleanup ; 000C perform final cleanup
int22_count equ ($-int22_table)/2
APIKeyWait db 0