- Timestamp:
- Oct 6, 2010 10:07:32 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 66425
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevAHCI.cpp
r32879 r32939 70 70 * This was before the config was added and ahciIOTasks was dropped. */ 71 71 #define AHCI_SAVED_STATE_VERSION_VBOX_30 2 72 73 /* If AHCI shall emulate MSI support */ 74 #define AHCI_WITH_MSI 72 75 73 76 /** … … 7668 7671 PCIDevSetDeviceId (&pThis->dev, 0x2829); /* ICH-8M */ 7669 7672 PCIDevSetCommand (&pThis->dev, 0x0000); 7670 // @todo: must be set, to use caps list 7671 //PCIDevSetStatus (&pThis->dev, VBOX_PCI_STATUS_CAP_LIST); 7673 #ifdef AHCI_WITH_MSI 7674 PCIDevSetStatus (&pThis->dev, VBOX_PCI_STATUS_CAP_LIST); 7675 PCIDevSetCapabilityList(&pThis->dev, 0x80); 7676 #else 7677 PCIDevSetCapabilityList(&pThis->dev, 0x70); 7678 #endif 7672 7679 PCIDevSetRevisionId (&pThis->dev, 0x02); 7673 7680 PCIDevSetClassProg (&pThis->dev, 0x01); … … 7676 7683 PCIDevSetBaseAddress (&pThis->dev, 5, false, false, false, 0x00000000); 7677 7684 7678 // @todo: maybe 0x70, as MSI currently not implemented7679 PCIDevSetCapabilityList(&pThis->dev, 0x80);7680 7681 7685 PCIDevSetInterruptLine(&pThis->dev, 0x00); 7682 7686 PCIDevSetInterruptPin (&pThis->dev, 0x01); … … 7685 7689 pThis->dev.config[0x71] = 0x00; /* next */ 7686 7690 pThis->dev.config[0x72] = 0x03; /* version ? */ 7687 7688 // @todo: this way it claims MSI *enabled*, not disabled, which is only7689 // compensated by above lack of VBOX_PCI_STATUS_CAP_LIST in status7690 pThis->dev.config[0x80] = VBOX_PCI_CAP_ID_MSI; /* Capability ID: Message Signaled Interrupts. Disabled. */7691 pThis->dev.config[0x81] = 0x70; /* next. */7692 7691 7693 7692 pThis->dev.config[0x90] = 0x40; /* AHCI mode. */ … … 7703 7702 if (RT_FAILURE(rc)) 7704 7703 return rc; 7704 7705 #ifdef AHCI_WITH_MSI 7706 PDMMSIREG aMsiReg; 7707 aMsiReg.cVectors = 1; 7708 aMsiReg.iCapOffset = 0x80; 7709 aMsiReg.iNextOffset = 0x70; 7710 aMsiReg.iMsiFlags = 0; 7711 rc = PDMDevHlpPCIRegisterMsi(pDevIns, &aMsiReg); 7712 if (RT_FAILURE (rc)) 7713 { 7714 LogRel(("Chipset cannot do MSI: %Rrc\n", rc)); 7715 PCIDevSetCapabilityList(&pThis->dev, 0x70); 7716 /* That's OK, we can work without MSI */ 7717 } 7718 #endif 7705 7719 7706 7720 /*
Note:
See TracChangeset
for help on using the changeset viewer.