mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-31 15:30:56 +00:00
hv: pci: add hide pci devices configuration for apl-up2
Other Platforms are not added for now. Tracked-On: #3465 Signed-off-by: Li Fei1 <fei1.li@intel.com>
This commit is contained in:
parent
3239cb0e1c
commit
65f3751ea3
@ -6,6 +6,7 @@
|
||||
|
||||
#include <board.h>
|
||||
#include <vtd.h>
|
||||
#include <pci.h>
|
||||
|
||||
#ifndef CONFIG_ACPI_PARSE_ENABLED
|
||||
#error "DMAR info is not available, please set ACPI_PARSE_ENABLED to y in Kconfig. \
|
||||
@ -15,3 +16,4 @@
|
||||
struct dmar_info plat_dmar_info;
|
||||
struct platform_clos_info platform_clos_array[MAX_PLATFORM_CLOS_NUM];
|
||||
const struct cpu_state_table board_cpu_state_tbl;
|
||||
const union pci_bdf plat_hidden_pdevs[MAX_HIDDEN_PDEVS_NUM];
|
||||
|
@ -41,4 +41,6 @@
|
||||
"cma=64M@0- " \
|
||||
"panic_print=0x1f"
|
||||
|
||||
#define MAX_HIDDEN_PDEVS_NUM 0U
|
||||
|
||||
#endif /* MISC_CFG_H */
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <board.h>
|
||||
#include <msr.h>
|
||||
#include <vtd.h>
|
||||
#include <pci.h>
|
||||
|
||||
#ifndef CONFIG_ACPI_PARSE_ENABLED
|
||||
#error "DMAR info is not available, please set ACPI_PARSE_ENABLED to y in Kconfig. \
|
||||
@ -35,3 +36,11 @@ struct platform_clos_info platform_clos_array[MAX_PLATFORM_CLOS_NUM] = {
|
||||
};
|
||||
|
||||
const struct cpu_state_table board_cpu_state_tbl;
|
||||
|
||||
const union pci_bdf plat_hidden_pdevs[MAX_HIDDEN_PDEVS_NUM] = {
|
||||
{
|
||||
.bits.b = 0x0,
|
||||
.bits.d = 0xd,
|
||||
.bits.f = 0x0,
|
||||
},
|
||||
};
|
||||
|
@ -37,4 +37,6 @@
|
||||
"i915.enable_guc=0x02 " \
|
||||
"cma=64M@0- "
|
||||
|
||||
#define MAX_HIDDEN_PDEVS_NUM 1U
|
||||
|
||||
#endif /* MISC_CFG_H */
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <board.h>
|
||||
#include <vtd.h>
|
||||
#include <pci.h>
|
||||
|
||||
#ifndef CONFIG_ACPI_PARSE_ENABLED
|
||||
#error "DMAR info is not available, please set ACPI_PARSE_ENABLED to y in Kconfig. \
|
||||
@ -15,3 +16,4 @@
|
||||
struct dmar_info plat_dmar_info;
|
||||
struct platform_clos_info platform_clos_array[MAX_PLATFORM_CLOS_NUM];
|
||||
const struct cpu_state_table board_cpu_state_tbl;
|
||||
const union pci_bdf plat_hidden_pdevs[MAX_HIDDEN_PDEVS_NUM];
|
||||
|
@ -26,4 +26,6 @@
|
||||
#define SOS_BOOTARGS_DIFF ""
|
||||
#endif
|
||||
|
||||
#define MAX_HIDDEN_PDEVS_NUM 0U
|
||||
|
||||
#endif /* MISC_CFG_H */
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <board.h>
|
||||
#include <vtd.h>
|
||||
#include <pci.h>
|
||||
|
||||
#ifndef CONFIG_ACPI_PARSE_ENABLED
|
||||
#error "DMAR info is not available, please set ACPI_PARSE_ENABLED to y in Kconfig. \
|
||||
@ -15,3 +16,4 @@
|
||||
struct dmar_info plat_dmar_info;
|
||||
struct platform_clos_info platform_clos_array[MAX_PLATFORM_CLOS_NUM];
|
||||
const struct cpu_state_table board_cpu_state_tbl;
|
||||
const union pci_bdf plat_hidden_pdevs[MAX_HIDDEN_PDEVS_NUM];
|
||||
|
@ -27,4 +27,6 @@
|
||||
#define SOS_BOOTARGS_DIFF ""
|
||||
#endif
|
||||
|
||||
#define MAX_HIDDEN_PDEVS_NUM 0U
|
||||
|
||||
#endif /* MISC_CFG_H */
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <board.h>
|
||||
#include <vtd.h>
|
||||
#include <pci.h>
|
||||
|
||||
#ifndef CONFIG_ACPI_PARSE_ENABLED
|
||||
#error "DMAR info is not available, please set ACPI_PARSE_ENABLED to y in Kconfig. \
|
||||
@ -15,3 +16,4 @@
|
||||
struct dmar_info plat_dmar_info;
|
||||
struct platform_clos_info platform_clos_array[MAX_PLATFORM_CLOS_NUM];
|
||||
const struct cpu_state_table board_cpu_state_tbl;
|
||||
const union pci_bdf plat_hidden_pdevs[MAX_HIDDEN_PDEVS_NUM];
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <board.h>
|
||||
#include <vtd.h>
|
||||
#include <pci.h>
|
||||
|
||||
#ifndef CONFIG_ACPI_PARSE_ENABLED
|
||||
#error "DMAR info is not available, please set ACPI_PARSE_ENABLED to y in Kconfig. \
|
||||
@ -15,3 +16,4 @@
|
||||
struct dmar_info plat_dmar_info;
|
||||
struct platform_clos_info platform_clos_array[MAX_PLATFORM_CLOS_NUM];
|
||||
const struct cpu_state_table board_cpu_state_tbl;
|
||||
const union pci_bdf plat_hidden_pdevs[MAX_HIDDEN_PDEVS_NUM];
|
||||
|
@ -26,4 +26,6 @@
|
||||
#define SOS_BOOTARGS_DIFF ""
|
||||
#endif
|
||||
|
||||
#define MAX_HIDDEN_PDEVS_NUM 0U
|
||||
|
||||
#endif /* MISC_CFG_H */
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <board.h>
|
||||
#include <vtd.h>
|
||||
#include <pci.h>
|
||||
|
||||
static struct dmar_dev_scope drhd0_dev_scope[DRHD0_DEV_CNT] = {
|
||||
{
|
||||
@ -57,3 +58,4 @@ struct dmar_info plat_dmar_info = {
|
||||
|
||||
struct platform_clos_info platform_clos_array[MAX_PLATFORM_CLOS_NUM];
|
||||
const struct cpu_state_table board_cpu_state_tbl;
|
||||
const union pci_bdf plat_hidden_pdevs[MAX_HIDDEN_PDEVS_NUM];
|
||||
|
@ -27,4 +27,6 @@
|
||||
#define SOS_BOOTARGS_DIFF ""
|
||||
#endif
|
||||
|
||||
#define MAX_HIDDEN_PDEVS_NUM 0U
|
||||
|
||||
#endif /* MISC_CFG_H */
|
||||
|
@ -202,7 +202,7 @@ void enable_disable_pci_intx(union pci_bdf bdf, bool enable)
|
||||
}
|
||||
}
|
||||
|
||||
static bool is_hidden_pdev(union pci_bdf pbdf)
|
||||
static bool is_hv_owned_pdev(union pci_bdf pbdf)
|
||||
{
|
||||
bool hidden = false;
|
||||
/* if it is debug uart, hide it*/
|
||||
@ -216,7 +216,7 @@ static bool is_hidden_pdev(union pci_bdf pbdf)
|
||||
|
||||
static void pci_init_pdev(union pci_bdf pbdf, uint32_t drhd_index)
|
||||
{
|
||||
if (!is_hidden_pdev(pbdf)) {
|
||||
if (!is_hv_owned_pdev(pbdf)) {
|
||||
init_pdev(pbdf.value, drhd_index);
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <types.h>
|
||||
#include <misc_cfg.h>
|
||||
#include <host_pm.h>
|
||||
#include <pci.h>
|
||||
|
||||
/* forward declarations */
|
||||
struct acrn_vm;
|
||||
@ -21,6 +22,7 @@ struct platform_clos_info {
|
||||
extern struct dmar_info plat_dmar_info;
|
||||
extern struct platform_clos_info platform_clos_array[MAX_PLATFORM_CLOS_NUM];
|
||||
extern const struct cpu_state_table board_cpu_state_tbl;
|
||||
extern const union pci_bdf plat_hidden_pdevs[MAX_HIDDEN_PDEVS_NUM];
|
||||
|
||||
/* board specific functions */
|
||||
void create_prelaunched_vm_e820(struct acrn_vm *vm);
|
||||
|
@ -320,5 +320,4 @@ static inline bool is_pci_cfg_bridge(uint8_t header_type)
|
||||
|
||||
bool pdev_need_bar_restore(const struct pci_pdev *pdev);
|
||||
void pdev_restore_bar(const struct pci_pdev *pdev);
|
||||
|
||||
#endif /* PCI_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user