Changeset 77336 in vbox for trunk/src/VBox
- Timestamp:
- Feb 15, 2019 12:56:20 PM (6 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Ata/AtaAtapiPassThru
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c
r58466 r77336 196 196 switch (Mode) { 197 197 case EfiAtaIdeMode: 198 #ifdef VBOX 199 // Reading the IDE controller's PCI config space byte by byte is quite expensive. 200 // It is very unclear why it should be done again and again for every command 201 // when it was already done in IdeModeInitialization(). 202 // See also ExtScsiPassThruPassThru(). 203 #else 198 204 // 199 205 // Reassign IDE mode io port registers' base addresses … … 204 210 return Status; 205 211 } 212 #endif 206 213 207 214 switch (Protocol) { … … 2027 2034 switch (Mode) { 2028 2035 case EfiAtaIdeMode: 2036 #ifdef VBOX 2037 // Reading the IDE controller's PCI config space byte by byte is quite expensive. 2038 // It is very unclear why it should be done again and again for every command 2039 // when it was already done in IdeModeInitialization(). 2040 // See also AtaPassThruPassThruExecute(). 2041 #else 2029 2042 // 2030 2043 // Reassign IDE mode io port registers' base addresses … … 2035 2048 return Status; 2036 2049 } 2050 #endif 2037 2051 2038 2052 Status = AtaPacketCommandExecute (Instance->PciIo, &Instance->IdeRegisters[Port], Port, PortMultiplier, Packet); -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c
r58459 r77336 1146 1146 IdeWritePortB (PciIo, IdeRegisters->CmdOrStatus, AtaCommand); 1147 1147 1148 #ifdef VBOX 1149 // Stalling is a complete waste of time in a VM. BSY gets set before the status register can be read again. 1150 #else 1148 1151 // 1149 1152 // Stall at least 400 microseconds. 1150 1153 // 1151 1154 MicroSecondDelay (400); 1155 #endif 1152 1156 1153 1157 return EFI_SUCCESS; … … 1802 1806 DeviceControl |= ATA_CTLREG_IEN_L; 1803 1807 IdeWritePortB (PciIo, IdeRegisters->AltOrDev, DeviceControl); 1808 #ifdef VBOX 1809 // It is not at all clear what purpose the unconditional 10 millisecond delay might possibly serve. 1810 #else 1804 1811 // 1805 1812 // Stall for 10 milliseconds. 1806 1813 // 1807 1814 MicroSecondDelay (10000); 1815 #endif 1808 1816 1809 1817 } … … 2079 2087 for (Count = 0; Count < 6; Count++) { 2080 2088 IdeWritePortW (PciIo, IdeRegisters->Data, *((UINT16*)PacketCommand + Count)); 2089 #ifdef VBOX 2090 // Any stalling is completely unnecessary, especially in a VM. 2091 #else 2081 2092 // 2082 2093 // Stall for 10 microseconds. 2083 2094 // 2084 2095 MicroSecondDelay (10); 2096 #endif 2085 2097 } 2086 2098
Note:
See TracChangeset
for help on using the changeset viewer.