From: Graeme Russ Date: Fri, 23 Apr 2010 14:05:45 +0000 (+1000) Subject: x86: Fix copying of Real-Mode code into RAM X-Git-Tag: v2010.06-rc1~50 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=153c2d9f2397e8b6ca03cfebb4e9666ea0b0637c;p=oweals%2Fu-boot.git x86: Fix copying of Real-Mode code into RAM Signed-off-by: Graeme Russ --- diff --git a/arch/i386/lib/bios_setup.c b/arch/i386/lib/bios_setup.c index 6491e522ec..a92b77ea23 100644 --- a/arch/i386/lib/bios_setup.c +++ b/arch/i386/lib/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/arch/i386/lib/realmode.c b/arch/i386/lib/realmode.c index 3c3c1fc961..b3f51230a5 100644 --- a/arch/i386/lib/realmode.c +++ b/arch/i386/lib/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 */