acrn-hypervisor/hypervisor/include/dm/vacpi.h
Li Fei1 a2fd8c5a9d pci: mcfg: limit device bus numbers which could access by ECAM
Per PCI Firmware Specification Revision 3.0, 4.1.2. MCFG Table Description:
Memory Mapped Enhanced Configuration Space Base Address Allocation Structure
assign the Start Bus Number and the End Bus Number which could decoded by the
Host Bridge. We should not access the PCI device which bus number outside of
the range of [Start Bus Number, End Bus Number).
For ACRN,  we should:
1. Don't detect PCI device which bus number outside the range of
[Start Bus Number, End Bus Number) of MCFG ACPI Table.
2. Only trap the ECAM MMIO size: [MMCFG_BASE_ADDRESS, MMCFG_BASE_ADDRESS +
(End Bus Number - Start Bus Number + 1) * 0x100000) for SOS.

Tracked-On: #5233

Signed-off-by: Li Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-09-09 09:31:56 +08:00

33 lines
918 B
C

/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef VACPI_H
#define VACPI_H
#include <acpi.h>
#define ACPI_OEM_ID "ACRN "
/* Use a pre-loaded multiboot module as pre-launched VM ACPI table.
* The module file size is fixed to 1MB and loaded to GPA 0x7ff00000.
* A hardcoded RSDP table at GPA 0x000f2400 will point to the XSDT
* table which at GPA 0x7ff00080;
* The module file should be generated by acrn-config tool;
*/
#define VIRT_ACPI_DATA_ADDR 0x7ff00000UL
#define VIRT_ACPI_NVS_ADDR 0x7fff0000UL
#define VIRT_RSDP_ADDR 0x000f2400UL
#define VIRT_XSDT_ADDR 0x7ff00080UL
/* virtual PCI MMCFG address base for pre/post-launched VM. */
#define UOS_VIRT_PCI_MMCFG_BASE 0xE0000000UL
#define UOS_VIRT_PCI_MMCFG_START_BUS 0x0U
#define UOS_VIRT_PCI_MMCFG_END_BUS 0xFFU
void build_vrsdp(struct acrn_vm *vm);
#endif /* VACPI_H */