Blame SOURCES/0005-Save-Dell-BIOS-chunk-in-PXELINUX.patch

b837a6
From e1db3e675ae4ccbeea5de9f4b74a618e42eac1a3 Mon Sep 17 00:00:00 2001
b837a6
From: Nick Bertrand <nick@physics.umn.edu>
b837a6
Date: Tue, 31 Jul 2012 19:00:05 -0700
b837a6
Subject: [PATCH] Save Dell BIOS chunk in PXELINUX
b837a6
b837a6
Our site has many Dell OptiPlex 790s, all of which are unable to use the
b837a6
'localboot' PXELINUX option as they either hang at 'Booting from local disk...'
b837a6
or immediately reboot depending on which SYSLINUX version is used. Many people
b837a6
have suggested using chain.c32 to chain load the local disk as a workaround,
b837a6
but this causes problems with Windows 7 BitLocker as it detects the chain load
b837a6
and forces the user to enter the recovery key. While searching for another
b837a6
option I determined that the problem seems to stem from the BIOS storing some
b837a6
information in the memory range 0x47CC-0x47FF, which is overwritten when
b837a6
PXELINUX loads. I couldn't figure out a clean way to avoid that memory region
b837a6
as it falls in the middle of the 4.x bss16 region, so I decided to create a
b837a6
copy of it instead. By copying that information out of the way during PXELINUX
b837a6
initialization and copying it back before returning control via 'localboot 0',
b837a6
the computer successfully boots to the local disk.
b837a6
b837a6
Some additional info:
b837a6
b837a6
BIOS revision: A13
b837a6
PXE versions: Intel Boot Agent GE v1.3.81, Intel Boot Agent PXE Base Code (PXE-2.1 build 089)
b837a6
Versions of SYSLINUX affected: 3.83, 4.03, 4.04, 4.05, possibly others
b837a6
Resulting symptom for localboot option vs SYSLINUX version:
b837a6
b837a6
      localboot 0  localboot -1
b837a6
3.83  Reboot       Reboot
b837a6
4.03  Reboot       Reboot
b837a6
4.04  Hang         Reboot
b837a6
4.05  Hang         Reboot
b837a6
b837a6
This patch does not fix the reboot issue when using 'localboot -1'. I believe
b837a6
this patch should also help those with OptiPlex 990s, but I don't have one to
b837a6
test with to confirm.
b837a6
b837a6
Below is a patch against commit 0a0e0e41cad93cd16c323cf16f40264a21eedd6c of
b837a6
the git.kernel.org/pub/scm/boot/syslinux/syslinux.git repository.
b837a6
b837a6
--
b837a6
---
b837a6
 core/pxelinux.asm | 18 ++++++++++++++++++
b837a6
 1 file changed, 18 insertions(+)
b837a6
b837a6
diff --git a/core/pxelinux.asm b/core/pxelinux.asm
b837a6
index e8818a6..b58ed2a 100644
b837a6
--- a/core/pxelinux.asm
b837a6
+++ b/core/pxelinux.asm
b837a6
@@ -132,6 +132,13 @@ _start1:
b837a6
 		mov ds,ax
b837a6
 		mov es,ax
b837a6
 
b837a6
+		; Copy chunk of memory used by Dell BIOS on OptiPlex 790s
b837a6
+		; Allows control to return to PXE Boot Agent for localboot
b837a6
+		mov esi,47cch
b837a6
+		mov edi,DellBIOSChunk
b837a6
+		mov ecx,13
b837a6
+		rep movsd
b837a6
+
b837a6
 %if 0 ; debugging code only... not intended for production use
b837a6
 		; Clobber the stack segment, to test for specific pathologies
b837a6
 		mov di,STACK_BASE
b837a6
@@ -289,6 +296,14 @@ local_boot:
b837a6
 		; Restore the environment we were called with
b837a6
 		pm_call reset_pxe
b837a6
 		call cleanup_hardware
b837a6
+
b837a6
+		; Copy Dell BIOS chunk back into place
b837a6
+		cld
b837a6
+		mov esi,DellBIOSChunk
b837a6
+		mov edi,47cch
b837a6
+		mov ecx,13
b837a6
+		rep movsd
b837a6
+
b837a6
 		lss sp,[InitStack]
b837a6
 		pop gs
b837a6
 		pop fs
b837a6
@@ -564,3 +579,6 @@ IPInfo:
b837a6
 .ServerIP	resd 1
b837a6
 .GatewayIP	resd 1
b837a6
 .Netmask	resd 1
b837a6
+
b837a6
+		section .earlybss
b837a6
+DellBIOSChunk   resd 13     ; 52 bytes to store Dell BIOS chunk
b837a6
-- 
b837a6
2.5.0
b837a6
b837a6