aboutsummaryrefslogtreecommitdiff
path: root/src/device/oprom/realmode/x86.h
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2013-02-08 16:56:51 -0600
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-03-21 18:01:38 +0100
commita146d58ca0375a12f23dc5a4bd25adfa3423114f (patch)
tree874776d78835bf56ba66eba54e2558edd97645de /src/device/oprom/realmode/x86.h
parente8c866ad45d80de768c9422474449e171d133575 (diff)
ramstage: prepare for relocation
The current ramstage code contains uses of symbols that cause issues when the ramstage is relocatable. There are 2 scenarios resolved by this patch: 1. Absolute symbols that are actually sizes/limits. The symbols are problematic when relocating a program because there is no way to distinguish a symbol that shouldn't be relocated and one that can. The only way to handle these symbols is to write a program to post process the relocations and keep a whitelist of ones that shouldn't be relocated. I don't believe that is a route that should be taken so fix the users of these sizes/limits encoded as absolute symbols to calculate the size at runtime or dereference a variable in memory containing the size/limit. 2. Absoulte symbols that were relocated to a fixed address. These absolute symbols are generated by assembly files to be placed at a fixed location. Again, these symbols are problematic because one can't distinguish a symbol that can't be relocated. The symbols are again resolved at runtime to allow for proper relocation. For the symbols defining a size either use 2 symbols and calculate the difference or provide a variable in memory containing the size. Change-Id: I1ef2bfe6fd531308218bcaac5dcccabf8edf932c Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/2789 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'src/device/oprom/realmode/x86.h')
-rw-r--r--src/device/oprom/realmode/x86.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/device/oprom/realmode/x86.h b/src/device/oprom/realmode/x86.h
index 76d3e4643c..a811a5621e 100644
--- a/src/device/oprom/realmode/x86.h
+++ b/src/device/oprom/realmode/x86.h
@@ -32,10 +32,10 @@ struct realmode_idt {
void x86_exception(struct eregs *info);
/* From x86_asm.S */
-extern unsigned char __idt_handler, __idt_handler_size;
-extern unsigned char __realmode_code, __realmode_code_size;
-extern unsigned char __realmode_call, __realmode_interrupt;
-extern unsigned char __buffer;
+extern unsigned char __idt_handler;
+extern unsigned int __idt_handler_size;
+extern unsigned char __realmode_code;
+extern unsigned int __realmode_code_size;
extern void (*realmode_call)(u32 addr, u32 eax, u32 ebx, u32 ecx, u32 edx,
u32 esi, u32 edi) asmlinkage;