summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2009-04-14 11:20:03 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2009-04-14 11:20:03 -0700
commit7c761e266caafb590e5d1c5698a1e011ebdd93ae (patch)
tree387befdea090e6dca806b6a724dd5a0c688c808e
parentf4f69c52bfdac6a71e090006198f5f81069c5544 (diff)
downloadsyslinux-7c761e266caafb590e5d1c5698a1e011ebdd93ae.tar.gz
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 <hpa@linux.intel.com>
-rw-r--r--core/bootsect.inc4
-rw-r--r--core/pxelinux.asm4
-rw-r--r--core/runkernel.inc8
-rw-r--r--core/ui.inc19
4 files changed, 14 insertions, 21 deletions
diff --git a/core/bootsect.inc b/core/bootsect.inc
index 27809586..bb7e82e8 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 370cc2bb..906c40bc 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 44c00289..2d987738 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 d59143bb..53401bf1 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