VirtualBox

Changeset 77795 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 19, 2019 4:26:01 PM (6 years ago)
Author:
vboxsync
Message:

EFI: More hacks to handle the case where ICH9 chipset gets some random device at 0:0.0 rather than having that slot empty.

Location:
trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c

    r77729 r77795  
    5151#ifdef VBOX
    5252    // HACK ALERT! There is no host bridge device in the PCIe chipset, and the same PIIX4 PM device is used.
    53     case 0xffff:
     53    // But there might be some other device at 0:0.0.
     54    default:
    5455#endif
    5556      Pmba       = POWER_MGMT_REGISTER_PIIX4 (PIIX4_PMBA);
     
    6667      AcpiEnBit  = ICH9_ACPI_CNTL_ACPI_EN;
    6768      break;
     69#ifndef VBOX
    6870    default:
    6971      DEBUG ((EFI_D_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n",
     
    7173      ASSERT (FALSE);
    7274      return RETURN_UNSUPPORTED;
     75#endif
    7376  }
    7477
  • trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c

    r77729 r77795  
    4949#ifdef VBOX
    5050    // HACK ALERT! There is no host bridge device in the PCIe chipset, and the same PIIX4 PM device is used.
    51     case 0xffff:
     51    // But there might be some other device at 0:0.0.
     52    default:
    5253#endif
    5354      Pmba       = POWER_MGMT_REGISTER_PIIX4 (PIIX4_PMBA);
     
    6465      AcpiEnBit  = ICH9_ACPI_CNTL_ACPI_EN;
    6566      break;
     67#ifndef VBOX
    6668    default:
    6769      DEBUG ((EFI_D_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n",
     
    6971      ASSERT (FALSE);
    7072      return RETURN_UNSUPPORTED;
     73#endif
    7174  }
    7275
  • trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c

    r77729 r77795  
    5252  switch (HostBridgeDevId) {
    5353#ifdef VBOX
    54     // HACK ALERT! In the PCIe chipset, the same PIIX4 PM device is used.
    55     case INTEL_Q35_MCH_DEVICE_ID:
     54      // HACK ALERT! There is no host bridge device in the PCIe chipset, and the same PIIX4 PM device is used.
     55      // But there might be some other device at 0:0.0.
     56    default:
    5657#endif
    5758    case INTEL_82441_DEVICE_ID:
     
    6263      Pmba = POWER_MGMT_REGISTER_Q35 (ICH9_PMBASE);
    6364      break;
    64 #endif
    6565    default:
    6666      DEBUG ((EFI_D_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n",
     
    6868      ASSERT (FALSE);
    6969      return RETURN_UNSUPPORTED;
     70#endif
    7071  }
    7172
  • trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/PlatformPei/Platform.c

    r77751 r77795  
    520520  //
    521521  switch (mHostBridgeDevId) {
     522#ifdef VBOX
     523    // This is really hacky but so it goes. The PCIe chipset might have nothing at 0:0.0,
     524    // or it might be some random device. But it's not going to be the 440FX host bridge.
     525    default:
     526#endif
    522527    case INTEL_82441_DEVICE_ID:
    523528      PmCmd      = POWER_MGMT_REGISTER_PIIX4 (PCI_COMMAND_OFFSET);
     
    528533      AcpiEnBit  = PIIX4_PMREGMISC_PMIOSE;
    529534      break;
     535#ifndef VBOX
    530536    case INTEL_Q35_MCH_DEVICE_ID:
    531537      PmCmd      = POWER_MGMT_REGISTER_Q35 (PCI_COMMAND_OFFSET);
     
    541547      ASSERT (FALSE);
    542548      return;
    543   }
     549#endif
     550  }
     551
     552#ifdef VBOX
     553  // If it's not 440FX, it must be the PCIe chipset.
     554  if (mHostBridgeDevId != INTEL_82441_DEVICE_ID)
     555      mHostBridgeDevId = INTEL_Q35_MCH_DEVICE_ID;
     556
     557#endif
    544558  PcdStatus = PcdSet16S (PcdOvmfHostBridgePciDevId, mHostBridgeDevId);
    545559  ASSERT_RETURN_ERROR (PcdStatus);
     
    760774#ifdef VBOX
    761775  // HACK ALERT! There is no host bridge device in the PCIe chipset, but we pretend it's a 3 Series chip.
    762   if (mHostBridgeDevId == 0xffff)
     776  // There may or not be some device at 0:0.0 so anything not 440FX must be PCIe.
     777  if (mHostBridgeDevId != INTEL_82441_DEVICE_ID)
    763778        mHostBridgeDevId = INTEL_Q35_MCH_DEVICE_ID;
    764779#endif
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