]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Bhyve/AcpiTables/Mcfg.aslc
Add BhyvePkg, to support the bhyve hypervisor
[mirror_edk2.git] / OvmfPkg / Bhyve / AcpiTables / Mcfg.aslc
1 /*
2 * Copyright (c) 2020, Rebecca Cran <rebecca@bsdio.com>
3 * Copyright (c) 2015, Nahanni Systems, Inc.
4 *
5 * SPDX-License-Identifier: BSD-2-Clause-Patent
6 */
7
8 #include "Platform.h"
9
10 #define EFI_ACPI_OEM_TABLE_ID SIGNATURE_64('B','V','M','C','F','G',' ',' ')
11
12 #pragma pack(1)
13
14 typedef struct {
15 EFI_ACPI_DESCRIPTION_HEADER Header;
16 UINT64 Reserved0;
17 UINT64 BaseAddress;
18 UINT16 PciSegmentGroupNumber;
19 UINT8 StartBusNumber;
20 UINT8 EndBusNumber;
21 UINT32 Reserved1;
22 } EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_TABLE;
23
24 #pragma pack()
25
26 EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_TABLE MCFG = {
27 {
28 EFI_ACPI_2_0_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_SIGNATURE,
29 sizeof (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_TABLE),
30 EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_TABLE_REVISION,
31 0, // to make sum of entire table == 0
32 {EFI_ACPI_OEM_ID}, // OEMID is a 6 bytes long field
33 EFI_ACPI_OEM_TABLE_ID, // OEM table identification(8 bytes long)
34 EFI_ACPI_OEM_REVISION, // OEM revision number
35 EFI_ACPI_CREATOR_ID, // ASL compiler vendor ID
36 EFI_ACPI_CREATOR_REVISION // ASL compiler revision number
37 },
38 0, // Reserved
39 0x00000000E0000000, // BaseAddress
40 0x0000, // PciSegmentGroupNumber
41 0, // StartBusNumber
42 255, // EndBusNumber
43 0 // Reserved
44 };
45
46
47 VOID *
48 ReferenceAcpiTable (
49 VOID
50 )
51 {
52 //
53 // Reference the table being generated to prevent the optimizer from removing the
54 // data structure from the exeutable
55 //
56 return (VOID*)&MCFG;
57 }