]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - arch/x86/lib/realmode.c
x86: Fix how the location of the realmode and bios blobs are calculated
[people/ms/u-boot.git] / arch / x86 / lib / realmode.c
index 5a525ee79e1b3dff0f8e9d46897b7b0f5b3ceebd..bf0d0aaa31e16bf42a5278cdde82fd6c0c8a4f6d 100644 (file)
 
 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 */