projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f124eb
)
x86: Initialize GDT entry 1 to be the 32-bit CS as well
author
Bin Meng
<bmeng.cn@gmail.com>
Thu, 8 Oct 2015 03:19:09 +0000
(20:19 -0700)
committer
Simon Glass
<sjg@chromium.org>
Wed, 21 Oct 2015 13:46:25 +0000
(07:46 -0600)
Some OS (like VxWorks) requires GDT entry 1 to be the 32-bit CS.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Jian Luo <jian.luo4@boschrexroth.de>
arch/x86/cpu/cpu.c
patch
|
blob
|
history
diff --git
a/arch/x86/cpu/cpu.c
b/arch/x86/cpu/cpu.c
index 1b76ca117ee3df339d981bfe3cde74cbd4a9ee9d..812c5e4e6bee312c7d4a273ec12964aa08311c99 100644
(file)
--- a/
arch/x86/cpu/cpu.c
+++ b/
arch/x86/cpu/cpu.c
@@
-142,7
+142,12
@@
void arch_setup_gd(gd_t *new_gd)
gdt_addr = new_gd->arch.gdt;
- /* CS: code, read/execute, 4 GB, base 0 */
+ /*
+ * CS: code, read/execute, 4 GB, base 0
+ *
+ * Some OS (like VxWorks) requires GDT entry 1 to be the 32-bit CS
+ */
+ gdt_addr[X86_GDT_ENTRY_UNUSED] = GDT_ENTRY(0xc09b, 0, 0xfffff);
gdt_addr[X86_GDT_ENTRY_32BIT_CS] = GDT_ENTRY(0xc09b, 0, 0xfffff);
/* DS: data, read/write, 4 GB, base 0 */