summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/x86/lib/bios_setup.c6
-rw-r--r--arch/x86/lib/realmode.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/arch/x86/lib/bios_setup.c b/arch/x86/lib/bios_setup.c
index 053280b..0dfe4a1 100644
--- a/arch/x86/lib/bios_setup.c
+++ b/arch/x86/lib/bios_setup.c
@@ -78,7 +78,11 @@ static void setvector(int vector, u16 segment, void *handler)
int bios_setup(void)
{
- ulong bios_start = (ulong)&__bios_start + gd->reloc_off;
+ /*
+ * The BIOS section is not relocated and still in the ROM. The
+ * __bios_start symbol was adjusted, though, so adjust it back.
+ */
+ ulong bios_start = (ulong)&__bios_start - gd->reloc_off;
ulong bios_size = (ulong)&__bios_size;
static int done;
diff --git a/arch/x86/lib/realmode.c b/arch/x86/lib/realmode.c
index 5a525ee..bf0d0aa 100644
--- a/arch/x86/lib/realmode.c
+++ b/arch/x86/lib/realmode.c
@@ -30,7 +30,11 @@
int realmode_setup(void)
{
- ulong realmode_start = (ulong)&__realmode_start + gd->reloc_off;
+ /*
+ * The realmode section is not relocated and still in the ROM. The
+ * __realmode_start symbol was adjusted, though, so adjust it back.
+ */
+ ulong realmode_start = (ulong)&__realmode_start - gd->reloc_off;
ulong realmode_size = (ulong)&__realmode_size;
/* copy the realmode switch code */