summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/processor.h
diff options
context:
space:
mode:
authorGraeme Russ <graeme.russ@gmail.com>2011-12-31 11:58:15 (GMT)
committerGraeme Russ <graeme.russ@gmail.com>2012-01-04 11:17:24 (GMT)
commit9e6c572ff03cda84c88663b23c7157d8b1f275ac (patch)
treea2c42fef142e1d179d47b20c35d3c331a279359a /arch/x86/include/asm/processor.h
parent240ab5aa2161df500e8950c2a4f392e84324f78a (diff)
downloadu-boot-9e6c572ff03cda84c88663b23c7157d8b1f275ac.tar.xz
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/processor.h')
-rw-r--r--arch/x86/include/asm/processor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index aa8188e..6eb5180 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -33,6 +33,7 @@ enum {
X86_GDT_ENTRY_UNUSED,
X86_GDT_ENTRY_32BIT_CS,
X86_GDT_ENTRY_32BIT_DS,
+ X86_GDT_ENTRY_32BIT_FS,
X86_GDT_ENTRY_16BIT_CS,
X86_GDT_ENTRY_16BIT_DS,
X86_GDT_NUM_ENTRIES