Changeset 58515 in vbox
- Timestamp:
- Oct 30, 2015 12:56:07 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 103836
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeController.c
r48730 r58515 87 87 }; 88 88 89 #ifdef VBOX 89 90 static EFI_STATUS GetPciIo(EFI_DRIVER_BINDING_PROTOCOL *This, EFI_HANDLE hController, EFI_PCI_IO_PROTOCOL **ppPciIo) 90 91 { … … 107 108 return Status; 108 109 } 110 #endif /* VBOX */ 109 111 110 112 /** … … 165 167 { 166 168 EFI_STATUS Status; 169 EFI_PCI_IO_PROTOCOL *PciIo; 167 170 UINT8 PciClass; 168 171 UINT8 PciSubClass; … … 171 174 // Attempt to Open PCI I/O Protocol 172 175 // 173 EFI_PCI_IO_PROTOCOL *PciIo; 174 #if 0 176 #ifndef VBOX 175 177 Status = gBS->OpenProtocol ( 176 178 Controller, … … 182 184 ); 183 185 #else 184 186 Status = GetPciIo(This, Controller, &PciIo); 185 187 #endif 186 188 if (EFI_ERROR (Status)) { … … 217 219 // Examine Ide PCI Configuration table fields 218 220 // 221 #ifndef VBOX 222 if ((PciClass != PCI_CLASS_MASS_STORAGE) || (PciSubClass != PCI_CLASS_MASS_STORAGE_IDE)) { 223 #else 219 224 if ( (PciClass != PCI_CLASS_MASS_STORAGE) 220 225 || ( PciSubClass != PCI_CLASS_MASS_STORAGE_IDE 221 226 && PciSubClass != 0x6 /* SATA */)) { 227 #endif 222 228 Status = EFI_UNSUPPORTED; 223 229 } … … 256 262 { 257 263 EFI_STATUS Status; 258 259 #if 0 264 #ifndef VBOX 265 EFI_PCI_IO_PROTOCOL *PciIo; 266 260 267 // 261 268 // Now test and open the EfiPciIoProtocol … … 264 271 Controller, 265 272 &gEfiPciIoProtocolGuid, 266 (VOID **) & gEfiIdeControllerInit->PciIo,273 (VOID **) &PciIo, 267 274 This->DriverBindingHandle, 268 275 Controller, … … 287 294 // Install IDE_CONTROLLER_INIT protocol 288 295 // 289 Status =gBS->InstallMultipleProtocolInterfaces (296 return gBS->InstallMultipleProtocolInterfaces ( 290 297 &Controller, 291 &gEfiIdeControllerInitProtocolGuid, &gEfiIdeControllerInit.Core, 298 &gEfiIdeControllerInitProtocolGuid, &gEfiIdeControllerInit.Core, /* VBox: We added .Core, probably for warnings. */ 292 299 NULL 293 300 ); 294 return Status;295 301 } 296 302 … … 336 342 // Make sure the protocol was produced by this driver 337 343 // 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... */ 339 345 return EFI_UNSUPPORTED; 340 346 } … … 345 351 Status = gBS->UninstallMultipleProtocolInterfaces ( 346 352 Controller, 347 &gEfiIdeControllerInitProtocolGuid, &gEfiIdeControllerInit.Core, 353 &gEfiIdeControllerInitProtocolGuid, &gEfiIdeControllerInit.Core, /* VBox: We added .Core, probably for warnings. */ 348 354 NULL 349 355 ); … … 414 420 // Channel number (0 based, either 0 or 1) 415 421 // 422 #ifdef VBOX 416 423 VBoxLogFlowFuncEnter(); 417 424 VBoxLogFlowFuncMarkVar(Channel, "%d"); 418 425 *MaxDevices = 0; 419 426 *Enabled = FALSE; 427 #endif 420 428 if (Channel < ICH_IDE_MAX_CHANNEL) { 421 429 #ifdef VBOX
Note:
See TracChangeset
for help on using the changeset viewer.