summaryrefslogtreecommitdiff
path: root/core/comboot.inc
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-02-16 14:53:51 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-02-16 14:53:51 -0800
commit7135a6783c4ca37f3b9f3baa87573a3f61060db4 (patch)
treedfaae4679e18f607d85278ffc0ec9f06f23da888 /core/comboot.inc
parent40861de7b2ff9fe7bbbe6c4fb22c43d7b20b47d2 (diff)
downloadsyslinux-7135a6783c4ca37f3b9f3baa87573a3f61060db4.tar.gz
core: use vk_append for function 0016h temp storagesyslinux-4.00-pre24
a) we have to copy the command line tail earlier - the pm_* calls may use xfer_buf_seg in particular. b) use vk_append rather than trackbuf; vk_append should definitely be unused. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/comboot.inc')
-rw-r--r--core/comboot.inc27
1 files changed, 14 insertions, 13 deletions
diff --git a/core/comboot.inc b/core/comboot.inc
index 74ec55dc..d7186d5e 100644
--- a/core/comboot.inc
+++ b/core/comboot.inc
@@ -747,6 +747,18 @@ comapi_runkernel:
cmp al,VK_TYPES-1
ja .error
mov [KernelType],al
+
+ ; It's not just possible, but quite likely, that ES:BX
+ ; points into real_mode_seg or xfer_buf_seg, so we
+ ; need to exercise some special care here... use
+ ; vk_append for temporary storage.
+ push ds
+ mov ds,P_ES
+ mov si,P_BX
+ mov di,vk_append
+ call strcpy
+ pop ds
+
push ds
mov ds,P_DS
mov si,P_SI
@@ -760,17 +772,6 @@ comapi_runkernel:
mov [Kernel_SI],si
mov [Kernel_EAX],eax
- ; It's not just possible, but quite likely, that ES:BX
- ; points into real_mode_seg or xfer_buf_seg, so we
- ; need to exercise some special care here... use
- ; trackbuf as an intermediary
- push ds
- mov ds,P_ES
- mov si,P_BX
- mov di,trackbuf
- call strcpy
- pop ds
-
%if IS_PXELINUX
mov al,P_CL
mov [IPAppend],al
@@ -783,10 +784,10 @@ comapi_runkernel:
push es
mov dx,real_mode_seg
mov es,dx
- mov si,trackbuf
+ mov si,vk_append
mov di,cmd_line_here
call strcpy
- mov byte [es:di-1],' ' ; Simulate APPEND
+ mov word [es:di-1],' ' ; Simulate APPEND: space plus null
pop es
mov [CmdLinePtr],di
mov word [CmdOptPtr],zero_string