Changeset 58466 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Ata
- Timestamp:
- Oct 29, 2015 4:30:44 AM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
- Property svn:mergeinfo changed
/vendor/edk2/current merged: 103769-103776
- Property svn:mergeinfo changed
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
r58459 r58466 807 807 PortTfd = AhciReadReg (PciIo, (UINT32) Offset); 808 808 // 809 // PxTFD will be updated if there is a D2H or SetupFIS received. 809 // PxTFD will be updated if there is a D2H or SetupFIS received. 810 810 // 811 811 if ((PortTfd & EFI_AHCI_PORT_TFD_ERR) != 0) { … … 1443 1443 // 1444 1444 Capability = AhciReadReg (PciIo, EFI_AHCI_CAPABILITY_OFFSET); 1445 1445 1446 1446 // 1447 1447 // Enable AE before accessing any AHCI registers if Supports AHCI Mode Only is not set … … 1998 1998 MaxCommandSlotNumber = (UINT8) (((Capability & 0x1F00) >> 8) + 1); 1999 1999 Support64Bit = (BOOLEAN) (((Capability & BIT31) != 0) ? TRUE : FALSE); 2000 2000 2001 2001 PortImplementBitMap = AhciReadReg(PciIo, EFI_AHCI_PI_OFFSET); 2002 2002 // … … 2256 2256 // 2257 2257 Capability = AhciReadReg (PciIo, EFI_AHCI_CAPABILITY_OFFSET); 2258 2258 2259 2259 // 2260 2260 // Enable AE before accessing any AHCI registers if Supports AHCI Mode Only is not set … … 2263 2263 AhciOrReg (PciIo, EFI_AHCI_GHC_OFFSET, EFI_AHCI_GHC_ENABLE); 2264 2264 } 2265 2265 2266 2266 // 2267 2267 // Get the number of command slots per port supported by this HBA. -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h
r58459 r58466 1 1 /** @file 2 2 Header file for AHCI mode of ATA host controller. 3 3 4 4 Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 13 13 **/ … … 64 64 65 65 #define EFI_AHCI_FIS_REGISTER_H2D 0x27 //Register FIS - Host to Device 66 #define EFI_AHCI_FIS_REGISTER_H2D_LENGTH 20 66 #define EFI_AHCI_FIS_REGISTER_H2D_LENGTH 20 67 67 #define EFI_AHCI_FIS_REGISTER_D2H 0x34 //Register FIS - Device to Host 68 68 #define EFI_AHCI_FIS_REGISTER_D2H_LENGTH 20 … … 203 203 UINT32 AhciCmdCtba; //Command Table Descriptor Base Address 204 204 UINT32 AhciCmdCtbau; //Command Table Descriptor Base Address Upper 32-BITs 205 UINT32 AhciCmdRsvd1[4]; 205 UINT32 AhciCmdRsvd1[4]; 206 206 } EFI_AHCI_COMMAND_LIST; 207 207 208 208 // 209 209 // This is a software constructed FIS. 210 // For data transfer operations, this is the H2D Register FIS format as 210 // For data transfer operations, this is the H2D Register FIS format as 211 211 // specified in the Serial ATA Revision 2.6 specification. 212 212 // … … 247 247 // The entry data structure is listed at the following. 248 248 // the actual entry number comes from the PRDTL field in the command 249 // list entry for this command slot. 249 // list entry for this command slot. 250 250 // 251 251 typedef struct { … … 275 275 UINT8 AhciDmaSetupFisRsvd[0x04]; 276 276 UINT8 AhciPioSetupFis[0x14]; // Pio Setup Fis: offset 0x20 277 UINT8 AhciPioSetupFisRsvd[0x0C]; 277 UINT8 AhciPioSetupFisRsvd[0x0C]; 278 278 UINT8 AhciD2HRegisterFis[0x14]; // D2H Register Fis: offset 0x40 279 279 UINT8 AhciD2HRegisterFisRsvd[0x04]; 280 280 UINT64 AhciSetDeviceBitsFis; // Set Device Bits Fix: offset 0x58 281 281 UINT8 AhciUnknownFis[0x40]; // Unkonwn Fis: offset 0x60 282 UINT8 AhciUnknownFisRsvd[0x60]; 283 } EFI_AHCI_RECEIVED_FIS; 282 UINT8 AhciUnknownFisRsvd[0x60]; 283 } EFI_AHCI_RECEIVED_FIS; 284 284 285 285 #pragma pack() … … 301 301 302 302 /** 303 This function is used to send out ATAPI commands conforms to the Packet Command 303 This function is used to send out ATAPI commands conforms to the Packet Command 304 304 with PIO Protocol. 305 305 306 306 @param PciIo The PCI IO protocol instance. 307 307 @param AhciRegisters The pointer to the EFI_AHCI_REGISTERS. 308 @param Port The number of port. 308 @param Port The number of port. 309 309 @param PortMultiplier The number of port multiplier. 310 310 @param Packet A pointer to EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET structure. … … 327 327 /** 328 328 Start command for give slot on specific port. 329 329 330 330 @param PciIo The PCI IO protocol instance. 331 331 @param Port The number of port. 332 332 @param CommandSlot The number of CommandSlot. 333 333 @param Timeout The timeout value of start, uses 100ns as a unit. 334 334 335 335 @retval EFI_DEVICE_ERROR The command start unsuccessfully. 336 336 @retval EFI_TIMEOUT The operation is time out. … … 349 349 /** 350 350 Stop command running for giving port 351 351 352 352 @param PciIo The PCI IO protocol instance. 353 353 @param Port The number of port. 354 354 @param Timeout The timeout value of stop, uses 100ns as a unit. 355 355 356 356 @retval EFI_DEVICE_ERROR The command stop unsuccessfully. 357 357 @retval EFI_TIMEOUT The operation is time out. -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c
r58459 r58466 2075 2075 // skip the loop. 2076 2076 // 2077 if ((PtrSenseData->Sense_Key == EFI_SCSI_SK_NO_SENSE) || 2077 if ((PtrSenseData->Sense_Key == EFI_SCSI_SK_NO_SENSE) || 2078 2078 (SenseDataLen + sizeof (EFI_SCSI_SENSE_DATA) > Packet->SenseDataLength)) { 2079 2079 SenseReq = FALSE; -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
r58459 r58466 30 30 # VALID_ARCHITECTURES = IA32 X64 IPF EBC 31 31 # 32 # DRIVER_BINDING = gAtaAtapiPassThruDriverBinding 32 # DRIVER_BINDING = gAtaAtapiPassThruDriverBinding 33 33 # COMPONENT_NAME = gAtaAtapiPassThruComponentName 34 # COMPONENT_NAME2 = gAtaAtapiPassThruComponentName2 34 # COMPONENT_NAME2 = gAtaAtapiPassThruComponentName2 35 35 # 36 36 # … … 44 44 IdeMode.h 45 45 ComponentName.c 46 46 47 47 [Packages] 48 48 MdePkg/MdePkg.dec -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/ComponentName.c
r48674 r58466 1 1 /** @file 2 2 UEFI Component Name(2) protocol implementation for AtaAtapiPassThru driver. 3 3 4 4 Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 13 13 **/ … … 16 16 17 17 // 18 // Driver name table 18 // Driver name table 19 19 // 20 20 GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mAtaAtapiPassThruDriverNameTable[] = { -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.h
r48674 r58466 1 1 /** @file 2 2 Header file for IDE mode of ATA host controller. 3 3 4 4 Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 13 13 **/ … … 122 122 123 123 /** 124 Get IDE i/o port registers' base addresses by mode. 124 Get IDE i/o port registers' base addresses by mode. 125 125 126 126 In 'Compatibility' mode, use fixed addresses. … … 145 145 146 146 Table 1. Compatibility resource mappings 147 147 148 148 b) In Native-PCI mode, IDE registers are mapped into IO space using the BARs 149 149 in IDE controller's PCI Configuration Space, shown in the Table 2 below. … … 162 162 @param[in, out] IdeRegisters Pointer to EFI_IDE_REGISTERS which is used to 163 163 store the IDE i/o port registers' base addresses 164 164 165 165 @retval EFI_UNSUPPORTED Return this value when the BARs is not IO type 166 166 @retval EFI_SUCCESS Get the Base address successfully … … 176 176 177 177 /** 178 This function is used to send out ATAPI commands conforms to the Packet Command 178 This function is used to send out ATAPI commands conforms to the Packet Command 179 179 with PIO Data In Protocol. 180 180 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c
r58459 r58466 633 633 // 634 634 // Aborting operation has been done. From now on, don't need to abort normal operation. 635 // 635 // 636 636 OldTpl = gBS->RaiseTPL (TPL_NOTIFY); 637 637 AtaDevice->Abort = FALSE; -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Ata/AtaBusDxe/ComponentName.c
r48674 r58466 1 1 /** @file 2 2 UEFI Component Name(2) protocol implementation for ConPlatform driver. 3 3 4 4 Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 13 13 **/ … … 16 16 17 17 // 18 // Driver name table 18 // Driver name table 19 19 // 20 20 GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mAtaBusDriverNameTable[] = {
Note:
See TracChangeset
for help on using the changeset viewer.