diff --git a/arch/x86/core/Kconfig.ia32 b/arch/x86/core/Kconfig.ia32 index 03e2af8cdfb..4d3dffe78cf 100644 --- a/arch/x86/core/Kconfig.ia32 +++ b/arch/x86/core/Kconfig.ia32 @@ -39,6 +39,14 @@ config GDT_DYNAMIC This option stores the GDT in RAM instead of ROM, so that it may be modified at runtime at the expense of some memory. +config GDT_RESERVED_NUM_ENTRIES + int "Number of reserved GDT entry place holders" + depends on GDT_DYNAMIC + default 0 + help + This option defines the number of GDT entry place holders revserved + that can be filled at runtime. + endmenu menu "Processor Capabilities" diff --git a/include/zephyr/arch/x86/ia32/scripts/shared_kernel_pages.ld b/include/zephyr/arch/x86/ia32/scripts/shared_kernel_pages.ld index 62fdf16cf2e..30ab2544c04 100644 --- a/include/zephyr/arch/x86/ia32/scripts/shared_kernel_pages.ld +++ b/include/zephyr/arch/x86/ia32/scripts/shared_kernel_pages.ld @@ -47,6 +47,7 @@ #define GDT_NUM_ENTRIES 3 #endif /* CONFIG_X86_USERSPACE */ . += (GDT_NUM_ENTRIES + GDT_NUM_TLS_ENTRIES) * 8; + . += CONFIG_GDT_RESERVED_NUM_ENTRIES * 8; #endif /* LINKER_ZEPHYR_FINAL */ #endif /* CONFIG_GDT_DYNAMIC */