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