Changeset 33049 in vbox for trunk/src/VBox/Devices/EFI/Firmware2
- Timestamp:
- Oct 12, 2010 2:29:32 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware2/VBoxPkg/VBoxIdeBusDxe/Ide.c
r33029 r33049 337 337 return Status; 338 338 } 339 DEBUG((DEBUG_INFO, "class code: %x\n", PciData.Hdr.ClassCode[0] & IDE_PRIMARY_OPERATING_MODE)); 339 DEBUG((DEBUG_INFO, "class primary code: %x\n", PciData.Hdr.ClassCode[0] & IDE_PRIMARY_OPERATING_MODE)); 340 DEBUG((DEBUG_INFO, "class secondary code: %x\n", PciData.Hdr.ClassCode[0] & IDE_SECONDARY_OPERATING_MODE)); 340 341 if ((PciData.Hdr.ClassCode[0] & IDE_PRIMARY_OPERATING_MODE) == 0) { 341 342 switch (PciSubClass) … … 376 377 break; 377 378 case 0x6: 378 IdeRegsBaseAddr[IdePrimary].CommandBlockBaseAddr = 0x1 e8;379 IdeRegsBaseAddr[IdePrimary].ControlBlockBaseAddr = 0x3 e6;380 379 IdeRegsBaseAddr[IdePrimary].CommandBlockBaseAddr = 0x168; 380 IdeRegsBaseAddr[IdePrimary].ControlBlockBaseAddr = 0x366; 381 IdeRegsBaseAddr[IdePrimary].BusMasterBaseAddr = 0; 381 382 break; 382 383 default: … … 395 396 break; 396 397 case 0x6: 398 IdeRegsBaseAddr[IdeSecondary].CommandBlockBaseAddr = 0x1e8; 399 IdeRegsBaseAddr[IdeSecondary].ControlBlockBaseAddr = 0x3e6; 400 IdeRegsBaseAddr[IdeSecondary].BusMasterBaseAddr = 0; 401 break; 402 default: 403 ASSERT_EFI_ERROR((EFI_UNSUPPORTED)); 404 } 405 } else { 406 // 407 // The BARs should be of IO type 408 // 409 if ((PciData.Device.Bar[2] & BIT0) == 0 || 410 (PciData.Device.Bar[3] & BIT0) == 0) { 411 DEBUG((DEBUG_INFO, "%a:%d\n", __FILE__, __LINE__)); 412 return EFI_UNSUPPORTED; 413 } 414 415 switch (PciSubClass) 416 { 417 case PCI_CLASS_MASS_STORAGE_IDE: 418 IdeRegsBaseAddr[IdeSecondary].CommandBlockBaseAddr = 419 (UINT16) (PciData.Device.Bar[2] & 0x0000fff8); 420 IdeRegsBaseAddr[IdeSecondary].ControlBlockBaseAddr = 421 (UINT16) ((PciData.Device.Bar[3] & 0x0000fffc) + 2); 422 IdeRegsBaseAddr[IdeSecondary].BusMasterBaseAddr = 423 (UINT16) ((PciData.Device.Bar[4] & 0x0000fff0)); 424 break; 425 case 0x6: 397 426 IdeRegsBaseAddr[IdeSecondary].CommandBlockBaseAddr = 0x168; 398 427 IdeRegsBaseAddr[IdeSecondary].ControlBlockBaseAddr = 0x366; … … 401 430 default: 402 431 ASSERT_EFI_ERROR((EFI_UNSUPPORTED)); 403 } 404 } else { 405 // 406 // The BARs should be of IO type 407 // 408 if ((PciData.Device.Bar[2] & BIT0) == 0 || 409 (PciData.Device.Bar[3] & BIT0) == 0) { 410 DEBUG((DEBUG_INFO, "%a:%d\n", __FILE__, __LINE__)); 411 return EFI_UNSUPPORTED; 412 } 413 414 IdeRegsBaseAddr[IdeSecondary].CommandBlockBaseAddr = 415 (UINT16) (PciData.Device.Bar[2] & 0x0000fff8); 416 IdeRegsBaseAddr[IdeSecondary].ControlBlockBaseAddr = 417 (UINT16) ((PciData.Device.Bar[3] & 0x0000fffc) + 2); 418 IdeRegsBaseAddr[IdeSecondary].BusMasterBaseAddr = 419 (UINT16) ((PciData.Device.Bar[4] & 0x0000fff0)); 432 } 420 433 } 421 434
Note:
See TracChangeset
for help on using the changeset viewer.