HV: enable Kconfig of ACPI_PARSE_ENABLED
Previously we use Kconfig of DMAR_PARSE_ENABLED to choose pre-defined DMAR info or parse it at runtime, at the same time we use MACRO of CONFIG_CONSTANT_ACPI to decide whether parse PM related ACPI info at runtime. This looks redundant so use a unified ACPI_PARSE_ENABLED Kconfig to replace them. Tracked-On: #3107 Signed-off-by: Victor Sun <victor.sun@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
86fe2e033c
commit
8afbdb7505
|
@ -158,10 +158,10 @@ endif
|
|||
|
||||
# ACPI parsing component
|
||||
# This part should be isolated from FuSa Cert
|
||||
ifeq ($(CONFIG_DMAR_PARSE_ENABLED),y)
|
||||
ifeq ($(CONFIG_ACPI_PARSE_ENABLED),y)
|
||||
C_SRCS += acpi_parser/dmar_parse.c
|
||||
endif
|
||||
C_SRCS += acpi_parser/acpi_ext.c
|
||||
endif
|
||||
|
||||
C_SRCS += boot/acpi_base.c
|
||||
C_SRCS += boot/dmar_info.c
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include <host_pm.h>
|
||||
#include <acrn_common.h>
|
||||
|
||||
#ifndef CONFIG_CONSTANT_ACPI
|
||||
/* Per ACPI spec:
|
||||
* There are two fundamental types of ACPI tables:
|
||||
*
|
||||
|
@ -49,8 +48,7 @@
|
|||
*
|
||||
* The second type of table, the ACPI Data Table, could be parsed here.
|
||||
*
|
||||
* When ACRN go FuSa, the platform ACPI data should be fixed. The MACRO of
|
||||
* CONFIG_CONSTANT_ACPI will be defined, then this code is not needed.
|
||||
* When ACRN go FuSa, the platform ACPI data should be fixed and this file is not needed.
|
||||
*/
|
||||
|
||||
#define ACPI_SIG_FACS 0x53434146U /* "FACS" */
|
||||
|
@ -158,4 +156,3 @@ void acpi_fixup(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -226,15 +226,15 @@ config SOS_RAM_SIZE
|
|||
A 64-bit integer indicating the size of the User OS RAM (MMIO not
|
||||
included). Now we assume each UOS uses same amount of RAM size.
|
||||
|
||||
config DMAR_PARSE_ENABLED
|
||||
bool "Enable ACPI DMA Remapping tables parsing"
|
||||
config ACPI_PARSE_ENABLED
|
||||
bool "Enable ACPI runtime parsing"
|
||||
default y
|
||||
help
|
||||
Whether to parse the ACPI DMA Remapping tables at runtime.
|
||||
Whether to parse the ACPI tables at runtime.
|
||||
|
||||
config GPU_SBDF
|
||||
hex "Segment, Bus, Device, and function of the GPU"
|
||||
depends on DMAR_PARSE_ENABLED
|
||||
depends on ACPI_PARSE_ENABLED
|
||||
default 0x00000010
|
||||
help
|
||||
A 32-bit integer encoding the segment, bus, device and function of the
|
||||
|
|
|
@ -8,5 +8,4 @@ CONFIG_HV_RAM_SIZE=0x07800000
|
|||
CONFIG_PLATFORM_RAM_SIZE=0x200000000
|
||||
CONFIG_SOS_RAM_SIZE=0x200000000
|
||||
CONFIG_UOS_RAM_SIZE=0x200000000
|
||||
CONFIG_DMAR_PARSE_ENABLED=n
|
||||
CONFIG_IOMMU_BUS_NUM=0x10
|
||||
|
|
|
@ -3,5 +3,4 @@ CONFIG_BOARD="up2"
|
|||
CONFIG_SERIAL_PCI=y
|
||||
CONFIG_SERIAL_PCI_BDF="0:18.0"
|
||||
CONFIG_COM_IRQ=6
|
||||
CONFIG_DMAR_PARSE_ENABLED=y
|
||||
CONFIG_HV_RAM_START=0x5e000000
|
||||
|
|
|
@ -2,4 +2,3 @@
|
|||
CONFIG_BOARD="dnv-cb2"
|
||||
CONFIG_SERIAL_LEGACY=y
|
||||
CONFIG_SERIAL_PIO_BASE=0x1000
|
||||
CONFIG_DMAR_PARSE_ENABLED=y
|
||||
|
|
|
@ -288,7 +288,7 @@ void init_paging(void)
|
|||
mmu_modify_or_del((uint64_t *)ppt_mmu_pml4_addr, (uint64_t)get_reserve_sworld_memory_base(),
|
||||
TRUSTY_RAM_SIZE * (CONFIG_MAX_VM_NUM - 1U), PAGE_USER, 0UL, &ppt_mem_ops, MR_MODIFY);
|
||||
|
||||
#ifdef CONFIG_DMAR_PARSE_ENABLED
|
||||
#ifdef CONFIG_ACPI_PARSE_ENABLED
|
||||
for (i = 0U; i < entries_count; i++) {
|
||||
entry = p_e820 + i;
|
||||
if ((entry->type == E820_TYPE_ACPI_RECLAIM) || (entry->type == E820_TYPE_RESERVED)) {
|
||||
|
|
|
@ -131,7 +131,7 @@ static struct dmar_info plat_dmar_info = {
|
|||
*/
|
||||
struct dmar_info *get_dmar_info(void)
|
||||
{
|
||||
#ifdef CONFIG_DMAR_PARSE_ENABLED
|
||||
#ifdef CONFIG_ACPI_PARSE_ENABLED
|
||||
parse_dmar_table(&plat_dmar_info);
|
||||
#endif
|
||||
return &plat_dmar_info;
|
||||
|
|
|
@ -66,7 +66,7 @@ void init_vboot_operations(void)
|
|||
/* @pre: vboot_ops->init != NULL */
|
||||
void init_vboot(void)
|
||||
{
|
||||
#ifndef CONFIG_CONSTANT_ACPI
|
||||
#ifndef CONFIG_ACPI_PARSE_ENABLED
|
||||
acpi_fixup();
|
||||
#endif
|
||||
vboot_ops->init();
|
||||
|
|
|
@ -36,7 +36,7 @@ struct ioapic_info;
|
|||
uint16_t parse_madt(uint32_t lapic_id_array[CONFIG_MAX_PCPU_NUM]);
|
||||
uint16_t parse_madt_ioapic(struct ioapic_info *ioapic_id_array);
|
||||
|
||||
#ifndef CONFIG_CONSTANT_ACPI
|
||||
#ifndef CONFIG_ACPI_PARSE_ENABLED
|
||||
void acpi_fixup(void);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -519,7 +519,7 @@ union dmar_ir_entry {
|
|||
|
||||
extern struct dmar_info *get_dmar_info(void);
|
||||
|
||||
#ifdef CONFIG_DMAR_PARSE_ENABLED
|
||||
#ifdef CONFIG_ACPI_PARSE_ENABLED
|
||||
int32_t parse_dmar_table(struct dmar_info *plat_dmar_info);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
|
||||
#include <pci_devices.h>
|
||||
|
||||
/* Use constant ACPI info which defined in platform_acpi_info.h instead of parsing it. */
|
||||
#define CONFIG_CONSTANT_ACPI
|
||||
|
||||
/* Bits mask of guest flags that can be programmed by device model. Other bits are set by hypervisor only */
|
||||
#define DM_OWNED_GUEST_FLAG_MASK 0UL
|
||||
|
||||
|
|
Loading…
Reference in New Issue