\r
do {\r
//\r
- // Access sytem memory to see if the value is the tested one.\r
+ // Access system memory to see if the value is the tested one.\r
//\r
// The system memory pointed by Address will be updated by the\r
// SATA Host Controller, "volatile" is introduced to prevent\r
}\r
\r
/**\r
- Buid a command FIS.\r
+ Build a command FIS.\r
\r
@param[in,out] CmdFis A pointer to the EFI_AHCI_COMMAND_FIS data\r
structure.\r
AhciWriteReg (AhciBar, Offset, Data64.Uint32.Upper32);\r
\r
//\r
- // Single task envrionment, we only use one command table for all port\r
+ // Single task environment, we only use one command table for all port\r
//\r
Offset = AHCI_PORT_START + Port * AHCI_PORT_REG_WIDTH + AHCI_PORT_CLB;\r
OldCmdListLo = AhciReadReg (AhciBar, Offset);\r
if (EFI_ERROR (Status)) {\r
DEBUG ((\r
DEBUG_ERROR,\r
- "%a: Error occured when waiting for the first D2H register FIS - %r\n",\r
+ "%a: Error occurred when waiting for the first D2H register FIS - %r\n",\r
__FUNCTION__, Status\r
));\r
continue;\r
UINT8 AhciD2HRegisterFis[0x14]; // D2H Register Fis: offset 0x40\r
UINT8 AhciD2HRegisterFisRsvd[0x04];\r
UINT64 AhciSetDeviceBitsFis; // Set Device Bits Fix: offset 0x58\r
- UINT8 AhciUnknownFis[0x40]; // Unkonwn Fis: offset 0x60\r
+ UINT8 AhciUnknownFis[0x40]; // Unknown Fis: offset 0x60\r
UINT8 AhciUnknownFisRsvd[0x60];\r
} EFI_AHCI_RECEIVED_FIS;\r
\r
} EFI_AHCI_COMMAND_PRDT;\r
\r
//\r
-// Command table Data strucute which is pointed to by the entry in the command list\r
+// Command table Data structure which is pointed to by the entry in the command list\r
//\r
typedef struct {\r
EFI_AHCI_COMMAND_FIS CommandFis; // A software constructed FIS.\r
\r
do {\r
//\r
- // Access sytem memory to see if the value is the tested one.\r
+ // Access system memory to see if the value is the tested one.\r
//\r
// The system memory pointed by Address will be updated by the\r
// SATA Host Controller, "volatile" is introduced to prevent\r
}\r
\r
/**\r
- Buid a command FIS.\r
+ Build a command FIS.\r
\r
@param CmdFis A pointer to the EFI_AHCI_COMMAND_FIS data structure.\r
@param AtaCommandBlock A pointer to the AhciBuildCommandFis data structure.\r
}\r
\r
//\r
- // Wait for command compelte\r
+ // Wait for command complete\r
//\r
FisBaseAddr = (UINTN)AhciRegisters->AhciRFis + Port * sizeof (EFI_AHCI_RECEIVED_FIS);\r
Offset = FisBaseAddr + EFI_AHCI_D2H_FIS_OFFSET;\r
\r
PortImplementBitMap = AhciReadReg(PciIo, EFI_AHCI_PI_OFFSET);\r
//\r
- // Get the highest bit of implemented ports which decides how many bytes are allocated for recived FIS.\r
+ // Get the highest bit of implemented ports which decides how many bytes are allocated for received FIS.\r
//\r
MaxPortNumber = (UINT8)(UINTN)(HighBitSet32(PortImplementBitMap) + 1);\r
if (MaxPortNumber == 0) {\r
\r
//\r
// Allocate memory for command list\r
- // Note that the implemenation is a single task model which only use a command list for all ports.\r
+ // Note that the implementation is a single task model which only use a command list for all ports.\r
//\r
Buffer = NULL;\r
MaxCommandListSize = MaxCommandSlotNumber * sizeof (EFI_AHCI_COMMAND_LIST);\r
} else {\r
continue;\r
}\r
- DEBUG ((EFI_D_INFO, "port [%d] port mulitplier [%d] has a [%a]\n",\r
+ DEBUG ((DEBUG_INFO, "port [%d] port multitplier [%d] has a [%a]\n",\r
Port, 0, DeviceType == EfiIdeCdrom ? "cdrom" : "harddisk"));\r
\r
//\r
TransferMode.ModeNumber = (UINT8) (SupportedModes->PioMode.Mode);\r
\r
//\r
- // Set supported DMA mode on this IDE device. Note that UDMA & MDMA cann't\r
+ // Set supported DMA mode on this IDE device. Note that UDMA & MDMA can't\r
// be set together. Only one DMA mode can be set to a device. If setting\r
// DMA mode operation fails, we can continue moving on because we only use\r
// PIO mode at boot time. DMA modes are used by certain kind of OS booting\r
} EFI_AHCI_COMMAND_PRDT;\r
\r
//\r
-// Command table data strucute which is pointed to by the entry in the command list\r
+// Command table data structure which is pointed to by the entry in the command list\r
//\r
typedef struct {\r
EFI_AHCI_COMMAND_FIS CommandFis; // A software constructed FIS.\r
UINT8 AhciD2HRegisterFis[0x14]; // D2H Register Fis: offset 0x40\r
UINT8 AhciD2HRegisterFisRsvd[0x04];\r
UINT64 AhciSetDeviceBitsFis; // Set Device Bits Fix: offset 0x58\r
- UINT8 AhciUnknownFis[0x40]; // Unkonwn Fis: offset 0x60\r
+ UINT8 AhciUnknownFis[0x40]; // Unknown Fis: offset 0x60\r
UINT8 AhciUnknownFisRsvd[0x60];\r
} EFI_AHCI_RECEIVED_FIS;\r
\r
/** @file\r
- This file implements ATA_PASSTHRU_PROCTOCOL and EXT_SCSI_PASSTHRU_PROTOCOL interfaces\r
+ This file implements ATA_PASSTHRU_PROTOCOL and EXT_SCSI_PASSTHRU_PROTOCOL interfaces\r
for managed ATA controllers.\r
\r
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
Instance = (ATA_ATAPI_PASS_THRU_INSTANCE *) Context;\r
EntryHeader = &Instance->NonBlockingTaskList;\r
//\r
- // Get the Taks from the Taks List and execute it, until there is\r
+ // Get the Tasks from the Tasks List and execute it, until there is\r
// no task in the list or the device is busy with task (EFI_NOT_READY).\r
//\r
while (TRUE) {\r
EFI_IDE_CONTROLLER_INIT_PROTOCOL *IdeControllerInit;\r
\r
//\r
- // SATA Controller is a device driver, and should ingore the\r
+ // SATA Controller is a device driver, and should ignore the\r
// "RemainingDevicePath" according to UEFI spec\r
//\r
Status = gBS->OpenProtocol (\r
@retval EFI_SUCCESS The device was started.\r
@retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
- @retval Others The driver failded to start the device.\r
+ @retval Others The driver failed to start the device.\r
\r
**/\r
EFI_STATUS\r
@retval EFI_SUCCESS The device was started.\r
@retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
- @retval Others The driver failded to start the device.\r
+ @retval Others The driver failed to start the device.\r
\r
**/\r
EFI_STATUS\r
);\r
\r
/**\r
- Call back funtion when the timer event is signaled.\r
+ Call back function when the timer event is signaled.\r
\r
@param[in] Event The Event this notify function registered to.\r
@param[in] Context Pointer to the context data registered to the\r
write a 1-byte data to a specific IDE port.\r
\r
@param PciIo A pointer to EFI_PCI_IO_PROTOCOL data structure\r
- @param Port The IDE port to be writen\r
+ @param Port The IDE port to be written\r
@param Data The data to write to the port\r
**/\r
VOID\r
write a 1-word data to a specific IDE port.\r
\r
@param PciIo A pointer to EFI_PCI_IO_PROTOCOL data structure\r
- @param Port The IDE port to be writen\r
+ @param Port The IDE port to be written\r
@param Data The data to write to the port\r
**/\r
VOID\r
write a 2-word data to a specific IDE port.\r
\r
@param PciIo A pointer to EFI_PCI_IO_PROTOCOL data structure\r
- @param Port The IDE port to be writen\r
+ @param Port The IDE port to be written\r
@param Data The data to write to the port\r
**/\r
VOID\r
Table 2. BARs for Register Mapping\r
\r
@param[in] PciIo Pointer to the EFI_PCI_IO_PROTOCOL instance\r
- @param[in, out] IdeRegisters Pointer to EFI_IDE_REGISTERS which is used to\r
+ @param[in, out] IdeRegisters Pointer to EFI_IDE_REGISTERS which is used to\r
store the IDE i/o port registers' base addresses\r
\r
@retval EFI_UNSUPPORTED Return this value when the BARs is not IO type\r
@retval EFI_SUCCESS Get the Base address successfully\r
- @retval Other Read the pci configureation data error\r
+ @retval Other Read the pci configuration data error\r
\r
**/\r
EFI_STATUS\r
Increment = 256;\r
\r
//\r
- // used to record bytes of currently transfered data\r
+ // used to record bytes of currently transferred data\r
//\r
WordCount = 0;\r
\r
RequiredWordCount = *ByteCount >> 1;\r
\r
//\r
- // No data transfer is premitted.\r
+ // No data transfer is permitted.\r
//\r
if (RequiredWordCount == 0) {\r
return EFI_SUCCESS;\r
}\r
\r
//\r
- // Set supported DMA mode on this IDE device. Note that UDMA & MDMA cann't\r
+ // Set supported DMA mode on this IDE device. Note that UDMA & MDMA can't\r
// be set together. Only one DMA mode can be set to a device. If setting\r
// DMA mode operation fails, we can continue moving on because we only use\r
// PIO mode at boot time. DMA modes are used by certain kind of OS booting\r
\r
@retval EFI_UNSUPPORTED Return this value when the BARs is not IO type\r
@retval EFI_SUCCESS Get the Base address successfully\r
- @retval Other Read the pci configureation data error\r
+ @retval Other Read the pci configuration data error\r
\r
**/\r
EFI_STATUS\r
@retval EFI_SUCCESS The device was started.\r
@retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
- @retval Others The driver failded to start the device.\r
+ @retval Others The driver failed to start the device.\r
\r
**/\r
EFI_STATUS\r
@retval EFI_WRITE_PROTECTED The device can not be read/written to.\r
@retval EFI_DEVICE_ERROR The device reported an error while performing the read/write.\r
@retval EFI_NO_MEDIA There is no media in the device.\r
- @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.\r
+ @retval EFI_MEDIA_CHANGED The MediaId does not match the current device.\r
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.\r
@retval EFI_INVALID_PARAMETER The read/write request contains LBAs that are not valid,\r
or the buffer is not on proper alignment.\r
@retval EFI_SUCCESS The data was read correctly from the device.\r
@retval EFI_DEVICE_ERROR The device reported an error while performing the read.\r
@retval EFI_NO_MEDIA There is no media in the device.\r
- @retval EFI_MEDIA_CHANGED The MediaId does not matched the current device.\r
+ @retval EFI_MEDIA_CHANGED The MediaId does not match the current device.\r
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.\r
@retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,\r
or the buffer is not on proper alignment.\r
@retval EFI_WRITE_PROTECTED The device can not be written to.\r
@retval EFI_DEVICE_ERROR The device reported an error while performing the write.\r
@retval EFI_NO_MEDIA There is no media in the device.\r
- @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.\r
+ @retval EFI_MEDIA_CHANGED The MediaId does not match the current device.\r
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.\r
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,\r
or the buffer is not on proper alignment.\r
@retval EFI_WRITE_PROTECTED The device can not be written to.\r
@retval EFI_DEVICE_ERROR The device reported an error while performing the write.\r
@retval EFI_NO_MEDIA There is no media in the device.\r
- @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.\r
+ @retval EFI_MEDIA_CHANGED The MediaId does not match the current device.\r
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.\r
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,\r
or the buffer is not on proper alignment.\r
@retval EFI_SUCCESS The device was started.\r
@retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
- @retval Others The driver failded to start the device.\r
+ @retval Others The driver failed to start the device.\r
\r
**/\r
EFI_STATUS\r
@retval EFI_SUCCESS The data was read correctly from the device.\r
@retval EFI_DEVICE_ERROR The device reported an error while performing the read.\r
@retval EFI_NO_MEDIA There is no media in the device.\r
- @retval EFI_MEDIA_CHANGED The MediaId does not matched the current device.\r
+ @retval EFI_MEDIA_CHANGED The MediaId does not match the current device.\r
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.\r
@retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid,\r
or the buffer is not on proper alignment.\r
@retval EFI_WRITE_PROTECTED The device can not be written to.\r
@retval EFI_DEVICE_ERROR The device reported an error while performing the write.\r
@retval EFI_NO_MEDIA There is no media in the device.\r
- @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.\r
+ @retval EFI_MEDIA_CHANGED The MediaId does not match the current device.\r
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.\r
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,\r
or the buffer is not on proper alignment.\r
);\r
\r
/**\r
- Reset the Block Device throught Block I/O2 protocol.\r
+ Reset the Block Device through Block I/O2 protocol.\r
\r
@param[in] This Indicates a pointer to the calling context.\r
@param[in] ExtendedVerification Driver may perform diagnostics on reset.\r
@retval EFI_WRITE_PROTECTED The device can not be written to.\r
@retval EFI_DEVICE_ERROR The device reported an error while performing the write.\r
@retval EFI_NO_MEDIA There is no media in the device.\r
- @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device.\r
+ @retval EFI_MEDIA_CHANGED The MediaId does not match the current device.\r
@retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device.\r
@retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid,\r
or the buffer is not on proper alignment.\r
Typically, there are 2 mechanism for resetting eDrive. They are:\r
1. TPer Reset through IEEE 1667 protocol.\r
2. TPer Reset through native TCG protocol.\r
- This routine will detect what protocol the attached eDrive comform to, TCG or\r
+ This routine will detect what protocol the attached eDrive conform to, TCG or\r
IEEE 1667 protocol. Then send out TPer Reset command separately.\r
\r
@param[in] AtaDevice ATA_DEVICE pointer.\r
## @file\r
-# ATA Bus driver to enumerate and identfy ATA devices.\r
+# ATA Bus driver to enumerate and identify ATA devices.\r
#\r
# This driver follows UEFI driver model and layers on ATA Pass Thru protocol defined\r
# in UEFI spec 2.2. It installs Block IO and Disk Info protocol for each ATA device\r
// /** @file\r
-// ATA Bus driver to enumerate and identfy ATA devices.\r
+// ATA Bus driver to enumerate and identify ATA devices.\r
//\r
// This driver follows UEFI driver model and layers on ATA Pass Thru protocol defined\r
// in UEFI spec 2.2. It installs Block IO and Disk Info protocol for each ATA device\r
//\r
// As AtaBus is used to manage ATA devices, we have to use the lowest transfer rate to\r
// calculate the possible maximum timeout value for each read/write operation.\r
- // The timout value is rounded up to nearest integar and here an additional 30s is added\r
+ // The timeout value is rounded up to nearest integer and here an additional 30s is added\r
// to follow ATA spec in which it mentioned that the device may take up to 30s to respond\r
// commands in the Standby/Idle mode.\r
//\r
}\r
\r
/**\r
- Call back funtion when the event is signaled.\r
+ Call back function when the event is signaled.\r
\r
@param[in] Event The Event this notify function registered to.\r
@param[in] Context Pointer to the context data registered to the\r