From: H. Peter Anvin Date: Tue, 16 Feb 2010 22:53:51 +0000 (-0800) Subject: core: use vk_append for function 0016h temp storage X-Git-Tag: syslinux-4.00-pre24^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7135a6783c4ca37f3b9f3baa87573a3f61060db4;p=profile%2Fivi%2Fsyslinux.git 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 --- 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