coreboot/src
Patrick Rudolph a6be271e63 arch/x86: Unify GDT entries
Currently there are 3 GDTs (Global Descriptor Tables) being used on x86:
- preRAM (gdt_init.S)
- SMM (smm_stub.S)
- RAM (c_start.S)

They have different layouts and thus different offsets for the segments
being used in assembly code. Stop using different GDT segments and
ensure that for ROM (preRAM + SMM) and RAM (ramstage) the segments
match. RAM will have additional entries, not found in pre RAM GDT,
but the segments for protected mode and 64-bit mode now match in
all stages.

This allows to use the same defines in all stages. It also drops the
need to know in which stage the code is compiled and it's no longer
necessary to switch the code segment between stages.

While at it fix the comments in the ramstage GDT and drop unused
declarations from header files, always set the accessed bit and drop
GDT_CODE_ACPI_SEG.

Change-Id: I208496e6e4cc82833636f4f42503b44b0d702b9e
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87255
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-05-08 12:29:24 +00:00
..
acpi Revert "acpi,Makefile: Add preload_acpi_dsdt" 2025-04-14 13:55:42 +00:00
arch arch/x86: Unify GDT entries 2025-05-08 12:29:24 +00:00
commonlib tree: remove duplicated includes 2025-04-20 05:13:57 +00:00
console console/i2c_smbus: Allow to send data w/o register offset 2024-07-11 00:06:22 +00:00
cpu arch/x86: Unify GDT entries 2025-05-08 12:29:24 +00:00
device arch/x86: Unify GDT entries 2025-05-08 12:29:24 +00:00
drivers drivers/intel/fsp2_0: Include coreboot_tables.h in fsp_gop_blt.h 2025-05-07 02:37:57 +00:00
ec ec/google/wilco/acpi: Add UCSI port data 2025-05-01 22:14:05 +00:00
include arch/x86: Unify GDT entries 2025-05-08 12:29:24 +00:00
lib treewide: Assume FMAP_SECTION_FLASH_START = 0 2025-04-18 14:57:05 +00:00
mainboard mb/google/volteer/var/elemi: Check FP presence against SKU ID 2025-05-07 16:37:15 +00:00
northbridge nb/intel/sandybridge: Add CFR objects for existing options 2025-04-23 14:17:36 +00:00
sbom src, util: Clean up makefile.inc in text, help & comments 2024-01-26 20:15:18 +00:00
security arch/x86: Unify GDT entries 2025-05-08 12:29:24 +00:00
soc soc/intel/tigerlake: Hook up S0ix setting to option API 2025-05-08 12:27:37 +00:00
southbridge sb/intel/lynxpoint: Add CFR objects for existing options 2025-04-25 14:24:47 +00:00
superio superio/ite/it8772f: Program power state after failure 2025-04-23 14:16:09 +00:00
vendorcode treewide: Assume FMAP_SECTION_FLASH_START = 0 2025-04-18 14:57:05 +00:00
Kconfig Kconfig: Update prompt and help text for CBFS_SIZE 2025-03-01 23:29:09 +00:00