diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:54:09 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | ac0a286f4d747a4c6c603a7b225917293cbe1e9f (patch) | |
tree | 32654f2b35755afc961e2c97296b2dec5762da75 /OvmfPkg/Bhyve | |
parent | d1050b9dff1cace252aff86630bfdb59dff5f507 (diff) | |
download | edk2-ac0a286f4d747a4c6c603a7b225917293cbe1e9f.tar.gz edk2-ac0a286f4d747a4c6c603a7b225917293cbe1e9f.tar.bz2 edk2-ac0a286f4d747a4c6c603a7b225917293cbe1e9f.zip |
OvmfPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737
Apply uncrustify changes to .c/.h files in the OvmfPkg package
Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Andrew Fish <afish@apple.com>
Diffstat (limited to 'OvmfPkg/Bhyve')
23 files changed, 1848 insertions, 1740 deletions
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c index 9ccdb4d91c..999e9f151e 100644 --- a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c +++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c @@ -13,10 +13,10 @@ EFI_STATUS
EFIAPI
InstallAcpiTable (
- IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
- IN VOID *AcpiTableBuffer,
- IN UINTN AcpiTableBufferSize,
- OUT UINTN *TableKey
+ IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
+ IN VOID *AcpiTableBuffer,
+ IN UINTN AcpiTableBufferSize,
+ OUT UINTN *TableKey
)
{
return AcpiProtocol->InstallAcpiTable (
@@ -27,7 +27,6 @@ InstallAcpiTable ( );
}
-
/**
Locate the first instance of a protocol. If the protocol requested is an
FV protocol, then it will return the first FV that contains the ACPI table
@@ -42,18 +41,18 @@ InstallAcpiTable ( **/
EFI_STATUS
LocateFvInstanceWithTables (
- OUT EFI_FIRMWARE_VOLUME2_PROTOCOL **Instance
+ OUT EFI_FIRMWARE_VOLUME2_PROTOCOL **Instance
)
{
- EFI_STATUS Status;
- EFI_HANDLE *HandleBuffer;
- UINTN NumberOfHandles;
- EFI_FV_FILETYPE FileType;
- UINT32 FvStatus;
- EFI_FV_FILE_ATTRIBUTES Attributes;
- UINTN Size;
- UINTN Index;
- EFI_FIRMWARE_VOLUME2_PROTOCOL *FvInstance;
+ EFI_STATUS Status;
+ EFI_HANDLE *HandleBuffer;
+ UINTN NumberOfHandles;
+ EFI_FV_FILETYPE FileType;
+ UINT32 FvStatus;
+ EFI_FV_FILE_ATTRIBUTES Attributes;
+ UINTN Size;
+ UINTN Index;
+ EFI_FIRMWARE_VOLUME2_PROTOCOL *FvInstance;
FvStatus = 0;
@@ -61,12 +60,12 @@ LocateFvInstanceWithTables ( // Locate protocol.
//
Status = gBS->LocateHandleBuffer (
- ByProtocol,
- &gEfiFirmwareVolume2ProtocolGuid,
- NULL,
- &NumberOfHandles,
- &HandleBuffer
- );
+ ByProtocol,
+ &gEfiFirmwareVolume2ProtocolGuid,
+ NULL,
+ &NumberOfHandles,
+ &HandleBuffer
+ );
if (EFI_ERROR (Status)) {
//
// Defined errors at this time are not found and out of resources.
@@ -83,10 +82,10 @@ LocateFvInstanceWithTables ( // This should not fail because of LocateHandleBuffer
//
Status = gBS->HandleProtocol (
- HandleBuffer[Index],
- &gEfiFirmwareVolume2ProtocolGuid,
- (VOID**) &FvInstance
- );
+ HandleBuffer[Index],
+ &gEfiFirmwareVolume2ProtocolGuid,
+ (VOID **)&FvInstance
+ );
ASSERT_EFI_ERROR (Status);
//
@@ -94,7 +93,7 @@ LocateFvInstanceWithTables ( //
Status = FvInstance->ReadFile (
FvInstance,
- (EFI_GUID*)PcdGetPtr (PcdAcpiTableStorageFile),
+ (EFI_GUID *)PcdGetPtr (PcdAcpiTableStorageFile),
NULL,
&Size,
&FileType,
@@ -124,7 +123,6 @@ LocateFvInstanceWithTables ( return Status;
}
-
/**
Find ACPI tables in an FV and install them.
@@ -140,18 +138,18 @@ LocateFvInstanceWithTables ( EFI_STATUS
EFIAPI
InstallOvmfFvTables (
- IN EFI_ACPI_TABLE_PROTOCOL *AcpiTable
+ IN EFI_ACPI_TABLE_PROTOCOL *AcpiTable
)
{
- EFI_STATUS Status;
- EFI_FIRMWARE_VOLUME2_PROTOCOL *FwVol;
- INTN Instance;
- EFI_ACPI_COMMON_HEADER *CurrentTable;
- UINTN TableHandle;
- UINT32 FvStatus;
- UINTN TableSize;
- UINTN Size;
- EFI_ACPI_TABLE_INSTALL_ACPI_TABLE TableInstallFunction;
+ EFI_STATUS Status;
+ EFI_FIRMWARE_VOLUME2_PROTOCOL *FwVol;
+ INTN Instance;
+ EFI_ACPI_COMMON_HEADER *CurrentTable;
+ UINTN TableHandle;
+ UINT32 FvStatus;
+ UINTN TableSize;
+ UINTN Size;
+ EFI_ACPI_TABLE_INSTALL_ACPI_TABLE TableInstallFunction;
Instance = 0;
CurrentTable = NULL;
@@ -171,19 +169,19 @@ InstallOvmfFvTables ( if (EFI_ERROR (Status)) {
return EFI_ABORTED;
}
+
ASSERT (FwVol != NULL);
//
// Read tables from the storage file.
//
while (Status == EFI_SUCCESS) {
-
Status = FwVol->ReadSection (
FwVol,
- (EFI_GUID*)PcdGetPtr (PcdAcpiTableStorageFile),
+ (EFI_GUID *)PcdGetPtr (PcdAcpiTableStorageFile),
EFI_SECTION_RAW,
Instance,
- (VOID**) &CurrentTable,
+ (VOID **)&CurrentTable,
&Size,
&FvStatus
);
@@ -193,7 +191,7 @@ InstallOvmfFvTables ( //
TableHandle = 0;
- TableSize = ((EFI_ACPI_DESCRIPTION_HEADER *) CurrentTable)->Length;
+ TableSize = ((EFI_ACPI_DESCRIPTION_HEADER *)CurrentTable)->Length;
ASSERT (Size >= TableSize);
//
@@ -240,13 +238,12 @@ InstallOvmfFvTables ( EFI_STATUS
EFIAPI
InstallAcpiTables (
- IN EFI_ACPI_TABLE_PROTOCOL *AcpiTable
+ IN EFI_ACPI_TABLE_PROTOCOL *AcpiTable
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
Status = InstallOvmfFvTables (AcpiTable);
return Status;
}
-
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h index 994ee2c7cd..54d1af073e 100644 --- a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h +++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h @@ -22,8 +22,8 @@ #include <IndustryStandard/Acpi.h>
typedef struct {
- EFI_PCI_IO_PROTOCOL *PciIo;
- UINT64 PciAttributes;
+ EFI_PCI_IO_PROTOCOL *PciIo;
+ UINT64 PciAttributes;
} ORIGINAL_ATTRIBUTES;
typedef struct S3_CONTEXT S3_CONTEXT;
@@ -31,43 +31,43 @@ typedef struct S3_CONTEXT S3_CONTEXT; EFI_STATUS
EFIAPI
InstallAcpiTable (
- IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
- IN VOID *AcpiTableBuffer,
- IN UINTN AcpiTableBufferSize,
- OUT UINTN *TableKey
+ IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
+ IN VOID *AcpiTableBuffer,
+ IN UINTN AcpiTableBufferSize,
+ OUT UINTN *TableKey
);
EFI_STATUS
EFIAPI
-BhyveInstallAcpiTable(
- IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
- IN VOID *AcpiTableBuffer,
- IN UINTN AcpiTableBufferSize,
- OUT UINTN *TableKey
+BhyveInstallAcpiTable (
+ IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
+ IN VOID *AcpiTableBuffer,
+ IN UINTN AcpiTableBufferSize,
+ OUT UINTN *TableKey
);
EFI_STATUS
EFIAPI
InstallXenTables (
- IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol
+ IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol
);
EFI_STATUS
EFIAPI
InstallAcpiTables (
- IN EFI_ACPI_TABLE_PROTOCOL *AcpiTable
+ IN EFI_ACPI_TABLE_PROTOCOL *AcpiTable
);
VOID
EnablePciDecoding (
- OUT ORIGINAL_ATTRIBUTES **OriginalAttributes,
- OUT UINTN *Count
+ OUT ORIGINAL_ATTRIBUTES **OriginalAttributes,
+ OUT UINTN *Count
);
VOID
RestorePciDecoding (
- IN ORIGINAL_ATTRIBUTES *OriginalAttributes,
- IN UINTN Count
+ IN ORIGINAL_ATTRIBUTES *OriginalAttributes,
+ IN UINTN Count
);
#endif /* _ACPI_PLATFORM_H_INCLUDED_ */
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c b/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c index 01ee894746..8e80aa33e1 100644 --- a/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c +++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/Bhyve.c @@ -16,28 +16,28 @@ STATIC EFI_STATUS
EFIAPI
BhyveInstallAcpiMadtTable (
- IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
- IN VOID *AcpiTableBuffer,
- IN UINTN AcpiTableBufferSize,
- OUT UINTN *TableKey
+ IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
+ IN VOID *AcpiTableBuffer,
+ IN UINTN AcpiTableBufferSize,
+ OUT UINTN *TableKey
)
{
- UINT32 CpuCount;
- UINTN cSize;
- UINTN NewBufferSize;
- EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER *Madt;
- EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE *LocalApic;
- EFI_ACPI_1_0_IO_APIC_STRUCTURE *IoApic;
- EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE *Iso;
- VOID *Ptr;
- UINTN Loop;
- EFI_STATUS Status;
+ UINT32 CpuCount;
+ UINTN cSize;
+ UINTN NewBufferSize;
+ EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER *Madt;
+ EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE *LocalApic;
+ EFI_ACPI_1_0_IO_APIC_STRUCTURE *IoApic;
+ EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE *Iso;
+ VOID *Ptr;
+ UINTN Loop;
+ EFI_STATUS Status;
ASSERT (AcpiTableBufferSize >= sizeof (EFI_ACPI_DESCRIPTION_HEADER));
// Query the host for the number of vCPUs
CpuCount = 0;
- cSize = sizeof(CpuCount);
+ cSize = sizeof (CpuCount);
if (BhyveFwCtlGet ("hw.ncpu", &CpuCount, &cSize) == RETURN_SUCCESS) {
DEBUG ((DEBUG_INFO, "Retrieved CpuCount %d\n", CpuCount));
ASSERT (CpuCount >= 1);
@@ -57,44 +57,45 @@ BhyveInstallAcpiMadtTable ( }
CopyMem (&(Madt->Header), AcpiTableBuffer, sizeof (EFI_ACPI_DESCRIPTION_HEADER));
- Madt->Header.Length = (UINT32) NewBufferSize;
+ Madt->Header.Length = (UINT32)NewBufferSize;
Madt->LocalApicAddress = 0xFEE00000;
Madt->Flags = EFI_ACPI_1_0_PCAT_COMPAT;
- Ptr = Madt + 1;
+ Ptr = Madt + 1;
LocalApic = Ptr;
for (Loop = 0; Loop < CpuCount; ++Loop) {
LocalApic->Type = EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC;
LocalApic->Length = sizeof (*LocalApic);
- LocalApic->AcpiProcessorId = (UINT8) Loop;
- LocalApic->ApicId = (UINT8) Loop;
+ LocalApic->AcpiProcessorId = (UINT8)Loop;
+ LocalApic->ApicId = (UINT8)Loop;
LocalApic->Flags = 1; // enabled
++LocalApic;
}
+
Ptr = LocalApic;
- IoApic = Ptr;
+ IoApic = Ptr;
IoApic->Type = EFI_ACPI_1_0_IO_APIC;
IoApic->Length = sizeof (*IoApic);
- IoApic->IoApicId = (UINT8) CpuCount;
+ IoApic->IoApicId = (UINT8)CpuCount;
IoApic->Reserved = EFI_ACPI_RESERVED_BYTE;
IoApic->IoApicAddress = 0xFEC00000;
IoApic->SystemVectorBase = 0x00000000;
- Ptr = IoApic + 1;
+ Ptr = IoApic + 1;
//
// IRQ0 (8254 Timer) => IRQ2 (PIC) Interrupt Source Override Structure
//
- Iso = Ptr;
+ Iso = Ptr;
Iso->Type = EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE;
Iso->Length = sizeof (*Iso);
Iso->Bus = 0x00; // ISA
Iso->Source = 0x00; // IRQ0
Iso->GlobalSystemInterruptVector = 0x00000002;
Iso->Flags = 0x0000; // Conforms to specs of the bus
- Ptr = Iso + 1;
+ Ptr = Iso + 1;
- ASSERT ((UINTN) ((UINT8 *)Ptr - (UINT8 *)Madt) == NewBufferSize);
+ ASSERT ((UINTN)((UINT8 *)Ptr - (UINT8 *)Madt) == NewBufferSize);
Status = InstallAcpiTable (AcpiProtocol, Madt, NewBufferSize, TableKey);
FreePool (Madt);
@@ -105,22 +106,22 @@ BhyveInstallAcpiMadtTable ( EFI_STATUS
EFIAPI
BhyveInstallAcpiTable (
- IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
- IN VOID *AcpiTableBuffer,
- IN UINTN AcpiTableBufferSize,
- OUT UINTN *TableKey
+ IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
+ IN VOID *AcpiTableBuffer,
+ IN UINTN AcpiTableBufferSize,
+ OUT UINTN *TableKey
)
{
EFI_ACPI_DESCRIPTION_HEADER *Hdr;
EFI_ACPI_TABLE_INSTALL_ACPI_TABLE TableInstallFunction;
- Hdr = (EFI_ACPI_DESCRIPTION_HEADER*) AcpiTableBuffer;
+ Hdr = (EFI_ACPI_DESCRIPTION_HEADER *)AcpiTableBuffer;
switch (Hdr->Signature) {
- case EFI_ACPI_1_0_APIC_SIGNATURE:
- TableInstallFunction = BhyveInstallAcpiMadtTable;
- break;
- default:
- TableInstallFunction = InstallAcpiTable;
+ case EFI_ACPI_1_0_APIC_SIGNATURE:
+ TableInstallFunction = BhyveInstallAcpiMadtTable;
+ break;
+ default:
+ TableInstallFunction = InstallAcpiTable;
}
return TableInstallFunction (
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/EntryPoint.c b/OvmfPkg/Bhyve/AcpiPlatformDxe/EntryPoint.c index f66f892911..b6ef101b2a 100644 --- a/OvmfPkg/Bhyve/AcpiPlatformDxe/EntryPoint.c +++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/EntryPoint.c @@ -16,49 +16,50 @@ FindAcpiTableProtocol ( VOID
)
{
- EFI_STATUS Status;
- EFI_ACPI_TABLE_PROTOCOL *AcpiTable;
+ EFI_STATUS Status;
+ EFI_ACPI_TABLE_PROTOCOL *AcpiTable;
Status = gBS->LocateProtocol (
&gEfiAcpiTableProtocolGuid,
NULL,
- (VOID**)&AcpiTable
+ (VOID **)&AcpiTable
);
ASSERT_EFI_ERROR (Status);
return AcpiTable;
}
-
STATIC
VOID
EFIAPI
OnRootBridgesConnected (
- IN EFI_EVENT Event,
- IN VOID *Context
+ IN EFI_EVENT Event,
+ IN VOID *Context
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
- DEBUG ((DEBUG_INFO,
+ DEBUG ((
+ DEBUG_INFO,
"%a: root bridges have been connected, installing ACPI tables\n",
- __FUNCTION__));
+ __FUNCTION__
+ ));
Status = InstallAcpiTables (FindAcpiTableProtocol ());
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: InstallAcpiTables: %r\n", __FUNCTION__, Status));
}
+
gBS->CloseEvent (Event);
}
-
EFI_STATUS
EFIAPI
AcpiPlatformEntryPoint (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
)
{
- EFI_STATUS Status;
- EFI_EVENT RootBridgesConnected;
+ EFI_STATUS Status;
+ EFI_EVENT RootBridgesConnected;
//
// If the platform doesn't support PCI, or PCI enumeration has been disabled,
@@ -66,8 +67,12 @@ AcpiPlatformEntryPoint ( // the full functionality.
//
if (PcdGetBool (PcdPciDisableBusEnumeration)) {
- DEBUG ((DEBUG_INFO, "%a: PCI or its enumeration disabled, installing "
- "ACPI tables\n", __FUNCTION__));
+ DEBUG ((
+ DEBUG_INFO,
+ "%a: PCI or its enumeration disabled, installing "
+ "ACPI tables\n",
+ __FUNCTION__
+ ));
return InstallAcpiTables (FindAcpiTableProtocol ());
}
@@ -77,13 +82,20 @@ AcpiPlatformEntryPoint ( // setup. (Note that we're a DXE_DRIVER; our entry point function is invoked
// strictly before BDS is entered and can connect the root bridges.)
//
- Status = gBS->CreateEventEx (EVT_NOTIFY_SIGNAL, TPL_CALLBACK,
- OnRootBridgesConnected, NULL /* Context */,
- &gRootBridgesConnectedEventGroupGuid, &RootBridgesConnected);
+ Status = gBS->CreateEventEx (
+ EVT_NOTIFY_SIGNAL,
+ TPL_CALLBACK,
+ OnRootBridgesConnected,
+ NULL /* Context */,
+ &gRootBridgesConnectedEventGroupGuid,
+ &RootBridgesConnected
+ );
if (!EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO,
+ DEBUG ((
+ DEBUG_INFO,
"%a: waiting for root bridges to be connected, registered callback\n",
- __FUNCTION__));
+ __FUNCTION__
+ ));
}
return Status;
diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/PciDecoding.c b/OvmfPkg/Bhyve/AcpiPlatformDxe/PciDecoding.c index 73894106c9..d31fd65393 100644 --- a/OvmfPkg/Bhyve/AcpiPlatformDxe/PciDecoding.c +++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/PciDecoding.c @@ -11,7 +11,6 @@ #include "AcpiPlatform.h"
-
/**
Collect all PciIo protocol instances in the system. Save their original
attributes, and enable IO and MMIO decoding for each.
@@ -38,15 +37,15 @@ **/
VOID
EnablePciDecoding (
- OUT ORIGINAL_ATTRIBUTES **OriginalAttributes,
- OUT UINTN *Count
+ OUT ORIGINAL_ATTRIBUTES **OriginalAttributes,
+ OUT UINTN *Count
)
{
- EFI_STATUS Status;
- UINTN NoHandles;
- EFI_HANDLE *Handles;
- ORIGINAL_ATTRIBUTES *OrigAttrs;
- UINTN Idx;
+ EFI_STATUS Status;
+ UINTN NoHandles;
+ EFI_HANDLE *Handles;
+ ORIGINAL_ATTRIBUTES *OrigAttrs;
+ UINTN Idx;
*OriginalAttributes = NULL;
*Count = 0;
@@ -59,8 +58,13 @@ EnablePciDecoding ( return;
}
- Status = gBS->LocateHandleBuffer (ByProtocol, &gEfiPciIoProtocolGuid,
- NULL /* SearchKey */, &NoHandles, &Handles);
+ Status = gBS->LocateHandleBuffer (
+ ByProtocol,
+ &gEfiPciIoProtocolGuid,
+ NULL /* SearchKey */,
+ &NoHandles,
+ &Handles
+ );
if (Status == EFI_NOT_FOUND) {
//
// No PCI devices were found on either of the root bridges. We're done.
@@ -69,49 +73,75 @@ EnablePciDecoding ( }
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_WARN, "%a: LocateHandleBuffer(): %r\n", __FUNCTION__,
- Status));
+ DEBUG ((
+ DEBUG_WARN,
+ "%a: LocateHandleBuffer(): %r\n",
+ __FUNCTION__,
+ Status
+ ));
return;
}
OrigAttrs = AllocatePool (NoHandles * sizeof *OrigAttrs);
if (OrigAttrs == NULL) {
- DEBUG ((DEBUG_WARN, "%a: AllocatePool(): out of resources\n",
- __FUNCTION__));
+ DEBUG ((
+ DEBUG_WARN,
+ "%a: AllocatePool(): out of resources\n",
+ __FUNCTION__
+ ));
goto FreeHandles;
}
for (Idx = 0; Idx < NoHandles; ++Idx) {
- EFI_PCI_IO_PROTOCOL *PciIo;
- UINT64 Attributes;
+ EFI_PCI_IO_PROTOCOL *PciIo;
+ UINT64 Attributes;
//
// Look up PciIo on the handle and stash it
//
- Status = gBS->HandleProtocol (Handles[Idx], &gEfiPciIoProtocolGuid,
- (VOID**)&PciIo);
+ Status = gBS->HandleProtocol (
+ Handles[Idx],
+ &gEfiPciIoProtocolGuid,
+ (VOID **)&PciIo
+ );
ASSERT_EFI_ERROR (Status);
OrigAttrs[Idx].PciIo = PciIo;
//
// Stash the current attributes
//
- Status = PciIo->Attributes (PciIo, EfiPciIoAttributeOperationGet, 0,
- &OrigAttrs[Idx].PciAttributes);
+ Status = PciIo->Attributes (
+ PciIo,
+ EfiPciIoAttributeOperationGet,
+ 0,
+ &OrigAttrs[Idx].PciAttributes
+ );
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_WARN, "%a: EfiPciIoAttributeOperationGet: %r\n",
- __FUNCTION__, Status));
+ DEBUG ((
+ DEBUG_WARN,
+ "%a: EfiPciIoAttributeOperationGet: %r\n",
+ __FUNCTION__,
+ Status
+ ));
goto RestoreAttributes;
}
//
// Retrieve supported attributes
//
- Status = PciIo->Attributes (PciIo, EfiPciIoAttributeOperationSupported, 0,
- &Attributes);
+ Status = PciIo->Attributes (
+ PciIo,
+ EfiPciIoAttributeOperationSupported,
+ 0,
+ &Attributes
+ );
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_WARN, "%a: EfiPciIoAttributeOperationSupported: %r\n",
- __FUNCTION__, Status));
+ DEBUG ((
+ DEBUG_WARN,
+ "%a: EfiPciIoAttributeOperationSupported: %r\n",
+ __FUNCTION__,
+ Status
+ ));
goto RestoreAttributes;
}
@@ -119,11 +149,19 @@ EnablePciDecoding ( // Enable IO and MMIO decoding
//
Attributes &= EFI_PCI_IO_ATTRIBUTE_IO | EFI_PCI_IO_ATTRIBUTE_MEMORY;
- Status = PciIo->Attributes (PciIo, EfiPciIoAttributeOperationEnable,
- Attributes, NULL);
+ Status = PciIo->Attributes (
+ PciIo,
+ EfiPciIoAttributeOperationEnable,
+ Attributes,
+ NULL
+ );
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_WARN, "%a: EfiPciIoAttributeOperationEnable: %r\n",
- __FUNCTION__, Status));
+ DEBUG ((
+ DEBUG_WARN,
+ "%a: EfiPciIoAttributeOperationEnable: %r\n",
+ __FUNCTION__,
+ Status
+ ));
goto RestoreAttributes;
}
}
@@ -139,19 +177,20 @@ EnablePciDecoding ( RestoreAttributes:
while (Idx > 0) {
--Idx;
- OrigAttrs[Idx].PciIo->Attributes (OrigAttrs[Idx].PciIo,
+ OrigAttrs[Idx].PciIo->Attributes (
+ OrigAttrs[Idx].PciIo,
EfiPciIoAttributeOperationSet,
OrigAttrs[Idx].PciAttributes,
NULL
);
}
+
FreePool (OrigAttrs);
FreeHandles:
FreePool (Handles);
}
-
/**
Restore the original PCI attributes saved with EnablePciDecoding().
@@ -169,11 +208,11 @@ FreeHandles: **/
VOID
RestorePciDecoding (
- IN ORIGINAL_ATTRIBUTES *OriginalAttributes,
- IN UINTN Count
+ IN ORIGINAL_ATTRIBUTES *OriginalAttributes,
+ IN UINTN Count
)
{
- UINTN Idx;
+ UINTN Idx;
ASSERT ((OriginalAttributes == NULL) == (Count == 0));
if (OriginalAttributes == NULL) {
@@ -188,5 +227,6 @@ RestorePciDecoding ( NULL
);
}
+
FreePool (OriginalAttributes);
}
diff --git a/OvmfPkg/Bhyve/AcpiTables/Platform.h b/OvmfPkg/Bhyve/AcpiTables/Platform.h index c6d43041f3..4561adc9f2 100644 --- a/OvmfPkg/Bhyve/AcpiTables/Platform.h +++ b/OvmfPkg/Bhyve/AcpiTables/Platform.h @@ -20,53 +20,53 @@ //
// ACPI table information used to initialize tables.
//
-#define EFI_ACPI_OEM_ID 'B','H','Y','V','E',' ' // OEMID 6 bytes long
-#define EFI_ACPI_OEM_REVISION 0x1
-#define EFI_ACPI_CREATOR_ID SIGNATURE_32('B','H','Y','V')
-#define EFI_ACPI_CREATOR_REVISION 0x00000001
+#define EFI_ACPI_OEM_ID 'B','H','Y','V','E',' ' // OEMID 6 bytes long
+#define EFI_ACPI_OEM_REVISION 0x1
+#define EFI_ACPI_CREATOR_ID SIGNATURE_32('B','H','Y','V')
+#define EFI_ACPI_CREATOR_REVISION 0x00000001
-#define INT_MODEL 0x01
-#define SCI_INT_VECTOR 0x0009
-#define SMI_CMD_IO_PORT 0xB2
-#define ACPI_ENABLE 0xA0
-#define ACPI_DISABLE 0xA1
-#define S4BIOS_REQ 0x00
-#define PM1a_EVT_BLK 0x00000400 /* TNXXX */
-#define PM1b_EVT_BLK 0x00000000
-#define PM1a_CNT_BLK 0x00000404 /* TNXXX */
-#define PM1b_CNT_BLK 0x00000000
-#define PM2_CNT_BLK 0x00000000
-#define PM_TMR_BLK 0x00000408
-#define GPE0_BLK 0x00000000
-#define GPE1_BLK 0x00000000
-#define PM1_EVT_LEN 0x04
-#define PM1_CNT_LEN 0x02
-#define PM2_CNT_LEN 0x00
-#define PM_TM_LEN 0x04
-#define GPE0_BLK_LEN 0x00
-#define GPE1_BLK_LEN 0x00
-#define GPE1_BASE 0x00
-#define RESERVED 0x00
-#define P_LVL2_LAT 0x0000
-#define P_LVL3_LAT 0x0000
-#define FLUSH_SIZE 0x0000
-#define FLUSH_STRIDE 0x0000
-#define DUTY_OFFSET 0x00
-#define DUTY_WIDTH 0x00
-#define DAY_ALRM 0x00
-#define MON_ALRM 0x00
-#define CENTURY 0x32
-#define IAPC_BOOT_ARCH 0x12 /* 8042 present, disable PCIe ASPM */
-#define FACP_FLAGS (EFI_ACPI_1_0_WBINVD | EFI_ACPI_1_0_PROC_C1 | \
+#define INT_MODEL 0x01
+#define SCI_INT_VECTOR 0x0009
+#define SMI_CMD_IO_PORT 0xB2
+#define ACPI_ENABLE 0xA0
+#define ACPI_DISABLE 0xA1
+#define S4BIOS_REQ 0x00
+#define PM1a_EVT_BLK 0x00000400 /* TNXXX */
+#define PM1b_EVT_BLK 0x00000000
+#define PM1a_CNT_BLK 0x00000404 /* TNXXX */
+#define PM1b_CNT_BLK 0x00000000
+#define PM2_CNT_BLK 0x00000000
+#define PM_TMR_BLK 0x00000408
+#define GPE0_BLK 0x00000000
+#define GPE1_BLK 0x00000000
+#define PM1_EVT_LEN 0x04
+#define PM1_CNT_LEN 0x02
+#define PM2_CNT_LEN 0x00
+#define PM_TM_LEN 0x04
+#define GPE0_BLK_LEN 0x00
+#define GPE1_BLK_LEN 0x00
+#define GPE1_BASE 0x00
+#define RESERVED 0x00
+#define P_LVL2_LAT 0x0000
+#define P_LVL3_LAT 0x0000
+#define FLUSH_SIZE 0x0000
+#define FLUSH_STRIDE 0x0000
+#define DUTY_OFFSET 0x00
+#define DUTY_WIDTH 0x00
+#define DAY_ALRM 0x00
+#define MON_ALRM 0x00
+#define CENTURY 0x32
+#define IAPC_BOOT_ARCH 0x12 /* 8042 present, disable PCIe ASPM */
+#define FACP_FLAGS (EFI_ACPI_1_0_WBINVD | EFI_ACPI_1_0_PROC_C1 | \
EFI_ACPI_1_0_SLP_BUTTON | EFI_ACPI_1_0_TMR_VAL_EXT | \
EFI_ACPI_2_0_RESET_REG_SUP | \
EFI_ACPI_3_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE)
-#define FACP_RESET_REG { \
+#define FACP_RESET_REG { \
EFI_ACPI_3_0_SYSTEM_IO, /* Address Space ID */ \
8, /* Bit Width */ \
0, /* Bit Offset */ \
EFI_ACPI_3_0_BYTE, /* Byte Access */ \
0xCF9 /* I/O Port */ \
}
-#define FACP_RESET_VAL 0x6
+#define FACP_RESET_VAL 0x6
#endif
diff --git a/OvmfPkg/Bhyve/BhyveRfbDxe/ComponentName.c b/OvmfPkg/Bhyve/BhyveRfbDxe/ComponentName.c index 673cd235a1..5e734d0503 100644 --- a/OvmfPkg/Bhyve/BhyveRfbDxe/ComponentName.c +++ b/OvmfPkg/Bhyve/BhyveRfbDxe/ComponentName.c @@ -30,17 +30,17 @@ EmuGopComponentNameGetDriverName ( EFI_STATUS
EFIAPI
EmuGopComponentNameGetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE ChildHandle OPTIONAL,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN CHAR8 *Language,
+ OUT CHAR16 **ControllerName
);
//
// EFI Component Name Protocol
//
-EFI_COMPONENT_NAME_PROTOCOL gEmuGopComponentName = {
+EFI_COMPONENT_NAME_PROTOCOL gEmuGopComponentName = {
EmuGopComponentNameGetDriverName,
EmuGopComponentNameGetControllerName,
"eng"
@@ -49,19 +49,17 @@ EFI_COMPONENT_NAME_PROTOCOL gEmuGopComponentName = { //
// EFI Component Name 2 Protocol
//
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gEmuGopComponentName2 = {
- (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) EmuGopComponentNameGetDriverName,
- (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) EmuGopComponentNameGetControllerName,
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gEmuGopComponentName2 = {
+ (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)EmuGopComponentNameGetDriverName,
+ (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)EmuGopComponentNameGetControllerName,
"en"
};
-
-EFI_UNICODE_STRING_TABLE mEmuGopDriverNameTable[] = {
+EFI_UNICODE_STRING_TABLE mEmuGopDriverNameTable[] = {
{ "eng", L"Emulator GOP Driver" },
- { NULL , NULL }
+ { NULL, NULL }
};
-
/**
Retrieves a Unicode string that is the user readable name of the driver.
@@ -118,7 +116,6 @@ EmuGopComponentNameGetDriverName ( );
}
-
/**
Retrieves a Unicode string that is the user readable name of the controller
that is being managed by a driver.
@@ -190,11 +187,11 @@ EmuGopComponentNameGetDriverName ( EFI_STATUS
EFIAPI
EmuGopComponentNameGetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE ChildHandle OPTIONAL,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN CHAR8 *Language,
+ OUT CHAR16 **ControllerName
)
{
return EFI_UNSUPPORTED;
diff --git a/OvmfPkg/Bhyve/BhyveRfbDxe/Gop.h b/OvmfPkg/Bhyve/BhyveRfbDxe/Gop.h index 13cf397626..128b4a5fd4 100644 --- a/OvmfPkg/Bhyve/BhyveRfbDxe/Gop.h +++ b/OvmfPkg/Bhyve/BhyveRfbDxe/Gop.h @@ -31,27 +31,27 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include <IndustryStandard/Pci.h>
-#define GRAPHICS_OUTPUT_INVALID_MODE_NUMBER 0xffff
+#define GRAPHICS_OUTPUT_INVALID_MODE_NUMBER 0xffff
typedef struct {
- UINT32 HorizontalResolution;
- UINT32 VerticalResolution;
- UINT32 ColorDepth;
- UINT32 RefreshRate;
+ UINT32 HorizontalResolution;
+ UINT32 VerticalResolution;
+ UINT32 ColorDepth;
+ UINT32 RefreshRate;
} GOP_MODE_DATA;
-#define PIXEL_RED_SHIFT 0
-#define PIXEL_GREEN_SHIFT 3
-#define PIXEL_BLUE_SHIFT 6
+#define PIXEL_RED_SHIFT 0
+#define PIXEL_GREEN_SHIFT 3
+#define PIXEL_BLUE_SHIFT 6
#define PIXEL_RED_MASK (BIT7 | BIT6 | BIT5)
#define PIXEL_GREEN_MASK (BIT4 | BIT3 | BIT2)
#define PIXEL_BLUE_MASK (BIT1 | BIT0)
-#define PIXEL_TO_COLOR_BYTE(pixel, mask, shift) ((UINT8) ((pixel & mask) << shift))
-#define PIXEL_TO_RED_BYTE(pixel) PIXEL_TO_COLOR_BYTE(pixel, PIXEL_RED_MASK, PIXEL_RED_SHIFT)
-#define PIXEL_TO_GREEN_BYTE(pixel) PIXEL_TO_COLOR_BYTE(pixel, PIXEL_GREEN_MASK, PIXEL_GREEN_SHIFT)
-#define PIXEL_TO_BLUE_BYTE(pixel) PIXEL_TO_COLOR_BYTE(pixel, PIXEL_BLUE_MASK, PIXEL_BLUE_SHIFT)
+#define PIXEL_TO_COLOR_BYTE(pixel, mask, shift) ((UINT8) ((pixel & mask) << shift))
+#define PIXEL_TO_RED_BYTE(pixel) PIXEL_TO_COLOR_BYTE(pixel, PIXEL_RED_MASK, PIXEL_RED_SHIFT)
+#define PIXEL_TO_GREEN_BYTE(pixel) PIXEL_TO_COLOR_BYTE(pixel, PIXEL_GREEN_MASK, PIXEL_GREEN_SHIFT)
+#define PIXEL_TO_BLUE_BYTE(pixel) PIXEL_TO_COLOR_BYTE(pixel, PIXEL_BLUE_MASK, PIXEL_BLUE_SHIFT)
#define RGB_BYTES_TO_PIXEL(Red, Green, Blue) \
(UINT8) ( (((Red) >> PIXEL_RED_SHIFT) & PIXEL_RED_MASK) | \
@@ -62,61 +62,60 @@ typedef struct { #define PIXEL24_GREEN_MASK 0x0000ff00
#define PIXEL24_BLUE_MASK 0x000000ff
-extern EFI_DRIVER_BINDING_PROTOCOL gEmuGopDriverBinding;
-extern EFI_COMPONENT_NAME_PROTOCOL gEmuGopComponentName;
+extern EFI_DRIVER_BINDING_PROTOCOL gEmuGopDriverBinding;
+extern EFI_COMPONENT_NAME_PROTOCOL gEmuGopComponentName;
-#define EMU_UGA_CLASS_NAME L"EmuGopWindow"
+#define EMU_UGA_CLASS_NAME L"EmuGopWindow"
#define GOP_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('G', 'o', 'p', 'N')
typedef struct {
- UINT64 Signature;
+ UINT64 Signature;
- EFI_HANDLE Handle;
- EFI_PCI_IO_PROTOCOL *PciIo;
- EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;
- EFI_DEVICE_PATH_PROTOCOL *GopDevicePath;
+ EFI_HANDLE Handle;
+ EFI_PCI_IO_PROTOCOL *PciIo;
+ EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;
+ EFI_DEVICE_PATH_PROTOCOL *GopDevicePath;
- EFI_UNICODE_STRING_TABLE *ControllerNameTable;
+ EFI_UNICODE_STRING_TABLE *ControllerNameTable;
//
// GOP Private Data for QueryMode ()
//
- GOP_MODE_DATA *ModeData;
+ GOP_MODE_DATA *ModeData;
- UINT64 FbAddr;
- UINT32 FbSize;
+ UINT64 FbAddr;
+ UINT32 FbSize;
} GOP_PRIVATE_DATA;
-
#define GOP_PRIVATE_DATA_FROM_THIS(a) \
CR(a, GOP_PRIVATE_DATA, GraphicsOutput, GOP_PRIVATE_DATA_SIGNATURE)
typedef struct {
- UINT32 FbSize;
- UINT16 Width;
- UINT16 Height;
- UINT16 Depth;
- UINT16 RefreshRate;
+ UINT32 FbSize;
+ UINT16 Width;
+ UINT16 Height;
+ UINT16 Depth;
+ UINT16 RefreshRate;
} BHYVE_FBUF_MEMREGS;
//
// Global Protocol Variables
//
-extern EFI_DRIVER_BINDING_PROTOCOL gEmuGopDriverBinding;
-extern EFI_COMPONENT_NAME_PROTOCOL gEmuGopComponentName;
-extern EFI_COMPONENT_NAME2_PROTOCOL gEmuGopComponentName2;
+extern EFI_DRIVER_BINDING_PROTOCOL gEmuGopDriverBinding;
+extern EFI_COMPONENT_NAME_PROTOCOL gEmuGopComponentName;
+extern EFI_COMPONENT_NAME2_PROTOCOL gEmuGopComponentName2;
//
// Gop Hardware abstraction internal worker functions
//
EFI_STATUS
EmuGopConstructor (
- IN GOP_PRIVATE_DATA *Private
+ IN GOP_PRIVATE_DATA *Private
);
EFI_STATUS
EmuGopDestructor (
- IN GOP_PRIVATE_DATA *Private
+ IN GOP_PRIVATE_DATA *Private
);
VOID
@@ -129,21 +128,21 @@ ShutdownGopEvent ( VOID
BhyveSetGraphicsMode (
GOP_PRIVATE_DATA *Private,
- UINT16 Width,
- UINT16 Height,
- UINT16 Depth
+ UINT16 Width,
+ UINT16 Height,
+ UINT16 Depth
);
VOID
BhyveGetMemregs (
- GOP_PRIVATE_DATA *Private,
- BHYVE_FBUF_MEMREGS *Memregs
+ GOP_PRIVATE_DATA *Private,
+ BHYVE_FBUF_MEMREGS *Memregs
);
VOID
InstallVbeShim (
- IN CONST CHAR16 *CardName,
- IN EFI_PHYSICAL_ADDRESS FrameBufferBase
+ IN CONST CHAR16 *CardName,
+ IN EFI_PHYSICAL_ADDRESS FrameBufferBase
);
#endif /* _GOP_H_ */
diff --git a/OvmfPkg/Bhyve/BhyveRfbDxe/GopDriver.c b/OvmfPkg/Bhyve/BhyveRfbDxe/GopDriver.c index bab4fbda53..bd8a0d804b 100644 --- a/OvmfPkg/Bhyve/BhyveRfbDxe/GopDriver.c +++ b/OvmfPkg/Bhyve/BhyveRfbDxe/GopDriver.c @@ -13,13 +13,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent STATIC VOID
BhyveGetGraphicsMode (
- EFI_PCI_IO_PROTOCOL *PciIo,
- UINT16 *Width,
- UINT16 *Height,
- UINT16 *Depth
+ EFI_PCI_IO_PROTOCOL *PciIo,
+ UINT16 *Width,
+ UINT16 *Height,
+ UINT16 *Depth
);
-
/**
Tests to see if this driver supports a given controller. If a child device is provided,
it further tests to see if this driver supports creating a handle for the specified child device.
@@ -65,15 +64,15 @@ BhyveGetGraphicsMode ( EFI_STATUS
EFIAPI
EmuGopDriverBindingSupported (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Handle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE Handle,
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
{
- EFI_STATUS Status;
- EFI_PCI_IO_PROTOCOL *PciIo;
- PCI_TYPE00 Pci;
- UINT16 Width, Height, Depth;
+ EFI_STATUS Status;
+ EFI_PCI_IO_PROTOCOL *PciIo;
+ PCI_TYPE00 Pci;
+ UINT16 Width, Height, Depth;
//
// Open the IO Abstraction(s) needed to perform the supported test
@@ -81,7 +80,7 @@ EmuGopDriverBindingSupported ( Status = gBS->OpenProtocol (
Handle,
&gEfiPciIoProtocolGuid,
- (VOID **) &PciIo,
+ (VOID **)&PciIo,
This->DriverBindingHandle,
Handle,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -107,11 +106,11 @@ EmuGopDriverBindingSupported ( }
Status = EFI_UNSUPPORTED;
- if (Pci.Hdr.VendorId == 0xFB5D && Pci.Hdr.DeviceId == 0x40FB) {
- DEBUG((DEBUG_INFO, "BHYVE framebuffer device detected\n"));
+ if ((Pci.Hdr.VendorId == 0xFB5D) && (Pci.Hdr.DeviceId == 0x40FB)) {
+ DEBUG ((DEBUG_INFO, "BHYVE framebuffer device detected\n"));
Status = EFI_SUCCESS;
- BhyveGetGraphicsMode(PciIo, &Width, &Height, &Depth);
+ BhyveGetGraphicsMode (PciIo, &Width, &Height, &Depth);
PcdSet32S (PcdVideoHorizontalResolution, Width);
PcdSet32S (PcdVideoVerticalResolution, Height);
}
@@ -121,16 +120,15 @@ Done: // Close the PCI I/O Protocol
//
gBS->CloseProtocol (
- Handle,
- &gEfiPciIoProtocolGuid,
- This->DriverBindingHandle,
- Handle
- );
+ Handle,
+ &gEfiPciIoProtocolGuid,
+ This->DriverBindingHandle,
+ Handle
+ );
return Status;
}
-
/**
Starts a device controller or a bus controller.
@@ -169,25 +167,25 @@ Done: EFI_STATUS
EFIAPI
EmuGopDriverBindingStart (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE Handle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE Handle,
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
{
- BHYVE_FBUF_MEMREGS Memregs;
- GOP_PRIVATE_DATA *Private;
- EFI_STATUS Status;
- EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *MmioDesc;
+ BHYVE_FBUF_MEMREGS Memregs;
+ GOP_PRIVATE_DATA *Private;
+ EFI_STATUS Status;
+ EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *MmioDesc;
//
// Allocate Private context data for SGO inteface.
//
Private = NULL;
- Status = gBS->AllocatePool (
- EfiBootServicesData,
- sizeof (GOP_PRIVATE_DATA),
- (VOID **)&Private
- );
+ Status = gBS->AllocatePool (
+ EfiBootServicesData,
+ sizeof (GOP_PRIVATE_DATA),
+ (VOID **)&Private
+ );
if (EFI_ERROR (Status)) {
goto Done;
}
@@ -204,7 +202,7 @@ EmuGopDriverBindingStart ( Status = gBS->OpenProtocol (
Handle,
&gEfiPciIoProtocolGuid,
- (VOID **) &Private->PciIo,
+ (VOID **)&Private->PciIo,
This->DriverBindingHandle,
Handle,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -217,24 +215,30 @@ EmuGopDriverBindingStart ( // Check if fbuf mmio BAR is present
//
MmioDesc = NULL;
- Status = Private->PciIo->GetBarAttributes (
- Private->PciIo,
- PCI_BAR_IDX0,
- NULL,
- (VOID**) &MmioDesc
- );
+ Status = Private->PciIo->GetBarAttributes (
+ Private->PciIo,
+ PCI_BAR_IDX0,
+ NULL,
+ (VOID **)&MmioDesc
+ );
if (EFI_ERROR (Status) ||
- MmioDesc->ResType != ACPI_ADDRESS_SPACE_TYPE_MEM) {
+ (MmioDesc->ResType != ACPI_ADDRESS_SPACE_TYPE_MEM))
+ {
DEBUG ((DEBUG_INFO, "BHYVE GOP: No mmio bar\n"));
} else {
- DEBUG ((DEBUG_INFO, "BHYVE GOP: Using mmio bar @ 0x%lx\n",
- MmioDesc->AddrRangeMin));
- BhyveGetMemregs(Private, &Memregs);
+ DEBUG ((
+ DEBUG_INFO,
+ "BHYVE GOP: Using mmio bar @ 0x%lx\n",
+ MmioDesc->AddrRangeMin
+ ));
+ BhyveGetMemregs (Private, &Memregs);
Private->FbSize = Memregs.FbSize;
}
+
if (MmioDesc != NULL) {
FreePool (MmioDesc);
}
+
if (EFI_ERROR (Status)) {
goto Done;
}
@@ -243,18 +247,22 @@ EmuGopDriverBindingStart ( // Check if fbuf frame-buffer BAR is present
//
MmioDesc = NULL;
- Status = Private->PciIo->GetBarAttributes (
- Private->PciIo,
- PCI_BAR_IDX1,
- NULL,
- (VOID**) &MmioDesc
- );
+ Status = Private->PciIo->GetBarAttributes (
+ Private->PciIo,
+ PCI_BAR_IDX1,
+ NULL,
+ (VOID **)&MmioDesc
+ );
if (EFI_ERROR (Status) ||
- MmioDesc->ResType != ACPI_ADDRESS_SPACE_TYPE_MEM) {
+ (MmioDesc->ResType != ACPI_ADDRESS_SPACE_TYPE_MEM))
+ {
DEBUG ((DEBUG_INFO, "BHYVE GOP: No frame-buffer bar\n"));
} else {
- DEBUG ((DEBUG_INFO, "BHYVE GOP: Using frame-buffer bar @ 0x%lx\n",
- MmioDesc->AddrRangeMin));
+ DEBUG ((
+ DEBUG_INFO,
+ "BHYVE GOP: Using frame-buffer bar @ 0x%lx\n",
+ MmioDesc->AddrRangeMin
+ ));
Private->FbAddr = MmioDesc->AddrRangeMin;
// XXX assert BAR is >= size
}
@@ -262,12 +270,17 @@ EmuGopDriverBindingStart ( if (MmioDesc != NULL) {
FreePool (MmioDesc);
}
+
if (EFI_ERROR (Status)) {
goto Done;
}
- DEBUG ((DEBUG_INFO, "BHYVE GOP: Framebuf addr 0x%lx, size %x\n",
- Private->FbAddr, Private->FbSize));
+ DEBUG ((
+ DEBUG_INFO,
+ "BHYVE GOP: Framebuf addr 0x%lx, size %x\n",
+ Private->FbAddr,
+ Private->FbSize
+ ));
Status = EmuGopConstructor (Private);
if (EFI_ERROR (Status)) {
@@ -279,18 +292,19 @@ EmuGopDriverBindingStart ( //
Status = gBS->InstallMultipleProtocolInterfaces (
&Private->Handle,
- &gEfiGraphicsOutputProtocolGuid, &Private->GraphicsOutput,
+ &gEfiGraphicsOutputProtocolGuid,
+ &Private->GraphicsOutput,
NULL
);
- DEBUG((DEBUG_INFO, "BHYVE framebuffer device started\n"));
+ DEBUG ((DEBUG_INFO, "BHYVE framebuffer device started\n"));
//
// Install int10 handler
//
-#ifndef CSM_ENABLE
+ #ifndef CSM_ENABLE
InstallVbeShim (L"Framebuffer", Private->FbAddr);
-#endif
+ #endif
Done:
if (EFI_ERROR (Status)) {
@@ -309,8 +323,6 @@ Done: return Status;
}
-
-
/**
Stops a device controller or a bus controller.
@@ -346,11 +358,11 @@ EmuGopDriverBindingStop ( IN EFI_HANDLE *ChildHandleBuffer
)
{
- EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
- EFI_STATUS Status;
- GOP_PRIVATE_DATA *Private;
+ EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
+ EFI_STATUS Status;
+ GOP_PRIVATE_DATA *Private;
- DEBUG((DEBUG_INFO, "BHYVE framebuffer device stopping\n"));
+ DEBUG ((DEBUG_INFO, "BHYVE framebuffer device stopping\n"));
Status = gBS->OpenProtocol (
Handle,
@@ -377,7 +389,8 @@ EmuGopDriverBindingStop ( //
Status = gBS->UninstallMultipleProtocolInterfaces (
Private->Handle,
- &gEfiGraphicsOutputProtocolGuid, &Private->GraphicsOutput,
+ &gEfiGraphicsOutputProtocolGuid,
+ &Private->GraphicsOutput,
NULL
);
if (!EFI_ERROR (Status)) {
@@ -390,11 +403,11 @@ EmuGopDriverBindingStop ( }
gBS->CloseProtocol (
- Handle,
- &gEfiPciIoProtocolGuid,
- This->DriverBindingHandle,
- Private->Handle
- );
+ Handle,
+ &gEfiPciIoProtocolGuid,
+ This->DriverBindingHandle,
+ Private->Handle
+ );
//
// Free our instance data
@@ -402,18 +415,16 @@ EmuGopDriverBindingStop ( FreeUnicodeStringTable (Private->ControllerNameTable);
gBS->FreePool (Private);
-
}
return Status;
}
-
///
/// This protocol provides the services required to determine if a driver supports a given controller.
/// If a controller is supported, then it also provides routines to start and stop the controller.
///
-EFI_DRIVER_BINDING_PROTOCOL gEmuGopDriverBinding = {
+EFI_DRIVER_BINDING_PROTOCOL gEmuGopDriverBinding = {
EmuGopDriverBindingSupported,
EmuGopDriverBindingStart,
EmuGopDriverBindingStop,
@@ -422,8 +433,6 @@ EFI_DRIVER_BINDING_PROTOCOL gEmuGopDriverBinding = { NULL
};
-
-
/**
The user Entry Point for module EmuGop. The user code starts with this function.
@@ -437,11 +446,11 @@ EFI_DRIVER_BINDING_PROTOCOL gEmuGopDriverBinding = { EFI_STATUS
EFIAPI
InitializeEmuGop (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
Status = EfiLibInstallDriverBindingComponentName2 (
ImageHandle,
@@ -453,33 +462,31 @@ InitializeEmuGop ( );
ASSERT_EFI_ERROR (Status);
-
return Status;
}
STATIC VOID
BhyveGetGraphicsMode (
- EFI_PCI_IO_PROTOCOL *PciIo,
- UINT16 *Width,
- UINT16 *Height,
- UINT16 *Depth
+ EFI_PCI_IO_PROTOCOL *PciIo,
+ UINT16 *Width,
+ UINT16 *Height,
+ UINT16 *Depth
)
{
- BHYVE_FBUF_MEMREGS BhyveRegs;
- UINT64 Offset;
- EFI_STATUS Status;
-
+ BHYVE_FBUF_MEMREGS BhyveRegs;
+ UINT64 Offset;
+ EFI_STATUS Status;
Offset = (UINT64)&BhyveRegs.Width - (UINT64)&BhyveRegs;
Status = PciIo->Mem.Read (
- PciIo,
- EfiPciIoWidthUint16,
- PCI_BAR_IDX0,
- Offset,
- 3,
- &BhyveRegs.Width
- );
+ PciIo,
+ EfiPciIoWidthUint16,
+ PCI_BAR_IDX0,
+ Offset,
+ 3,
+ &BhyveRegs.Width
+ );
*Width = BhyveRegs.Width;
*Height = BhyveRegs.Height;
@@ -493,51 +500,56 @@ BhyveGetGraphicsMode ( VOID
BhyveSetGraphicsMode (
GOP_PRIVATE_DATA *Private,
- UINT16 Width,
- UINT16 Height,
- UINT16 Depth
+ UINT16 Width,
+ UINT16 Height,
+ UINT16 Depth
)
{
- BHYVE_FBUF_MEMREGS BhyveRegs;
- UINT64 Offset;
- EFI_STATUS Status;
+ BHYVE_FBUF_MEMREGS BhyveRegs;
+ UINT64 Offset;
+ EFI_STATUS Status;
DEBUG ((DEBUG_INFO, "BHYVE Set Graphics Mode: w %d, h %d\n", Width, Height));
BhyveRegs.Width = Width;
BhyveRegs.Height = Height;
BhyveRegs.Depth = Depth;
- Offset = (UINT64)&BhyveRegs.Width - (UINT64)&BhyveRegs;
+ Offset = (UINT64)&BhyveRegs.Width - (UINT64)&BhyveRegs;
Status = Private->PciIo->Mem.Write (
- Private->PciIo,
- EfiPciIoWidthUint16,
- PCI_BAR_IDX0,
- Offset,
- 3,
- &BhyveRegs.Width
- );
+ Private->PciIo,
+ EfiPciIoWidthUint16,
+ PCI_BAR_IDX0,
+ Offset,
+ 3,
+ &BhyveRegs.Width
+ );
ASSERT_EFI_ERROR (Status);
}
VOID
BhyveGetMemregs (
- GOP_PRIVATE_DATA *Private,
- BHYVE_FBUF_MEMREGS *Memregs
+ GOP_PRIVATE_DATA *Private,
+ BHYVE_FBUF_MEMREGS *Memregs
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
Status = Private->PciIo->Mem.Read (
- Private->PciIo,
- EfiPciIoWidthUint32,
- PCI_BAR_IDX0,
- 0,
- 3,
- Memregs
- );
+ Private->PciIo,
+ EfiPciIoWidthUint32,
+ PCI_BAR_IDX0,
+ 0,
+ 3,
+ Memregs
+ );
ASSERT_EFI_ERROR (Status);
- DEBUG ((DEBUG_INFO, "BHYVE Get Memregs, size %d width %d height %d\n",
- Memregs->FbSize, Memregs->Width, Memregs->Height));
+ DEBUG ((
+ DEBUG_INFO,
+ "BHYVE Get Memregs, size %d width %d height %d\n",
+ Memregs->FbSize,
+ Memregs->Width,
+ Memregs->Height
+ ));
}
diff --git a/OvmfPkg/Bhyve/BhyveRfbDxe/GopScreen.c b/OvmfPkg/Bhyve/BhyveRfbDxe/GopScreen.c index 4eaf7001b4..2fcc1dd56a 100644 --- a/OvmfPkg/Bhyve/BhyveRfbDxe/GopScreen.c +++ b/OvmfPkg/Bhyve/BhyveRfbDxe/GopScreen.c @@ -22,45 +22,48 @@ Abstract: #include "Gop.h"
#include <Library/FrameBufferBltLib.h>
+EFI_EVENT mGopScreenExitBootServicesEvent;
-EFI_EVENT mGopScreenExitBootServicesEvent;
-
-GOP_MODE_DATA mGopModeData[] = {
- { 0, 0, 32, 0 }, // Filled in with user-spec'd resolution
- { 1024, 768, 32, 0 },
- { 800, 600, 32, 0 },
- { 640, 480, 32, 0 }
- };
+GOP_MODE_DATA mGopModeData[] = {
+ { 0, 0, 32, 0 }, // Filled in with user-spec'd resolution
+ { 1024, 768, 32, 0 },
+ { 800, 600, 32, 0 },
+ { 640, 480, 32, 0 }
+};
STATIC
VOID
BhyveGopCompleteModeInfo (
- IN GOP_MODE_DATA *ModeData,
+ IN GOP_MODE_DATA *ModeData,
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info
)
{
Info->Version = 0;
if (ModeData->ColorDepth == 8) {
- Info->PixelFormat = PixelBitMask;
- Info->PixelInformation.RedMask = PIXEL_RED_MASK;
- Info->PixelInformation.GreenMask = PIXEL_GREEN_MASK;
- Info->PixelInformation.BlueMask = PIXEL_BLUE_MASK;
+ Info->PixelFormat = PixelBitMask;
+ Info->PixelInformation.RedMask = PIXEL_RED_MASK;
+ Info->PixelInformation.GreenMask = PIXEL_GREEN_MASK;
+ Info->PixelInformation.BlueMask = PIXEL_BLUE_MASK;
Info->PixelInformation.ReservedMask = 0;
} else if (ModeData->ColorDepth == 24) {
- Info->PixelFormat = PixelBitMask;
- Info->PixelInformation.RedMask = PIXEL24_RED_MASK;
- Info->PixelInformation.GreenMask = PIXEL24_GREEN_MASK;
- Info->PixelInformation.BlueMask = PIXEL24_BLUE_MASK;
+ Info->PixelFormat = PixelBitMask;
+ Info->PixelInformation.RedMask = PIXEL24_RED_MASK;
+ Info->PixelInformation.GreenMask = PIXEL24_GREEN_MASK;
+ Info->PixelInformation.BlueMask = PIXEL24_BLUE_MASK;
Info->PixelInformation.ReservedMask = 0;
} else if (ModeData->ColorDepth == 32) {
- DEBUG ((DEBUG_INFO, "%dx%d PixelBlueGreenRedReserved8BitPerColor\n",
- ModeData->HorizontalResolution, ModeData->VerticalResolution));
+ DEBUG ((
+ DEBUG_INFO,
+ "%dx%d PixelBlueGreenRedReserved8BitPerColor\n",
+ ModeData->HorizontalResolution,
+ ModeData->VerticalResolution
+ ));
Info->PixelFormat = PixelBlueGreenRedReserved8BitPerColor;
}
+
Info->PixelsPerScanLine = Info->HorizontalResolution;
}
-
/**
Returns information for an available graphics mode that the graphics device
and the set of active video output devices supports.
@@ -91,7 +94,7 @@ EmuGopQuerytMode ( Private = GOP_PRIVATE_DATA_FROM_THIS (This);
- if (Info == NULL || SizeOfInfo == NULL || (UINTN) ModeNumber >= This->Mode->MaxMode) {
+ if ((Info == NULL) || (SizeOfInfo == NULL) || ((UINTN)ModeNumber >= This->Mode->MaxMode)) {
return EFI_INVALID_PARAMETER;
}
@@ -102,18 +105,16 @@ EmuGopQuerytMode ( *SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
- ModeData = &Private->ModeData[ModeNumber];
- (*Info)->Version = 0;
+ ModeData = &Private->ModeData[ModeNumber];
+ (*Info)->Version = 0;
(*Info)->HorizontalResolution = ModeData->HorizontalResolution;
(*Info)->VerticalResolution = ModeData->VerticalResolution;
- (*Info)->PixelFormat = PixelBitMask;
- (*Info)->PixelsPerScanLine = (*Info)->HorizontalResolution;
- BhyveGopCompleteModeInfo(ModeData, *Info);
+ (*Info)->PixelFormat = PixelBitMask;
+ (*Info)->PixelsPerScanLine = (*Info)->HorizontalResolution;
+ BhyveGopCompleteModeInfo (ModeData, *Info);
return EFI_SUCCESS;
}
-
-
/**
Set the video device into the specified mode and clears the visible portions of
the output display to black.
@@ -127,7 +128,7 @@ EmuGopQuerytMode ( **/
-FRAME_BUFFER_CONFIGURE *fbconf;
+FRAME_BUFFER_CONFIGURE *fbconf;
EFI_STATUS
EFIAPI
@@ -136,37 +137,38 @@ EmuGopSetMode ( IN UINT32 ModeNumber
)
{
- GOP_PRIVATE_DATA *Private;
- GOP_MODE_DATA *ModeData;
- EFI_GRAPHICS_OUTPUT_BLT_PIXEL Fill;
+ GOP_PRIVATE_DATA *Private;
+ GOP_MODE_DATA *ModeData;
+ EFI_GRAPHICS_OUTPUT_BLT_PIXEL Fill;
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
- UINTN confsize = 0;
+ UINTN confsize = 0;
+
fbconf = NULL;
Private = GOP_PRIVATE_DATA_FROM_THIS (This);
if (ModeNumber >= This->Mode->MaxMode) {
// Tell bhyve that we are switching out of vesa
- BhyveSetGraphicsMode(Private, 0, 0, 0);
+ BhyveSetGraphicsMode (Private, 0, 0, 0);
return EFI_UNSUPPORTED;
}
DEBUG ((DEBUG_INFO, "BHYVE GopSetMode %d\n", ModeNumber));
- ModeData = &Private->ModeData[ModeNumber];
- This->Mode->Mode = ModeNumber;
+ ModeData = &Private->ModeData[ModeNumber];
+ This->Mode->Mode = ModeNumber;
Private->GraphicsOutput.Mode->Info->HorizontalResolution = ModeData->HorizontalResolution;
- Private->GraphicsOutput.Mode->Info->VerticalResolution = ModeData->VerticalResolution;
- Private->GraphicsOutput.Mode->Info->PixelsPerScanLine = ModeData->HorizontalResolution;
+ Private->GraphicsOutput.Mode->Info->VerticalResolution = ModeData->VerticalResolution;
+ Private->GraphicsOutput.Mode->Info->PixelsPerScanLine = ModeData->HorizontalResolution;
Info = This->Mode->Info;
- BhyveGopCompleteModeInfo(ModeData, Info);
+ BhyveGopCompleteModeInfo (ModeData, Info);
This->Mode->Info->HorizontalResolution = ModeData->HorizontalResolution;
- This->Mode->Info->VerticalResolution = ModeData->VerticalResolution;
- This->Mode->SizeOfInfo = sizeof(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
- This->Mode->FrameBufferBase = Private->GraphicsOutput.Mode->FrameBufferBase;
+ This->Mode->Info->VerticalResolution = ModeData->VerticalResolution;
+ This->Mode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
+ This->Mode->FrameBufferBase = Private->GraphicsOutput.Mode->FrameBufferBase;
/*
This->Mode->FrameBufferSize = Info->HorizontalResolution * Info->VerticalResolution
@@ -175,18 +177,24 @@ EmuGopSetMode ( This->Mode->FrameBufferSize = Private->FbSize;
DEBUG ((DEBUG_INFO, "BHYVE GOP FrameBufferBase: 0x%x, FrameBufferSize: 0x%x\n", This->Mode->FrameBufferBase, This->Mode->FrameBufferSize));
- BhyveSetGraphicsMode(Private, (UINT16)ModeData->HorizontalResolution, (UINT16)ModeData->VerticalResolution, (UINT16)ModeData->ColorDepth);
-
- RETURN_STATUS ret = FrameBufferBltConfigure (
- (VOID*)(UINTN) This->Mode->FrameBufferBase,
- This->Mode->Info, fbconf, &confsize
- );
- if (ret == EFI_BUFFER_TOO_SMALL || ret == EFI_INVALID_PARAMETER) {
- fbconf = AllocatePool(confsize);
- ret = FrameBufferBltConfigure(
- (VOID*)(UINTN)This->Mode->FrameBufferBase,
- This->Mode->Info, fbconf, &confsize);
- ASSERT(ret == EFI_SUCCESS);
+ BhyveSetGraphicsMode (Private, (UINT16)ModeData->HorizontalResolution, (UINT16)ModeData->VerticalResolution, (UINT16)ModeData->ColorDepth);
+
+ RETURN_STATUS ret = FrameBufferBltConfigure (
+ (VOID *)(UINTN)This->Mode->FrameBufferBase,
+ This->Mode->Info,
+ fbconf,
+ &confsize
+ );
+
+ if ((ret == EFI_BUFFER_TOO_SMALL) || (ret == EFI_INVALID_PARAMETER)) {
+ fbconf = AllocatePool (confsize);
+ ret = FrameBufferBltConfigure (
+ (VOID *)(UINTN)This->Mode->FrameBufferBase,
+ This->Mode->Info,
+ fbconf,
+ &confsize
+ );
+ ASSERT (ret == EFI_SUCCESS);
}
Fill.Red = 0;
@@ -207,8 +215,6 @@ EmuGopSetMode ( return EFI_SUCCESS;
}
-
-
/**
Blt a rectangle of pixels on the graphics screen. Blt stands for BLock Transfer.
@@ -232,26 +238,26 @@ EmuGopSetMode ( EFI_STATUS
EFIAPI
EmuGopBlt (
- IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
- IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL,
- IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
- IN UINTN SourceX,
- IN UINTN SourceY,
- IN UINTN DestinationX,
- IN UINTN DestinationY,
- IN UINTN Width,
- IN UINTN Height,
- IN UINTN Delta OPTIONAL
+ IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
+ IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL,
+ IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
+ IN UINTN SourceX,
+ IN UINTN SourceY,
+ IN UINTN DestinationX,
+ IN UINTN DestinationY,
+ IN UINTN Width,
+ IN UINTN Height,
+ IN UINTN Delta OPTIONAL
)
{
- EFI_TPL OriginalTPL;
- EFI_STATUS Status;
+ EFI_TPL OriginalTPL;
+ EFI_STATUS Status;
if ((UINT32)BltOperation >= EfiGraphicsOutputBltOperationMax) {
return EFI_INVALID_PARAMETER;
}
- if (Width == 0 || Height == 0) {
+ if ((Width == 0) || (Height == 0)) {
return EFI_INVALID_PARAMETER;
}
@@ -263,27 +269,27 @@ EmuGopBlt ( OriginalTPL = gBS->RaiseTPL (TPL_NOTIFY);
switch (BltOperation) {
- case EfiBltVideoToBltBuffer:
- case EfiBltBufferToVideo:
- case EfiBltVideoFill:
- case EfiBltVideoToVideo:
- Status = FrameBufferBlt (
- fbconf,
- BltBuffer,
- BltOperation,
- SourceX,
- SourceY,
- DestinationX,
- DestinationY,
- Width,
- Height,
- Delta
- );
- break;
-
- default:
- Status = EFI_INVALID_PARAMETER;
- ASSERT (FALSE);
+ case EfiBltVideoToBltBuffer:
+ case EfiBltBufferToVideo:
+ case EfiBltVideoFill:
+ case EfiBltVideoToVideo:
+ Status = FrameBufferBlt (
+ fbconf,
+ BltBuffer,
+ BltOperation,
+ SourceX,
+ SourceY,
+ DestinationX,
+ DestinationY,
+ Width,
+ Height,
+ Delta
+ );
+ break;
+
+ default:
+ Status = EFI_INVALID_PARAMETER;
+ ASSERT (FALSE);
}
gBS->RestoreTPL (OriginalTPL);
@@ -291,25 +297,24 @@ EmuGopBlt ( return Status;
}
-
//
// Construction and Destruction functions
//
EFI_STATUS
EmuGopConstructor (
- GOP_PRIVATE_DATA *Private
+ GOP_PRIVATE_DATA *Private
)
{
// Set mode 0 to be the requested resolution
- mGopModeData[0].HorizontalResolution = PcdGet32 ( PcdVideoHorizontalResolution);
- mGopModeData[0].VerticalResolution = PcdGet32 ( PcdVideoVerticalResolution );
+ mGopModeData[0].HorizontalResolution = PcdGet32 (PcdVideoHorizontalResolution);
+ mGopModeData[0].VerticalResolution = PcdGet32 (PcdVideoVerticalResolution);
Private->ModeData = mGopModeData;
- Private->GraphicsOutput.QueryMode = EmuGopQuerytMode;
- Private->GraphicsOutput.SetMode = EmuGopSetMode;
- Private->GraphicsOutput.Blt = EmuGopBlt;
+ Private->GraphicsOutput.QueryMode = EmuGopQuerytMode;
+ Private->GraphicsOutput.SetMode = EmuGopSetMode;
+ Private->GraphicsOutput.Blt = EmuGopBlt;
//
// Allocate buffer for Graphics Output Protocol mode information
@@ -318,35 +323,33 @@ EmuGopConstructor ( if (Private->GraphicsOutput.Mode == NULL) {
return EFI_OUT_OF_RESOURCES;
}
+
Private->GraphicsOutput.Mode->Info = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
if (Private->GraphicsOutput.Mode->Info == NULL) {
return EFI_OUT_OF_RESOURCES;
}
-
DEBUG ((DEBUG_INFO, "BHYVE Gop Constructor\n"));
- Private->GraphicsOutput.Mode->MaxMode = sizeof(mGopModeData) / sizeof(GOP_MODE_DATA);
+ Private->GraphicsOutput.Mode->MaxMode = sizeof (mGopModeData) / sizeof (GOP_MODE_DATA);
//
// Till now, we have no idea about the window size.
//
- Private->GraphicsOutput.Mode->Mode = GRAPHICS_OUTPUT_INVALID_MODE_NUMBER;
- Private->GraphicsOutput.Mode->Info->Version = 0;
+ Private->GraphicsOutput.Mode->Mode = GRAPHICS_OUTPUT_INVALID_MODE_NUMBER;
+ Private->GraphicsOutput.Mode->Info->Version = 0;
Private->GraphicsOutput.Mode->Info->HorizontalResolution = 0;
- Private->GraphicsOutput.Mode->Info->VerticalResolution = 0;
- Private->GraphicsOutput.Mode->Info->PixelFormat = PixelBitMask;
- Private->GraphicsOutput.Mode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
- Private->GraphicsOutput.Mode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) Private->FbAddr;
- Private->GraphicsOutput.Mode->FrameBufferSize = Private->FbSize;
+ Private->GraphicsOutput.Mode->Info->VerticalResolution = 0;
+ Private->GraphicsOutput.Mode->Info->PixelFormat = PixelBitMask;
+ Private->GraphicsOutput.Mode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
+ Private->GraphicsOutput.Mode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS)Private->FbAddr;
+ Private->GraphicsOutput.Mode->FrameBufferSize = Private->FbSize;
return EFI_SUCCESS;
}
-
-
EFI_STATUS
EmuGopDestructor (
- GOP_PRIVATE_DATA *Private
+ GOP_PRIVATE_DATA *Private
)
{
//
@@ -356,6 +359,7 @@ EmuGopDestructor ( if (Private->GraphicsOutput.Mode->Info != NULL) {
FreePool (Private->GraphicsOutput.Mode->Info);
}
+
FreePool (Private->GraphicsOutput.Mode);
Private->GraphicsOutput.Mode = NULL;
}
@@ -363,13 +367,13 @@ EmuGopDestructor ( return EFI_SUCCESS;
}
-
VOID
EFIAPI
ShutdownGopEvent (
IN EFI_EVENT Event,
IN VOID *Context
)
+
/*++
Routine Description:
diff --git a/OvmfPkg/Bhyve/BhyveRfbDxe/VbeShim.c b/OvmfPkg/Bhyve/BhyveRfbDxe/VbeShim.c index 740b966794..41f0180001 100644 --- a/OvmfPkg/Bhyve/BhyveRfbDxe/VbeShim.c +++ b/OvmfPkg/Bhyve/BhyveRfbDxe/VbeShim.c @@ -28,8 +28,8 @@ #pragma pack (1)
typedef struct {
- UINT16 Offset;
- UINT16 Segment;
+ UINT16 Offset;
+ UINT16 Segment;
} IVT_ENTRY;
#pragma pack ()
@@ -37,52 +37,49 @@ typedef struct { // This string is displayed by Windows 2008 R2 SP1 in the Screen Resolution,
// Advanced Settings dialog. It should be short.
//
-STATIC CONST CHAR8 mProductRevision[] = "2.0";
+STATIC CONST CHAR8 mProductRevision[] = "2.0";
-#define NUM_VBE_MODES 3
-STATIC CONST UINT16 vbeModeIds[] = {
+#define NUM_VBE_MODES 3
+STATIC CONST UINT16 vbeModeIds[] = {
0x13f, // 640x480x32
0x140, // 800x600x32
0x141 // 1024x768x32
};
// Modes can be toggled with bit-0
-#define VBE_MODE_ENABLED 0x00BB
-#define VBE_MODE_DISABLED 0x00BA
+#define VBE_MODE_ENABLED 0x00BB
+#define VBE_MODE_DISABLED 0x00BA
-STATIC VBE2_MODE_INFO vbeModes[] = {
+STATIC VBE2_MODE_INFO vbeModes[] = {
{ // 0x13f 640x480x32
-
// ModeAttr - BytesPerScanLine
- VBE_MODE_DISABLED, 0x07, 0x00, 0x40, 0x40, 0xA000, 0x00, 0x0000, 640*4,
+ VBE_MODE_DISABLED, 0x07, 0x00, 0x40, 0x40, 0xA000, 0x00, 0x0000, 640*4,
// Width, Height..., Vbe3
- 640, 480, 16, 8, 1, 32, 1, 0x06, 0, 0, 1,
+ 640, 480, 16, 8, 1, 32, 1, 0x06, 0, 0, 1,
// Masks
- 0x08, 0x10, 0x08, 0x08, 0x08, 0x00, 0x08, 0x18, 0x00,
+ 0x08, 0x10, 0x08, 0x08, 0x08, 0x00, 0x08, 0x18, 0x00,
// Framebuffer
- 0xdeadbeef, 0x0000, 0x0000
+ 0xdeadbeef, 0x0000, 0x0000
},
{ // 0x140 800x600x32
-
// ModeAttr - BytesPerScanLine
- VBE_MODE_DISABLED, 0x07, 0x00, 0x40, 0x40, 0xA000, 0x00, 0x0000, 800*4,
+ VBE_MODE_DISABLED, 0x07, 0x00, 0x40, 0x40, 0xA000, 0x00, 0x0000, 800*4,
// Width, Height..., Vbe3
- 800, 600, 16, 8, 1, 32, 1, 0x06, 0, 0, 1,
+ 800, 600, 16, 8, 1, 32, 1, 0x06, 0, 0, 1,
// Masks
- 0x08, 0x10, 0x08, 0x08, 0x08, 0x00, 0x08, 0x18, 0x00,
+ 0x08, 0x10, 0x08, 0x08, 0x08, 0x00, 0x08, 0x18, 0x00,
// Framebuffer
- 0xdeadbeef, 0x0000, 0x0000
+ 0xdeadbeef, 0x0000, 0x0000
},
{ // 0x141 1024x768x32
-
// ModeAttr - BytesPerScanLine
- VBE_MODE_ENABLED, 0x07, 0x00, 0x40, 0x40, 0xA000, 0x00, 0x0000, 1024*4,
+ VBE_MODE_ENABLED, 0x07, 0x00, 0x40, 0x40, 0xA000, 0x00, 0x0000, 1024*4,
// Width, Height..., Vbe3
- 1024, 768, 16, 8, 1, 32, 1, 0x06, 0, 0, 1,
+ 1024, 768, 16, 8, 1, 32, 1, 0x06, 0, 0, 1,
// Masks
- 0x08, 0x10, 0x08, 0x08, 0x08, 0x00, 0x08, 0x18, 0x00,
+ 0x08, 0x10, 0x08, 0x08, 0x08, 0x00, 0x08, 0x18, 0x00,
// Framebuffer
- 0xdeadbeef, 0x0000, 0x0000
+ 0xdeadbeef, 0x0000, 0x0000
}
};
@@ -98,23 +95,23 @@ STATIC VBE2_MODE_INFO vbeModes[] = { **/
VOID
InstallVbeShim (
- IN CONST CHAR16 *CardName,
- IN EFI_PHYSICAL_ADDRESS FrameBufferBase
+ IN CONST CHAR16 *CardName,
+ IN EFI_PHYSICAL_ADDRESS FrameBufferBase
)
{
- EFI_PHYSICAL_ADDRESS Segment0, SegmentC, SegmentF;
- UINTN Segment0Pages;
- IVT_ENTRY *Int0x10;
- EFI_STATUS Status;
- UINTN Pam1Address;
- UINT8 Pam1;
- UINTN SegmentCPages;
- VBE_INFO *VbeInfoFull;
- VBE_INFO_BASE *VbeInfo;
- UINT8 *Ptr;
- UINTN Printed;
- VBE_MODE_INFO *VbeModeInfo;
- UINTN i;
+ EFI_PHYSICAL_ADDRESS Segment0, SegmentC, SegmentF;
+ UINTN Segment0Pages;
+ IVT_ENTRY *Int0x10;
+ EFI_STATUS Status;
+ UINTN Pam1Address;
+ UINT8 Pam1;
+ UINTN SegmentCPages;
+ VBE_INFO *VbeInfoFull;
+ VBE_INFO_BASE *VbeInfo;
+ UINT8 *Ptr;
+ UINTN Printed;
+ VBE_MODE_INFO *VbeModeInfo;
+ UINTN i;
Segment0 = 0x00000;
SegmentC = 0xC0000;
@@ -130,11 +127,15 @@ InstallVbeShim ( //
Segment0Pages = 1;
Int0x10 = (IVT_ENTRY *)(UINTN)Segment0 + 0x10;
- Status = gBS->AllocatePages (AllocateAddress, EfiBootServicesCode,
- Segment0Pages, &Segment0);
+ Status = gBS->AllocatePages (
+ AllocateAddress,
+ EfiBootServicesCode,
+ Segment0Pages,
+ &Segment0
+ );
if (EFI_ERROR (Status)) {
- EFI_PHYSICAL_ADDRESS Handler;
+ EFI_PHYSICAL_ADDRESS Handler;
//
// Check if a video BIOS handler has been installed previously -- we
@@ -142,9 +143,14 @@ InstallVbeShim ( // it's already present.
//
Handler = (Int0x10->Segment << 4) + Int0x10->Offset;
- if (Handler >= SegmentC && Handler < SegmentF) {
- DEBUG ((DEBUG_VERBOSE, "%a: Video BIOS handler found at %04x:%04x\n",
- __FUNCTION__, Int0x10->Segment, Int0x10->Offset));
+ if ((Handler >= SegmentC) && (Handler < SegmentF)) {
+ DEBUG ((
+ DEBUG_VERBOSE,
+ "%a: Video BIOS handler found at %04x:%04x\n",
+ __FUNCTION__,
+ Int0x10->Segment,
+ Int0x10->Offset
+ ));
return;
}
@@ -152,8 +158,12 @@ InstallVbeShim ( // Otherwise we'll overwrite the Int10h vector, even though we may not own
// the page at zero.
//
- DEBUG ((DEBUG_VERBOSE, "%a: failed to allocate page at zero: %r\n",
- __FUNCTION__, Status));
+ DEBUG ((
+ DEBUG_VERBOSE,
+ "%a: failed to allocate page at zero: %r\n",
+ __FUNCTION__,
+ Status
+ ));
} else {
//
// We managed to allocate the page at zero. SVN r14218 guarantees that it
@@ -203,14 +213,15 @@ InstallVbeShim ( VbeInfo->Capabilities = BIT1 | BIT0; // DAC can be switched into 8-bit mode
VbeInfo->ModeListAddress = (UINT32)SegmentC << 12 | (UINT16)((UINTN)Ptr-SegmentC);
- for (i = 0; i < NUM_VBE_MODES; i ++) {
- *(UINT16*)Ptr = vbeModeIds[i]; // mode number
- Ptr += 2;
+ for (i = 0; i < NUM_VBE_MODES; i++) {
+ *(UINT16 *)Ptr = vbeModeIds[i]; // mode number
+ Ptr += 2;
}
- *(UINT16*)Ptr = 0xFFFF; // mode list terminator
- Ptr += 2;
- VbeInfo->VideoMem64K = (UINT16)((1024 * 768 * 4 + 65535) / 65536);
+ *(UINT16 *)Ptr = 0xFFFF; // mode list terminator
+ Ptr += 2;
+
+ VbeInfo->VideoMem64K = (UINT16)((1024 * 768 * 4 + 65535) / 65536);
VbeInfo->OemSoftwareVersion = 0x0200;
VbeInfo->VendorNameAddress = (UINT32)SegmentC << 12 | (UINT16)((UINTN)Ptr-SegmentC);
@@ -218,9 +229,12 @@ InstallVbeShim ( Ptr += 5;
VbeInfo->ProductNameAddress = (UINT32)SegmentC << 12 | (UINT16)((UINTN)Ptr-SegmentC);
- Printed = AsciiSPrint ((CHAR8 *)Ptr,
- sizeof VbeInfoFull->Buffer - (Ptr - VbeInfoFull->Buffer), "%s",
- CardName);
+ Printed = AsciiSPrint (
+ (CHAR8 *)Ptr,
+ sizeof VbeInfoFull->Buffer - (Ptr - VbeInfoFull->Buffer),
+ "%s",
+ CardName
+ );
Ptr += Printed + 1;
VbeInfo->ProductRevAddress = (UINT32)SegmentC << 12 | (UINT16)((UINTN)Ptr-SegmentC);
@@ -234,7 +248,7 @@ InstallVbeShim ( // Fill in the VBE MODE INFO structure list
//
VbeModeInfo = (VBE_MODE_INFO *)(VbeInfoFull + 1);
- Ptr = (UINT8 *)VbeModeInfo;
+ Ptr = (UINT8 *)VbeModeInfo;
for (i = 0; i < NUM_VBE_MODES; i++) {
vbeModes[i].LfbAddress = (UINT32)FrameBufferBase;
CopyMem (Ptr, &vbeModes[i], 0x32);
@@ -251,9 +265,14 @@ InstallVbeShim ( //
// Second, point the Int10h vector at the shim.
//
- Int0x10->Segment = (UINT16) ((UINT32)SegmentC >> 4);
- Int0x10->Offset = (UINT16) ((UINTN) (VbeModeInfo + 1) - SegmentC);
-
- DEBUG ((DEBUG_INFO, "%a: VBE shim installed to %x:%x\n",
- __FUNCTION__, Int0x10->Segment, Int0x10->Offset));
+ Int0x10->Segment = (UINT16)((UINT32)SegmentC >> 4);
+ Int0x10->Offset = (UINT16)((UINTN)(VbeModeInfo + 1) - SegmentC);
+
+ DEBUG ((
+ DEBUG_INFO,
+ "%a: VBE shim installed to %x:%x\n",
+ __FUNCTION__,
+ Int0x10->Segment,
+ Int0x10->Offset
+ ));
}
diff --git a/OvmfPkg/Bhyve/BhyveRfbDxe/VbeShim.h b/OvmfPkg/Bhyve/BhyveRfbDxe/VbeShim.h index 72b8a3f25f..4becb1afa1 100644 --- a/OvmfPkg/Bhyve/BhyveRfbDxe/VbeShim.h +++ b/OvmfPkg/Bhyve/BhyveRfbDxe/VbeShim.h @@ -1,912 +1,913 @@ //
// THIS FILE WAS GENERATED BY "VbeShim.sh". DO NOT EDIT.
//
+
#ifndef _VBE_SHIM_H_
#define _VBE_SHIM_H_
-STATIC CONST UINT8 mVbeShim[] = {
- /* 00000000 nop */ 0x90,
- /* 00000001 nop */ 0x90,
- /* 00000002 nop */ 0x90,
- /* 00000003 nop */ 0x90,
- /* 00000004 nop */ 0x90,
- /* 00000005 nop */ 0x90,
- /* 00000006 nop */ 0x90,
- /* 00000007 nop */ 0x90,
- /* 00000008 nop */ 0x90,
- /* 00000009 nop */ 0x90,
- /* 0000000A nop */ 0x90,
- /* 0000000B nop */ 0x90,
- /* 0000000C nop */ 0x90,
- /* 0000000D nop */ 0x90,
- /* 0000000E nop */ 0x90,
- /* 0000000F nop */ 0x90,
- /* 00000010 nop */ 0x90,
- /* 00000011 nop */ 0x90,
- /* 00000012 nop */ 0x90,
- /* 00000013 nop */ 0x90,
- /* 00000014 nop */ 0x90,
- /* 00000015 nop */ 0x90,
- /* 00000016 nop */ 0x90,
- /* 00000017 nop */ 0x90,
- /* 00000018 nop */ 0x90,
- /* 00000019 nop */ 0x90,
- /* 0000001A nop */ 0x90,
- /* 0000001B nop */ 0x90,
- /* 0000001C nop */ 0x90,
- /* 0000001D nop */ 0x90,
- /* 0000001E nop */ 0x90,
- /* 0000001F nop */ 0x90,
- /* 00000020 nop */ 0x90,
- /* 00000021 nop */ 0x90,
- /* 00000022 nop */ 0x90,
- /* 00000023 nop */ 0x90,
- /* 00000024 nop */ 0x90,
- /* 00000025 nop */ 0x90,
- /* 00000026 nop */ 0x90,
- /* 00000027 nop */ 0x90,
- /* 00000028 nop */ 0x90,
- /* 00000029 nop */ 0x90,
- /* 0000002A nop */ 0x90,
- /* 0000002B nop */ 0x90,
- /* 0000002C nop */ 0x90,
- /* 0000002D nop */ 0x90,
- /* 0000002E nop */ 0x90,
- /* 0000002F nop */ 0x90,
- /* 00000030 nop */ 0x90,
- /* 00000031 nop */ 0x90,
- /* 00000032 nop */ 0x90,
- /* 00000033 nop */ 0x90,
- /* 00000034 nop */ 0x90,
- /* 00000035 nop */ 0x90,
- /* 00000036 nop */ 0x90,
- /* 00000037 nop */ 0x90,
- /* 00000038 nop */ 0x90,
- /* 00000039 nop */ 0x90,
- /* 0000003A nop */ 0x90,
- /* 0000003B nop */ 0x90,
- /* 0000003C nop */ 0x90,
- /* 0000003D nop */ 0x90,
- /* 0000003E nop */ 0x90,
- /* 0000003F nop */ 0x90,
- /* 00000040 nop */ 0x90,
- /* 00000041 nop */ 0x90,
- /* 00000042 nop */ 0x90,
- /* 00000043 nop */ 0x90,
- /* 00000044 nop */ 0x90,
- /* 00000045 nop */ 0x90,
- /* 00000046 nop */ 0x90,
- /* 00000047 nop */ 0x90,
- /* 00000048 nop */ 0x90,
- /* 00000049 nop */ 0x90,
- /* 0000004A nop */ 0x90,
- /* 0000004B nop */ 0x90,
- /* 0000004C nop */ 0x90,
- /* 0000004D nop */ 0x90,
- /* 0000004E nop */ 0x90,
- /* 0000004F nop */ 0x90,
- /* 00000050 nop */ 0x90,
- /* 00000051 nop */ 0x90,
- /* 00000052 nop */ 0x90,
- /* 00000053 nop */ 0x90,
- /* 00000054 nop */ 0x90,
- /* 00000055 nop */ 0x90,
- /* 00000056 nop */ 0x90,
- /* 00000057 nop */ 0x90,
- /* 00000058 nop */ 0x90,
- /* 00000059 nop */ 0x90,
- /* 0000005A nop */ 0x90,
- /* 0000005B nop */ 0x90,
- /* 0000005C nop */ 0x90,
- /* 0000005D nop */ 0x90,
- /* 0000005E nop */ 0x90,
- /* 0000005F nop */ 0x90,
- /* 00000060 nop */ 0x90,
- /* 00000061 nop */ 0x90,
- /* 00000062 nop */ 0x90,
- /* 00000063 nop */ 0x90,
- /* 00000064 nop */ 0x90,
- /* 00000065 nop */ 0x90,
- /* 00000066 nop */ 0x90,
- /* 00000067 nop */ 0x90,
- /* 00000068 nop */ 0x90,
- /* 00000069 nop */ 0x90,
- /* 0000006A nop */ 0x90,
- /* 0000006B nop */ 0x90,
- /* 0000006C nop */ 0x90,
- /* 0000006D nop */ 0x90,
- /* 0000006E nop */ 0x90,
- /* 0000006F nop */ 0x90,
- /* 00000070 nop */ 0x90,
- /* 00000071 nop */ 0x90,
- /* 00000072 nop */ 0x90,
- /* 00000073 nop */ 0x90,
- /* 00000074 nop */ 0x90,
- /* 00000075 nop */ 0x90,
- /* 00000076 nop */ 0x90,
- /* 00000077 nop */ 0x90,
- /* 00000078 nop */ 0x90,
- /* 00000079 nop */ 0x90,
- /* 0000007A nop */ 0x90,
- /* 0000007B nop */ 0x90,
- /* 0000007C nop */ 0x90,
- /* 0000007D nop */ 0x90,
- /* 0000007E nop */ 0x90,
- /* 0000007F nop */ 0x90,
- /* 00000080 nop */ 0x90,
- /* 00000081 nop */ 0x90,
- /* 00000082 nop */ 0x90,
- /* 00000083 nop */ 0x90,
- /* 00000084 nop */ 0x90,
- /* 00000085 nop */ 0x90,
- /* 00000086 nop */ 0x90,
- /* 00000087 nop */ 0x90,
- /* 00000088 nop */ 0x90,
- /* 00000089 nop */ 0x90,
- /* 0000008A nop */ 0x90,
- /* 0000008B nop */ 0x90,
- /* 0000008C nop */ 0x90,
- /* 0000008D nop */ 0x90,
- /* 0000008E nop */ 0x90,
- /* 0000008F nop */ 0x90,
- /* 00000090 nop */ 0x90,
- /* 00000091 nop */ 0x90,
- /* 00000092 nop */ 0x90,
- /* 00000093 nop */ 0x90,
- /* 00000094 nop */ 0x90,
- /* 00000095 nop */ 0x90,
- /* 00000096 nop */ 0x90,
- /* 00000097 nop */ 0x90,
- /* 00000098 nop */ 0x90,
- /* 00000099 nop */ 0x90,
- /* 0000009A nop */ 0x90,
- /* 0000009B nop */ 0x90,
- /* 0000009C nop */ 0x90,
- /* 0000009D nop */ 0x90,
- /* 0000009E nop */ 0x90,
- /* 0000009F nop */ 0x90,
- /* 000000A0 nop */ 0x90,
- /* 000000A1 nop */ 0x90,
- /* 000000A2 nop */ 0x90,
- /* 000000A3 nop */ 0x90,
- /* 000000A4 nop */ 0x90,
- /* 000000A5 nop */ 0x90,
- /* 000000A6 nop */ 0x90,
- /* 000000A7 nop */ 0x90,
- /* 000000A8 nop */ 0x90,
- /* 000000A9 nop */ 0x90,
- /* 000000AA nop */ 0x90,
- /* 000000AB nop */ 0x90,
- /* 000000AC nop */ 0x90,
- /* 000000AD nop */ 0x90,
- /* 000000AE nop */ 0x90,
- /* 000000AF nop */ 0x90,
- /* 000000B0 nop */ 0x90,
- /* 000000B1 nop */ 0x90,
- /* 000000B2 nop */ 0x90,
- /* 000000B3 nop */ 0x90,
- /* 000000B4 nop */ 0x90,
- /* 000000B5 nop */ 0x90,
- /* 000000B6 nop */ 0x90,
- /* 000000B7 nop */ 0x90,
- /* 000000B8 nop */ 0x90,
- /* 000000B9 nop */ 0x90,
- /* 000000BA nop */ 0x90,
- /* 000000BB nop */ 0x90,
- /* 000000BC nop */ 0x90,
- /* 000000BD nop */ 0x90,
- /* 000000BE nop */ 0x90,
- /* 000000BF nop */ 0x90,
- /* 000000C0 nop */ 0x90,
- /* 000000C1 nop */ 0x90,
- /* 000000C2 nop */ 0x90,
- /* 000000C3 nop */ 0x90,
- /* 000000C4 nop */ 0x90,
- /* 000000C5 nop */ 0x90,
- /* 000000C6 nop */ 0x90,
- /* 000000C7 nop */ 0x90,
- /* 000000C8 nop */ 0x90,
- /* 000000C9 nop */ 0x90,
- /* 000000CA nop */ 0x90,
- /* 000000CB nop */ 0x90,
- /* 000000CC nop */ 0x90,
- /* 000000CD nop */ 0x90,
- /* 000000CE nop */ 0x90,
- /* 000000CF nop */ 0x90,
- /* 000000D0 nop */ 0x90,
- /* 000000D1 nop */ 0x90,
- /* 000000D2 nop */ 0x90,
- /* 000000D3 nop */ 0x90,
- /* 000000D4 nop */ 0x90,
- /* 000000D5 nop */ 0x90,
- /* 000000D6 nop */ 0x90,
- /* 000000D7 nop */ 0x90,
- /* 000000D8 nop */ 0x90,
- /* 000000D9 nop */ 0x90,
- /* 000000DA nop */ 0x90,
- /* 000000DB nop */ 0x90,
- /* 000000DC nop */ 0x90,
- /* 000000DD nop */ 0x90,
- /* 000000DE nop */ 0x90,
- /* 000000DF nop */ 0x90,
- /* 000000E0 nop */ 0x90,
- /* 000000E1 nop */ 0x90,
- /* 000000E2 nop */ 0x90,
- /* 000000E3 nop */ 0x90,
- /* 000000E4 nop */ 0x90,
- /* 000000E5 nop */ 0x90,
- /* 000000E6 nop */ 0x90,
- /* 000000E7 nop */ 0x90,
- /* 000000E8 nop */ 0x90,
- /* 000000E9 nop */ 0x90,
- /* 000000EA nop */ 0x90,
- /* 000000EB nop */ 0x90,
- /* 000000EC nop */ 0x90,
- /* 000000ED nop */ 0x90,
- /* 000000EE nop */ 0x90,
- /* 000000EF nop */ 0x90,
- /* 000000F0 nop */ 0x90,
- /* 000000F1 nop */ 0x90,
- /* 000000F2 nop */ 0x90,
- /* 000000F3 nop */ 0x90,
- /* 000000F4 nop */ 0x90,
- /* 000000F5 nop */ 0x90,
- /* 000000F6 nop */ 0x90,
- /* 000000F7 nop */ 0x90,
- /* 000000F8 nop */ 0x90,
- /* 000000F9 nop */ 0x90,
- /* 000000FA nop */ 0x90,
- /* 000000FB nop */ 0x90,
- /* 000000FC nop */ 0x90,
- /* 000000FD nop */ 0x90,
- /* 000000FE nop */ 0x90,
- /* 000000FF nop */ 0x90,
- /* 00000100 nop */ 0x90,
- /* 00000101 nop */ 0x90,
- /* 00000102 nop */ 0x90,
- /* 00000103 nop */ 0x90,
- /* 00000104 nop */ 0x90,
- /* 00000105 nop */ 0x90,
- /* 00000106 nop */ 0x90,
- /* 00000107 nop */ 0x90,
- /* 00000108 nop */ 0x90,
- /* 00000109 nop */ 0x90,
- /* 0000010A nop */ 0x90,
- /* 0000010B nop */ 0x90,
- /* 0000010C nop */ 0x90,
- /* 0000010D nop */ 0x90,
- /* 0000010E nop */ 0x90,
- /* 0000010F nop */ 0x90,
- /* 00000110 nop */ 0x90,
- /* 00000111 nop */ 0x90,
- /* 00000112 nop */ 0x90,
- /* 00000113 nop */ 0x90,
- /* 00000114 nop */ 0x90,
- /* 00000115 nop */ 0x90,
- /* 00000116 nop */ 0x90,
- /* 00000117 nop */ 0x90,
- /* 00000118 nop */ 0x90,
- /* 00000119 nop */ 0x90,
- /* 0000011A nop */ 0x90,
- /* 0000011B nop */ 0x90,
- /* 0000011C nop */ 0x90,
- /* 0000011D nop */ 0x90,
- /* 0000011E nop */ 0x90,
- /* 0000011F nop */ 0x90,
- /* 00000120 nop */ 0x90,
- /* 00000121 nop */ 0x90,
- /* 00000122 nop */ 0x90,
- /* 00000123 nop */ 0x90,
- /* 00000124 nop */ 0x90,
- /* 00000125 nop */ 0x90,
- /* 00000126 nop */ 0x90,
- /* 00000127 nop */ 0x90,
- /* 00000128 nop */ 0x90,
- /* 00000129 nop */ 0x90,
- /* 0000012A nop */ 0x90,
- /* 0000012B nop */ 0x90,
- /* 0000012C nop */ 0x90,
- /* 0000012D nop */ 0x90,
- /* 0000012E nop */ 0x90,
- /* 0000012F nop */ 0x90,
- /* 00000130 nop */ 0x90,
- /* 00000131 nop */ 0x90,
- /* 00000132 nop */ 0x90,
- /* 00000133 nop */ 0x90,
- /* 00000134 nop */ 0x90,
- /* 00000135 nop */ 0x90,
- /* 00000136 nop */ 0x90,
- /* 00000137 nop */ 0x90,
- /* 00000138 nop */ 0x90,
- /* 00000139 nop */ 0x90,
- /* 0000013A nop */ 0x90,
- /* 0000013B nop */ 0x90,
- /* 0000013C nop */ 0x90,
- /* 0000013D nop */ 0x90,
- /* 0000013E nop */ 0x90,
- /* 0000013F nop */ 0x90,
- /* 00000140 nop */ 0x90,
- /* 00000141 nop */ 0x90,
- /* 00000142 nop */ 0x90,
- /* 00000143 nop */ 0x90,
- /* 00000144 nop */ 0x90,
- /* 00000145 nop */ 0x90,
- /* 00000146 nop */ 0x90,
- /* 00000147 nop */ 0x90,
- /* 00000148 nop */ 0x90,
- /* 00000149 nop */ 0x90,
- /* 0000014A nop */ 0x90,
- /* 0000014B nop */ 0x90,
- /* 0000014C nop */ 0x90,
- /* 0000014D nop */ 0x90,
- /* 0000014E nop */ 0x90,
- /* 0000014F nop */ 0x90,
- /* 00000150 nop */ 0x90,
- /* 00000151 nop */ 0x90,
- /* 00000152 nop */ 0x90,
- /* 00000153 nop */ 0x90,
- /* 00000154 nop */ 0x90,
- /* 00000155 nop */ 0x90,
- /* 00000156 nop */ 0x90,
- /* 00000157 nop */ 0x90,
- /* 00000158 nop */ 0x90,
- /* 00000159 nop */ 0x90,
- /* 0000015A nop */ 0x90,
- /* 0000015B nop */ 0x90,
- /* 0000015C nop */ 0x90,
- /* 0000015D nop */ 0x90,
- /* 0000015E nop */ 0x90,
- /* 0000015F nop */ 0x90,
- /* 00000160 nop */ 0x90,
- /* 00000161 nop */ 0x90,
- /* 00000162 nop */ 0x90,
- /* 00000163 nop */ 0x90,
- /* 00000164 nop */ 0x90,
- /* 00000165 nop */ 0x90,
- /* 00000166 nop */ 0x90,
- /* 00000167 nop */ 0x90,
- /* 00000168 nop */ 0x90,
- /* 00000169 nop */ 0x90,
- /* 0000016A nop */ 0x90,
- /* 0000016B nop */ 0x90,
- /* 0000016C nop */ 0x90,
- /* 0000016D nop */ 0x90,
- /* 0000016E nop */ 0x90,
- /* 0000016F nop */ 0x90,
- /* 00000170 nop */ 0x90,
- /* 00000171 nop */ 0x90,
- /* 00000172 nop */ 0x90,
- /* 00000173 nop */ 0x90,
- /* 00000174 nop */ 0x90,
- /* 00000175 nop */ 0x90,
- /* 00000176 nop */ 0x90,
- /* 00000177 nop */ 0x90,
- /* 00000178 nop */ 0x90,
- /* 00000179 nop */ 0x90,
- /* 0000017A nop */ 0x90,
- /* 0000017B nop */ 0x90,
- /* 0000017C nop */ 0x90,
- /* 0000017D nop */ 0x90,
- /* 0000017E nop */ 0x90,
- /* 0000017F nop */ 0x90,
- /* 00000180 nop */ 0x90,
- /* 00000181 nop */ 0x90,
- /* 00000182 nop */ 0x90,
- /* 00000183 nop */ 0x90,
- /* 00000184 nop */ 0x90,
- /* 00000185 nop */ 0x90,
- /* 00000186 nop */ 0x90,
- /* 00000187 nop */ 0x90,
- /* 00000188 nop */ 0x90,
- /* 00000189 nop */ 0x90,
- /* 0000018A nop */ 0x90,
- /* 0000018B nop */ 0x90,
- /* 0000018C nop */ 0x90,
- /* 0000018D nop */ 0x90,
- /* 0000018E nop */ 0x90,
- /* 0000018F nop */ 0x90,
- /* 00000190 nop */ 0x90,
- /* 00000191 nop */ 0x90,
- /* 00000192 nop */ 0x90,
- /* 00000193 nop */ 0x90,
- /* 00000194 nop */ 0x90,
- /* 00000195 nop */ 0x90,
- /* 00000196 nop */ 0x90,
- /* 00000197 nop */ 0x90,
- /* 00000198 nop */ 0x90,
- /* 00000199 nop */ 0x90,
- /* 0000019A nop */ 0x90,
- /* 0000019B nop */ 0x90,
- /* 0000019C nop */ 0x90,
- /* 0000019D nop */ 0x90,
- /* 0000019E nop */ 0x90,
- /* 0000019F nop */ 0x90,
- /* 000001A0 nop */ 0x90,
- /* 000001A1 nop */ 0x90,
- /* 000001A2 nop */ 0x90,
- /* 000001A3 nop */ 0x90,
- /* 000001A4 nop */ 0x90,
- /* 000001A5 nop */ 0x90,
- /* 000001A6 nop */ 0x90,
- /* 000001A7 nop */ 0x90,
- /* 000001A8 nop */ 0x90,
- /* 000001A9 nop */ 0x90,
- /* 000001AA nop */ 0x90,
- /* 000001AB nop */ 0x90,
- /* 000001AC nop */ 0x90,
- /* 000001AD nop */ 0x90,
- /* 000001AE nop */ 0x90,
- /* 000001AF nop */ 0x90,
- /* 000001B0 nop */ 0x90,
- /* 000001B1 nop */ 0x90,
- /* 000001B2 nop */ 0x90,
- /* 000001B3 nop */ 0x90,
- /* 000001B4 nop */ 0x90,
- /* 000001B5 nop */ 0x90,
- /* 000001B6 nop */ 0x90,
- /* 000001B7 nop */ 0x90,
- /* 000001B8 nop */ 0x90,
- /* 000001B9 nop */ 0x90,
- /* 000001BA nop */ 0x90,
- /* 000001BB nop */ 0x90,
- /* 000001BC nop */ 0x90,
- /* 000001BD nop */ 0x90,
- /* 000001BE nop */ 0x90,
- /* 000001BF nop */ 0x90,
- /* 000001C0 nop */ 0x90,
- /* 000001C1 nop */ 0x90,
- /* 000001C2 nop */ 0x90,
- /* 000001C3 nop */ 0x90,
- /* 000001C4 nop */ 0x90,
- /* 000001C5 nop */ 0x90,
- /* 000001C6 nop */ 0x90,
- /* 000001C7 nop */ 0x90,
- /* 000001C8 nop */ 0x90,
- /* 000001C9 nop */ 0x90,
- /* 000001CA nop */ 0x90,
- /* 000001CB nop */ 0x90,
- /* 000001CC nop */ 0x90,
- /* 000001CD nop */ 0x90,
- /* 000001CE nop */ 0x90,
- /* 000001CF nop */ 0x90,
- /* 000001D0 nop */ 0x90,
- /* 000001D1 nop */ 0x90,
- /* 000001D2 nop */ 0x90,
- /* 000001D3 nop */ 0x90,
- /* 000001D4 nop */ 0x90,
- /* 000001D5 nop */ 0x90,
- /* 000001D6 nop */ 0x90,
- /* 000001D7 nop */ 0x90,
- /* 000001D8 nop */ 0x90,
- /* 000001D9 nop */ 0x90,
- /* 000001DA nop */ 0x90,
- /* 000001DB nop */ 0x90,
- /* 000001DC nop */ 0x90,
- /* 000001DD nop */ 0x90,
- /* 000001DE nop */ 0x90,
- /* 000001DF nop */ 0x90,
- /* 000001E0 nop */ 0x90,
- /* 000001E1 nop */ 0x90,
- /* 000001E2 nop */ 0x90,
- /* 000001E3 nop */ 0x90,
- /* 000001E4 nop */ 0x90,
- /* 000001E5 nop */ 0x90,
- /* 000001E6 nop */ 0x90,
- /* 000001E7 nop */ 0x90,
- /* 000001E8 nop */ 0x90,
- /* 000001E9 nop */ 0x90,
- /* 000001EA nop */ 0x90,
- /* 000001EB nop */ 0x90,
- /* 000001EC nop */ 0x90,
- /* 000001ED nop */ 0x90,
- /* 000001EE nop */ 0x90,
- /* 000001EF nop */ 0x90,
- /* 000001F0 nop */ 0x90,
- /* 000001F1 nop */ 0x90,
- /* 000001F2 nop */ 0x90,
- /* 000001F3 nop */ 0x90,
- /* 000001F4 nop */ 0x90,
- /* 000001F5 nop */ 0x90,
- /* 000001F6 nop */ 0x90,
- /* 000001F7 nop */ 0x90,
- /* 000001F8 nop */ 0x90,
- /* 000001F9 nop */ 0x90,
- /* 000001FA nop */ 0x90,
- /* 000001FB nop */ 0x90,
- /* 000001FC nop */ 0x90,
- /* 000001FD nop */ 0x90,
- /* 000001FE nop */ 0x90,
- /* 000001FF nop */ 0x90,
- /* 00000200 cmp ax,0x4f00 */ 0x3D, 0x00, 0x4F,
- /* 00000203 jz 0x237 */ 0x74, 0x32,
- /* 00000205 cmp ax,0x4f01 */ 0x3D, 0x01, 0x4F,
- /* 00000208 jz 0x257 */ 0x74, 0x4D,
- /* 0000020A cmp ax,0x4f02 */ 0x3D, 0x02, 0x4F,
- /* 0000020D jz word 0x2c8 */ 0x0F, 0x84, 0xB7, 0x00,
- /* 00000211 cmp ax,0x4f03 */ 0x3D, 0x03, 0x4F,
- /* 00000214 jz word 0x325 */ 0x0F, 0x84, 0x0D, 0x01,
- /* 00000218 cmp ax,0x4f10 */ 0x3D, 0x10, 0x4F,
- /* 0000021B jz word 0x337 */ 0x0F, 0x84, 0x18, 0x01,
- /* 0000021F cmp ax,0x4f15 */ 0x3D, 0x15, 0x4F,
- /* 00000222 jz word 0x344 */ 0x0F, 0x84, 0x1E, 0x01,
- /* 00000226 cmp ah,0x0 */ 0x80, 0xFC, 0x00,
- /* 00000229 jz word 0x363 */ 0x0F, 0x84, 0x36, 0x01,
- /* 0000022D push si */ 0x56,
- /* 0000022E mov si,0x3d7 */ 0xBE, 0xD7, 0x03,
- /* 00000231 call word 0x3ad */ 0xE8, 0x79, 0x01,
- /* 00000234 pop si */ 0x5E,
- /* 00000235 jmp short 0x235 */ 0xEB, 0xFE,
- /* 00000237 push es */ 0x06,
- /* 00000238 push di */ 0x57,
- /* 00000239 push ds */ 0x1E,
- /* 0000023A push si */ 0x56,
- /* 0000023B push cx */ 0x51,
- /* 0000023C push si */ 0x56,
- /* 0000023D mov si,0x3eb */ 0xBE, 0xEB, 0x03,
- /* 00000240 call word 0x3ad */ 0xE8, 0x6A, 0x01,
- /* 00000243 pop si */ 0x5E,
- /* 00000244 push cs */ 0x0E,
- /* 00000245 pop ds */ 0x1F,
- /* 00000246 mov si,0x0 */ 0xBE, 0x00, 0x00,
- /* 00000249 mov cx,0x100 */ 0xB9, 0x00, 0x01,
- /* 0000024C cld */ 0xFC,
- /* 0000024D rep movsb */ 0xF3, 0xA4,
- /* 0000024F pop cx */ 0x59,
- /* 00000250 pop si */ 0x5E,
- /* 00000251 pop ds */ 0x1F,
- /* 00000252 pop di */ 0x5F,
- /* 00000253 pop es */ 0x07,
- /* 00000254 jmp word 0x395 */ 0xE9, 0x3E, 0x01,
- /* 00000257 push es */ 0x06,
- /* 00000258 push di */ 0x57,
- /* 00000259 push ds */ 0x1E,
- /* 0000025A push si */ 0x56,
- /* 0000025B push cx */ 0x51,
- /* 0000025C push si */ 0x56,
- /* 0000025D mov si,0x3f6 */ 0xBE, 0xF6, 0x03,
- /* 00000260 call word 0x3ad */ 0xE8, 0x4A, 0x01,
- /* 00000263 pop si */ 0x5E,
- /* 00000264 and cx,0xbfff */ 0x81, 0xE1, 0xFF, 0xBF,
- /* 00000268 cmp cx,0x13f */ 0x81, 0xF9, 0x3F, 0x01,
- /* 0000026C jz 0x284 */ 0x74, 0x16,
- /* 0000026E cmp cx,0x140 */ 0x81, 0xF9, 0x40, 0x01,
- /* 00000272 jz 0x291 */ 0x74, 0x1D,
- /* 00000274 cmp cx,0x141 */ 0x81, 0xF9, 0x41, 0x01,
- /* 00000278 jz 0x29e */ 0x74, 0x24,
- /* 0000027A push si */ 0x56,
- /* 0000027B mov si,0x42c */ 0xBE, 0x2C, 0x04,
- /* 0000027E call word 0x3ad */ 0xE8, 0x2C, 0x01,
- /* 00000281 pop si */ 0x5E,
- /* 00000282 jmp short 0x235 */ 0xEB, 0xB1,
- /* 00000284 push si */ 0x56,
- /* 00000285 mov si,0x46b */ 0xBE, 0x6B, 0x04,
- /* 00000288 call word 0x3ad */ 0xE8, 0x22, 0x01,
- /* 0000028B pop si */ 0x5E,
- /* 0000028C mov si,0x100 */ 0xBE, 0x00, 0x01,
- /* 0000028F jmp short 0x2b8 */ 0xEB, 0x27,
- /* 00000291 push si */ 0x56,
- /* 00000292 mov si,0x47d */ 0xBE, 0x7D, 0x04,
- /* 00000295 call word 0x3ad */ 0xE8, 0x15, 0x01,
- /* 00000298 pop si */ 0x5E,
- /* 00000299 mov si,0x132 */ 0xBE, 0x32, 0x01,
- /* 0000029C jmp short 0x2b8 */ 0xEB, 0x1A,
- /* 0000029E push si */ 0x56,
- /* 0000029F mov si,0x48f */ 0xBE, 0x8F, 0x04,
- /* 000002A2 call word 0x3ad */ 0xE8, 0x08, 0x01,
- /* 000002A5 pop si */ 0x5E,
- /* 000002A6 mov si,0x164 */ 0xBE, 0x64, 0x01,
- /* 000002A9 jmp short 0x2b8 */ 0xEB, 0x0D,
- /* 000002AB push si */ 0x56,
- /* 000002AC mov si,0x4a2 */ 0xBE, 0xA2, 0x04,
- /* 000002AF call word 0x3ad */ 0xE8, 0xFB, 0x00,
- /* 000002B2 pop si */ 0x5E,
- /* 000002B3 mov si,0x196 */ 0xBE, 0x96, 0x01,
- /* 000002B6 jmp short 0x2b8 */ 0xEB, 0x00,
- /* 000002B8 push cs */ 0x0E,
- /* 000002B9 pop ds */ 0x1F,
- /* 000002BA mov cx,0x32 */ 0xB9, 0x32, 0x00,
- /* 000002BD cld */ 0xFC,
- /* 000002BE rep movsb */ 0xF3, 0xA4,
- /* 000002C0 pop cx */ 0x59,
- /* 000002C1 pop si */ 0x5E,
- /* 000002C2 pop ds */ 0x1F,
- /* 000002C3 pop di */ 0x5F,
- /* 000002C4 pop es */ 0x07,
- /* 000002C5 jmp word 0x395 */ 0xE9, 0xCD, 0x00,
- /* 000002C8 push dx */ 0x52,
- /* 000002C9 push ax */ 0x50,
- /* 000002CA push si */ 0x56,
- /* 000002CB mov si,0x410 */ 0xBE, 0x10, 0x04,
- /* 000002CE call word 0x3ad */ 0xE8, 0xDC, 0x00,
- /* 000002D1 pop si */ 0x5E,
- /* 000002D2 and bx,0xbfff */ 0x81, 0xE3, 0xFF, 0xBF,
- /* 000002D6 cmp bx,0x13f */ 0x81, 0xFB, 0x3F, 0x01,
- /* 000002DA jz 0x2f3 */ 0x74, 0x17,
- /* 000002DC cmp bx,0x140 */ 0x81, 0xFB, 0x40, 0x01,
- /* 000002E0 jz 0x2fd */ 0x74, 0x1B,
- /* 000002E2 cmp bx,0x141 */ 0x81, 0xFB, 0x41, 0x01,
- /* 000002E6 jz 0x307 */ 0x74, 0x1F,
- /* 000002E8 push si */ 0x56,
- /* 000002E9 mov si,0x42c */ 0xBE, 0x2C, 0x04,
- /* 000002EC call word 0x3ad */ 0xE8, 0xBE, 0x00,
- /* 000002EF pop si */ 0x5E,
- /* 000002F0 jmp word 0x235 */ 0xE9, 0x42, 0xFF,
- /* 000002F3 push si */ 0x56,
- /* 000002F4 mov si,0x46b */ 0xBE, 0x6B, 0x04,
- /* 000002F7 call word 0x3ad */ 0xE8, 0xB3, 0x00,
- /* 000002FA pop si */ 0x5E,
- /* 000002FB jmp short 0x319 */ 0xEB, 0x1C,
- /* 000002FD push si */ 0x56,
- /* 000002FE mov si,0x47d */ 0xBE, 0x7D, 0x04,
- /* 00000301 call word 0x3ad */ 0xE8, 0xA9, 0x00,
- /* 00000304 pop si */ 0x5E,
- /* 00000305 jmp short 0x319 */ 0xEB, 0x12,
- /* 00000307 push si */ 0x56,
- /* 00000308 mov si,0x48f */ 0xBE, 0x8F, 0x04,
- /* 0000030B call word 0x3ad */ 0xE8, 0x9F, 0x00,
- /* 0000030E pop si */ 0x5E,
- /* 0000030F jmp short 0x319 */ 0xEB, 0x08,
- /* 00000311 push si */ 0x56,
- /* 00000312 mov si,0x4a2 */ 0xBE, 0xA2, 0x04,
- /* 00000315 call word 0x3ad */ 0xE8, 0x95, 0x00,
- /* 00000318 pop si */ 0x5E,
- /* 00000319 mov [0x4b0],bl */ 0x88, 0x1E, 0xB0, 0x04,
- /* 0000031D mov [0x4b1],bh */ 0x88, 0x3E, 0xB1, 0x04,
- /* 00000321 pop ax */ 0x58,
- /* 00000322 pop dx */ 0x5A,
- /* 00000323 jmp short 0x395 */ 0xEB, 0x70,
- /* 00000325 push si */ 0x56,
- /* 00000326 mov si,0x405 */ 0xBE, 0x05, 0x04,
- /* 00000329 call word 0x3ad */ 0xE8, 0x81, 0x00,
- /* 0000032C pop si */ 0x5E,
- /* 0000032D mov bl,[0x4b0] */ 0x8A, 0x1E, 0xB0, 0x04,
- /* 00000331 mov bh,[0x4b1] */ 0x8A, 0x3E, 0xB1, 0x04,
- /* 00000335 jmp short 0x395 */ 0xEB, 0x5E,
- /* 00000337 push si */ 0x56,
- /* 00000338 mov si,0x43b */ 0xBE, 0x3B, 0x04,
- /* 0000033B call word 0x3ad */ 0xE8, 0x6F, 0x00,
- /* 0000033E pop si */ 0x5E,
- /* 0000033F mov bx,0x80 */ 0xBB, 0x80, 0x00,
- /* 00000342 jmp short 0x395 */ 0xEB, 0x51,
- /* 00000344 push es */ 0x06,
- /* 00000345 push di */ 0x57,
- /* 00000346 push ds */ 0x1E,
- /* 00000347 push si */ 0x56,
- /* 00000348 push cx */ 0x51,
- /* 00000349 push si */ 0x56,
- /* 0000034A mov si,0x450 */ 0xBE, 0x50, 0x04,
- /* 0000034D call word 0x3ad */ 0xE8, 0x5D, 0x00,
- /* 00000350 pop si */ 0x5E,
- /* 00000351 push cs */ 0x0E,
- /* 00000352 pop ds */ 0x1F,
- /* 00000353 mov si,0x4b2 */ 0xBE, 0xB2, 0x04,
- /* 00000356 mov cx,0x80 */ 0xB9, 0x80, 0x00,
- /* 00000359 cld */ 0xFC,
- /* 0000035A rep movsb */ 0xF3, 0xA4,
- /* 0000035C pop cx */ 0x59,
- /* 0000035D pop si */ 0x5E,
- /* 0000035E pop ds */ 0x1F,
- /* 0000035F pop di */ 0x5F,
- /* 00000360 pop es */ 0x07,
- /* 00000361 jmp short 0x395 */ 0xEB, 0x32,
- /* 00000363 push si */ 0x56,
- /* 00000364 mov si,0x41b */ 0xBE, 0x1B, 0x04,
- /* 00000367 call word 0x3ad */ 0xE8, 0x43, 0x00,
- /* 0000036A pop si */ 0x5E,
- /* 0000036B cmp al,0x3 */ 0x3C, 0x03,
- /* 0000036D jz 0x37e */ 0x74, 0x0F,
- /* 0000036F cmp al,0x12 */ 0x3C, 0x12,
- /* 00000371 jz 0x38a */ 0x74, 0x17,
- /* 00000373 push si */ 0x56,
- /* 00000374 mov si,0x42c */ 0xBE, 0x2C, 0x04,
- /* 00000377 call word 0x3ad */ 0xE8, 0x33, 0x00,
- /* 0000037A pop si */ 0x5E,
- /* 0000037B jmp word 0x235 */ 0xE9, 0xB7, 0xFE,
- /* 0000037E push si */ 0x56,
- /* 0000037F mov si,0x45c */ 0xBE, 0x5C, 0x04,
- /* 00000382 call word 0x3ad */ 0xE8, 0x28, 0x00,
- /* 00000385 pop si */ 0x5E,
- /* 00000386 mov al,0x0 */ 0xB0, 0x00,
- /* 00000388 jmp short 0x38c */ 0xEB, 0x02,
- /* 0000038A mov al,0x0 */ 0xB0, 0x00,
- /* 0000038C push si */ 0x56,
- /* 0000038D mov si,0x3c2 */ 0xBE, 0xC2, 0x03,
- /* 00000390 call word 0x3ad */ 0xE8, 0x1A, 0x00,
- /* 00000393 pop si */ 0x5E,
- /* 00000394 iretw */ 0xCF,
- /* 00000395 push si */ 0x56,
- /* 00000396 mov si,0x3c2 */ 0xBE, 0xC2, 0x03,
- /* 00000399 call word 0x3ad */ 0xE8, 0x11, 0x00,
- /* 0000039C pop si */ 0x5E,
- /* 0000039D mov ax,0x4f */ 0xB8, 0x4F, 0x00,
- /* 000003A0 iretw */ 0xCF,
- /* 000003A1 push si */ 0x56,
- /* 000003A2 mov si,0x3c8 */ 0xBE, 0xC8, 0x03,
- /* 000003A5 call word 0x3ad */ 0xE8, 0x05, 0x00,
- /* 000003A8 pop si */ 0x5E,
- /* 000003A9 mov ax,0x24f */ 0xB8, 0x4F, 0x02,
- /* 000003AC iretw */ 0xCF,
- /* 000003AD pushaw */ 0x60,
- /* 000003AE push ds */ 0x1E,
- /* 000003AF push cs */ 0x0E,
- /* 000003B0 pop ds */ 0x1F,
- /* 000003B1 mov dx,0x220 */ 0xBA, 0x20, 0x02,
- /* 000003B4 mov ax,0x0 */ 0xB8, 0x00, 0x00,
- /* 000003B7 lodsb */ 0xAC,
- /* 000003B8 cmp al,0x0 */ 0x3C, 0x00,
- /* 000003BA jz 0x3bf */ 0x74, 0x03,
- /* 000003BC out dx,al */ 0xEE,
- /* 000003BD jmp short 0x3b7 */ 0xEB, 0xF8,
- /* 000003BF pop ds */ 0x1F,
- /* 000003C0 popaw */ 0x61,
- /* 000003C1 ret */ 0xC3,
- /* 000003C2 jna 0x413 */ 0x76, 0x4F,
- /* 000003C4 imul cx,[di],byte +0xa */ 0x6B, 0x0D, 0x0A,
- /* 000003C7 add [bp+0x55],dh */ 0x00, 0x76, 0x55,
- /* 000003CA outsb */ 0x6E,
- /* 000003CB jnc 0x442 */ 0x73, 0x75,
- /* 000003CD jo 0x43f */ 0x70, 0x70,
- /* 000003CF outsw */ 0x6F,
- /* 000003D0 jc 0x446 */ 0x72, 0x74,
- /* 000003D2 fs or ax,0xa */ 0x65, 0x64, 0x0D, 0x0A, 0x00,
- /* 000003D7 jna 0x42e */ 0x76, 0x55,
- /* 000003D9 outsb */ 0x6E,
- /* 000003DA imul bp,[bp+0x6f],byte +0x77 */ 0x6B, 0x6E, 0x6F, 0x77,
- /* 000003DE outsb */ 0x6E,
- /* 000003DF and [bp+0x75],al */ 0x20, 0x46, 0x75,
- /* 000003E2 outsb */ 0x6E,
- /* 000003E3 arpl [si+0x69],si */ 0x63, 0x74, 0x69,
- /* 000003E6 outsw */ 0x6F,
- /* 000003E7 outsb */ 0x6E,
- /* 000003E8 or ax,0xa */ 0x0D, 0x0A, 0x00,
- /* 000003EB jna 0x434 */ 0x76, 0x47,
- /* 000003ED gs jz 0x439 */ 0x65, 0x74, 0x49,
- /* 000003F0 outsb */ 0x6E,
- /* 000003F1 outsd */ 0x66, 0x6F,
- /* 000003F3 or ax,0xa */ 0x0D, 0x0A, 0x00,
- /* 000003F6 jna 0x43f */ 0x76, 0x47,
- /* 000003F8 gs jz 0x448 */ 0x65, 0x74, 0x4D,
- /* 000003FB outsw */ 0x6F,
- /* 000003FC gs dec cx */ 0x64, 0x65, 0x49,
- /* 000003FF outsb */ 0x6E,
- /* 00000400 outsd */ 0x66, 0x6F,
- /* 00000402 or ax,0xa */ 0x0D, 0x0A, 0x00,
- /* 00000405 jna 0x44e */ 0x76, 0x47,
- /* 00000407 gs jz 0x457 */ 0x65, 0x74, 0x4D,
- /* 0000040A outsw */ 0x6F,
- /* 0000040B gs or ax,0xa */ 0x64, 0x65, 0x0D, 0x0A, 0x00,
- /* 00000410 jna 0x465 */ 0x76, 0x53,
- /* 00000412 gs jz 0x462 */ 0x65, 0x74, 0x4D,
- /* 00000415 outsw */ 0x6F,
- /* 00000416 gs or ax,0xa */ 0x64, 0x65, 0x0D, 0x0A, 0x00,
- /* 0000041B jna 0x470 */ 0x76, 0x53,
- /* 0000041D gs jz 0x46d */ 0x65, 0x74, 0x4D,
- /* 00000420 outsw */ 0x6F,
- /* 00000421 gs dec sp */ 0x64, 0x65, 0x4C,
- /* 00000424 gs a32 popaw */ 0x65, 0x67, 0x61,
- /* 00000427 arpl [bx+di+0xd],di */ 0x63, 0x79, 0x0D,
- /* 0000042A or al,[bx+si] */ 0x0A, 0x00,
- /* 0000042C jna 0x483 */ 0x76, 0x55,
- /* 0000042E outsb */ 0x6E,
- /* 0000042F imul bp,[bx+0x77],byte +0x6e */ 0x6B, 0x6F, 0x77, 0x6E,
- /* 00000433 and [di+0x6f],cl */ 0x20, 0x4D, 0x6F,
- /* 00000436 gs or ax,0xa */ 0x64, 0x65, 0x0D, 0x0A, 0x00,
- /* 0000043B jna 0x484 */ 0x76, 0x47,
- /* 0000043D gs jz 0x490 */ 0x65, 0x74, 0x50,
- /* 00000440 insw */ 0x6D,
- /* 00000441 inc bx */ 0x43,
- /* 00000442 popaw */ 0x61,
- /* 00000443 jo 0x4a6 */ 0x70, 0x61,
- /* 00000445 bound bp,[bx+di+0x6c] */ 0x62, 0x69, 0x6C,
- /* 00000448 imul si,[si+0x69],word 0x7365 */ 0x69, 0x74, 0x69, 0x65, 0x73,
- /* 0000044D or ax,0xa */ 0x0D, 0x0A, 0x00,
- /* 00000450 jna 0x4a4 */ 0x76, 0x52,
- /* 00000452 gs popaw */ 0x65, 0x61,
- /* 00000454 fs inc bp */ 0x64, 0x45,
- /* 00000456 imul sp,[fs:si+0xd],word 0xa */ 0x64, 0x69, 0x64, 0x0D, 0x0A, 0x00,
- /* 0000045C jna 0x4aa */ 0x76, 0x4C,
- /* 0000045E gs a32 popaw */ 0x65, 0x67, 0x61,
- /* 00000461 arpl [bx+di+0x4d],di */ 0x63, 0x79, 0x4D,
- /* 00000464 outsw */ 0x6F,
- /* 00000465 xor cx,[gs:di] */ 0x64, 0x65, 0x33, 0x0D,
- /* 00000469 or al,[bx+si] */ 0x0A, 0x00,
- /* 0000046B insw */ 0x6D,
- /* 0000046C outsw */ 0x6F,
- /* 0000046D gs pop di */ 0x64, 0x65, 0x5F,
- /* 00000470 ss xor al,0x30 */ 0x36, 0x34, 0x30,
- /* 00000473 js 0x4a9 */ 0x78, 0x34,
- /* 00000475 cmp [bx+si],dh */ 0x38, 0x30,
- /* 00000477 js 0x4ac */ 0x78, 0x33,
- /* 00000479 xor cl,[di] */ 0x32, 0x0D,
- /* 0000047B or al,[bx+si] */ 0x0A, 0x00,
- /* 0000047D insw */ 0x6D,
- /* 0000047E outsw */ 0x6F,
- /* 0000047F gs pop di */ 0x64, 0x65, 0x5F,
- /* 00000482 cmp [bx+si],dh */ 0x38, 0x30,
- /* 00000484 xor [bx+si+0x36],bh */ 0x30, 0x78, 0x36,
- /* 00000487 xor [bx+si],dh */ 0x30, 0x30,
- /* 00000489 js 0x4be */ 0x78, 0x33,
- /* 0000048B xor cl,[di] */ 0x32, 0x0D,
- /* 0000048D or al,[bx+si] */ 0x0A, 0x00,
- /* 0000048F insw */ 0x6D,
- /* 00000490 outsw */ 0x6F,
- /* 00000491 gs pop di */ 0x64, 0x65, 0x5F,
- /* 00000494 xor [bx+si],si */ 0x31, 0x30,
- /* 00000496 xor dh,[si] */ 0x32, 0x34,
- /* 00000498 js 0x4d1 */ 0x78, 0x37,
- /* 0000049A cmp [ss:bx+si+0x33],bh */ 0x36, 0x38, 0x78, 0x33,
- /* 0000049E xor cl,[di] */ 0x32, 0x0D,
- /* 000004A0 or al,[bx+si] */ 0x0A, 0x00,
- /* 000004A2 insw */ 0x6D,
- /* 000004A3 outsw */ 0x6F,
- /* 000004A4 gs pop di */ 0x64, 0x65, 0x5F,
- /* 000004A7 jnz 0x517 */ 0x75, 0x6E,
- /* 000004A9 jnz 0x51e */ 0x75, 0x73,
- /* 000004AB fs or ax,0xa */ 0x65, 0x64, 0x0D, 0x0A, 0x00,
- /* 000004B0 add [bx+si],al */ 0x00, 0x00,
- /* 000004B2 add [bx+si],al */ 0x00, 0x00,
- /* 000004B4 add [bx+si],al */ 0x00, 0x00,
- /* 000004B6 add [bx+si],al */ 0x00, 0x00,
- /* 000004B8 add [bx+si],al */ 0x00, 0x00,
- /* 000004BA add [bx+si],al */ 0x00, 0x00,
- /* 000004BC add [bx+si],al */ 0x00, 0x00,
- /* 000004BE add [bx+si],al */ 0x00, 0x00,
- /* 000004C0 add [bx+si],al */ 0x00, 0x00,
- /* 000004C2 add [bx+si],al */ 0x00, 0x00,
- /* 000004C4 add [bx+si],al */ 0x00, 0x00,
- /* 000004C6 add [bx+si],al */ 0x00, 0x00,
- /* 000004C8 add [bx+si],al */ 0x00, 0x00,
- /* 000004CA add [bx+si],al */ 0x00, 0x00,
- /* 000004CC add [bx+si],al */ 0x00, 0x00,
- /* 000004CE add [bx+si],al */ 0x00, 0x00,
- /* 000004D0 add [bx+si],al */ 0x00, 0x00,
- /* 000004D2 add [bx+si],al */ 0x00, 0x00,
- /* 000004D4 add [bx+si],al */ 0x00, 0x00,
- /* 000004D6 add [bx+si],al */ 0x00, 0x00,
- /* 000004D8 add [bx+si],al */ 0x00, 0x00,
- /* 000004DA add [bx+si],al */ 0x00, 0x00,
- /* 000004DC add [bx+si],al */ 0x00, 0x00,
- /* 000004DE add [bx+si],al */ 0x00, 0x00,
- /* 000004E0 add [bx+si],al */ 0x00, 0x00,
- /* 000004E2 add [bx+si],al */ 0x00, 0x00,
- /* 000004E4 add [bx+si],al */ 0x00, 0x00,
- /* 000004E6 add [bx+si],al */ 0x00, 0x00,
- /* 000004E8 add [bx+si],al */ 0x00, 0x00,
- /* 000004EA add [bx+si],al */ 0x00, 0x00,
- /* 000004EC add [bx+si],al */ 0x00, 0x00,
- /* 000004EE add [bx+si],al */ 0x00, 0x00,
- /* 000004F0 add [bx+si],al */ 0x00, 0x00,
- /* 000004F2 add [bx+si],al */ 0x00, 0x00,
- /* 000004F4 add [bx+si],al */ 0x00, 0x00,
- /* 000004F6 add [bx+si],al */ 0x00, 0x00,
- /* 000004F8 add [bx+si],al */ 0x00, 0x00,
- /* 000004FA add [bx+si],al */ 0x00, 0x00,
- /* 000004FC add [bx+si],al */ 0x00, 0x00,
- /* 000004FE add [bx+si],al */ 0x00, 0x00,
- /* 00000500 add [bx+si],al */ 0x00, 0x00,
- /* 00000502 add [bx+si],al */ 0x00, 0x00,
- /* 00000504 add [bx+si],al */ 0x00, 0x00,
- /* 00000506 add [bx+si],al */ 0x00, 0x00,
- /* 00000508 add [bx+si],al */ 0x00, 0x00,
- /* 0000050A add [bx+si],al */ 0x00, 0x00,
- /* 0000050C add [bx+si],al */ 0x00, 0x00,
- /* 0000050E add [bx+si],al */ 0x00, 0x00,
- /* 00000510 add [bx+si],al */ 0x00, 0x00,
- /* 00000512 add [bx+si],al */ 0x00, 0x00,
- /* 00000514 add [bx+si],al */ 0x00, 0x00,
- /* 00000516 add [bx+si],al */ 0x00, 0x00,
- /* 00000518 add [bx+si],al */ 0x00, 0x00,
- /* 0000051A add [bx+si],al */ 0x00, 0x00,
- /* 0000051C add [bx+si],al */ 0x00, 0x00,
- /* 0000051E add [bx+si],al */ 0x00, 0x00,
- /* 00000520 add [bx+si],al */ 0x00, 0x00,
- /* 00000522 add [bx+si],al */ 0x00, 0x00,
- /* 00000524 add [bx+si],al */ 0x00, 0x00,
- /* 00000526 add [bx+si],al */ 0x00, 0x00,
- /* 00000528 add [bx+si],al */ 0x00, 0x00,
- /* 0000052A add [bx+si],al */ 0x00, 0x00,
- /* 0000052C add [bx+si],al */ 0x00, 0x00,
- /* 0000052E add [bx+si],al */ 0x00, 0x00,
- /* 00000530 add [bx+si],al */ 0x00, 0x00,
- /* 00000532 add [bx+si],al */ 0x00, 0x00,
+STATIC CONST UINT8 mVbeShim[] = {
+ /* 00000000 nop */ 0x90,
+ /* 00000001 nop */ 0x90,
+ /* 00000002 nop */ 0x90,
+ /* 00000003 nop */ 0x90,
+ /* 00000004 nop */ 0x90,
+ /* 00000005 nop */ 0x90,
+ /* 00000006 nop */ 0x90,
+ /* 00000007 nop */ 0x90,
+ /* 00000008 nop */ 0x90,
+ /* 00000009 nop */ 0x90,
+ /* 0000000A nop */ 0x90,
+ /* 0000000B nop */ 0x90,
+ /* 0000000C nop */ 0x90,
+ /* 0000000D nop */ 0x90,
+ /* 0000000E nop */ 0x90,
+ /* 0000000F nop */ 0x90,
+ /* 00000010 nop */ 0x90,
+ /* 00000011 nop */ 0x90,
+ /* 00000012 nop */ 0x90,
+ /* 00000013 nop */ 0x90,
+ /* 00000014 nop */ 0x90,
+ /* 00000015 nop */ 0x90,
+ /* 00000016 nop */ 0x90,
+ /* 00000017 nop */ 0x90,
+ /* 00000018 nop */ 0x90,
+ /* 00000019 nop */ 0x90,
+ /* 0000001A nop */ 0x90,
+ /* 0000001B nop */ 0x90,
+ /* 0000001C nop */ 0x90,
+ /* 0000001D nop */ 0x90,
+ /* 0000001E nop */ 0x90,
+ /* 0000001F nop */ 0x90,
+ /* 00000020 nop */ 0x90,
+ /* 00000021 nop */ 0x90,
+ /* 00000022 nop */ 0x90,
+ /* 00000023 nop */ 0x90,
+ /* 00000024 nop */ 0x90,
+ /* 00000025 nop */ 0x90,
+ /* 00000026 nop */ 0x90,
+ /* 00000027 nop */ 0x90,
+ /* 00000028 nop */ 0x90,
+ /* 00000029 nop */ 0x90,
+ /* 0000002A nop */ 0x90,
+ /* 0000002B nop */ 0x90,
+ /* 0000002C nop */ 0x90,
+ /* 0000002D nop */ 0x90,
+ /* 0000002E nop */ 0x90,
+ /* 0000002F nop */ 0x90,
+ /* 00000030 nop */ 0x90,
+ /* 00000031 nop */ 0x90,
+ /* 00000032 nop */ 0x90,
+ /* 00000033 nop */ 0x90,
+ /* 00000034 nop */ 0x90,
+ /* 00000035 nop */ 0x90,
+ /* 00000036 nop */ 0x90,
+ /* 00000037 nop */ 0x90,
+ /* 00000038 nop */ 0x90,
+ /* 00000039 nop */ 0x90,
+ /* 0000003A nop */ 0x90,
+ /* 0000003B nop */ 0x90,
+ /* 0000003C nop */ 0x90,
+ /* 0000003D nop */ 0x90,
+ /* 0000003E nop */ 0x90,
+ /* 0000003F nop */ 0x90,
+ /* 00000040 nop */ 0x90,
+ /* 00000041 nop */ 0x90,
+ /* 00000042 nop */ 0x90,
+ /* 00000043 nop */ 0x90,
+ /* 00000044 nop */ 0x90,
+ /* 00000045 nop */ 0x90,
+ /* 00000046 nop */ 0x90,
+ /* 00000047 nop */ 0x90,
+ /* 00000048 nop */ 0x90,
+ /* 00000049 nop */ 0x90,
+ /* 0000004A nop */ 0x90,
+ /* 0000004B nop */ 0x90,
+ /* 0000004C nop */ 0x90,
+ /* 0000004D nop */ 0x90,
+ /* 0000004E nop */ 0x90,
+ /* 0000004F nop */ 0x90,
+ /* 00000050 nop */ 0x90,
+ /* 00000051 nop */ 0x90,
+ /* 00000052 nop */ 0x90,
+ /* 00000053 nop */ 0x90,
+ /* 00000054 nop */ 0x90,
+ /* 00000055 nop */ 0x90,
+ /* 00000056 nop */ 0x90,
+ /* 00000057 nop */ 0x90,
+ /* 00000058 nop */ 0x90,
+ /* 00000059 nop */ 0x90,
+ /* 0000005A nop */ 0x90,
+ /* 0000005B nop */ 0x90,
+ /* 0000005C nop */ 0x90,
+ /* 0000005D nop */ 0x90,
+ /* 0000005E nop */ 0x90,
+ /* 0000005F nop */ 0x90,
+ /* 00000060 nop */ 0x90,
+ /* 00000061 nop */ 0x90,
+ /* 00000062 nop */ 0x90,
+ /* 00000063 nop */ 0x90,
+ /* 00000064 nop */ 0x90,
+ /* 00000065 nop */ 0x90,
+ /* 00000066 nop */ 0x90,
+ /* 00000067 nop */ 0x90,
+ /* 00000068 nop */ 0x90,
+ /* 00000069 nop */ 0x90,
+ /* 0000006A nop */ 0x90,
+ /* 0000006B nop */ 0x90,
+ /* 0000006C nop */ 0x90,
+ /* 0000006D nop */ 0x90,
+ /* 0000006E nop */ 0x90,
+ /* 0000006F nop */ 0x90,
+ /* 00000070 nop */ 0x90,
+ /* 00000071 nop */ 0x90,
+ /* 00000072 nop */ 0x90,
+ /* 00000073 nop */ 0x90,
+ /* 00000074 nop */ 0x90,
+ /* 00000075 nop */ 0x90,
+ /* 00000076 nop */ 0x90,
+ /* 00000077 nop */ 0x90,
+ /* 00000078 nop */ 0x90,
+ /* 00000079 nop */ 0x90,
+ /* 0000007A nop */ 0x90,
+ /* 0000007B nop */ 0x90,
+ /* 0000007C nop */ 0x90,
+ /* 0000007D nop */ 0x90,
+ /* 0000007E nop */ 0x90,
+ /* 0000007F nop */ 0x90,
+ /* 00000080 nop */ 0x90,
+ /* 00000081 nop */ 0x90,
+ /* 00000082 nop */ 0x90,
+ /* 00000083 nop */ 0x90,
+ /* 00000084 nop */ 0x90,
+ /* 00000085 nop */ 0x90,
+ /* 00000086 nop */ 0x90,
+ /* 00000087 nop */ 0x90,
+ /* 00000088 nop */ 0x90,
+ /* 00000089 nop */ 0x90,
+ /* 0000008A nop */ 0x90,
+ /* 0000008B nop */ 0x90,
+ /* 0000008C nop */ 0x90,
+ /* 0000008D nop */ 0x90,
+ /* 0000008E nop */ 0x90,
+ /* 0000008F nop */ 0x90,
+ /* 00000090 nop */ 0x90,
+ /* 00000091 nop */ 0x90,
+ /* 00000092 nop */ 0x90,
+ /* 00000093 nop */ 0x90,
+ /* 00000094 nop */ 0x90,
+ /* 00000095 nop */ 0x90,
+ /* 00000096 nop */ 0x90,
+ /* 00000097 nop */ 0x90,
+ /* 00000098 nop */ 0x90,
+ /* 00000099 nop */ 0x90,
+ /* 0000009A nop */ 0x90,
+ /* 0000009B nop */ 0x90,
+ /* 0000009C nop */ 0x90,
+ /* 0000009D nop */ 0x90,
+ /* 0000009E nop */ 0x90,
+ /* 0000009F nop */ 0x90,
+ /* 000000A0 nop */ 0x90,
+ /* 000000A1 nop */ 0x90,
+ /* 000000A2 nop */ 0x90,
+ /* 000000A3 nop */ 0x90,
+ /* 000000A4 nop */ 0x90,
+ /* 000000A5 nop */ 0x90,
+ /* 000000A6 nop */ 0x90,
+ /* 000000A7 nop */ 0x90,
+ /* 000000A8 nop */ 0x90,
+ /* 000000A9 nop */ 0x90,
+ /* 000000AA nop */ 0x90,
+ /* 000000AB nop */ 0x90,
+ /* 000000AC nop */ 0x90,
+ /* 000000AD nop */ 0x90,
+ /* 000000AE nop */ 0x90,
+ /* 000000AF nop */ 0x90,
+ /* 000000B0 nop */ 0x90,
+ /* 000000B1 nop */ 0x90,
+ /* 000000B2 nop */ 0x90,
+ /* 000000B3 nop */ 0x90,
+ /* 000000B4 nop */ 0x90,
+ /* 000000B5 nop */ 0x90,
+ /* 000000B6 nop */ 0x90,
+ /* 000000B7 nop */ 0x90,
+ /* 000000B8 nop */ 0x90,
+ /* 000000B9 nop */ 0x90,
+ /* 000000BA nop */ 0x90,
+ /* 000000BB nop */ 0x90,
+ /* 000000BC nop */ 0x90,
+ /* 000000BD nop */ 0x90,
+ /* 000000BE nop */ 0x90,
+ /* 000000BF nop */ 0x90,
+ /* 000000C0 nop */ 0x90,
+ /* 000000C1 nop */ 0x90,
+ /* 000000C2 nop */ 0x90,
+ /* 000000C3 nop */ 0x90,
+ /* 000000C4 nop */ 0x90,
+ /* 000000C5 nop */ 0x90,
+ /* 000000C6 nop */ 0x90,
+ /* 000000C7 nop */ 0x90,
+ /* 000000C8 nop */ 0x90,
+ /* 000000C9 nop */ 0x90,
+ /* 000000CA nop */ 0x90,
+ /* 000000CB nop */ 0x90,
+ /* 000000CC nop */ 0x90,
+ /* 000000CD nop */ 0x90,
+ /* 000000CE nop */ 0x90,
+ /* 000000CF nop */ 0x90,
+ /* 000000D0 nop */ 0x90,
+ /* 000000D1 nop */ 0x90,
+ /* 000000D2 nop */ 0x90,
+ /* 000000D3 nop */ 0x90,
+ /* 000000D4 nop */ 0x90,
+ /* 000000D5 nop */ 0x90,
+ /* 000000D6 nop */ 0x90,
+ /* 000000D7 nop */ 0x90,
+ /* 000000D8 nop */ 0x90,
+ /* 000000D9 nop */ 0x90,
+ /* 000000DA nop */ 0x90,
+ /* 000000DB nop */ 0x90,
+ /* 000000DC nop */ 0x90,
+ /* 000000DD nop */ 0x90,
+ /* 000000DE nop */ 0x90,
+ /* 000000DF nop */ 0x90,
+ /* 000000E0 nop */ 0x90,
+ /* 000000E1 nop */ 0x90,
+ /* 000000E2 nop */ 0x90,
+ /* 000000E3 nop */ 0x90,
+ /* 000000E4 nop */ 0x90,
+ /* 000000E5 nop */ 0x90,
+ /* 000000E6 nop */ 0x90,
+ /* 000000E7 nop */ 0x90,
+ /* 000000E8 nop */ 0x90,
+ /* 000000E9 nop */ 0x90,
+ /* 000000EA nop */ 0x90,
+ /* 000000EB nop */ 0x90,
+ /* 000000EC nop */ 0x90,
+ /* 000000ED nop */ 0x90,
+ /* 000000EE nop */ 0x90,
+ /* 000000EF nop */ 0x90,
+ /* 000000F0 nop */ 0x90,
+ /* 000000F1 nop */ 0x90,
+ /* 000000F2 nop */ 0x90,
+ /* 000000F3 nop */ 0x90,
+ /* 000000F4 nop */ 0x90,
+ /* 000000F5 nop */ 0x90,
+ /* 000000F6 nop */ 0x90,
+ /* 000000F7 nop */ 0x90,
+ /* 000000F8 nop */ 0x90,
+ /* 000000F9 nop */ 0x90,
+ /* 000000FA nop */ 0x90,
+ /* 000000FB nop */ 0x90,
+ /* 000000FC nop */ 0x90,
+ /* 000000FD nop */ 0x90,
+ /* 000000FE nop */ 0x90,
+ /* 000000FF nop */ 0x90,
+ /* 00000100 nop */ 0x90,
+ /* 00000101 nop */ 0x90,
+ /* 00000102 nop */ 0x90,
+ /* 00000103 nop */ 0x90,
+ /* 00000104 nop */ 0x90,
+ /* 00000105 nop */ 0x90,
+ /* 00000106 nop */ 0x90,
+ /* 00000107 nop */ 0x90,
+ /* 00000108 nop */ 0x90,
+ /* 00000109 nop */ 0x90,
+ /* 0000010A nop */ 0x90,
+ /* 0000010B nop */ 0x90,
+ /* 0000010C nop */ 0x90,
+ /* 0000010D nop */ 0x90,
+ /* 0000010E nop */ 0x90,
+ /* 0000010F nop */ 0x90,
+ /* 00000110 nop */ 0x90,
+ /* 00000111 nop */ 0x90,
+ /* 00000112 nop */ 0x90,
+ /* 00000113 nop */ 0x90,
+ /* 00000114 nop */ 0x90,
+ /* 00000115 nop */ 0x90,
+ /* 00000116 nop */ 0x90,
+ /* 00000117 nop */ 0x90,
+ /* 00000118 nop */ 0x90,
+ /* 00000119 nop */ 0x90,
+ /* 0000011A nop */ 0x90,
+ /* 0000011B nop */ 0x90,
+ /* 0000011C nop */ 0x90,
+ /* 0000011D nop */ 0x90,
+ /* 0000011E nop */ 0x90,
+ /* 0000011F nop */ 0x90,
+ /* 00000120 nop */ 0x90,
+ /* 00000121 nop */ 0x90,
+ /* 00000122 nop */ 0x90,
+ /* 00000123 nop */ 0x90,
+ /* 00000124 nop */ 0x90,
+ /* 00000125 nop */ 0x90,
+ /* 00000126 nop */ 0x90,
+ /* 00000127 nop */ 0x90,
+ /* 00000128 nop */ 0x90,
+ /* 00000129 nop */ 0x90,
+ /* 0000012A nop */ 0x90,
+ /* 0000012B nop */ 0x90,
+ /* 0000012C nop */ 0x90,
+ /* 0000012D nop */ 0x90,
+ /* 0000012E nop */ 0x90,
+ /* 0000012F nop */ 0x90,
+ /* 00000130 nop */ 0x90,
+ /* 00000131 nop */ 0x90,
+ /* 00000132 nop */ 0x90,
+ /* 00000133 nop */ 0x90,
+ /* 00000134 nop */ 0x90,
+ /* 00000135 nop */ 0x90,
+ /* 00000136 nop */ 0x90,
+ /* 00000137 nop */ 0x90,
+ /* 00000138 nop */ 0x90,
+ /* 00000139 nop */ 0x90,
+ /* 0000013A nop */ 0x90,
+ /* 0000013B nop */ 0x90,
+ /* 0000013C nop */ 0x90,
+ /* 0000013D nop */ 0x90,
+ /* 0000013E nop */ 0x90,
+ /* 0000013F nop */ 0x90,
+ /* 00000140 nop */ 0x90,
+ /* 00000141 nop */ 0x90,
+ /* 00000142 nop */ 0x90,
+ /* 00000143 nop */ 0x90,
+ /* 00000144 nop */ 0x90,
+ /* 00000145 nop */ 0x90,
+ /* 00000146 nop */ 0x90,
+ /* 00000147 nop */ 0x90,
+ /* 00000148 nop */ 0x90,
+ /* 00000149 nop */ 0x90,
+ /* 0000014A nop */ 0x90,
+ /* 0000014B nop */ 0x90,
+ /* 0000014C nop */ 0x90,
+ /* 0000014D nop */ 0x90,
+ /* 0000014E nop */ 0x90,
+ /* 0000014F nop */ 0x90,
+ /* 00000150 nop */ 0x90,
+ /* 00000151 nop */ 0x90,
+ /* 00000152 nop */ 0x90,
+ /* 00000153 nop */ 0x90,
+ /* 00000154 nop */ 0x90,
+ /* 00000155 nop */ 0x90,
+ /* 00000156 nop */ 0x90,
+ /* 00000157 nop */ 0x90,
+ /* 00000158 nop */ 0x90,
+ /* 00000159 nop */ 0x90,
+ /* 0000015A nop */ 0x90,
+ /* 0000015B nop */ 0x90,
+ /* 0000015C nop */ 0x90,
+ /* 0000015D nop */ 0x90,
+ /* 0000015E nop */ 0x90,
+ /* 0000015F nop */ 0x90,
+ /* 00000160 nop */ 0x90,
+ /* 00000161 nop */ 0x90,
+ /* 00000162 nop */ 0x90,
+ /* 00000163 nop */ 0x90,
+ /* 00000164 nop */ 0x90,
+ /* 00000165 nop */ 0x90,
+ /* 00000166 nop */ 0x90,
+ /* 00000167 nop */ 0x90,
+ /* 00000168 nop */ 0x90,
+ /* 00000169 nop */ 0x90,
+ /* 0000016A nop */ 0x90,
+ /* 0000016B nop */ 0x90,
+ /* 0000016C nop */ 0x90,
+ /* 0000016D nop */ 0x90,
+ /* 0000016E nop */ 0x90,
+ /* 0000016F nop */ 0x90,
+ /* 00000170 nop */ 0x90,
+ /* 00000171 nop */ 0x90,
+ /* 00000172 nop */ 0x90,
+ /* 00000173 nop */ 0x90,
+ /* 00000174 nop */ 0x90,
+ /* 00000175 nop */ 0x90,
+ /* 00000176 nop */ 0x90,
+ /* 00000177 nop */ 0x90,
+ /* 00000178 nop */ 0x90,
+ /* 00000179 nop */ 0x90,
+ /* 0000017A nop */ 0x90,
+ /* 0000017B nop */ 0x90,
+ /* 0000017C nop */ 0x90,
+ /* 0000017D nop */ 0x90,
+ /* 0000017E nop */ 0x90,
+ /* 0000017F nop */ 0x90,
+ /* 00000180 nop */ 0x90,
+ /* 00000181 nop */ 0x90,
+ /* 00000182 nop */ 0x90,
+ /* 00000183 nop */ 0x90,
+ /* 00000184 nop */ 0x90,
+ /* 00000185 nop */ 0x90,
+ /* 00000186 nop */ 0x90,
+ /* 00000187 nop */ 0x90,
+ /* 00000188 nop */ 0x90,
+ /* 00000189 nop */ 0x90,
+ /* 0000018A nop */ 0x90,
+ /* 0000018B nop */ 0x90,
+ /* 0000018C nop */ 0x90,
+ /* 0000018D nop */ 0x90,
+ /* 0000018E nop */ 0x90,
+ /* 0000018F nop */ 0x90,
+ /* 00000190 nop */ 0x90,
+ /* 00000191 nop */ 0x90,
+ /* 00000192 nop */ 0x90,
+ /* 00000193 nop */ 0x90,
+ /* 00000194 nop */ 0x90,
+ /* 00000195 nop */ 0x90,
+ /* 00000196 nop */ 0x90,
+ /* 00000197 nop */ 0x90,
+ /* 00000198 nop */ 0x90,
+ /* 00000199 nop */ 0x90,
+ /* 0000019A nop */ 0x90,
+ /* 0000019B nop */ 0x90,
+ /* 0000019C nop */ 0x90,
+ /* 0000019D nop */ 0x90,
+ /* 0000019E nop */ 0x90,
+ /* 0000019F nop */ 0x90,
+ /* 000001A0 nop */ 0x90,
+ /* 000001A1 nop */ 0x90,
+ /* 000001A2 nop */ 0x90,
+ /* 000001A3 nop */ 0x90,
+ /* 000001A4 nop */ 0x90,
+ /* 000001A5 nop */ 0x90,
+ /* 000001A6 nop */ 0x90,
+ /* 000001A7 nop */ 0x90,
+ /* 000001A8 nop */ 0x90,
+ /* 000001A9 nop */ 0x90,
+ /* 000001AA nop */ 0x90,
+ /* 000001AB nop */ 0x90,
+ /* 000001AC nop */ 0x90,
+ /* 000001AD nop */ 0x90,
+ /* 000001AE nop */ 0x90,
+ /* 000001AF nop */ 0x90,
+ /* 000001B0 nop */ 0x90,
+ /* 000001B1 nop */ 0x90,
+ /* 000001B2 nop */ 0x90,
+ /* 000001B3 nop */ 0x90,
+ /* 000001B4 nop */ 0x90,
+ /* 000001B5 nop */ 0x90,
+ /* 000001B6 nop */ 0x90,
+ /* 000001B7 nop */ 0x90,
+ /* 000001B8 nop */ 0x90,
+ /* 000001B9 nop */ 0x90,
+ /* 000001BA nop */ 0x90,
+ /* 000001BB nop */ 0x90,
+ /* 000001BC nop */ 0x90,
+ /* 000001BD nop */ 0x90,
+ /* 000001BE nop */ 0x90,
+ /* 000001BF nop */ 0x90,
+ /* 000001C0 nop */ 0x90,
+ /* 000001C1 nop */ 0x90,
+ /* 000001C2 nop */ 0x90,
+ /* 000001C3 nop */ 0x90,
+ /* 000001C4 nop */ 0x90,
+ /* 000001C5 nop */ 0x90,
+ /* 000001C6 nop */ 0x90,
+ /* 000001C7 nop */ 0x90,
+ /* 000001C8 nop */ 0x90,
+ /* 000001C9 nop */ 0x90,
+ /* 000001CA nop */ 0x90,
+ /* 000001CB nop */ 0x90,
+ /* 000001CC nop */ 0x90,
+ /* 000001CD nop */ 0x90,
+ /* 000001CE nop */ 0x90,
+ /* 000001CF nop */ 0x90,
+ /* 000001D0 nop */ 0x90,
+ /* 000001D1 nop */ 0x90,
+ /* 000001D2 nop */ 0x90,
+ /* 000001D3 nop */ 0x90,
+ /* 000001D4 nop */ 0x90,
+ /* 000001D5 nop */ 0x90,
+ /* 000001D6 nop */ 0x90,
+ /* 000001D7 nop */ 0x90,
+ /* 000001D8 nop */ 0x90,
+ /* 000001D9 nop */ 0x90,
+ /* 000001DA nop */ 0x90,
+ /* 000001DB nop */ 0x90,
+ /* 000001DC nop */ 0x90,
+ /* 000001DD nop */ 0x90,
+ /* 000001DE nop */ 0x90,
+ /* 000001DF nop */ 0x90,
+ /* 000001E0 nop */ 0x90,
+ /* 000001E1 nop */ 0x90,
+ /* 000001E2 nop */ 0x90,
+ /* 000001E3 nop */ 0x90,
+ /* 000001E4 nop */ 0x90,
+ /* 000001E5 nop */ 0x90,
+ /* 000001E6 nop */ 0x90,
+ /* 000001E7 nop */ 0x90,
+ /* 000001E8 nop */ 0x90,
+ /* 000001E9 nop */ 0x90,
+ /* 000001EA nop */ 0x90,
+ /* 000001EB nop */ 0x90,
+ /* 000001EC nop */ 0x90,
+ /* 000001ED nop */ 0x90,
+ /* 000001EE nop */ 0x90,
+ /* 000001EF nop */ 0x90,
+ /* 000001F0 nop */ 0x90,
+ /* 000001F1 nop */ 0x90,
+ /* 000001F2 nop */ 0x90,
+ /* 000001F3 nop */ 0x90,
+ /* 000001F4 nop */ 0x90,
+ /* 000001F5 nop */ 0x90,
+ /* 000001F6 nop */ 0x90,
+ /* 000001F7 nop */ 0x90,
+ /* 000001F8 nop */ 0x90,
+ /* 000001F9 nop */ 0x90,
+ /* 000001FA nop */ 0x90,
+ /* 000001FB nop */ 0x90,
+ /* 000001FC nop */ 0x90,
+ /* 000001FD nop */ 0x90,
+ /* 000001FE nop */ 0x90,
+ /* 000001FF nop */ 0x90,
+ /* 00000200 cmp ax,0x4f00 */ 0x3D,0x00, 0x4F,
+ /* 00000203 jz 0x237 */ 0x74,0x32,
+ /* 00000205 cmp ax,0x4f01 */ 0x3D,0x01, 0x4F,
+ /* 00000208 jz 0x257 */ 0x74,0x4D,
+ /* 0000020A cmp ax,0x4f02 */ 0x3D,0x02, 0x4F,
+ /* 0000020D jz word 0x2c8 */ 0x0F,0x84, 0xB7,0x00,
+ /* 00000211 cmp ax,0x4f03 */ 0x3D,0x03, 0x4F,
+ /* 00000214 jz word 0x325 */ 0x0F,0x84, 0x0D,0x01,
+ /* 00000218 cmp ax,0x4f10 */ 0x3D,0x10, 0x4F,
+ /* 0000021B jz word 0x337 */ 0x0F,0x84, 0x18,0x01,
+ /* 0000021F cmp ax,0x4f15 */ 0x3D,0x15, 0x4F,
+ /* 00000222 jz word 0x344 */ 0x0F,0x84, 0x1E,0x01,
+ /* 00000226 cmp ah,0x0 */ 0x80,0xFC, 0x00,
+ /* 00000229 jz word 0x363 */ 0x0F,0x84, 0x36,0x01,
+ /* 0000022D push si */ 0x56,
+ /* 0000022E mov si,0x3d7 */ 0xBE,0xD7, 0x03,
+ /* 00000231 call word 0x3ad */ 0xE8,0x79, 0x01,
+ /* 00000234 pop si */ 0x5E,
+ /* 00000235 jmp short 0x235 */ 0xEB,0xFE,
+ /* 00000237 push es */ 0x06,
+ /* 00000238 push di */ 0x57,
+ /* 00000239 push ds */ 0x1E,
+ /* 0000023A push si */ 0x56,
+ /* 0000023B push cx */ 0x51,
+ /* 0000023C push si */ 0x56,
+ /* 0000023D mov si,0x3eb */ 0xBE,0xEB, 0x03,
+ /* 00000240 call word 0x3ad */ 0xE8,0x6A, 0x01,
+ /* 00000243 pop si */ 0x5E,
+ /* 00000244 push cs */ 0x0E,
+ /* 00000245 pop ds */ 0x1F,
+ /* 00000246 mov si,0x0 */ 0xBE,0x00, 0x00,
+ /* 00000249 mov cx,0x100 */ 0xB9,0x00, 0x01,
+ /* 0000024C cld */ 0xFC,
+ /* 0000024D rep movsb */ 0xF3,0xA4,
+ /* 0000024F pop cx */ 0x59,
+ /* 00000250 pop si */ 0x5E,
+ /* 00000251 pop ds */ 0x1F,
+ /* 00000252 pop di */ 0x5F,
+ /* 00000253 pop es */ 0x07,
+ /* 00000254 jmp word 0x395 */ 0xE9,0x3E, 0x01,
+ /* 00000257 push es */ 0x06,
+ /* 00000258 push di */ 0x57,
+ /* 00000259 push ds */ 0x1E,
+ /* 0000025A push si */ 0x56,
+ /* 0000025B push cx */ 0x51,
+ /* 0000025C push si */ 0x56,
+ /* 0000025D mov si,0x3f6 */ 0xBE,0xF6, 0x03,
+ /* 00000260 call word 0x3ad */ 0xE8,0x4A, 0x01,
+ /* 00000263 pop si */ 0x5E,
+ /* 00000264 and cx,0xbfff */ 0x81,0xE1, 0xFF,0xBF,
+ /* 00000268 cmp cx,0x13f */ 0x81,0xF9, 0x3F,0x01,
+ /* 0000026C jz 0x284 */ 0x74,0x16,
+ /* 0000026E cmp cx,0x140 */ 0x81,0xF9, 0x40,0x01,
+ /* 00000272 jz 0x291 */ 0x74,0x1D,
+ /* 00000274 cmp cx,0x141 */ 0x81,0xF9, 0x41,0x01,
+ /* 00000278 jz 0x29e */ 0x74,0x24,
+ /* 0000027A push si */ 0x56,
+ /* 0000027B mov si,0x42c */ 0xBE,0x2C, 0x04,
+ /* 0000027E call word 0x3ad */ 0xE8,0x2C, 0x01,
+ /* 00000281 pop si */ 0x5E,
+ /* 00000282 jmp short 0x235 */ 0xEB,0xB1,
+ /* 00000284 push si */ 0x56,
+ /* 00000285 mov si,0x46b */ 0xBE,0x6B, 0x04,
+ /* 00000288 call word 0x3ad */ 0xE8,0x22, 0x01,
+ /* 0000028B pop si */ 0x5E,
+ /* 0000028C mov si,0x100 */ 0xBE,0x00, 0x01,
+ /* 0000028F jmp short 0x2b8 */ 0xEB,0x27,
+ /* 00000291 push si */ 0x56,
+ /* 00000292 mov si,0x47d */ 0xBE,0x7D, 0x04,
+ /* 00000295 call word 0x3ad */ 0xE8,0x15, 0x01,
+ /* 00000298 pop si */ 0x5E,
+ /* 00000299 mov si,0x132 */ 0xBE,0x32, 0x01,
+ /* 0000029C jmp short 0x2b8 */ 0xEB,0x1A,
+ /* 0000029E push si */ 0x56,
+ /* 0000029F mov si,0x48f */ 0xBE,0x8F, 0x04,
+ /* 000002A2 call word 0x3ad */ 0xE8,0x08, 0x01,
+ /* 000002A5 pop si */ 0x5E,
+ /* 000002A6 mov si,0x164 */ 0xBE,0x64, 0x01,
+ /* 000002A9 jmp short 0x2b8 */ 0xEB,0x0D,
+ /* 000002AB push si */ 0x56,
+ /* 000002AC mov si,0x4a2 */ 0xBE,0xA2, 0x04,
+ /* 000002AF call word 0x3ad */ 0xE8,0xFB, 0x00,
+ /* 000002B2 pop si */ 0x5E,
+ /* 000002B3 mov si,0x196 */ 0xBE,0x96, 0x01,
+ /* 000002B6 jmp short 0x2b8 */ 0xEB,0x00,
+ /* 000002B8 push cs */ 0x0E,
+ /* 000002B9 pop ds */ 0x1F,
+ /* 000002BA mov cx,0x32 */ 0xB9,0x32, 0x00,
+ /* 000002BD cld */ 0xFC,
+ /* 000002BE rep movsb */ 0xF3,0xA4,
+ /* 000002C0 pop cx */ 0x59,
+ /* 000002C1 pop si */ 0x5E,
+ /* 000002C2 pop ds */ 0x1F,
+ /* 000002C3 pop di */ 0x5F,
+ /* 000002C4 pop es */ 0x07,
+ /* 000002C5 jmp word 0x395 */ 0xE9,0xCD, 0x00,
+ /* 000002C8 push dx */ 0x52,
+ /* 000002C9 push ax */ 0x50,
+ /* 000002CA push si */ 0x56,
+ /* 000002CB mov si,0x410 */ 0xBE,0x10, 0x04,
+ /* 000002CE call word 0x3ad */ 0xE8,0xDC, 0x00,
+ /* 000002D1 pop si */ 0x5E,
+ /* 000002D2 and bx,0xbfff */ 0x81,0xE3, 0xFF,0xBF,
+ /* 000002D6 cmp bx,0x13f */ 0x81,0xFB, 0x3F,0x01,
+ /* 000002DA jz 0x2f3 */ 0x74,0x17,
+ /* 000002DC cmp bx,0x140 */ 0x81,0xFB, 0x40,0x01,
+ /* 000002E0 jz 0x2fd */ 0x74,0x1B,
+ /* 000002E2 cmp bx,0x141 */ 0x81,0xFB, 0x41,0x01,
+ /* 000002E6 jz 0x307 */ 0x74,0x1F,
+ /* 000002E8 push si */ 0x56,
+ /* 000002E9 mov si,0x42c */ 0xBE,0x2C, 0x04,
+ /* 000002EC call word 0x3ad */ 0xE8,0xBE, 0x00,
+ /* 000002EF pop si */ 0x5E,
+ /* 000002F0 jmp word 0x235 */ 0xE9,0x42, 0xFF,
+ /* 000002F3 push si */ 0x56,
+ /* 000002F4 mov si,0x46b */ 0xBE,0x6B, 0x04,
+ /* 000002F7 call word 0x3ad */ 0xE8,0xB3, 0x00,
+ /* 000002FA pop si */ 0x5E,
+ /* 000002FB jmp short 0x319 */ 0xEB,0x1C,
+ /* 000002FD push si */ 0x56,
+ /* 000002FE mov si,0x47d */ 0xBE,0x7D, 0x04,
+ /* 00000301 call word 0x3ad */ 0xE8,0xA9, 0x00,
+ /* 00000304 pop si */ 0x5E,
+ /* 00000305 jmp short 0x319 */ 0xEB,0x12,
+ /* 00000307 push si */ 0x56,
+ /* 00000308 mov si,0x48f */ 0xBE,0x8F, 0x04,
+ /* 0000030B call word 0x3ad */ 0xE8,0x9F, 0x00,
+ /* 0000030E pop si */ 0x5E,
+ /* 0000030F jmp short 0x319 */ 0xEB,0x08,
+ /* 00000311 push si */ 0x56,
+ /* 00000312 mov si,0x4a2 */ 0xBE,0xA2, 0x04,
+ /* 00000315 call word 0x3ad */ 0xE8,0x95, 0x00,
+ /* 00000318 pop si */ 0x5E,
+ /* 00000319 mov [0x4b0],bl */ 0x88,0x1E, 0xB0,0x04,
+ /* 0000031D mov [0x4b1],bh */ 0x88,0x3E, 0xB1,0x04,
+ /* 00000321 pop ax */ 0x58,
+ /* 00000322 pop dx */ 0x5A,
+ /* 00000323 jmp short 0x395 */ 0xEB,0x70,
+ /* 00000325 push si */ 0x56,
+ /* 00000326 mov si,0x405 */ 0xBE,0x05, 0x04,
+ /* 00000329 call word 0x3ad */ 0xE8,0x81, 0x00,
+ /* 0000032C pop si */ 0x5E,
+ /* 0000032D mov bl,[0x4b0] */ 0x8A,0x1E, 0xB0,0x04,
+ /* 00000331 mov bh,[0x4b1] */ 0x8A,0x3E, 0xB1,0x04,
+ /* 00000335 jmp short 0x395 */ 0xEB,0x5E,
+ /* 00000337 push si */ 0x56,
+ /* 00000338 mov si,0x43b */ 0xBE,0x3B, 0x04,
+ /* 0000033B call word 0x3ad */ 0xE8,0x6F, 0x00,
+ /* 0000033E pop si */ 0x5E,
+ /* 0000033F mov bx,0x80 */ 0xBB,0x80, 0x00,
+ /* 00000342 jmp short 0x395 */ 0xEB,0x51,
+ /* 00000344 push es */ 0x06,
+ /* 00000345 push di */ 0x57,
+ /* 00000346 push ds */ 0x1E,
+ /* 00000347 push si */ 0x56,
+ /* 00000348 push cx */ 0x51,
+ /* 00000349 push si */ 0x56,
+ /* 0000034A mov si,0x450 */ 0xBE,0x50, 0x04,
+ /* 0000034D call word 0x3ad */ 0xE8,0x5D, 0x00,
+ /* 00000350 pop si */ 0x5E,
+ /* 00000351 push cs */ 0x0E,
+ /* 00000352 pop ds */ 0x1F,
+ /* 00000353 mov si,0x4b2 */ 0xBE,0xB2, 0x04,
+ /* 00000356 mov cx,0x80 */ 0xB9,0x80, 0x00,
+ /* 00000359 cld */ 0xFC,
+ /* 0000035A rep movsb */ 0xF3,0xA4,
+ /* 0000035C pop cx */ 0x59,
+ /* 0000035D pop si */ 0x5E,
+ /* 0000035E pop ds */ 0x1F,
+ /* 0000035F pop di */ 0x5F,
+ /* 00000360 pop es */ 0x07,
+ /* 00000361 jmp short 0x395 */ 0xEB,0x32,
+ /* 00000363 push si */ 0x56,
+ /* 00000364 mov si,0x41b */ 0xBE,0x1B, 0x04,
+ /* 00000367 call word 0x3ad */ 0xE8,0x43, 0x00,
+ /* 0000036A pop si */ 0x5E,
+ /* 0000036B cmp al,0x3 */ 0x3C,0x03,
+ /* 0000036D jz 0x37e */ 0x74,0x0F,
+ /* 0000036F cmp al,0x12 */ 0x3C,0x12,
+ /* 00000371 jz 0x38a */ 0x74,0x17,
+ /* 00000373 push si */ 0x56,
+ /* 00000374 mov si,0x42c */ 0xBE,0x2C, 0x04,
+ /* 00000377 call word 0x3ad */ 0xE8,0x33, 0x00,
+ /* 0000037A pop si */ 0x5E,
+ /* 0000037B jmp word 0x235 */ 0xE9,0xB7, 0xFE,
+ /* 0000037E push si */ 0x56,
+ /* 0000037F mov si,0x45c */ 0xBE,0x5C, 0x04,
+ /* 00000382 call word 0x3ad */ 0xE8,0x28, 0x00,
+ /* 00000385 pop si */ 0x5E,
+ /* 00000386 mov al,0x0 */ 0xB0,0x00,
+ /* 00000388 jmp short 0x38c */ 0xEB,0x02,
+ /* 0000038A mov al,0x0 */ 0xB0,0x00,
+ /* 0000038C push si */ 0x56,
+ /* 0000038D mov si,0x3c2 */ 0xBE,0xC2, 0x03,
+ /* 00000390 call word 0x3ad */ 0xE8,0x1A, 0x00,
+ /* 00000393 pop si */ 0x5E,
+ /* 00000394 iretw */ 0xCF,
+ /* 00000395 push si */ 0x56,
+ /* 00000396 mov si,0x3c2 */ 0xBE,0xC2, 0x03,
+ /* 00000399 call word 0x3ad */ 0xE8,0x11, 0x00,
+ /* 0000039C pop si */ 0x5E,
+ /* 0000039D mov ax,0x4f */ 0xB8,0x4F, 0x00,
+ /* 000003A0 iretw */ 0xCF,
+ /* 000003A1 push si */ 0x56,
+ /* 000003A2 mov si,0x3c8 */ 0xBE,0xC8, 0x03,
+ /* 000003A5 call word 0x3ad */ 0xE8,0x05, 0x00,
+ /* 000003A8 pop si */ 0x5E,
+ /* 000003A9 mov ax,0x24f */ 0xB8,0x4F, 0x02,
+ /* 000003AC iretw */ 0xCF,
+ /* 000003AD pushaw */ 0x60,
+ /* 000003AE push ds */ 0x1E,
+ /* 000003AF push cs */ 0x0E,
+ /* 000003B0 pop ds */ 0x1F,
+ /* 000003B1 mov dx,0x220 */ 0xBA,0x20, 0x02,
+ /* 000003B4 mov ax,0x0 */ 0xB8,0x00, 0x00,
+ /* 000003B7 lodsb */ 0xAC,
+ /* 000003B8 cmp al,0x0 */ 0x3C,0x00,
+ /* 000003BA jz 0x3bf */ 0x74,0x03,
+ /* 000003BC out dx,al */ 0xEE,
+ /* 000003BD jmp short 0x3b7 */ 0xEB,0xF8,
+ /* 000003BF pop ds */ 0x1F,
+ /* 000003C0 popaw */ 0x61,
+ /* 000003C1 ret */ 0xC3,
+ /* 000003C2 jna 0x413 */ 0x76,0x4F,
+ /* 000003C4 imul cx,[di],byte +0xa */ 0x6B,0x0D, 0x0A,
+ /* 000003C7 add [bp+0x55],dh */ 0x00,0x76, 0x55,
+ /* 000003CA outsb */ 0x6E,
+ /* 000003CB jnc 0x442 */ 0x73,0x75,
+ /* 000003CD jo 0x43f */ 0x70,0x70,
+ /* 000003CF outsw */ 0x6F,
+ /* 000003D0 jc 0x446 */ 0x72,0x74,
+ /* 000003D2 fs or ax,0xa */ 0x65,0x64, 0x0D,0x0A, 0x00,
+ /* 000003D7 jna 0x42e */ 0x76,0x55,
+ /* 000003D9 outsb */ 0x6E,
+ /* 000003DA imul bp,[bp+0x6f],byte +0x77 */ 0x6B,0x6E, 0x6F,0x77,
+ /* 000003DE outsb */ 0x6E,
+ /* 000003DF and [bp+0x75],al */ 0x20,0x46, 0x75,
+ /* 000003E2 outsb */ 0x6E,
+ /* 000003E3 arpl [si+0x69],si */ 0x63,0x74, 0x69,
+ /* 000003E6 outsw */ 0x6F,
+ /* 000003E7 outsb */ 0x6E,
+ /* 000003E8 or ax,0xa */ 0x0D,0x0A, 0x00,
+ /* 000003EB jna 0x434 */ 0x76,0x47,
+ /* 000003ED gs jz 0x439 */ 0x65,0x74, 0x49,
+ /* 000003F0 outsb */ 0x6E,
+ /* 000003F1 outsd */ 0x66,0x6F,
+ /* 000003F3 or ax,0xa */ 0x0D,0x0A, 0x00,
+ /* 000003F6 jna 0x43f */ 0x76,0x47,
+ /* 000003F8 gs jz 0x448 */ 0x65,0x74, 0x4D,
+ /* 000003FB outsw */ 0x6F,
+ /* 000003FC gs dec cx */ 0x64,0x65, 0x49,
+ /* 000003FF outsb */ 0x6E,
+ /* 00000400 outsd */ 0x66,0x6F,
+ /* 00000402 or ax,0xa */ 0x0D,0x0A, 0x00,
+ /* 00000405 jna 0x44e */ 0x76,0x47,
+ /* 00000407 gs jz 0x457 */ 0x65,0x74, 0x4D,
+ /* 0000040A outsw */ 0x6F,
+ /* 0000040B gs or ax,0xa */ 0x64,0x65, 0x0D,0x0A, 0x00,
+ /* 00000410 jna 0x465 */ 0x76,0x53,
+ /* 00000412 gs jz 0x462 */ 0x65,0x74, 0x4D,
+ /* 00000415 outsw */ 0x6F,
+ /* 00000416 gs or ax,0xa */ 0x64,0x65, 0x0D,0x0A, 0x00,
+ /* 0000041B jna 0x470 */ 0x76,0x53,
+ /* 0000041D gs jz 0x46d */ 0x65,0x74, 0x4D,
+ /* 00000420 outsw */ 0x6F,
+ /* 00000421 gs dec sp */ 0x64,0x65, 0x4C,
+ /* 00000424 gs a32 popaw */ 0x65,0x67, 0x61,
+ /* 00000427 arpl [bx+di+0xd],di */ 0x63,0x79, 0x0D,
+ /* 0000042A or al,[bx+si] */ 0x0A,0x00,
+ /* 0000042C jna 0x483 */ 0x76,0x55,
+ /* 0000042E outsb */ 0x6E,
+ /* 0000042F imul bp,[bx+0x77],byte +0x6e */ 0x6B,0x6F, 0x77,0x6E,
+ /* 00000433 and [di+0x6f],cl */ 0x20,0x4D, 0x6F,
+ /* 00000436 gs or ax,0xa */ 0x64,0x65, 0x0D,0x0A, 0x00,
+ /* 0000043B jna 0x484 */ 0x76,0x47,
+ /* 0000043D gs jz 0x490 */ 0x65,0x74, 0x50,
+ /* 00000440 insw */ 0x6D,
+ /* 00000441 inc bx */ 0x43,
+ /* 00000442 popaw */ 0x61,
+ /* 00000443 jo 0x4a6 */ 0x70,0x61,
+ /* 00000445 bound bp,[bx+di+0x6c] */ 0x62,0x69, 0x6C,
+ /* 00000448 imul si,[si+0x69],word 0x7365 */ 0x69,0x74, 0x69,0x65, 0x73,
+ /* 0000044D or ax,0xa */ 0x0D,0x0A, 0x00,
+ /* 00000450 jna 0x4a4 */ 0x76,0x52,
+ /* 00000452 gs popaw */ 0x65,0x61,
+ /* 00000454 fs inc bp */ 0x64,0x45,
+ /* 00000456 imul sp,[fs:si+0xd],word 0xa */ 0x64,0x69, 0x64,0x0D, 0x0A, 0x00,
+ /* 0000045C jna 0x4aa */ 0x76,0x4C,
+ /* 0000045E gs a32 popaw */ 0x65,0x67, 0x61,
+ /* 00000461 arpl [bx+di+0x4d],di */ 0x63,0x79, 0x4D,
+ /* 00000464 outsw */ 0x6F,
+ /* 00000465 xor cx,[gs:di] */ 0x64,0x65, 0x33,0x0D,
+ /* 00000469 or al,[bx+si] */ 0x0A,0x00,
+ /* 0000046B insw */ 0x6D,
+ /* 0000046C outsw */ 0x6F,
+ /* 0000046D gs pop di */ 0x64,0x65, 0x5F,
+ /* 00000470 ss xor al,0x30 */ 0x36,0x34, 0x30,
+ /* 00000473 js 0x4a9 */ 0x78,0x34,
+ /* 00000475 cmp [bx+si],dh */ 0x38,0x30,
+ /* 00000477 js 0x4ac */ 0x78,0x33,
+ /* 00000479 xor cl,[di] */ 0x32,0x0D,
+ /* 0000047B or al,[bx+si] */ 0x0A,0x00,
+ /* 0000047D insw */ 0x6D,
+ /* 0000047E outsw */ 0x6F,
+ /* 0000047F gs pop di */ 0x64,0x65, 0x5F,
+ /* 00000482 cmp [bx+si],dh */ 0x38,0x30,
+ /* 00000484 xor [bx+si+0x36],bh */ 0x30,0x78, 0x36,
+ /* 00000487 xor [bx+si],dh */ 0x30,0x30,
+ /* 00000489 js 0x4be */ 0x78,0x33,
+ /* 0000048B xor cl,[di] */ 0x32,0x0D,
+ /* 0000048D or al,[bx+si] */ 0x0A,0x00,
+ /* 0000048F insw */ 0x6D,
+ /* 00000490 outsw */ 0x6F,
+ /* 00000491 gs pop di */ 0x64,0x65, 0x5F,
+ /* 00000494 xor [bx+si],si */ 0x31,0x30,
+ /* 00000496 xor dh,[si] */ 0x32,0x34,
+ /* 00000498 js 0x4d1 */ 0x78,0x37,
+ /* 0000049A cmp [ss:bx+si+0x33],bh */ 0x36,0x38, 0x78,0x33,
+ /* 0000049E xor cl,[di] */ 0x32,0x0D,
+ /* 000004A0 or al,[bx+si] */ 0x0A,0x00,
+ /* 000004A2 insw */ 0x6D,
+ /* 000004A3 outsw */ 0x6F,
+ /* 000004A4 gs pop di */ 0x64,0x65, 0x5F,
+ /* 000004A7 jnz 0x517 */ 0x75,0x6E,
+ /* 000004A9 jnz 0x51e */ 0x75,0x73,
+ /* 000004AB fs or ax,0xa */ 0x65,0x64, 0x0D,0x0A, 0x00,
+ /* 000004B0 add [bx+si],al */ 0x00,0x00,
+ /* 000004B2 add [bx+si],al */ 0x00,0x00,
+ /* 000004B4 add [bx+si],al */ 0x00,0x00,
+ /* 000004B6 add [bx+si],al */ 0x00,0x00,
+ /* 000004B8 add [bx+si],al */ 0x00,0x00,
+ /* 000004BA add [bx+si],al */ 0x00,0x00,
+ /* 000004BC add [bx+si],al */ 0x00,0x00,
+ /* 000004BE add [bx+si],al */ 0x00,0x00,
+ /* 000004C0 add [bx+si],al */ 0x00,0x00,
+ /* 000004C2 add [bx+si],al */ 0x00,0x00,
+ /* 000004C4 add [bx+si],al */ 0x00,0x00,
+ /* 000004C6 add [bx+si],al */ 0x00,0x00,
+ /* 000004C8 add [bx+si],al */ 0x00,0x00,
+ /* 000004CA add [bx+si],al */ 0x00,0x00,
+ /* 000004CC add [bx+si],al */ 0x00,0x00,
+ /* 000004CE add [bx+si],al */ 0x00,0x00,
+ /* 000004D0 add [bx+si],al */ 0x00,0x00,
+ /* 000004D2 add [bx+si],al */ 0x00,0x00,
+ /* 000004D4 add [bx+si],al */ 0x00,0x00,
+ /* 000004D6 add [bx+si],al */ 0x00,0x00,
+ /* 000004D8 add [bx+si],al */ 0x00,0x00,
+ /* 000004DA add [bx+si],al */ 0x00,0x00,
+ /* 000004DC add [bx+si],al */ 0x00,0x00,
+ /* 000004DE add [bx+si],al */ 0x00,0x00,
+ /* 000004E0 add [bx+si],al */ 0x00,0x00,
+ /* 000004E2 add [bx+si],al */ 0x00,0x00,
+ /* 000004E4 add [bx+si],al */ 0x00,0x00,
+ /* 000004E6 add [bx+si],al */ 0x00,0x00,
+ /* 000004E8 add [bx+si],al */ 0x00,0x00,
+ /* 000004EA add [bx+si],al */ 0x00,0x00,
+ /* 000004EC add [bx+si],al */ 0x00,0x00,
+ /* 000004EE add [bx+si],al */ 0x00,0x00,
+ /* 000004F0 add [bx+si],al */ 0x00,0x00,
+ /* 000004F2 add [bx+si],al */ 0x00,0x00,
+ /* 000004F4 add [bx+si],al */ 0x00,0x00,
+ /* 000004F6 add [bx+si],al */ 0x00,0x00,
+ /* 000004F8 add [bx+si],al */ 0x00,0x00,
+ /* 000004FA add [bx+si],al */ 0x00,0x00,
+ /* 000004FC add [bx+si],al */ 0x00,0x00,
+ /* 000004FE add [bx+si],al */ 0x00,0x00,
+ /* 00000500 add [bx+si],al */ 0x00,0x00,
+ /* 00000502 add [bx+si],al */ 0x00,0x00,
+ /* 00000504 add [bx+si],al */ 0x00,0x00,
+ /* 00000506 add [bx+si],al */ 0x00,0x00,
+ /* 00000508 add [bx+si],al */ 0x00,0x00,
+ /* 0000050A add [bx+si],al */ 0x00,0x00,
+ /* 0000050C add [bx+si],al */ 0x00,0x00,
+ /* 0000050E add [bx+si],al */ 0x00,0x00,
+ /* 00000510 add [bx+si],al */ 0x00,0x00,
+ /* 00000512 add [bx+si],al */ 0x00,0x00,
+ /* 00000514 add [bx+si],al */ 0x00,0x00,
+ /* 00000516 add [bx+si],al */ 0x00,0x00,
+ /* 00000518 add [bx+si],al */ 0x00,0x00,
+ /* 0000051A add [bx+si],al */ 0x00,0x00,
+ /* 0000051C add [bx+si],al */ 0x00,0x00,
+ /* 0000051E add [bx+si],al */ 0x00,0x00,
+ /* 00000520 add [bx+si],al */ 0x00,0x00,
+ /* 00000522 add [bx+si],al */ 0x00,0x00,
+ /* 00000524 add [bx+si],al */ 0x00,0x00,
+ /* 00000526 add [bx+si],al */ 0x00,0x00,
+ /* 00000528 add [bx+si],al */ 0x00,0x00,
+ /* 0000052A add [bx+si],al */ 0x00,0x00,
+ /* 0000052C add [bx+si],al */ 0x00,0x00,
+ /* 0000052E add [bx+si],al */ 0x00,0x00,
+ /* 00000530 add [bx+si],al */ 0x00,0x00,
+ /* 00000532 add [bx+si],al */ 0x00,0x00,
};
#endif
diff --git a/OvmfPkg/Bhyve/PlatformPei/AmdSev.c b/OvmfPkg/Bhyve/PlatformPei/AmdSev.c index e3ed78581c..a85f4b760a 100644 --- a/OvmfPkg/Bhyve/PlatformPei/AmdSev.c +++ b/OvmfPkg/Bhyve/PlatformPei/AmdSev.c @@ -30,8 +30,8 @@ AmdSevInitialize ( VOID
)
{
- UINT64 EncryptionMask;
- RETURN_STATUS PcdStatus;
+ UINT64 EncryptionMask;
+ RETURN_STATUS PcdStatus;
//
// Check if SEV is enabled
@@ -44,7 +44,7 @@ AmdSevInitialize ( // Set Memory Encryption Mask PCD
//
EncryptionMask = MemEncryptSevGetEncryptionMask ();
- PcdStatus = PcdSet64S (PcdPteMemoryEncryptionAddressOrMask, EncryptionMask);
+ PcdStatus = PcdSet64S (PcdPteMemoryEncryptionAddressOrMask, EncryptionMask);
ASSERT_RETURN_ERROR (PcdStatus);
DEBUG ((DEBUG_INFO, "SEV is enabled (mask 0x%lx)\n", EncryptionMask));
@@ -67,9 +67,9 @@ AmdSevInitialize ( // hypervisor.
//
if (FeaturePcdGet (PcdSmmSmramRequire) && (mBootMode != BOOT_ON_S3_RESUME)) {
- RETURN_STATUS LocateMapStatus;
- UINTN MapPagesBase;
- UINTN MapPagesCount;
+ RETURN_STATUS LocateMapStatus;
+ UINTN MapPagesBase;
+ UINTN MapPagesCount;
LocateMapStatus = MemEncryptSevLocateInitialSmramSaveStateMapPages (
&MapPagesBase,
diff --git a/OvmfPkg/Bhyve/PlatformPei/ClearCache.c b/OvmfPkg/Bhyve/PlatformPei/ClearCache.c index 5c538c59e0..9f23f9a428 100644 --- a/OvmfPkg/Bhyve/PlatformPei/ClearCache.c +++ b/OvmfPkg/Bhyve/PlatformPei/ClearCache.c @@ -29,7 +29,7 @@ STATIC VOID
EFIAPI
ClearCache (
- IN OUT VOID *WorkSpace
+ IN OUT VOID *WorkSpace
)
{
WriteBackInvalidateDataCache ();
@@ -56,8 +56,8 @@ ClearCacheOnMpServicesAvailable ( IN VOID *Ppi
)
{
- EFI_PEI_MP_SERVICES_PPI *MpServices;
- EFI_STATUS Status;
+ EFI_PEI_MP_SERVICES_PPI *MpServices;
+ EFI_STATUS Status;
DEBUG ((DEBUG_INFO, "%a: %a\n", gEfiCallerBaseName, __FUNCTION__));
@@ -65,15 +65,15 @@ ClearCacheOnMpServicesAvailable ( // Clear cache on all the APs in parallel.
//
MpServices = Ppi;
- Status = MpServices->StartupAllAPs (
- (CONST EFI_PEI_SERVICES **)PeiServices,
- MpServices,
- ClearCache, // Procedure
- FALSE, // SingleThread
- 0, // TimeoutInMicroSeconds: inf.
- NULL // ProcedureArgument
- );
- if (EFI_ERROR (Status) && Status != EFI_NOT_STARTED) {
+ Status = MpServices->StartupAllAPs (
+ (CONST EFI_PEI_SERVICES **)PeiServices,
+ MpServices,
+ ClearCache, // Procedure
+ FALSE, // SingleThread
+ 0, // TimeoutInMicroSeconds: inf.
+ NULL // ProcedureArgument
+ );
+ if (EFI_ERROR (Status) && (Status != EFI_NOT_STARTED)) {
DEBUG ((DEBUG_ERROR, "%a: StartupAllAps(): %r\n", __FUNCTION__, Status));
return Status;
}
@@ -89,7 +89,7 @@ ClearCacheOnMpServicesAvailable ( // Notification object for registering the callback, for when
// EFI_PEI_MP_SERVICES_PPI becomes available.
//
-STATIC CONST EFI_PEI_NOTIFY_DESCRIPTOR mMpServicesNotify = {
+STATIC CONST EFI_PEI_NOTIFY_DESCRIPTOR mMpServicesNotify = {
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | // Flags
EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
&gEfiPeiMpServicesPpiGuid, // Guid
@@ -101,11 +101,15 @@ InstallClearCacheCallback ( VOID
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
Status = PeiServicesNotifyPpi (&mMpServicesNotify);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: failed to set up MP Services callback: %r\n",
- __FUNCTION__, Status));
+ DEBUG ((
+ DEBUG_ERROR,
+ "%a: failed to set up MP Services callback: %r\n",
+ __FUNCTION__,
+ Status
+ ));
}
}
diff --git a/OvmfPkg/Bhyve/PlatformPei/Cmos.c b/OvmfPkg/Bhyve/PlatformPei/Cmos.c index 9b34e10b17..a01b3866be 100644 --- a/OvmfPkg/Bhyve/PlatformPei/Cmos.c +++ b/OvmfPkg/Bhyve/PlatformPei/Cmos.c @@ -6,7 +6,6 @@ **/
-
#include "Cmos.h"
#include "Library/IoLib.h"
@@ -24,14 +23,13 @@ UINT8
EFIAPI
CmosRead8 (
- IN UINTN Index
+ IN UINTN Index
)
{
- IoWrite8 (0x70, (UINT8) Index);
+ IoWrite8 (0x70, (UINT8)Index);
return IoRead8 (0x71);
}
-
/**
Writes 8-bits of CMOS data.
@@ -47,12 +45,11 @@ CmosRead8 ( UINT8
EFIAPI
CmosWrite8 (
- IN UINTN Index,
- IN UINT8 Value
+ IN UINTN Index,
+ IN UINT8 Value
)
{
- IoWrite8 (0x70, (UINT8) Index);
+ IoWrite8 (0x70, (UINT8)Index);
IoWrite8 (0x71, Value);
return Value;
}
-
diff --git a/OvmfPkg/Bhyve/PlatformPei/Cmos.h b/OvmfPkg/Bhyve/PlatformPei/Cmos.h index ef7901fbea..e0ba81d4fa 100644 --- a/OvmfPkg/Bhyve/PlatformPei/Cmos.h +++ b/OvmfPkg/Bhyve/PlatformPei/Cmos.h @@ -23,7 +23,7 @@ UINT8
EFIAPI
CmosRead8 (
- IN UINTN Index
+ IN UINTN Index
);
/**
@@ -41,10 +41,8 @@ CmosRead8 ( UINT8
EFIAPI
CmosWrite8 (
- IN UINTN Index,
- IN UINT8 Value
+ IN UINTN Index,
+ IN UINT8 Value
);
-
#endif /* _CMOS_H_ */
-
diff --git a/OvmfPkg/Bhyve/PlatformPei/Fv.c b/OvmfPkg/Bhyve/PlatformPei/Fv.c index 94b7e21415..575600aa70 100644 --- a/OvmfPkg/Bhyve/PlatformPei/Fv.c +++ b/OvmfPkg/Bhyve/PlatformPei/Fv.c @@ -13,7 +13,6 @@ #include <Library/PcdLib.h>
#include <Library/PeiServicesLib.h>
-
/**
Publish PEI & DXE (Decompressed) Memory based FVs to let PEI
and DXE know about them.
@@ -26,7 +25,7 @@ PeiFvInitialization ( VOID
)
{
- BOOLEAN SecureS3Needed;
+ BOOLEAN SecureS3Needed;
DEBUG ((DEBUG_INFO, "Platform PEI Firmware Volume Initialization\n"));
@@ -67,7 +66,7 @@ PeiFvInitialization ( // of DXEFV, so let's keep away the OS from there too.
//
if (SecureS3Needed) {
- UINT32 DxeMemFvEnd;
+ UINT32 DxeMemFvEnd;
DxeMemFvEnd = PcdGet32 (PcdOvmfDxeMemFvBase) +
PcdGet32 (PcdOvmfDxeMemFvSize);
@@ -83,7 +82,7 @@ PeiFvInitialization ( //
PeiServicesInstallFvInfoPpi (
NULL,
- (VOID *)(UINTN) PcdGet32 (PcdOvmfDxeMemFvBase),
+ (VOID *)(UINTN)PcdGet32 (PcdOvmfDxeMemFvBase),
PcdGet32 (PcdOvmfDxeMemFvSize),
NULL,
NULL
@@ -91,4 +90,3 @@ PeiFvInitialization ( return EFI_SUCCESS;
}
-
diff --git a/OvmfPkg/Bhyve/PlatformPei/MemDetect.c b/OvmfPkg/Bhyve/PlatformPei/MemDetect.c index 1b556be69c..1949e586a0 100644 --- a/OvmfPkg/Bhyve/PlatformPei/MemDetect.c +++ b/OvmfPkg/Bhyve/PlatformPei/MemDetect.c @@ -36,22 +36,22 @@ Module Name: #include "Platform.h"
#include "Cmos.h"
-UINT8 mPhysMemAddressWidth;
+UINT8 mPhysMemAddressWidth;
-STATIC UINT32 mS3AcpiReservedMemoryBase;
-STATIC UINT32 mS3AcpiReservedMemorySize;
+STATIC UINT32 mS3AcpiReservedMemoryBase;
+STATIC UINT32 mS3AcpiReservedMemorySize;
-STATIC UINT16 mQ35TsegMbytes;
+STATIC UINT16 mQ35TsegMbytes;
-BOOLEAN mQ35SmramAtDefaultSmbase = FALSE;
+BOOLEAN mQ35SmramAtDefaultSmbase = FALSE;
VOID
Q35TsegMbytesInitialization (
VOID
)
{
- UINT16 ExtendedTsegMbytes;
- RETURN_STATUS PcdStatus;
+ UINT16 ExtendedTsegMbytes;
+ RETURN_STATUS PcdStatus;
if (mHostBridgeDevId != INTEL_Q35_MCH_DEVICE_ID) {
DEBUG ((
@@ -100,14 +100,13 @@ Q35TsegMbytesInitialization ( mQ35TsegMbytes = ExtendedTsegMbytes;
}
-
UINT32
GetSystemMemorySizeBelow4gb (
VOID
)
{
- UINT8 Cmos0x34;
- UINT8 Cmos0x35;
+ UINT8 Cmos0x34;
+ UINT8 Cmos0x35;
//
// CMOS 0x34/0x35 specifies the system memory above 16 MB.
@@ -118,20 +117,19 @@ GetSystemMemorySizeBelow4gb ( // into the calculation to get the total memory size.
//
- Cmos0x34 = (UINT8) CmosRead8 (0x34);
- Cmos0x35 = (UINT8) CmosRead8 (0x35);
+ Cmos0x34 = (UINT8)CmosRead8 (0x34);
+ Cmos0x35 = (UINT8)CmosRead8 (0x35);
- return (UINT32) (((UINTN)((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB);
+ return (UINT32)(((UINTN)((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB);
}
-
STATIC
UINT64
GetSystemMemorySizeAbove4gb (
)
{
- UINT32 Size;
- UINTN CmosIndex;
+ UINT32 Size;
+ UINTN CmosIndex;
//
// CMOS 0x5b-0x5d specifies the system memory above 4GB MB.
@@ -143,13 +141,12 @@ GetSystemMemorySizeAbove4gb ( Size = 0;
for (CmosIndex = 0x5d; CmosIndex >= 0x5b; CmosIndex--) {
- Size = (UINT32) (Size << 8) + (UINT32) CmosRead8 (CmosIndex);
+ Size = (UINT32)(Size << 8) + (UINT32)CmosRead8 (CmosIndex);
}
return LShiftU64 (Size, 16);
}
-
/**
Return the highest address that DXE could possibly use, plus one.
**/
@@ -159,9 +156,9 @@ GetFirstNonAddress ( VOID
)
{
- UINT64 FirstNonAddress;
- UINT64 Pci64Base, Pci64Size;
- RETURN_STATUS PcdStatus;
+ UINT64 FirstNonAddress;
+ UINT64 Pci64Base, Pci64Size;
+ RETURN_STATUS PcdStatus;
FirstNonAddress = BASE_4GB + GetSystemMemorySizeAbove4gb ();
@@ -170,11 +167,12 @@ GetFirstNonAddress ( // resources to 32-bit anyway. See DegradeResource() in
// "PciResourceSupport.c".
//
-#ifdef MDE_CPU_IA32
+ #ifdef MDE_CPU_IA32
if (!FeaturePcdGet (PcdDxeIplSwitchToLongMode)) {
return FirstNonAddress;
}
-#endif
+
+ #endif
//
// Otherwise, in order to calculate the highest address plus one, we must
@@ -184,8 +182,11 @@ GetFirstNonAddress ( if (Pci64Size == 0) {
if (mBootMode != BOOT_ON_S3_RESUME) {
- DEBUG ((DEBUG_INFO, "%a: disabling 64-bit PCI host aperture\n",
- __FUNCTION__));
+ DEBUG ((
+ DEBUG_INFO,
+ "%a: disabling 64-bit PCI host aperture\n",
+ __FUNCTION__
+ ));
PcdStatus = PcdSet64S (PcdPciMmio64Size, 0);
ASSERT_RETURN_ERROR (PcdStatus);
}
@@ -224,8 +225,13 @@ GetFirstNonAddress ( PcdStatus = PcdSet64S (PcdPciMmio64Size, Pci64Size);
ASSERT_RETURN_ERROR (PcdStatus);
- DEBUG ((DEBUG_INFO, "%a: Pci64Base=0x%Lx Pci64Size=0x%Lx\n",
- __FUNCTION__, Pci64Base, Pci64Size));
+ DEBUG ((
+ DEBUG_INFO,
+ "%a: Pci64Base=0x%Lx Pci64Size=0x%Lx\n",
+ __FUNCTION__,
+ Pci64Base,
+ Pci64Size
+ ));
}
//
@@ -235,7 +241,6 @@ GetFirstNonAddress ( return FirstNonAddress;
}
-
/**
Initialize the mPhysMemAddressWidth variable, based on guest RAM size.
**/
@@ -244,7 +249,7 @@ AddressWidthInitialization ( VOID
)
{
- UINT64 FirstNonAddress;
+ UINT64 FirstNonAddress;
//
// As guest-physical memory size grows, the permanent PEI RAM requirements
@@ -272,10 +277,10 @@ AddressWidthInitialization ( if (mPhysMemAddressWidth <= 36) {
mPhysMemAddressWidth = 36;
}
+
ASSERT (mPhysMemAddressWidth <= 48);
}
-
/**
Calculate the cap for the permanent PEI memory.
**/
@@ -285,21 +290,22 @@ GetPeiMemoryCap ( VOID
)
{
- BOOLEAN Page1GSupport;
- UINT32 RegEax;
- UINT32 RegEdx;
- UINT32 Pml4Entries;
- UINT32 PdpEntries;
- UINTN TotalPages;
+ BOOLEAN Page1GSupport;
+ UINT32 RegEax;
+ UINT32 RegEdx;
+ UINT32 Pml4Entries;
+ UINT32 PdpEntries;
+ UINTN TotalPages;
//
// If DXE is 32-bit, then just return the traditional 64 MB cap.
//
-#ifdef MDE_CPU_IA32
+ #ifdef MDE_CPU_IA32
if (!FeaturePcdGet (PcdDxeIplSwitchToLongMode)) {
return SIZE_64MB;
}
-#endif
+
+ #endif
//
// Dependent on physical address width, PEI memory allocations can be
@@ -320,7 +326,7 @@ GetPeiMemoryCap ( if (mPhysMemAddressWidth <= 39) {
Pml4Entries = 1;
- PdpEntries = 1 << (mPhysMemAddressWidth - 30);
+ PdpEntries = 1 << (mPhysMemAddressWidth - 30);
ASSERT (PdpEntries <= 0x200);
} else {
Pml4Entries = 1 << (mPhysMemAddressWidth - 39);
@@ -329,7 +335,7 @@ GetPeiMemoryCap ( }
TotalPages = Page1GSupport ? Pml4Entries + 1 :
- (PdpEntries + 1) * Pml4Entries + 1;
+ (PdpEntries + 1) * Pml4Entries + 1;
ASSERT (TotalPages <= 0x40201);
//
@@ -340,7 +346,6 @@ GetPeiMemoryCap ( return (UINT32)(EFI_PAGES_TO_SIZE (TotalPages) + SIZE_64MB);
}
-
/**
Publish PEI core memory
@@ -352,11 +357,11 @@ PublishPeiMemory ( VOID
)
{
- EFI_STATUS Status;
- EFI_PHYSICAL_ADDRESS MemoryBase;
- UINT64 MemorySize;
- UINT32 LowerMemorySize;
- UINT32 PeiMemoryCap;
+ EFI_STATUS Status;
+ EFI_PHYSICAL_ADDRESS MemoryBase;
+ UINT64 MemorySize;
+ UINT32 LowerMemorySize;
+ UINT32 PeiMemoryCap;
LowerMemorySize = GetSystemMemorySizeBelow4gb ();
if (FeaturePcdGet (PcdSmmSmramRequire)) {
@@ -373,10 +378,10 @@ PublishPeiMemory ( //
if (mS3Supported) {
mS3AcpiReservedMemorySize = SIZE_512KB +
- mMaxCpuCount *
- PcdGet32 (PcdCpuApStackSize);
+ mMaxCpuCount *
+ PcdGet32 (PcdCpuApStackSize);
mS3AcpiReservedMemoryBase = LowerMemorySize - mS3AcpiReservedMemorySize;
- LowerMemorySize = mS3AcpiReservedMemoryBase;
+ LowerMemorySize = mS3AcpiReservedMemoryBase;
}
if (mBootMode == BOOT_ON_S3_RESUME) {
@@ -384,8 +389,13 @@ PublishPeiMemory ( MemorySize = mS3AcpiReservedMemorySize;
} else {
PeiMemoryCap = GetPeiMemoryCap ();
- DEBUG ((DEBUG_INFO, "%a: mPhysMemAddressWidth=%d PeiMemoryCap=%u KB\n",
- __FUNCTION__, mPhysMemAddressWidth, PeiMemoryCap >> 10));
+ DEBUG ((
+ DEBUG_INFO,
+ "%a: mPhysMemAddressWidth=%d PeiMemoryCap=%u KB\n",
+ __FUNCTION__,
+ mPhysMemAddressWidth,
+ PeiMemoryCap >> 10
+ ));
//
// Determine the range of memory to use during PEI
@@ -398,8 +408,8 @@ PublishPeiMemory ( // shouldn't overlap with that HOB.
//
MemoryBase = mS3Supported && FeaturePcdGet (PcdSmmSmramRequire) ?
- PcdGet32 (PcdOvmfDecompressionScratchEnd) :
- PcdGet32 (PcdOvmfDxeMemFvBase) + PcdGet32 (PcdOvmfDxeMemFvSize);
+ PcdGet32 (PcdOvmfDecompressionScratchEnd) :
+ PcdGet32 (PcdOvmfDxeMemFvBase) + PcdGet32 (PcdOvmfDxeMemFvSize);
MemorySize = LowerMemorySize - MemoryBase;
if (MemorySize > PeiMemoryCap) {
MemoryBase = LowerMemorySize - PeiMemoryCap;
@@ -410,13 +420,12 @@ PublishPeiMemory ( //
// Publish this memory to the PEI Core
//
- Status = PublishSystemMemory(MemoryBase, MemorySize);
+ Status = PublishSystemMemory (MemoryBase, MemorySize);
ASSERT_EFI_ERROR (Status);
return Status;
}
-
/**
Peform Memory Detection for QEMU / KVM
@@ -427,10 +436,10 @@ QemuInitializeRam ( VOID
)
{
- UINT64 LowerMemorySize;
- UINT64 UpperMemorySize;
- MTRR_SETTINGS MtrrSettings;
- EFI_STATUS Status;
+ UINT64 LowerMemorySize;
+ UINT64 UpperMemorySize;
+ MTRR_SETTINGS MtrrSettings;
+ EFI_STATUS Status;
DEBUG ((DEBUG_INFO, "%a called\n", __FUNCTION__));
@@ -469,12 +478,15 @@ QemuInitializeRam ( AddMemoryRangeHob (0, BASE_512KB + BASE_128KB);
if (FeaturePcdGet (PcdSmmSmramRequire)) {
- UINT32 TsegSize;
+ UINT32 TsegSize;
TsegSize = mQ35TsegMbytes * SIZE_1MB;
AddMemoryRangeHob (BASE_1MB, LowerMemorySize - TsegSize);
- AddReservedMemoryBaseSizeHob (LowerMemorySize - TsegSize, TsegSize,
- TRUE);
+ AddReservedMemoryBaseSizeHob (
+ LowerMemorySize - TsegSize,
+ TsegSize,
+ TRUE
+ );
} else {
AddMemoryRangeHob (BASE_1MB, LowerMemorySize);
}
@@ -516,16 +528,22 @@ QemuInitializeRam ( //
// Set memory range from 640KB to 1MB to uncacheable
//
- Status = MtrrSetMemoryAttribute (BASE_512KB + BASE_128KB,
- BASE_1MB - (BASE_512KB + BASE_128KB), CacheUncacheable);
+ Status = MtrrSetMemoryAttribute (
+ BASE_512KB + BASE_128KB,
+ BASE_1MB - (BASE_512KB + BASE_128KB),
+ CacheUncacheable
+ );
ASSERT_EFI_ERROR (Status);
//
// Set memory range from the "top of lower RAM" (RAM below 4GB) to 4GB as
// uncacheable
//
- Status = MtrrSetMemoryAttribute (LowerMemorySize,
- SIZE_4GB - LowerMemorySize, CacheUncacheable);
+ Status = MtrrSetMemoryAttribute (
+ LowerMemorySize,
+ SIZE_4GB - LowerMemorySize,
+ CacheUncacheable
+ );
ASSERT_EFI_ERROR (Status);
}
}
@@ -541,7 +559,7 @@ InitializeRamRegions ( {
QemuInitializeRam ();
- if (mS3Supported && mBootMode != BOOT_ON_S3_RESUME) {
+ if (mS3Supported && (mBootMode != BOOT_ON_S3_RESUME)) {
//
// This is the memory range that will be used for PEI on S3 resume
//
@@ -571,7 +589,7 @@ InitializeRamRegions ( EfiACPIMemoryNVS
);
-#ifdef MDE_CPU_X64
+ #ifdef MDE_CPU_X64
//
// Reserve the initial page tables built by the reset vector code.
//
@@ -579,11 +597,11 @@ InitializeRamRegions ( // resume, it must be reserved as ACPI NVS.
//
BuildMemoryAllocationHob (
- (EFI_PHYSICAL_ADDRESS)(UINTN) PcdGet32 (PcdOvmfSecPageTablesBase),
- (UINT64)(UINTN) PcdGet32 (PcdOvmfSecPageTablesSize),
+ (EFI_PHYSICAL_ADDRESS)(UINTN)PcdGet32 (PcdOvmfSecPageTablesBase),
+ (UINT64)(UINTN)PcdGet32 (PcdOvmfSecPageTablesSize),
EfiACPIMemoryNVS
);
-#endif
+ #endif
}
if (mBootMode != BOOT_ON_S3_RESUME) {
@@ -599,18 +617,18 @@ InitializeRamRegions ( // such that they would overlap the LockBox storage.
//
ZeroMem (
- (VOID*)(UINTN) PcdGet32 (PcdOvmfLockBoxStorageBase),
- (UINTN) PcdGet32 (PcdOvmfLockBoxStorageSize)
+ (VOID *)(UINTN)PcdGet32 (PcdOvmfLockBoxStorageBase),
+ (UINTN)PcdGet32 (PcdOvmfLockBoxStorageSize)
);
BuildMemoryAllocationHob (
- (EFI_PHYSICAL_ADDRESS)(UINTN) PcdGet32 (PcdOvmfLockBoxStorageBase),
- (UINT64)(UINTN) PcdGet32 (PcdOvmfLockBoxStorageSize),
+ (EFI_PHYSICAL_ADDRESS)(UINTN)PcdGet32 (PcdOvmfLockBoxStorageBase),
+ (UINT64)(UINTN)PcdGet32 (PcdOvmfLockBoxStorageSize),
mS3Supported ? EfiACPIMemoryNVS : EfiBootServicesData
);
}
if (FeaturePcdGet (PcdSmmSmramRequire)) {
- UINT32 TsegSize;
+ UINT32 TsegSize;
//
// Make sure the TSEG area that we reported as a reserved memory resource
@@ -618,7 +636,7 @@ InitializeRamRegions ( //
TsegSize = mQ35TsegMbytes * SIZE_1MB;
BuildMemoryAllocationHob (
- GetSystemMemorySizeBelow4gb() - TsegSize,
+ GetSystemMemorySizeBelow4gb () - TsegSize,
TsegSize,
EfiReservedMemoryType
);
diff --git a/OvmfPkg/Bhyve/PlatformPei/Platform.c b/OvmfPkg/Bhyve/PlatformPei/Platform.c index c23b906733..eba7c60fce 100644 --- a/OvmfPkg/Bhyve/PlatformPei/Platform.c +++ b/OvmfPkg/Bhyve/PlatformPei/Platform.c @@ -36,7 +36,7 @@ #include "Platform.h"
#include "Cmos.h"
-EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = {
+EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = {
{ EfiACPIMemoryNVS, 0x004 },
{ EfiACPIReclaimMemory, 0x008 },
{ EfiReservedMemoryType, 0x004 },
@@ -47,8 +47,7 @@ EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = { { EfiMaxMemoryType, 0x000 }
};
-
-EFI_PEI_PPI_DESCRIPTOR mPpiBootMode[] = {
+EFI_PEI_PPI_DESCRIPTOR mPpiBootMode[] = {
{
EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
&gEfiPeiMasterBootModePpiGuid,
@@ -56,27 +55,26 @@ EFI_PEI_PPI_DESCRIPTOR mPpiBootMode[] = { }
};
+UINT16 mHostBridgeDevId;
-UINT16 mHostBridgeDevId;
-
-EFI_BOOT_MODE mBootMode = BOOT_WITH_FULL_CONFIGURATION;
+EFI_BOOT_MODE mBootMode = BOOT_WITH_FULL_CONFIGURATION;
-BOOLEAN mS3Supported = FALSE;
+BOOLEAN mS3Supported = FALSE;
-UINT32 mMaxCpuCount;
+UINT32 mMaxCpuCount;
VOID
AddIoMemoryBaseSizeHob (
- EFI_PHYSICAL_ADDRESS MemoryBase,
- UINT64 MemorySize
+ EFI_PHYSICAL_ADDRESS MemoryBase,
+ UINT64 MemorySize
)
{
BuildResourceDescriptorHob (
EFI_RESOURCE_MEMORY_MAPPED_IO,
- EFI_RESOURCE_ATTRIBUTE_PRESENT |
- EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
- EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_TESTED,
+ EFI_RESOURCE_ATTRIBUTE_PRESENT |
+ EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
+ EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
+ EFI_RESOURCE_ATTRIBUTE_TESTED,
MemoryBase,
MemorySize
);
@@ -84,23 +82,23 @@ AddIoMemoryBaseSizeHob ( VOID
AddReservedMemoryBaseSizeHob (
- EFI_PHYSICAL_ADDRESS MemoryBase,
- UINT64 MemorySize,
- BOOLEAN Cacheable
+ EFI_PHYSICAL_ADDRESS MemoryBase,
+ UINT64 MemorySize,
+ BOOLEAN Cacheable
)
{
BuildResourceDescriptorHob (
EFI_RESOURCE_MEMORY_RESERVED,
- EFI_RESOURCE_ATTRIBUTE_PRESENT |
- EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
- EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
- (Cacheable ?
- EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE :
- 0
- ) |
- EFI_RESOURCE_ATTRIBUTE_TESTED,
+ EFI_RESOURCE_ATTRIBUTE_PRESENT |
+ EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
+ EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
+ (Cacheable ?
+ EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
+ EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
+ EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE :
+ 0
+ ) |
+ EFI_RESOURCE_ATTRIBUTE_TESTED,
MemoryBase,
MemorySize
);
@@ -108,53 +106,50 @@ AddReservedMemoryBaseSizeHob ( VOID
AddIoMemoryRangeHob (
- EFI_PHYSICAL_ADDRESS MemoryBase,
- EFI_PHYSICAL_ADDRESS MemoryLimit
+ EFI_PHYSICAL_ADDRESS MemoryBase,
+ EFI_PHYSICAL_ADDRESS MemoryLimit
)
{
AddIoMemoryBaseSizeHob (MemoryBase, (UINT64)(MemoryLimit - MemoryBase));
}
-
VOID
AddMemoryBaseSizeHob (
- EFI_PHYSICAL_ADDRESS MemoryBase,
- UINT64 MemorySize
+ EFI_PHYSICAL_ADDRESS MemoryBase,
+ UINT64 MemorySize
)
{
BuildResourceDescriptorHob (
EFI_RESOURCE_SYSTEM_MEMORY,
- EFI_RESOURCE_ATTRIBUTE_PRESENT |
- EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
- EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_TESTED,
+ EFI_RESOURCE_ATTRIBUTE_PRESENT |
+ EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
+ EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
+ EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
+ EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
+ EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE |
+ EFI_RESOURCE_ATTRIBUTE_TESTED,
MemoryBase,
MemorySize
);
}
-
VOID
AddMemoryRangeHob (
- EFI_PHYSICAL_ADDRESS MemoryBase,
- EFI_PHYSICAL_ADDRESS MemoryLimit
+ EFI_PHYSICAL_ADDRESS MemoryBase,
+ EFI_PHYSICAL_ADDRESS MemoryLimit
)
{
AddMemoryBaseSizeHob (MemoryBase, (UINT64)(MemoryLimit - MemoryBase));
}
-
VOID
MemMapInitialization (
VOID
)
{
- UINT64 PciIoBase;
- UINT64 PciIoSize;
- RETURN_STATUS PcdStatus;
+ UINT64 PciIoBase;
+ UINT64 PciIoSize;
+ RETURN_STATUS PcdStatus;
PciIoBase = 0xC000;
PciIoSize = 0x4000;
@@ -165,7 +160,7 @@ MemMapInitialization ( BuildGuidDataHob (
&gEfiMemoryTypeInformationGuid,
mDefaultMemoryTypeInformation,
- sizeof(mDefaultMemoryTypeInformation)
+ sizeof (mDefaultMemoryTypeInformation)
);
//
@@ -179,7 +174,7 @@ MemMapInitialization ( UINT32 PciBase;
UINT32 PciSize;
- TopOfLowRam = GetSystemMemorySizeBelow4gb ();
+ TopOfLowRam = GetSystemMemorySizeBelow4gb ();
PciExBarBase = 0;
if (mHostBridgeDevId == INTEL_Q35_MCH_DEVICE_ID) {
//
@@ -192,8 +187,9 @@ MemMapInitialization ( PciBase = (UINT32)(PciExBarBase + SIZE_256MB);
} else {
PciBase = (UINT32)PcdGet64 (PcdPciMmio32Base);
- if (PciBase == 0)
+ if (PciBase == 0) {
PciBase = (TopOfLowRam < BASE_2GB) ? BASE_2GB : TopOfLowRam;
+ }
}
//
@@ -242,10 +238,14 @@ MemMapInitialization ( // uncacheable reserved memory right here.
//
AddReservedMemoryBaseSizeHob (PciExBarBase, SIZE_256MB, FALSE);
- BuildMemoryAllocationHob (PciExBarBase, SIZE_256MB,
- EfiReservedMemoryType);
+ BuildMemoryAllocationHob (
+ PciExBarBase,
+ SIZE_256MB,
+ EfiReservedMemoryType
+ );
}
- AddIoMemoryBaseSizeHob (PcdGet32(PcdCpuLocalApicBaseAddress), SIZE_1MB);
+
+ AddIoMemoryBaseSizeHob (PcdGet32 (PcdCpuLocalApicBaseAddress), SIZE_1MB);
//
// On Q35, the IO Port space is available for PCI resource allocations from
@@ -287,8 +287,8 @@ PciExBarInitialization ( )
{
union {
- UINT64 Uint64;
- UINT32 Uint32[2];
+ UINT64 Uint64;
+ UINT32 Uint32[2];
} PciExBarBase;
//
@@ -327,13 +327,13 @@ MiscInitialization ( VOID
)
{
- UINTN PmCmd;
- UINTN Pmba;
- UINT32 PmbaAndVal;
- UINT32 PmbaOrVal;
- UINTN AcpiCtlReg;
- UINT8 AcpiEnBit;
- RETURN_STATUS PcdStatus;
+ UINTN PmCmd;
+ UINTN Pmba;
+ UINT32 PmbaAndVal;
+ UINT32 PmbaOrVal;
+ UINTN AcpiCtlReg;
+ UINT8 AcpiEnBit;
+ RETURN_STATUS PcdStatus;
//
// Disable A20 Mask
@@ -370,11 +370,16 @@ MiscInitialization ( AcpiEnBit = ICH9_ACPI_CNTL_ACPI_EN;
break;
default:
- DEBUG ((DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n",
- __FUNCTION__, mHostBridgeDevId));
+ DEBUG ((
+ DEBUG_ERROR,
+ "%a: Unknown Host Bridge Device ID: 0x%04x\n",
+ __FUNCTION__,
+ mHostBridgeDevId
+ ));
ASSERT (FALSE);
return;
}
+
PcdStatus = PcdSet16S (PcdOvmfHostBridgePciDevId, mHostBridgeDevId);
ASSERT_RETURN_ERROR (PcdStatus);
@@ -417,17 +422,17 @@ MiscInitialization ( }
}
-
VOID
BootModeInitialization (
VOID
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
if (CmosRead8 (0xF) == 0xFE) {
mBootMode = BOOT_ON_S3_RESUME;
}
+
CmosWrite8 (0xF, 0x00);
Status = PeiServicesSetBootMode (mBootMode);
@@ -437,13 +442,12 @@ BootModeInitialization ( ASSERT_EFI_ERROR (Status);
}
-
VOID
ReserveEmuVariableNvStore (
)
{
- EFI_PHYSICAL_ADDRESS VariableStore;
- RETURN_STATUS PcdStatus;
+ EFI_PHYSICAL_ADDRESS VariableStore;
+ RETURN_STATUS PcdStatus;
//
// Allocate storage for NV variables early on so it will be
@@ -453,25 +457,25 @@ ReserveEmuVariableNvStore ( //
VariableStore =
(EFI_PHYSICAL_ADDRESS)(UINTN)
- AllocateRuntimePages (
- EFI_SIZE_TO_PAGES (2 * PcdGet32 (PcdFlashNvStorageFtwSpareSize))
- );
- DEBUG ((DEBUG_INFO,
- "Reserved variable store memory: 0x%lX; size: %dkb\n",
- VariableStore,
- (2 * PcdGet32 (PcdFlashNvStorageFtwSpareSize)) / 1024
- ));
+ AllocateRuntimePages (
+ EFI_SIZE_TO_PAGES (2 * PcdGet32 (PcdFlashNvStorageFtwSpareSize))
+ );
+ DEBUG ((
+ DEBUG_INFO,
+ "Reserved variable store memory: 0x%lX; size: %dkb\n",
+ VariableStore,
+ (2 * PcdGet32 (PcdFlashNvStorageFtwSpareSize)) / 1024
+ ));
PcdStatus = PcdSet64S (PcdEmuVariableNvStoreReserved, VariableStore);
ASSERT_RETURN_ERROR (PcdStatus);
}
-
VOID
DebugDumpCmos (
VOID
)
{
- UINT32 Loop;
+ UINT32 Loop;
DEBUG ((DEBUG_INFO, "CMOS:\n"));
@@ -479,6 +483,7 @@ DebugDumpCmos ( if ((Loop % 0x10) == 0) {
DEBUG ((DEBUG_INFO, "%02x:", Loop));
}
+
DEBUG ((DEBUG_INFO, " %02x", CmosRead8 (Loop)));
if ((Loop % 0x10) == 0xf) {
DEBUG ((DEBUG_INFO, "\n"));
@@ -486,27 +491,34 @@ DebugDumpCmos ( }
}
-
VOID
S3Verification (
VOID
)
{
-#if defined (MDE_CPU_X64)
+ #if defined (MDE_CPU_X64)
if (FeaturePcdGet (PcdSmmSmramRequire) && mS3Supported) {
- DEBUG ((DEBUG_ERROR,
- "%a: S3Resume2Pei doesn't support X64 PEI + SMM yet.\n", __FUNCTION__));
- DEBUG ((DEBUG_ERROR,
+ DEBUG ((
+ DEBUG_ERROR,
+ "%a: S3Resume2Pei doesn't support X64 PEI + SMM yet.\n",
+ __FUNCTION__
+ ));
+ DEBUG ((
+ DEBUG_ERROR,
"%a: Please disable S3 on the QEMU command line (see the README),\n",
- __FUNCTION__));
- DEBUG ((DEBUG_ERROR,
- "%a: or build OVMF with \"OvmfPkgIa32X64.dsc\".\n", __FUNCTION__));
+ __FUNCTION__
+ ));
+ DEBUG ((
+ DEBUG_ERROR,
+ "%a: or build OVMF with \"OvmfPkgIa32X64.dsc\".\n",
+ __FUNCTION__
+ ));
ASSERT (FALSE);
CpuDeadLoop ();
}
-#endif
-}
+ #endif
+}
/**
Fetch the number of boot CPUs from QEMU and expose it to UefiCpuPkg modules.
@@ -517,8 +529,8 @@ MaxCpuCountInitialization ( VOID
)
{
- UINT16 ProcessorCount = 0;
- RETURN_STATUS PcdStatus;
+ UINT16 ProcessorCount = 0;
+ RETURN_STATUS PcdStatus;
//
// If the fw_cfg key or fw_cfg entirely is unavailable, load mMaxCpuCount
@@ -528,6 +540,7 @@ MaxCpuCountInitialization ( mMaxCpuCount = PcdGet32 (PcdCpuMaxLogicalProcessorNumber);
return;
}
+
//
// Otherwise, set mMaxCpuCount to the value reported by QEMU.
//
@@ -542,11 +555,14 @@ MaxCpuCountInitialization ( ASSERT_RETURN_ERROR (PcdStatus);
PcdStatus = PcdSet32S (PcdCpuApInitTimeOutInMicroSeconds, MAX_UINT32);
ASSERT_RETURN_ERROR (PcdStatus);
- DEBUG ((DEBUG_INFO, "%a: QEMU reports %d processor(s)\n", __FUNCTION__,
- ProcessorCount));
+ DEBUG ((
+ DEBUG_INFO,
+ "%a: QEMU reports %d processor(s)\n",
+ __FUNCTION__,
+ ProcessorCount
+ ));
}
-
/**
Perform Platform PEI initialization.
@@ -596,6 +612,7 @@ InitializePlatform ( if (!FeaturePcdGet (PcdSmmSmramRequire)) {
ReserveEmuVariableNvStore ();
}
+
PeiFvInitialization ();
MemMapInitialization ();
NoexecDxeInitialization ();
diff --git a/OvmfPkg/Bhyve/PlatformPei/Platform.h b/OvmfPkg/Bhyve/PlatformPei/Platform.h index 8239ca05ac..17b63dfef3 100644 --- a/OvmfPkg/Bhyve/PlatformPei/Platform.h +++ b/OvmfPkg/Bhyve/PlatformPei/Platform.h @@ -14,33 +14,33 @@ VOID
AddIoMemoryBaseSizeHob (
- EFI_PHYSICAL_ADDRESS MemoryBase,
- UINT64 MemorySize
+ EFI_PHYSICAL_ADDRESS MemoryBase,
+ UINT64 MemorySize
);
VOID
AddIoMemoryRangeHob (
- EFI_PHYSICAL_ADDRESS MemoryBase,
- EFI_PHYSICAL_ADDRESS MemoryLimit
+ EFI_PHYSICAL_ADDRESS MemoryBase,
+ EFI_PHYSICAL_ADDRESS MemoryLimit
);
VOID
AddMemoryBaseSizeHob (
- EFI_PHYSICAL_ADDRESS MemoryBase,
- UINT64 MemorySize
+ EFI_PHYSICAL_ADDRESS MemoryBase,
+ UINT64 MemorySize
);
VOID
AddMemoryRangeHob (
- EFI_PHYSICAL_ADDRESS MemoryBase,
- EFI_PHYSICAL_ADDRESS MemoryLimit
+ EFI_PHYSICAL_ADDRESS MemoryBase,
+ EFI_PHYSICAL_ADDRESS MemoryLimit
);
VOID
AddReservedMemoryBaseSizeHob (
- EFI_PHYSICAL_ADDRESS MemoryBase,
- UINT64 MemorySize,
- BOOLEAN Cacheable
+ EFI_PHYSICAL_ADDRESS MemoryBase,
+ UINT64 MemorySize,
+ BOOLEAN Cacheable
);
VOID
@@ -113,25 +113,25 @@ AmdSevInitialize ( VOID
);
-extern BOOLEAN mXen;
+extern BOOLEAN mXen;
VOID
XenPublishRamRegions (
VOID
);
-extern EFI_BOOT_MODE mBootMode;
+extern EFI_BOOT_MODE mBootMode;
-extern BOOLEAN mS3Supported;
+extern BOOLEAN mS3Supported;
-extern UINT8 mPhysMemAddressWidth;
+extern UINT8 mPhysMemAddressWidth;
-extern UINT32 mMaxCpuCount;
+extern UINT32 mMaxCpuCount;
-extern UINT16 mHostBridgeDevId;
+extern UINT16 mHostBridgeDevId;
-extern BOOLEAN mQ35SmramAtDefaultSmbase;
+extern BOOLEAN mQ35SmramAtDefaultSmbase;
-extern UINT32 mQemuUc32Base;
+extern UINT32 mQemuUc32Base;
#endif // _PLATFORM_PEI_H_INCLUDED_
diff --git a/OvmfPkg/Bhyve/SmbiosPlatformDxe/Bhyve.c b/OvmfPkg/Bhyve/SmbiosPlatformDxe/Bhyve.c index 6ca976daa6..b70285bc2a 100644 --- a/OvmfPkg/Bhyve/SmbiosPlatformDxe/Bhyve.c +++ b/OvmfPkg/Bhyve/SmbiosPlatformDxe/Bhyve.c @@ -7,8 +7,8 @@ #include "SmbiosPlatformDxe.h"
-#define BHYVE_SMBIOS_PHYSICAL_ADDRESS 0x000F0000
-#define BHYVE_SMBIOS_PHYSICAL_END 0x000FFFFF
+#define BHYVE_SMBIOS_PHYSICAL_ADDRESS 0x000F0000
+#define BHYVE_SMBIOS_PHYSICAL_END 0x000FFFFF
/**
Locates the bhyve SMBIOS data if it exists
@@ -24,18 +24,17 @@ GetBhyveSmbiosTables ( UINT8 *BhyveSmbiosPtr;
SMBIOS_TABLE_ENTRY_POINT *BhyveSmbiosEntryPointStructure;
- for (BhyveSmbiosPtr = (UINT8*)(UINTN) BHYVE_SMBIOS_PHYSICAL_ADDRESS;
- BhyveSmbiosPtr < (UINT8*)(UINTN) BHYVE_SMBIOS_PHYSICAL_END;
- BhyveSmbiosPtr += 0x10) {
-
- BhyveSmbiosEntryPointStructure = (SMBIOS_TABLE_ENTRY_POINT *) BhyveSmbiosPtr;
-
- if (!AsciiStrnCmp ((CHAR8 *) BhyveSmbiosEntryPointStructure->AnchorString, "_SM_", 4) &&
- !AsciiStrnCmp ((CHAR8 *) BhyveSmbiosEntryPointStructure->IntermediateAnchorString, "_DMI_", 5) &&
- IsEntryPointStructureValid (BhyveSmbiosEntryPointStructure)) {
+ for (BhyveSmbiosPtr = (UINT8 *)(UINTN)BHYVE_SMBIOS_PHYSICAL_ADDRESS;
+ BhyveSmbiosPtr < (UINT8 *)(UINTN)BHYVE_SMBIOS_PHYSICAL_END;
+ BhyveSmbiosPtr += 0x10)
+ {
+ BhyveSmbiosEntryPointStructure = (SMBIOS_TABLE_ENTRY_POINT *)BhyveSmbiosPtr;
+ if (!AsciiStrnCmp ((CHAR8 *)BhyveSmbiosEntryPointStructure->AnchorString, "_SM_", 4) &&
+ !AsciiStrnCmp ((CHAR8 *)BhyveSmbiosEntryPointStructure->IntermediateAnchorString, "_DMI_", 5) &&
+ IsEntryPointStructureValid (BhyveSmbiosEntryPointStructure))
+ {
return BhyveSmbiosEntryPointStructure;
-
}
}
diff --git a/OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.c b/OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.c index 59f5d77a3b..ba21393f8e 100644 --- a/OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.c +++ b/OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.c @@ -20,34 +20,34 @@ //
#pragma pack(1)
typedef struct {
- SMBIOS_TABLE_TYPE0 Base;
- UINT8 Strings[sizeof(TYPE0_STRINGS)];
+ SMBIOS_TABLE_TYPE0 Base;
+ UINT8 Strings[sizeof (TYPE0_STRINGS)];
} OVMF_TYPE0;
#pragma pack()
-STATIC CONST OVMF_TYPE0 mOvmfDefaultType0 = {
+STATIC CONST OVMF_TYPE0 mOvmfDefaultType0 = {
{
// SMBIOS_STRUCTURE Hdr
{
EFI_SMBIOS_TYPE_BIOS_INFORMATION, // UINT8 Type
sizeof (SMBIOS_TABLE_TYPE0), // UINT8 Length
},
- 1, // SMBIOS_TABLE_STRING Vendor
- 2, // SMBIOS_TABLE_STRING BiosVersion
- 0xE800,// UINT16 BiosSegment
- 3, // SMBIOS_TABLE_STRING BiosReleaseDate
- 0, // UINT8 BiosSize
+ 1, // SMBIOS_TABLE_STRING Vendor
+ 2, // SMBIOS_TABLE_STRING BiosVersion
+ 0xE800, // UINT16 BiosSegment
+ 3, // SMBIOS_TABLE_STRING BiosReleaseDate
+ 0, // UINT8 BiosSize
{ // MISC_BIOS_CHARACTERISTICS BiosCharacteristics
- 0, // Reserved :2
- 0, // Unknown :1
- 1, // BiosCharacteristicsNotSupported :1
- // Remaining BiosCharacteristics bits left unset :60
+ 0, // Reserved :2
+ 0, // Unknown :1
+ 1, // BiosCharacteristicsNotSupported :1
+ // Remaining BiosCharacteristics bits left unset :60
},
{ // BIOSCharacteristicsExtensionBytes[2]
- 0, // BiosReserved
- 0x1C // SystemReserved = VirtualMachineSupported |
- // UefiSpecificationSupported |
- // TargetContentDistributionEnabled
+ 0, // BiosReserved
+ 0x1C // SystemReserved = VirtualMachineSupported |
+ // UefiSpecificationSupported |
+ // TargetContentDistributionEnabled
},
0, // UINT8 SystemBiosMajorRelease
0, // UINT8 SystemBiosMinorRelease
@@ -58,7 +58,6 @@ STATIC CONST OVMF_TYPE0 mOvmfDefaultType0 = { TYPE0_STRINGS
};
-
/**
Validates the SMBIOS entry point structure
@@ -73,17 +72,17 @@ IsEntryPointStructureValid ( IN SMBIOS_TABLE_ENTRY_POINT *EntryPointStructure
)
{
- UINTN Index;
- UINT8 Length;
- UINT8 Checksum;
- UINT8 *BytePtr;
+ UINTN Index;
+ UINT8 Length;
+ UINT8 Checksum;
+ UINT8 *BytePtr;
- BytePtr = (UINT8*) EntryPointStructure;
- Length = EntryPointStructure->EntryPointLength;
+ BytePtr = (UINT8 *)EntryPointStructure;
+ Length = EntryPointStructure->EntryPointLength;
Checksum = 0;
for (Index = 0; Index < Length; Index++) {
- Checksum = Checksum + (UINT8) BytePtr[Index];
+ Checksum = Checksum + (UINT8)BytePtr[Index];
}
if (Checksum != 0) {
@@ -93,7 +92,6 @@ IsEntryPointStructureValid ( }
}
-
/**
Get SMBIOS record length.
@@ -102,7 +100,7 @@ IsEntryPointStructureValid ( **/
UINTN
SmbiosTableLength (
- IN SMBIOS_STRUCTURE_POINTER SmbiosTable
+ IN SMBIOS_STRUCTURE_POINTER SmbiosTable
)
{
CHAR8 *AChar;
@@ -114,14 +112,14 @@ SmbiosTableLength ( // Each structure shall be terminated by a double-null (SMBIOS spec.7.1)
//
while ((*AChar != 0) || (*(AChar + 1) != 0)) {
- AChar ++;
+ AChar++;
}
+
Length = ((UINTN)AChar - (UINTN)SmbiosTable.Raw + 2);
return Length;
}
-
/**
Install all structures from the given SMBIOS structures block
@@ -131,8 +129,8 @@ SmbiosTableLength ( **/
EFI_STATUS
InstallAllStructures (
- IN EFI_SMBIOS_PROTOCOL *Smbios,
- IN UINT8 *TableAddress
+ IN EFI_SMBIOS_PROTOCOL *Smbios,
+ IN UINT8 *TableAddress
)
{
EFI_STATUS Status;
@@ -152,12 +150,12 @@ InstallAllStructures ( // Log the SMBIOS data for this structure
//
SmbiosHandle = SmbiosTable.Hdr->Handle;
- Status = Smbios->Add (
- Smbios,
- NULL,
- &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER*) SmbiosTable.Raw
- );
+ Status = Smbios->Add (
+ Smbios,
+ NULL,
+ &SmbiosHandle,
+ (EFI_SMBIOS_TABLE_HEADER *)SmbiosTable.Raw
+ );
ASSERT_EFI_ERROR (Status);
if (SmbiosTable.Hdr->Type == 0) {
@@ -175,19 +173,18 @@ InstallAllStructures ( // Add OVMF default Type 0 (BIOS Information) table
//
SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
- Status = Smbios->Add (
- Smbios,
- NULL,
- &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER*) &mOvmfDefaultType0
- );
+ Status = Smbios->Add (
+ Smbios,
+ NULL,
+ &SmbiosHandle,
+ (EFI_SMBIOS_TABLE_HEADER *)&mOvmfDefaultType0
+ );
ASSERT_EFI_ERROR (Status);
}
return EFI_SUCCESS;
}
-
/**
Installs SMBIOS information for OVMF
@@ -201,8 +198,8 @@ InstallAllStructures ( EFI_STATUS
EFIAPI
SmbiosTablePublishEntry (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_STATUS Status;
@@ -216,7 +213,7 @@ SmbiosTablePublishEntry ( Status = gBS->LocateProtocol (
&gEfiSmbiosProtocolGuid,
NULL,
- (VOID**)&Smbios
+ (VOID **)&Smbios
);
if (EFI_ERROR (Status)) {
return Status;
@@ -227,7 +224,7 @@ SmbiosTablePublishEntry ( //
EntryPointStructure = GetBhyveSmbiosTables ();
if (EntryPointStructure != NULL) {
- SmbiosTables = (UINT8*)(UINTN)EntryPointStructure->TableAddress;
+ SmbiosTables = (UINT8 *)(UINTN)EntryPointStructure->TableAddress;
}
if (SmbiosTables != NULL) {
diff --git a/OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.h b/OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.h index 12d7be7b24..147370533d 100644 --- a/OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.h +++ b/OvmfPkg/Bhyve/SmbiosPlatformDxe/SmbiosPlatformDxe.h @@ -21,7 +21,6 @@ #include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
-
/**
Locates the bhyve SMBIOS data if it exists
@@ -33,7 +32,6 @@ GetBhyveSmbiosTables ( VOID
);
-
/**
Validates the SMBIOS entry point structure
|