Skip to content

Commit

Permalink
arch: x86: updated acpi config macro
Browse files Browse the repository at this point in the history
renamed x86 CONFIG_ACPI config macro to CONFIG_x86_ACPI.

Signed-off-by: Najumon Ba <[email protected]>
  • Loading branch information
najumon1980 authored and jhedberg committed Jun 30, 2023
1 parent a72271f commit b3d78de
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 16 deletions.
6 changes: 3 additions & 3 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -227,22 +227,22 @@ choice
Reboot via the RST_CNT register, going back to BIOS.
endchoice

config ACPI
config X86_ACPI
bool "ACPI (Advanced Configuration and Power Interface) support"
depends on X86_PC_COMPATIBLE
help
Allow retrieval of platform configuration at runtime.

config PCIE_MMIO_CFG
bool "Use MMIO PCI configuration space access"
select ACPI
select X86_ACPI
help
Selects the use of the memory-mapped PCI Express Extended
Configuration Space instead of the traditional 0xCF8/0xCFC
IO Port registers.

config KERNEL_VM_SIZE
default 0x40000000 if ACPI
default 0x40000000 if X86_ACPI

config X86_PC_COMPATIBLE
bool
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ zephyr_library_sources_ifdef(CONFIG_PCIE pcie.c)
zephyr_library_sources_ifdef(CONFIG_REBOOT_RST_CNT reboot_rst_cnt.c)
zephyr_library_sources_ifdef(CONFIG_MULTIBOOT_INFO multiboot.c)
zephyr_library_sources_ifdef(CONFIG_X86_EFI efi.c)
zephyr_library_sources_ifdef(CONFIG_ACPI acpi.c)
zephyr_library_sources_ifdef(CONFIG_X86_ACPI acpi.c)
zephyr_library_sources_ifdef(CONFIG_X86_MMU x86_mmu.c)
zephyr_library_sources_ifdef(CONFIG_USERSPACE userspace.c)
zephyr_library_sources_ifdef(CONFIG_ARCH_CACHE cache.c)
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/core/intel64/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz,
uint8_t vector = ((unsigned long) x86_ap_start) >> 12;
uint8_t apic_id;

if (IS_ENABLED(CONFIG_ACPI)) {
if (IS_ENABLED(CONFIG_X86_ACPI)) {
struct acpi_cpu *cpu;

cpu = z_acpi_get_cpu(cpu_num);
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/core/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <zephyr/sys/device_mmio.h>
#include <zephyr/drivers/pcie/pcie.h>

#ifdef CONFIG_ACPI
#ifdef CONFIG_X86_ACPI
#include <zephyr/arch/x86/acpi.h>
#endif

Expand All @@ -35,7 +35,7 @@ static bool do_pcie_mmio_cfg;

static void pcie_mm_init(void)
{
#ifdef CONFIG_ACPI
#ifdef CONFIG_X86_ACPI
struct acpi_mcfg *m = z_acpi_find_table(ACPI_MCFG_SIGNATURE);

if (m != NULL) {
Expand Down
2 changes: 1 addition & 1 deletion boards/x86/qemu_x86/board.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ set(QEMU_FLAGS_${ARCH}
-nographic
)

if(NOT CONFIG_ACPI)
if(NOT CONFIG_X86_ACPI)
list(APPEND QEMU_FLAGS_${ARCH} -no-acpi)
endif()

Expand Down
1 change: 1 addition & 0 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,5 @@ source "drivers/watchdog/Kconfig"
source "drivers/wifi/Kconfig"
source "drivers/xen/Kconfig"
source "drivers/sip_svc/Kconfig"

endmenu
6 changes: 3 additions & 3 deletions include/zephyr/arch/x86/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ union acpi_dmar_id {
uint16_t raw;
};

#if defined(CONFIG_ACPI)
#if defined(CONFIG_X86_ACPI)

void *z_acpi_find_table(uint32_t signature);

Expand All @@ -187,7 +187,7 @@ z_acpi_get_dev_scope_paths(struct acpi_dmar_dev_scope *dev_scope, int *n);

uint16_t z_acpi_get_dev_id_from_dmar(uint8_t dev_scope_type);

#else /* CONFIG_ACPI */
#else /* CONFIG_X86_ACPI */

#define z_acpi_find_table(...) NULL
#define z_acpi_get_cpu(...) NULL
Expand All @@ -197,7 +197,7 @@ uint16_t z_acpi_get_dev_id_from_dmar(uint8_t dev_scope_type);
#define z_acpi_get_dev_scope_paths(...) NULL
#define z_acpi_get_dev_id_from_dmar(...) USHRT_MAX

#endif /* CONFIG_ACPI */
#endif /* CONFIG_X86_ACPI */

#endif /* _ASMLANGUAGE */

Expand Down
2 changes: 1 addition & 1 deletion tests/arch/x86/info/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ project(x86_info)

target_sources(app PRIVATE src/main.c)
target_sources(app PRIVATE src/timer.c)
target_sources_ifdef(CONFIG_ACPI app PRIVATE src/acpi.c)
target_sources_ifdef(CONFIG_X86_ACPI app PRIVATE src/acpi.c)
target_sources_ifdef(CONFIG_MULTIBOOT app PRIVATE src/multiboot.c)
target_sources_ifdef(CONFIG_X86_MEMMAP app PRIVATE src/memmap.c)
2 changes: 1 addition & 1 deletion tests/arch/x86/info/prj.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_ACPI=y
CONFIG_X86_ACPI=y
CONFIG_MULTIBOOT_INFO=y
CONFIG_MULTIBOOT_MEMMAP=y
CONFIG_COUNTER=y
Expand Down
2 changes: 1 addition & 1 deletion tests/boot/uefi/prj.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_QEMU_UEFI_BOOT=y
CONFIG_BUILD_OUTPUT_EFI=y
CONFIG_SRAM_SIZE=204800
CONFIG_ACPI=y
CONFIG_X86_ACPI=y
2 changes: 1 addition & 1 deletion tests/drivers/disk/disk_access/boards/qemu_x86_64.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_ACPI=y
CONFIG_X86_ACPI=y
CONFIG_PCIE=y
CONFIG_PCIE_MSI=y
CONFIG_PCIE_MSI_X=y
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG_ACPI=y
CONFIG_X86_ACPI=y
CONFIG_PCIE=y
CONFIG_PCIE_MSI=y
CONFIG_PCIE_MSI_X=y
Expand Down

0 comments on commit b3d78de

Please sign in to comment.