summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c')
-rw-r--r--OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c37
1 files changed, 36 insertions, 1 deletions
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c
index 999e9f151e..1e1c90614e 100644
--- a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c
+++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c
@@ -10,6 +10,11 @@
#include "AcpiPlatform.h"
+#include <Library/AcpiPlatformLib.h> // InstallAcpiTablesFromMemory()
+
+#define BHYVE_ACPI_PHYSICAL_ADDRESS ((UINTN)0x000F2400)
+#define BHYVE_BIOS_PHYSICAL_END ((UINTN)0x00100000)
+
EFI_STATUS
EFIAPI
InstallAcpiTable (
@@ -241,7 +246,37 @@ InstallAcpiTables (
IN EFI_ACPI_TABLE_PROTOCOL *AcpiTable
)
{
- EFI_STATUS Status;
+ EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *Rsdp;
+ EFI_STATUS Status;
+
+ Status = GetAcpiRsdpFromMemory (
+ BHYVE_ACPI_PHYSICAL_ADDRESS,
+ BHYVE_BIOS_PHYSICAL_END,
+ &Rsdp
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Status = InstallAcpiTablesFromRsdp (
+ AcpiTable,
+ Rsdp
+ );
+ if (!EFI_ERROR (Status)) {
+ return EFI_SUCCESS;
+ }
+
+ if (Status != EFI_NOT_FOUND) {
+ DEBUG (
+ (
+ DEBUG_WARN,
+ "%a: unable to install bhyve's ACPI tables (%r)\n",
+ __func__,
+ Status
+ )
+ );
+ return Status;
+ }
Status = InstallOvmfFvTables (AcpiTable);