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>
diff --git a/src/arch/x86/gdt_init.S b/src/arch/x86/gdt_init.S
index 6aa2a79..f66cd43 100644
--- a/src/arch/x86/gdt_init.S
+++ b/src/arch/x86/gdt_init.S
@@ -21,11 +21,15 @@
 .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