arch/x86: Prepare GDT for x86_64
Make GDT a separate table and don't reuse GDT descriptor as unused first field of GDT. Required for separate x86_64 GDT descriptor, pointing to the same GDT. Tested on qemu. Change-Id: I513329b67d49ade1055bc07cf7b93ff2e0131e0b Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31769 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
0c590f064e
commit
4e8dee51e3
1 changed files with 6 additions and 2 deletions
|
@ -21,11 +21,15 @@ gdt_init:
|
|||
.previous
|
||||
.align 4
|
||||
.globl gdtptr
|
||||
gdt:
|
||||
gdtptr:
|
||||
.word gdt_end - gdt -1 /* compute the table limit */
|
||||
.long gdt /* we know the offset */
|
||||
.word 0
|
||||
|
||||
.align 4
|
||||
gdt:
|
||||
/* selgdt 0, unused */
|
||||
.word 0x0000, 0x0000 /* dummy */
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
/* selgdt 0x08, flat code segment */
|
||||
.word 0xffff, 0x0000
|
||||
|
|
Loading…
Reference in a new issue