Patchwork [U-Boot,RFC,08/36] x86 - Move Global Descriptor Table defines to processor.h

login
register
mail settings
Submitter Graeme Russ
Date Jan. 3, 2011, 7:46 p.m.
Message ID <1294084016-2674-9-git-send-email-graeme.russ@gmail.com>
Download mbox | patch
Permalink /patch/77315/
State Superseded
Delegated to: Graeme Russ
Headers show

Comments

Graeme Russ - Jan. 3, 2011, 7:46 p.m.
---
 arch/i386/cpu/cpu.c               |    8 +-------
 arch/i386/include/asm/processor.h |    9 ++++++---
 2 files changed, 7 insertions(+), 10 deletions(-)

--
1.7.1.422.g049e9

Patch

diff --git a/arch/i386/cpu/cpu.c b/arch/i386/cpu/cpu.c
index ae40384..1dcbb98 100644
--- a/arch/i386/cpu/cpu.c
+++ b/arch/i386/cpu/cpu.c
@@ -35,6 +35,7 @@ 

 #include <common.h>
 #include <command.h>
+#include <asm/processor.h>
 #include <asm/interrupt.h>

 /* Constructor for a conventional segment GDT (or LDT) entry */
@@ -46,13 +47,6 @@ 
 	 (((base)  & 0x00ffffffULL) << 16) |		\
 	 (((limit) & 0x0000ffffULL)))

-/* Simple and small GDT entries for booting only */
-
-#define GDT_ENTRY_32BIT_CS	2
-#define GDT_ENTRY_32BIT_DS	(GDT_ENTRY_32BIT_CS + 1)
-#define GDT_ENTRY_16BIT_CS	(GDT_ENTRY_32BIT_DS + 1)
-#define GDT_ENTRY_16BIT_DS	(GDT_ENTRY_16BIT_CS + 1)
-
 /*
  * Set up the GDT
  */
diff --git a/arch/i386/include/asm/processor.h b/arch/i386/include/asm/processor.h
index 5dedba8..22a1298 100644
--- a/arch/i386/include/asm/processor.h
+++ b/arch/i386/include/asm/processor.h
@@ -23,7 +23,10 @@ 

 #ifndef __ASM_PROCESSOR_H_
 #define __ASM_PROCESSOR_H_ 1
-/* Currently this header is unused in the i386 port
- * but some generic files #include <asm/processor.h>
- * so this file is a placeholder. */
+
+#define GDT_ENTRY_32BIT_CS	2
+#define GDT_ENTRY_32BIT_DS	(GDT_ENTRY_32BIT_CS + 1)
+#define GDT_ENTRY_16BIT_CS	(GDT_ENTRY_32BIT_DS + 1)
+#define GDT_ENTRY_16BIT_DS	(GDT_ENTRY_16BIT_CS + 1)
+
 #endif