diff options
author | Graeme Russ <graeme.russ@gmail.com> | 2011-02-12 15:11:24 +1100 |
---|---|---|
committer | Graeme Russ <graeme.russ@gmail.com> | 2011-02-12 15:11:24 +1100 |
commit | 3a25e944101aa5d042ac2d20f2f6ce02f300faad (patch) | |
tree | 2e62ef9ca7f8413db95d857d128c978b47ac3644 /arch/i386/lib | |
parent | fde59123666dbd13fa230286253daee00bafba3f (diff) | |
download | u-boot-imx-3a25e944101aa5d042ac2d20f2f6ce02f300faad.zip u-boot-imx-3a25e944101aa5d042ac2d20f2f6ce02f300faad.tar.gz u-boot-imx-3a25e944101aa5d042ac2d20f2f6ce02f300faad.tar.bz2 |
x86: Parametize values used in linker script
Diffstat (limited to 'arch/i386/lib')
-rw-r--r-- | arch/i386/lib/realmode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/i386/lib/realmode.c b/arch/i386/lib/realmode.c index 60fe181..2dda95b 100644 --- a/arch/i386/lib/realmode.c +++ b/arch/i386/lib/realmode.c @@ -27,7 +27,6 @@ #include <asm/realmode.h> -#define REALMODE_BASE ((char*)0x7c0) #define REALMODE_MAILBOX ((char*)0xe00) @@ -41,13 +40,14 @@ int realmode_setup(void) ulong realmode_size = (ulong)&__realmode_size; /* copy the realmode switch code */ - if (realmode_size > (REALMODE_MAILBOX-REALMODE_BASE)) { + if (realmode_size > (REALMODE_MAILBOX - (char *)REALMODE_BASE)) { printf("realmode switch too large (%ld bytes, max is %d)\n", - realmode_size, (REALMODE_MAILBOX-REALMODE_BASE)); + realmode_size, + (REALMODE_MAILBOX - (char *)REALMODE_BASE)); return -1; } - memcpy(REALMODE_BASE, (void*)realmode_start, realmode_size); + memcpy((char *)REALMODE_BASE, (void *)realmode_start, realmode_size); asm("wbinvd\n"); return 0; |