mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-21 14:03:34 +00:00
This commit moves struct acrn_vm under common header vm.h, and move some x86-specific members of struct acrn_vm into arch_vm. This commit focuses on struct cleanup only. API cleanup will be in future patch series. The affected members are: e820_entry_num e820_entries wire_mode wbinvd_lock vlapic_mode_lock vcpuid_entry_nr vcpuid_level vcpuid_xlevel vcpuid_entries reset_control pm sworld_control sworld_snapshot intr_inject_delay_delta Moved to common vm.h: ept_lock -> rename to stg2pt_lock ept_pgtable -> rename to stg2_pgtable nworld_eptp -> rename to root_stg2ptp emul_mmio_lock nr_emul_mmio_regions emul_mmio emul_pio To avoid circular dependency, some in-header helpers are also moved into common vm.h. Tracked-On: #8830 Signed-off-by: Yifan Liu <yifan1.liu@intel.com> Reviewed-by: Fei Li <fei1.li@intel.com> Acked-by: Wang Yu1 <yu1.wang@intel.com>
41 lines
1.4 KiB
C
41 lines
1.4 KiB
C
/*
|
|
* Copyright (C) 2019-2022 Intel Corporation.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef VACPI_H
|
|
#define VACPI_H
|
|
|
|
#include <acpi.h>
|
|
#include <vm.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 0x7fe00000.
|
|
* A hardcoded RSDP table at GPA 0x000f2400 will point to the XSDT
|
|
* table which at GPA 0x7fe00080;
|
|
* The module file should be generated by acrn-config tool;
|
|
*/
|
|
#define VIRT_ACPI_DATA_LEN MEM_1M
|
|
#define VIRT_ACPI_NVS_LEN MEM_1M
|
|
/* Currently ACPI NVS start addr is presumed to be consecutive with ACPI DATA area right below 0x80000000 */
|
|
#define VIRT_ACPI_NVS_ADDR (0x80000000UL - VIRT_ACPI_NVS_LEN)
|
|
#define VIRT_ACPI_DATA_ADDR (VIRT_ACPI_NVS_ADDR - VIRT_ACPI_DATA_LEN)
|
|
#define VIRT_RSDP_ADDR 0x000f2400UL
|
|
#define VIRT_XSDT_ADDR 0x7fe00080UL
|
|
|
|
/* virtual PCI MMCFG address base for pre/post-launched VM. */
|
|
#define USER_VM_VIRT_PCI_MMCFG_BASE 0xE0000000UL
|
|
#define USER_VM_VIRT_PCI_MMCFG_START_BUS 0x0U
|
|
#define USER_VM_VIRT_PCI_MMCFG_END_BUS 0xFFU
|
|
#define USER_VM_VIRT_PCI_MEMBASE32 0x80000000UL /* 2GB */
|
|
#define USER_VM_VIRT_PCI_MEMLIMIT32 0xE0000000UL /* 3.5GB */
|
|
#define USER_VM_VIRT_PCI_MEMBASE64 0x4000000000UL /* 256GB */
|
|
#define USER_VM_VIRT_PCI_MEMLIMIT64 0x8000000000UL /* 512GB */
|
|
|
|
void build_vrsdp(struct acrn_vm *vm);
|
|
|
|
#endif /* VACPI_H */
|