mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-03 04:39:50 +00:00
When guest doing BAR re-programming, we should check whether the base address of the BAR is valid.This patch does this check by: 1. whether the gpa is located in the responding MMIO window 2. whether the gpa is aligned with the BAR size Tracked-On: #6011 Signed-off-by: Tao Yuhong <yuhong.tao@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com> Reviewed-by: Li Fei <fei1.li@intel.com>
37 lines
1.1 KiB
C
37 lines
1.1 KiB
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
|
|
#define UOS_VIRT_PCI_MEMBASE32 0x80000000UL /* 2GB */
|
|
#define UOS_VIRT_PCI_MEMLIMIT32 0xE0000000UL /* 3.5GB */
|
|
#define UOS_VIRT_PCI_MEMBASE64 0x4000000000UL /* 256GB */
|
|
#define UOS_VIRT_PCI_MEMLIMIT64 0x8000000000UL /* 512GB */
|
|
|
|
void build_vrsdp(struct acrn_vm *vm);
|
|
|
|
#endif /* VACPI_H */
|