VirtualBox

Ignore:
Timestamp:
Aug 12, 2020 4:09:12 PM (4 years ago)
Author:
vboxsync
Message:

Devices/EFI: Merge edk-stable202005 and make it build, bugref:4643

Location:
trunk/src/VBox/Devices/EFI/FirmwareNew
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/FirmwareNew

  • trunk/src/VBox/Devices/EFI/FirmwareNew/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c

    r80721 r85718  
    107107  // Report MMIO/IO Resources
    108108  //
    109   Status = ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0xFEC00000, SIZE_4KB, 0, SystemTable); // IOAPIC
     109  Status = ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0xFEC00000, SIZE_4KB, 0, ImageHandle); // IOAPIC
    110110  ASSERT_EFI_ERROR (Status);
    111111
    112   Status = ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0xFED00000, SIZE_1KB, 0, SystemTable); // HPET
     112  Status = ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0xFED00000, SIZE_1KB, 0, ImageHandle); // HPET
    113113  ASSERT_EFI_ERROR (Status);
    114114
  • trunk/src/VBox/Devices/EFI/FirmwareNew/UefiPayloadPkg/BlSupportPei/BlSupportPei.c

    r80721 r85718  
    165165  UINTN                                         Entry64Num;
    166166  UINTN                                         Idx;
     167  UINT32                                        *Signature;
    167168  EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEADER *MmCfgHdr;
    168169  EFI_ACPI_MEMORY_MAPPED_ENHANCED_CONFIGURATION_SPACE_BASE_ADDRESS_ALLOCATION_STRUCTURE *MmCfgBase;
     
    182183    Entry32Num = (Rsdt->Length - sizeof(EFI_ACPI_DESCRIPTION_HEADER)) >> 2;
    183184    for (Idx = 0; Idx < Entry32Num; Idx++) {
    184       if (*(UINT32 *)(UINTN)(Entry32[Idx]) == EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE) {
    185         Fadt = (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)(UINTN)(Entry32[Idx]);
     185      Signature = (UINT32 *)(UINTN)Entry32[Idx];
     186      if (*Signature == EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE) {
     187        Fadt = (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)Signature;
    186188        DEBUG ((DEBUG_INFO, "Found Fadt in Rsdt\n"));
    187189      }
    188190
    189       if (*(UINT32 *)(UINTN)(Entry32[Idx]) == EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE) {
    190         MmCfgHdr = (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEADER *)(UINTN)(Entry32[Idx]);
     191      if (*Signature == EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE) {
     192        MmCfgHdr = (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEADER *)Signature;
    191193        DEBUG ((DEBUG_INFO, "Found MM config address in Rsdt\n"));
    192194      }
     
    206208    Entry64Num = (Xsdt->Length - sizeof(EFI_ACPI_DESCRIPTION_HEADER)) >> 3;
    207209    for (Idx = 0; Idx < Entry64Num; Idx++) {
    208       if (*(UINT32 *)(UINTN)(Entry64[Idx]) == EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE) {
    209         Fadt = (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)(UINTN)(Entry64[Idx]);
     210      Signature = (UINT32 *)(UINTN)Entry64[Idx];
     211      if (*Signature == EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE) {
     212        Fadt = (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *)Signature;
    210213        DEBUG ((DEBUG_INFO, "Found Fadt in Xsdt\n"));
    211214      }
    212215
    213       if (*(UINT32 *)(UINTN)(Entry64[Idx]) == EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE) {
    214         MmCfgHdr = (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEADER *)(UINTN)(Entry32[Idx]);
     216      if (*Signature == EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE) {
     217        MmCfgHdr = (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEADER *)Signature;
    215218        DEBUG ((DEBUG_INFO, "Found MM config address in Xsdt\n"));
    216219      }
  • trunk/src/VBox/Devices/EFI/FirmwareNew/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.c

    r80721 r85718  
    4444#define gPnp16550ComPort \
    4545  PNPID_DEVICE_PATH_NODE(0x0501)
     46
     47#define gPnpPs2Keyboard \
     48  PNPID_DEVICE_PATH_NODE(0x0303)
    4649
    4750#define gUartVendor \
     
    8891  }
    8992
    90 
     93ACPI_HID_DEVICE_PATH       gPnpPs2KeyboardDeviceNode  = gPnpPs2Keyboard;
    9194ACPI_HID_DEVICE_PATH       gPnp16550ComPortDeviceNode = gPnp16550ComPort;
    9295UART_DEVICE_PATH           gUartDeviceNode            = gUart;
     
    110113
    111114/**
    112   Add UART to ConOut, ConIn, ErrOut.
    113 
    114   @param[in]   DeviceHandle - LPC device path.
    115 
    116   @retval EFI_SUCCESS  - Serial console is added to ConOut, ConIn, and ErrOut.
    117   @retval EFI_STATUS   - No serial console is added.
     115  Add IsaKeyboard to ConIn; add IsaSerial to ConOut, ConIn, ErrOut.
     116
     117  @param[in] DeviceHandle  Handle of the LPC Bridge device.
     118
     119  @retval EFI_SUCCESS  Console devices on the LPC bridge have been added to
     120                       ConOut, ConIn, and ErrOut.
     121
     122  @return              Error codes, due to EFI_DEVICE_PATH_PROTOCOL missing
     123                       from DeviceHandle.
    118124**/
    119125EFI_STATUS
     
    124130  EFI_STATUS                Status;
    125131  EFI_DEVICE_PATH_PROTOCOL  *DevicePath;
     132  EFI_DEVICE_PATH_PROTOCOL  *TempDevicePath;
    126133
    127134  DevicePath = NULL;
     
    134141    return Status;
    135142  }
     143  TempDevicePath = DevicePath;
     144
     145  //
     146  // Register Keyboard
     147  //
     148  DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&gPnpPs2KeyboardDeviceNode);
     149  EfiBootManagerUpdateConsoleVariable (ConIn, DevicePath, NULL);
    136150
    137151  //
    138152  // Register COM1
    139153  //
     154  DevicePath = TempDevicePath;
    140155  DevicePath = AppendDevicePathNode ((EFI_DEVICE_PATH_PROTOCOL *)NULL, (EFI_DEVICE_PATH_PROTOCOL *)&gUartDeviceVendorNode);
    141156  DevicePath = AppendDevicePathNode (DevicePath, (EFI_DEVICE_PATH_PROTOCOL *)&gUartDeviceNode);
  • trunk/src/VBox/Devices/EFI/FirmwareNew/UefiPayloadPkg/Library/ResetSystemLib/ResetSystemLib.c

    r80721 r85718  
    133133
    134134/**
    135   Calling this function causes the system to enter a power state for capsule
    136   update.
    137 
    138   Reset update should not return, if it returns, it means the system does
    139   not support capsule update.
    140 
    141 **/
    142 VOID
    143 EFIAPI
    144 EnterS3WithImmediateWake (
    145   VOID
    146   )
    147 {
    148   AcpiPmControl (5);
    149   ASSERT (FALSE);
    150 }
    151 
    152 /**
    153135  This function causes a systemwide reset. The exact type of the reset is
    154136  defined by the EFI_GUID that follows the Null-terminated Unicode string passed
  • trunk/src/VBox/Devices/EFI/FirmwareNew/UefiPayloadPkg/UefiPayloadPkg.fdf

    r80721 r85718  
    121121#
    122122INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
     123!if $(PS2_KEYBOARD_ENABLE) == TRUE
     124INF OvmfPkg/SioBusDxe/SioBusDxe.inf
     125INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
     126!endif
    123127
    124128#
  • trunk/src/VBox/Devices/EFI/FirmwareNew/UefiPayloadPkg/UefiPayloadPkgIa32.dsc

    r80721 r85718  
    492492  #
    493493  MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
     494!if $(PS2_KEYBOARD_ENABLE) == TRUE
     495  OvmfPkg/SioBusDxe/SioBusDxe.inf
     496  MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
     497!endif
    494498
    495499  #
  • trunk/src/VBox/Devices/EFI/FirmwareNew/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc

    r80721 r85718  
    2626
    2727  DEFINE SOURCE_DEBUG_ENABLE          = FALSE
     28  DEFINE PS2_KEYBOARD_ENABLE          = FALSE
    2829
    2930  #
     
    493494  #
    494495  MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
     496!if $(PS2_KEYBOARD_ENABLE) == TRUE
     497  OvmfPkg/SioBusDxe/SioBusDxe.inf
     498  MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
     499!endif
    495500
    496501  #
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette