coreboot/src/device
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
..
dram device/dram/ddr5: Add 7500 MT/s support 2025-02-28 18:25:25 +00:00
oprom arch/x86: Unify GDT entries 2025-05-08 12:29:24 +00:00
azalia_device.c device/azalia: Clear busy bit after failed verb command 2024-10-16 15:19:49 +00:00
cardbus_device.c device/device.h: Rename busses for clarity 2024-01-31 10:36:39 +00:00
cpu_device.c cpu/x86/topology: Add code to fill in topology on struct path 2023-04-06 15:27:23 +00:00
device.c device/device.h: Fix spelling mistake 2024-01-31 10:36:49 +00:00
device_const.c arch/x86: Enable support for IOAPIC devices 2024-12-06 20:57:44 +00:00
device_util.c device: Fix debug print 2025-01-08 08:18:55 +00:00
gpio.c
i2c.c
i2c_bus.c device/device.h: Rename busses for clarity 2024-01-31 10:36:39 +00:00
Kconfig allocator_v4: Re-enable top-down allocation for edk2 2025-05-06 15:06:57 +00:00
Makefile.mk device, security: Rename Makefiles from .inc to .mk 2024-01-24 10:13:21 +00:00
mdio.c device/device.h: Rename busses for clarity 2024-01-31 10:36:39 +00:00
mmio.c tree: Remove blank lines before '}' and after '{' 2024-04-11 19:19:08 +00:00
pci_class.c arch to drivers/intel: Fix misspellings & capitalization issues 2023-09-08 00:53:57 +00:00
pci_device.c device/pci_device: Move PCI Option ROM code into pci_rom.c 2025-03-10 11:35:57 +00:00
pci_early.c
pci_ops.c
pci_rom.c device/pci_device: Move PCI Option ROM code into pci_rom.c 2025-03-10 11:35:57 +00:00
pciexp_device.c device/pciexp: Add hot-plug capable helper function 2024-10-23 11:49:30 +00:00
pcix_device.c device/device.h: Rename busses for clarity 2024-01-31 10:36:39 +00:00
pnp_device.c device/pnp_device: fix log levels for unassigned resource messages 2024-02-29 21:40:49 +00:00
resource_allocator_common.c
resource_allocator_v4.c tree: Remove blank lines before '}' and after '{' 2024-04-11 19:19:08 +00:00
root_device.c device/device.h: Rename busses for clarity 2024-01-31 10:36:39 +00:00
smbus_ops.c console: Add format-checking __printf() to die() 2023-05-17 11:23:59 +00:00
software_i2c.c
xhci.c device/xhci: Add functions to work with resource pointers 2023-03-05 15:32:34 +00:00
xhci_resource.c device/xhci: Add functions to work with resource pointers 2023-03-05 15:32:34 +00:00