summaryrefslogtreecommitdiff
path: root/core/com32.inc
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@linux.intel.com>2011-05-24 10:45:51 +0100
committerMatt Fleming <matt.fleming@intel.com>2011-12-02 12:13:30 +0000
commit14531c47bc9577e56301884a9cd64dc4f651220b (patch)
tree225c242abc52b247810a40763b2a86682db849ac /core/com32.inc
parent323eeba0fada24cbaa99b18e099844c975e1366a (diff)
downloadsyslinux-14531c47bc9577e56301884a9cd64dc4f651220b.tar.gz
core: Delete code that is duplicated in ldlinux
Lots of code that used to be implemented in the core is now implemented in ldlinux, but code from core was never deleted. Purge this code. Also, move all com32 loading to ldlinux since we need to be able to do various command line things (which are no longer available in the core). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'core/com32.inc')
-rw-r--r--core/com32.inc83
1 files changed, 0 insertions, 83 deletions
diff --git a/core/com32.inc b/core/com32.inc
index 111590c3..929f50ec 100644
--- a/core/com32.inc
+++ b/core/com32.inc
@@ -31,91 +31,8 @@
;
com32_entry equ free_high_memory
- section .text16
-is_com32_image:
- push si ; Save file handle
- push eax ; Save file length
-
- call make_plain_cmdline
- ; Copy the command line into the low cmdline buffer
- mov ax,real_mode_seg
- mov fs,ax
- mov si,cmd_line_here
- mov di,command_line
- mov cx,[CmdLinePtr]
- inc cx ; Include final null
- sub cx,si
- fs rep movsb
-
- mov si,KernelName
- mov di,Com32Name
- call strcpy
-
- call comboot_setup_api ; Set up the COMBOOT-style API
-
- mov edi,com32_entry ; Load address
- pop eax ; File length
- pop si ; File handle
- xor dx,dx ; No padding
- mov bx,abort_check ; Don't print dots, but allow abort
- call load_high
-
- mov esi,com32_entry
- mov edi,trackbuf
- mov ecx,5
- call bcopy
- cmp dword [trackbuf],0xcd4cfeb8
- jne not_com32r
- cmp byte [trackbuf+4],0x21
- jne not_com32r
-
-com32_start:
- ;
- ; Point the stack to the end of (permitted) high memory
- ;
- mov eax,[HighMemRsvd]
- xor ax,ax ; Align to a 64K boundary
- mov [PMESP],eax
- mov ebx,.pm ; Where to go in PM
- jmp enter_pm
-
-;
-; This is invoked right before the actually starting the COM32
-; progam, in 32-bit mode...
-;
- bits 32
- section .text
-.pm:
- ; Set up the calling stack frame
-
- push dword pm_api_vector
- push dword Com32Name ; Module filename
- push dword [HighMemSize] ; Memory managed by Syslinux
- push dword core_cfarcall ; Cfarcall entry point
- push dword core_farcall ; Farcall entry point
- push dword (1 << 16) ; 64K bounce buffer
- push dword core_real_mode ; Bounce buffer address
- push dword core_intcall ; Intcall entry point
- push dword command_line ; Command line pointer
- push dword 9 ; Argument count
- sti ; Interrupts OK now
- call com32_entry ; Run the program...
- ; ... on return, fall through to com32_exit ...
-com32_exit:
- mov bx,comboot_return
- jmp enter_rm
-
bits 16
- section .text16
-not_com32r:
- mov si,KernelName
- call writestr
- mov si,not_com32r_msg
- call writestr
- jmp enter_command
-
section .data16
-not_com32r_msg db ': not a COM32R image', CR, LF, 0
; Ersatz com32 invocation structure, to make libcom32
; code run the same if linked to the core. This is in