[U-Boot] [PATCH 36/48] x86: Add an enum for some commonly-used GDT bits

Simon Glass sjg at chromium.org
Wed Jul 22 17:49:28 CEST 2015


Rather than add these as open-coded values, create an enum with the commonly
used flags.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 arch/x86/include/asm/cpu.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h
index 08284ee..b96513d 100644
--- a/arch/x86/include/asm/cpu.h
+++ b/arch/x86/include/asm/cpu.h
@@ -27,6 +27,16 @@ enum {
 	X86_VENDOR_UNKNOWN = 0xff
 };
 
+/* Global descriptor table (GDT) bits */
+enum {
+	GDT_4GB			= 1ULL << 55,
+	GDT_32BIT		= 1ULL << 54,
+	GDT_LONG		= 1ULL << 53,
+	GDT_PRESENT		= 1ULL << 47,
+	GDT_NOTSYS		= 1ULL << 44,
+	GDT_CODE		= 1ULL << 43,
+};
+
 struct cpuid_result {
 	uint32_t eax;
 	uint32_t ebx;
-- 
2.4.3.573.g4eafbef



More information about the U-Boot mailing list