summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/u-boot-x86.h
diff options
context:
space:
mode:
authorGraeme Russ <graeme.russ@gmail.com>2011-12-31 22:58:15 +1100
committerGraeme Russ <graeme.russ@gmail.com>2012-01-04 22:17:24 +1100
commit9e6c572ff03cda84c88663b23c7157d8b1f275ac (patch)
treea2c42fef142e1d179d47b20c35d3c331a279359a /arch/x86/include/asm/u-boot-x86.h
parent240ab5aa2161df500e8950c2a4f392e84324f78a (diff)
downloadu-boot-imx-9e6c572ff03cda84c88663b23c7157d8b1f275ac.zip
u-boot-imx-9e6c572ff03cda84c88663b23c7157d8b1f275ac.tar.gz
u-boot-imx-9e6c572ff03cda84c88663b23c7157d8b1f275ac.tar.bz2
x86: Use fs for global data
Use the base address of the 'F' segment as a pointer to the global data structure. By adding the linear address (i.e. the 'D' segment address) as the first word of the global data structure, the address of the global data relative to the 'D' segment can be found simply, for example, by: fs movl 0, %eax This makes the gd 'pointer' writable prior to relocation (by reloading the Global Desctriptor Table) which brings x86 into line with all other arches NOTE: Writing to the gd 'pointer' is expensive (but we only do it twice) but using it to access global data members (read and write) is still fairly cheap -- Changes for v2: - Rebased against changes made to patch #3 - Removed extra indent - Tweaked commit message
Diffstat (limited to 'arch/x86/include/asm/u-boot-x86.h')
-rw-r--r--arch/x86/include/asm/u-boot-x86.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h
index c3d2277..5540d51 100644
--- a/arch/x86/include/asm/u-boot-x86.h
+++ b/arch/x86/include/asm/u-boot-x86.h
@@ -37,6 +37,8 @@ int x86_cpu_init_r(void);
int cpu_init_r(void);
int x86_cpu_init_f(void);
int cpu_init_f(void);
+void init_gd(gd_t *id, u64 *gdt_addr);
+void setup_gdt(gd_t *id, u64 *gdt_addr);
/* cpu/.../timer.c */
void timer_isr(void *);