From: H. Peter Anvin Date: Tue, 14 Apr 2009 18:20:03 +0000 (-0700) Subject: pxelinux: fix the handling of KeepPXE X-Git-Tag: syslinux-3.75-pre1~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c761e266caafb590e5d1c5698a1e011ebdd93ae;p=profile%2Fivi%2Fsyslinux.git pxelinux: fix the handling of KeepPXE KeepPXE was broken in 3.74, because we tried to use both bits 0 and 1, but failed to actually test both bits. Instead, just use bit 0, but move the place where we clear the bits. Signed-off-by: H. Peter Anvin --- diff --git a/core/bootsect.inc b/core/bootsect.inc index 2780958..bb7e82e 100644 --- a/core/bootsect.inc +++ b/core/bootsect.inc @@ -117,8 +117,8 @@ replace_bootstrap: mov es,ax %if IS_PXELINUX - test byte [KeepPXE],01h - jz .stdstack + cmp byte [KeepPXE],0 + je .stdstack les di,[InitStack] ; Reset stack to PXE original jmp .stackok %endif diff --git a/core/pxelinux.asm b/core/pxelinux.asm index 370cc2b..906c40b 100644 --- a/core/pxelinux.asm +++ b/core/pxelinux.asm @@ -2000,8 +2000,8 @@ get_packet_gpxe: ; the memory. ; unload_pxe: - test byte [KeepPXE],01h ; Should we keep PXE around? - jnz reset_pxe + cmp byte [KeepPXE],0 ; Should we keep PXE around? + jne reset_pxe push ds push es diff --git a/core/runkernel.inc b/core/runkernel.inc index 44c0028..2d98773 100644 --- a/core/runkernel.inc +++ b/core/runkernel.inc @@ -95,12 +95,6 @@ construct_cmdline: ; parse_cmdline: mov di,cmd_line_here - xor ax,ax - mov [InitRDPtr],ax ; No initrd= option (yet) - mov [QuietBoot],al -%if IS_PXELINUX - and byte [KeepPXE],~2 -%endif .skipspace: mov al,[es:di] inc di .skipspace_loaded: @@ -176,7 +170,7 @@ opt_quiet: %if IS_PXELINUX opt_keeppxe: - or byte [KeepPXE],2 ; KeepPXE set by command line + or byte [KeepPXE],1 ; KeepPXE set by command line ret %endif diff --git a/core/ui.inc b/core/ui.inc index d59143b..53401bf 100644 --- a/core/ui.inc +++ b/core/ui.inc @@ -310,16 +310,6 @@ command_done: load_kernel: ; Load the kernel now ; -; Common initialization for all kernel types -; - xor ax,ax - mov [InitRDPtr],ax - mov [QuietBoot],al -%if IS_PXELINUX - mov [KeepPXE],al -%endif - -; ; First we need to mangle the kernel name the way DOS would... ; mov si,command_line @@ -603,6 +593,15 @@ kernel_good_saved: kernel_good: pushad + ; + ; Common initialization for all kernel types + ; + xor ax,ax + mov [InitRDPtr],ax + mov [QuietBoot],al +%if IS_PXELINUX + mov [KeepPXE],al +%endif mov si,KernelName mov di,KernelCName