mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-03 14:06:54 +00:00
- The pci device config is related to VM configurations, so move the device mapping MACROs from pci_devices.h to vm_configurations.h. Also considering pci_devices.h should be generated by offline parse tool, this code change would decouple the relationship between VM configuration tool and target paser tool; - Another minor change is add post-fix in number for each PCI device subclass name to make target parse tool interface friendly; Tracked-On: #2291 Signed-off-by: Victor Sun <victor.sun@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
42 lines
886 B
C
42 lines
886 B
C
/*
|
|
* Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <vm_config.h>
|
|
#include <vm_configurations.h>
|
|
#include <pci_devices.h>
|
|
|
|
struct acrn_vm_pci_ptdev_config vm0_pci_ptdevs[VM0_CONFIG_PCI_PTDEV_NUM] = {
|
|
{
|
|
.vbdf.bits = {.b = 0x00U, .d = 0x00U, .f = 0x00U},
|
|
HOST_BRIDGE
|
|
},
|
|
{
|
|
.vbdf.bits = {.b = 0x00U, .d = 0x01U, .f = 0x00U},
|
|
VM0_STORAGE_CONTROLLER
|
|
},
|
|
{
|
|
.vbdf.bits = {.b = 0x00U, .d = 0x02U, .f = 0x00U},
|
|
VM0_NETWORK_CONTROLLER
|
|
},
|
|
};
|
|
|
|
struct acrn_vm_pci_ptdev_config vm1_pci_ptdevs[VM1_CONFIG_PCI_PTDEV_NUM] = {
|
|
{
|
|
.vbdf.bits = {.b = 0x00U, .d = 0x00U, .f = 0x00U},
|
|
HOST_BRIDGE
|
|
},
|
|
{
|
|
.vbdf.bits = {.b = 0x00U, .d = 0x01U, .f = 0x00U},
|
|
VM1_STORAGE_CONTROLLER
|
|
},
|
|
#if defined(VM1_NETWORK_CONTROLLER)
|
|
{
|
|
.vbdf.bits = {.b = 0x00U, .d = 0x02U, .f = 0x00U},
|
|
VM1_NETWORK_CONTROLLER
|
|
},
|
|
#endif
|
|
};
|