aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-12-04 21:51:46 +0000
committerMatt Fleming <matt.fleming@intel.com>2012-12-05 20:06:27 +0000
commit19eb366ea1945a88909c0b919980e54085e6b204 (patch)
treed7b014283c76bf3d1709ab90e02c1f97a1a3ac18
parenta8458c8f748a430137e25bd3ade8600978c828c3 (diff)
downloadsyslinux-19eb366ea1945a88909c0b919980e54085e6b204.tar.gz
syslinux-19eb366ea1945a88909c0b919980e54085e6b204.tar.xz
syslinux-19eb366ea1945a88909c0b919980e54085e6b204.zip
comboot: Mark API functions obsolete
Starting with Syslinux 5.00 the COMBOOT API is obsolete and should not be used by any modules. It is still used internally for some things, such as the ADV code in ldlinux.c32, but that will change in the future. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r--core/comboot.inc386
1 files changed, 37 insertions, 349 deletions
diff --git a/core/comboot.inc b/core/comboot.inc
index 92c43ff2..4474cd37 100644
--- a/core/comboot.inc
+++ b/core/comboot.inc
@@ -367,125 +367,6 @@ comapi_err:
ret
;
-; INT 22h AX=0001h Get SYSLINUX version
-;
-comapi_get_version:
- ; Number of API functions supported
- mov P_AX,int22_count
- ; SYSLINUX version
- mov P_CX,(VERSION_MAJOR << 8)+VERSION_MINOR
- ; SYSLINUX derivative ID byte
- mov P_DX,my_id
- ; For future use
- mov P_BX,cs ; cs == 0
-
- mov P_ES,ds
- ; ES:SI -> version banner
- mov P_SI,syslinux_banner + 2 ; Skip leading CR LF
- ; ES:DI -> copyright string
- mov P_DI,copyright_str + 1 ; Skip leading space
-
-comapi_nop:
- clc
- ret
-
-;
-; INT 22h AX=0002h Write string
-;
-; Write null-terminated string in ES:BX
-;
-comapi_writestr:
- mov ds,P_ES
- mov si,P_BX
- pm_call pm_writestr
- clc
- ret
-
-;
-; INT 22h AX=0003h Run command
-;
-; Terminates the COMBOOT program and executes the command line in
-; ES:BX as if it had been entered by the user.
-;
-comapi_run:
- mov es,P_ES
- mov bx,P_BX
- pm_call pm_env32_run
- ret
-
-;
-; INT 22h AX=0004h Run default command
-;
-; Terminates the COMBOOT program and executes the default command line
-; as if a timeout had happened or the user pressed <Enter>.
-;
-comapi_run_default:
- push auto_boot
- jmp comboot_exit
-
-;
-; INT 22h AX=0005h Force text mode
-;
-; Puts the video in standard text mode
-;
-comapi_textmode:
- pm_call syslinux_force_text_mode
- clc
- ret
-
-;
-; INT 22h AX=0006h Open file
-;
-comapi_open:
- mov es,P_ES
- mov si,P_SI
- pm_call pm_open_file
- mov P_EAX,eax
- mov P_CX,cx
- mov P_SI,si
- ret
-
-;
-; INT 22h AX=0007h Read file
-;
-comapi_read:
- mov es,P_ES
- mov bx,P_BX
- mov si,P_SI
- mov cx,P_CX
- pm_call getfssec
- jnc .noteof
- xor si,si ; SI <- 0 on EOF, CF <- 0
-.noteof: mov P_SI,si
- mov P_ECX,ecx
- ret
-
-;
-; INT 22h AX=0008h Close file
-;
-comapi_close:
- mov si,P_SI
- pm_call pm_close_file
- clc
- ret
-
-;
-; INT 22h AX=0009h Call PXE stack
-;
-%if IS_PXELINUX
-comapi_pxecall:
- mov bx,P_BX
- mov es,P_ES
- mov di,P_DI
- call pxenv
- mov ax,[PXEStatus]
- mov P_AX,ax
- ret
-%else
-comapi_pxecall equ comapi_err ; Not available
-%endif
-
-;
; INT 22h AX=000Ah Get Derivative-Specific Info
;
comapi_derinfo:
@@ -532,180 +413,6 @@ comapi_derinfo:
ret
;
-; INT 22h AX=000Bh Get Serial Console Configuration
-;
-comapi_serialcfg:
- pm_call pm_serialcfg
- mov P_DX,ax
- mov P_CX,cx
- mov P_BX,bx
- clc
- ret
-
-;
-; INT 22h AX=000Ch Perform final cleanup
-;
-comapi_cleanup:
-%if IS_PXELINUX
- ; Unload PXE if requested
- test dl,3
- setnz [KeepPXE]
- sub bp,sp ; unload_pxe may move the stack around
- pm_call unload_pxe
- add bp,sp ; restore frame pointer...
-%elif IS_SYSLINUX || IS_EXTLINUX
- ; Restore original FDC table
- mov eax,[OrigFDCTabPtr]
- mov [fdctab],eax
-%endif
- pm_call cleanup_hardware
- clc
- ret
-
-;
-; INT 22h AX=000Dh Obsolete
-;
-
-;
-; INT 22h AX=000Eh Get configuration file name
-;
-comapi_configfile:
- mov P_ES,cs
- mov P_BX,ConfigName
- clc
- ret
-
-;
-; INT 22h AX=000Fh Get IPAPPEND strings
-;
-comapi_ipappend:
- mov P_ES,cs
- mov P_CX,numIPAppends
- mov P_BX,IPAppends
- clc
- ret
-
-;
-; INT 22h AX=0010h Resolve hostname
-;
-%if IS_PXELINUX
- extern pm_pxe_dns_resolv
-comapi_dnsresolv:
- mov ds,P_ES
- mov si,P_BX
- pm_call pm_pxe_dns_resolv
- mov P_EAX,eax
- clc
- ret
-%else
-comapi_dnsresolv equ comapi_err
-%endif
-
- section .text16
-
-;
-; INT 22h AX=0011h Obsolete
-;
-
-;
-; INT 22h AX=0012h Obsolete
-;
-
-;
-; INT 22h AX=0013h Idle call
-;
-comapi_idle:
- call do_idle
- clc
- ret
-
-;
-; INT 22h AX=0014h Local boot
-;
-comapi_localboot:
- mov ax,P_DX
- pm_call pm_local_boot
- ret
-
-;
-; 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
-
-;
-; INT 22h AX=0016h Run kernel image
-;
-comapi_runkernel:
- ret
-
-;
-; INT 22h AX=0017h Report video mode change
-;
-comapi_usingvga:
- mov ax,P_BX
- cmp ax,0Fh ; Unknown flags = failure
- ja .error
- mov cx,P_CX
- mov dx,P_DX
- pm_call pm_using_vga
- clc
- ret
-.error:
- stc
- ret
-
-;
-; INT 22h AX=0018h Query custom font
-;
-comapi_userfont:
- mov al,[UserFont]
- and al,al
- jz .done
- mov al,[VGAFontSize]
- pm_call pm_userfont
- mov P_ES,es
- mov P_BX,bx
-
-.done: ; CF=0 here
- mov P_AL,al
- ret
-
-;
-; INT 22h AX=0019h Read disk
-;
-%if IS_SYSLINUX || IS_ISOLINUX || IS_EXTLINUX
-comapi_readdisk:
- cmp P_EDI,0 ; Reserved for future expansion
- jnz .err
- mov eax,P_EDX
- mov edx,P_ESI
- mov es,P_ES
- mov bx,P_BX
- mov bp,P_CX ; WE CANNOT use P_* after touching bp!
- call getlinsec
- clc
- ret
-.err:
- stc
- ret
-%else
-comapi_readdisk equ comapi_err
-%endif
-
-;
-; INT 22h AX=001Ah Obsolete
-;
-
-;
-; INT 22h AX=001Bh Obsolete
-;
-
-;
; INT 22h AX=001Ch Get pointer to auxillary data vector
;
comapi_getadv:
@@ -720,41 +427,22 @@ comapi_getadv:
comapi_writeadv equ adv_write
;
-; INT 22h AX=001Eh Keyboard remapping table
-comapi_kbdtable:
- cmp P_DX,0
- jne .err
- mov P_AX,1 ; Version
- mov P_CX,256 ; Length
- mov P_ES,cs
- mov P_BX,KbdMap
- ret
-.err:
- stc
- ret
-
-;
-; INT 22h AX=001Fh Get current working directory
-;
-comapi_getcwd:
- mov P_ES,cs
- mov P_BX,CurrentDirName
- clc
- ret
-
-;
-; INT 22h AX=0023h Query shuffler size
-;
-comapi_shufsize:
- ; +15 is padding to guarantee alignment
- mov P_CX,__bcopyxx_len + 15
- ret
-
-;
; INT 22h AX=0024h Cleanup, shuffle and boot raw
;
comapi_shufraw:
- call comapi_cleanup
+%if IS_PXELINUX
+ ; Unload PXE if requested
+ test dl,3
+ setnz [KeepPXE]
+ sub bp,sp ; unload_pxe may move the stack around
+ pm_call unload_pxe
+ add bp,sp ; restore frame pointer...
+%elif IS_SYSLINUX || IS_EXTLINUX
+ ; Restore original FDC table
+ mov eax,[OrigFDCTabPtr]
+ mov [fdctab],eax
+%endif
+ pm_call cleanup_hardware
mov edi,P_EDI
mov esi,P_ESI
mov ecx,P_ECX
@@ -790,41 +478,41 @@ int21_count equ ($-int21_table)/3
alignz 2
int22_table:
dw comapi_err ; 0000 unimplemented syscall
- dw comapi_get_version ; 0001 get SYSLINUX version
- dw comapi_writestr ; 0002 write string
- dw comapi_run ; 0003 run specified command
- dw comapi_run_default ; 0004 run default command
- dw comapi_textmode ; 0005 force text mode
- dw comapi_open ; 0006 open file
- dw comapi_read ; 0007 read file
- dw comapi_close ; 0008 close file
- dw comapi_pxecall ; 0009 call PXE stack
+ dw comapi_err ; 0001 get SYSLINUX version
+ dw comapi_err ; 0002 write string
+ dw comapi_err ; 0003 run specified command
+ dw comapi_err ; 0004 run default command
+ dw comapi_err ; 0005 force text mode
+ dw comapi_err ; 0006 open file
+ dw comapi_err ; 0007 read file
+ dw comapi_err ; 0008 close file
+ dw comapi_err ; 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
+ dw comapi_err ; 000B get serial port config
+ dw comapi_err ; 000C perform final cleanup
dw comapi_err ; 000D clean up then bootstrap
- dw comapi_configfile ; 000E get name of config file
- dw comapi_ipappend ; 000F get ipappend strings
- dw comapi_dnsresolv ; 0010 resolve hostname
+ dw comapi_err ; 000E get name of config file
+ dw comapi_err ; 000F get ipappend strings
+ dw comapi_err ; 0010 resolve hostname
dw comapi_err ; 0011 maximum shuffle descriptors
dw comapi_err ; 0012 cleanup, shuffle and boot
- dw comapi_idle ; 0013 idle call
- dw comapi_localboot ; 0014 local boot
- dw comapi_features ; 0015 feature flags
- 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
+ dw comapi_err ; 0013 idle call
+ dw comapi_err ; 0014 local boot
+ dw comapi_err ; 0015 feature flags
+ dw comapi_err ; 0016 run kernel image
+ dw comapi_err ; 0017 report video mode change
+ dw comapi_err ; 0018 query custom font
+ dw comapi_err ; 0019 read disk
dw comapi_err ; 001A cleanup, shuffle and boot to pm
dw comapi_err ; 001B cleanup, shuffle and boot to rm
dw comapi_getadv ; 001C get pointer to ADV
dw comapi_writeadv ; 001D write ADV to disk
- dw comapi_kbdtable ; 001E keyboard remapping table
- dw comapi_getcwd ; 001F get current working directory
+ dw comapi_err ; 001E keyboard remapping table
+ dw comapi_err ; 001F get current working directory
dw comapi_err ; 0020 open directory
dw comapi_err ; 0021 read directory
dw comapi_err ; 0022 close directory
- dw comapi_shufsize ; 0023 query shuffler size
+ dw comapi_err ; 0023 query shuffler size
dw comapi_shufraw ; 0024 cleanup, shuffle and boot raw
dw comapi_initadv ; 0025 initialize adv structure
int22_count equ ($-int22_table)/2