VirtualBox

Changeset 58515 in vbox


Ignore:
Timestamp:
Oct 30, 2015 12:56:07 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103836
Message:

PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeController.c: Replaced some myserious #if 0 we've added with #ifndef VBOX; commented or #ifdef'ed other changes we've made.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeController.c

    r48730 r58515  
    8787};
    8888
     89#ifdef VBOX
    8990static EFI_STATUS GetPciIo(EFI_DRIVER_BINDING_PROTOCOL *This, EFI_HANDLE hController, EFI_PCI_IO_PROTOCOL **ppPciIo)
    9091{
     
    107108    return Status;
    108109}
     110#endif /* VBOX */
    109111
    110112/**
     
    165167{
    166168  EFI_STATUS                Status;
     169  EFI_PCI_IO_PROTOCOL       *PciIo;
    167170  UINT8                     PciClass;
    168171  UINT8                     PciSubClass;
     
    171174  // Attempt to Open PCI I/O Protocol
    172175  //
    173   EFI_PCI_IO_PROTOCOL       *PciIo;
    174 #if 0
     176#ifndef VBOX
    175177  Status = gBS->OpenProtocol (
    176178                  Controller,
     
    182184                  );
    183185#else
    184     Status = GetPciIo(This, Controller, &PciIo);
     186  Status = GetPciIo(This, Controller, &PciIo);
    185187#endif
    186188  if (EFI_ERROR (Status)) {
     
    217219  // Examine Ide PCI Configuration table fields
    218220  //
     221#ifndef VBOX
     222  if ((PciClass != PCI_CLASS_MASS_STORAGE) || (PciSubClass != PCI_CLASS_MASS_STORAGE_IDE)) {
     223#else
    219224  if (   (PciClass != PCI_CLASS_MASS_STORAGE)
    220225      || (   PciSubClass != PCI_CLASS_MASS_STORAGE_IDE
    221226          && PciSubClass != 0x6 /* SATA */)) {
     227#endif
    222228    Status = EFI_UNSUPPORTED;
    223229  }
     
    256262{
    257263  EFI_STATUS           Status;
    258 
    259 #if 0
     264#ifndef VBOX
     265  EFI_PCI_IO_PROTOCOL  *PciIo;
     266
    260267  //
    261268  // Now test and open the EfiPciIoProtocol
     
    264271                  Controller,
    265272                  &gEfiPciIoProtocolGuid,
    266                   (VOID **) &gEfiIdeControllerInit->PciIo,
     273                  (VOID **) &PciIo,
    267274                  This->DriverBindingHandle,
    268275                  Controller,
     
    287294  // Install IDE_CONTROLLER_INIT protocol
    288295  //
    289   Status = gBS->InstallMultipleProtocolInterfaces (
     296  return gBS->InstallMultipleProtocolInterfaces (
    290297                &Controller,
    291                 &gEfiIdeControllerInitProtocolGuid, &gEfiIdeControllerInit.Core,
     298                &gEfiIdeControllerInitProtocolGuid, &gEfiIdeControllerInit.Core, /* VBox: We added .Core, probably for warnings. */
    292299                NULL
    293300                );
    294   return Status;
    295301}
    296302
     
    336342  // Make sure the protocol was produced by this driver
    337343  //
    338   if ((void *)IdeControllerInit != (void *)&gEfiIdeControllerInit) {
     344  if ((void *)IdeControllerInit != (void *)&gEfiIdeControllerInit) { /* VBox: Dunno why we're doing the (void *) thing, types should be the same... */
    339345    return EFI_UNSUPPORTED;
    340346  }
     
    345351  Status = gBS->UninstallMultipleProtocolInterfaces (
    346352                  Controller,
    347                   &gEfiIdeControllerInitProtocolGuid, &gEfiIdeControllerInit.Core,
     353                  &gEfiIdeControllerInitProtocolGuid, &gEfiIdeControllerInit.Core, /* VBox: We added .Core, probably for warnings. */
    348354                  NULL
    349355                  );
     
    414420  // Channel number (0 based, either 0 or 1)
    415421  //
     422#ifdef VBOX
    416423  VBoxLogFlowFuncEnter();
    417424  VBoxLogFlowFuncMarkVar(Channel, "%d");
    418425  *MaxDevices = 0;
    419426  *Enabled = FALSE;
     427#endif
    420428  if (Channel < ICH_IDE_MAX_CHANNEL) {
    421429#ifdef VBOX
Note: See TracChangeset for help on using the changeset viewer.

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