[syslinux:pathbased] core: use vk_append for function 0016h temp storage
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Tue Feb 16 14:57:09 PST 2010
Commit-ID: 7135a6783c4ca37f3b9f3baa87573a3f61060db4
Gitweb: http://syslinux.zytor.com/commit/7135a6783c4ca37f3b9f3baa87573a3f61060db4
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Tue, 16 Feb 2010 14:53:51 -0800
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Tue, 16 Feb 2010 14:53:51 -0800
core: use vk_append for function 0016h temp storage
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 at zytor.com>
---
core/comboot.inc | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/core/comboot.inc b/core/comboot.inc
index 74ec55d..d7186d5 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
More information about the Syslinux-commits
mailing list