提交 19038e1b 编写于 作者: B Bin Meng 提交者: Simon Glass

x86: Initialize GDT entry 1 to be the 32-bit CS as well

Some OS (like VxWorks) requires GDT entry 1 to be the 32-bit CS.
Signed-off-by: NBin Meng <bmeng.cn@gmail.com>
Acked-by: NSimon Glass <sjg@chromium.org>
Tested-by: NJian Luo <jian.luo4@boschrexroth.de>
上级 1f124eba
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册