[U-Boot] [RFC][PATCH 11/21] [x86] Fix copying of Real-Mode code into RAM
Graeme Russ
graeme.russ at gmail.com
Thu Mar 25 12:22:53 CET 2010
Now that the relocation offset is in Global Data, we can locate the BIOS
code in the U-Boot image
---
lib_i386/bios_setup.c | 2 +-
lib_i386/realmode.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib_i386/bios_setup.c b/lib_i386/bios_setup.c
index 6491e52..a92b77e 100644
--- a/lib_i386/bios_setup.c
+++ b/lib_i386/bios_setup.c
@@ -141,7 +141,7 @@ static void setvector(int vector, u16 segment, void *handler)
int bios_setup(void)
{
- ulong i386boot_bios = (ulong)&_i386boot_bios;
+ ulong i386boot_bios = (ulong)&_i386boot_bios + gd->reloc_off;
ulong i386boot_bios_size = (ulong)&_i386boot_bios_size;
static int done=0;
diff --git a/lib_i386/realmode.c b/lib_i386/realmode.c
index 3c3c1fc..b3f5123 100644
--- a/lib_i386/realmode.c
+++ b/lib_i386/realmode.c
@@ -37,7 +37,7 @@ extern char realmode_enter;
int realmode_setup(void)
{
- ulong i386boot_realmode = (ulong)&_i386boot_realmode;
+ ulong i386boot_realmode = (ulong)&_i386boot_realmode + gd->reloc_off;
ulong i386boot_realmode_size = (ulong)&_i386boot_realmode_size;
/* copy the realmode switch code */
--
1.7.0.2.182.ge007
More information about the U-Boot
mailing list