MdeModulePkg: Apply uncrustify changes

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the MdeModulePkg package

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
Michael Kubacki
2021-12-05 14:54:02 -08:00
committed by mergify[bot]
parent 7c7184e201
commit 1436aea4d5
994 changed files with 107608 additions and 101311 deletions

View File

@@ -18,14 +18,13 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gUfsPassThruComponent
//
// EFI Component Name 2 Protocol
//
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gUfsPassThruComponentName2 = {
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) UfsPassThruComponentNameGetDriverName,
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) UfsPassThruComponentNameGetControllerName,
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gUfsPassThruComponentName2 = {
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME)UfsPassThruComponentNameGetDriverName,
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)UfsPassThruComponentNameGetControllerName,
"en"
};
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUfsPassThruDriverNameTable[] = {
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUfsPassThruDriverNameTable[] = {
{
"eng;en",
L"Universal Flash Storage (UFS) Pass Thru Driver"
@@ -36,7 +35,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUfsPassThruDriverNameTab
}
};
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUfsPassThruControllerNameTable[] = {
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUfsPassThruControllerNameTable[] = {
{
"eng;en",
L"Universal Flash Storage (UFS) Host Controller"
@@ -174,16 +173,16 @@ UfsPassThruComponentNameGetDriverName (
EFI_STATUS
EFIAPI
UfsPassThruComponentNameGetControllerName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
)
{
EFI_STATUS Status;
EFI_STATUS Status;
if (Language == NULL || ControllerName == NULL) {
if ((Language == NULL) || (ControllerName == NULL)) {
return EFI_INVALID_PARAMETER;
}

View File

@@ -34,17 +34,17 @@
EFI_STATUS
EFIAPI
UfsRwUfsDescriptor (
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
IN BOOLEAN Read,
IN UINT8 DescId,
IN UINT8 Index,
IN UINT8 Selector,
IN OUT UINT8 *Descriptor,
IN OUT UINT32 *DescSize
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
IN BOOLEAN Read,
IN UINT8 DescId,
IN UINT8 Index,
IN UINT8 Selector,
IN OUT UINT8 *Descriptor,
IN OUT UINT32 *DescSize
)
{
EFI_STATUS Status;
UFS_PASS_THRU_PRIVATE_DATA *Private;
EFI_STATUS Status;
UFS_PASS_THRU_PRIVATE_DATA *Private;
Private = UFS_PASS_THRU_PRIVATE_DATA_FROM_DEV_CONFIG (This);
@@ -64,6 +64,7 @@ UfsRwUfsDescriptor (
if (Status == EFI_TIMEOUT) {
Status = EFI_DEVICE_ERROR;
}
return Status;
}
@@ -88,14 +89,14 @@ UfsRwUfsDescriptor (
EFI_STATUS
EFIAPI
UfsRwUfsFlag (
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
IN BOOLEAN Read,
IN UINT8 FlagId,
IN OUT UINT8 *Flag
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
IN BOOLEAN Read,
IN UINT8 FlagId,
IN OUT UINT8 *Flag
)
{
EFI_STATUS Status;
UFS_PASS_THRU_PRIVATE_DATA *Private;
EFI_STATUS Status;
UFS_PASS_THRU_PRIVATE_DATA *Private;
Private = UFS_PASS_THRU_PRIVATE_DATA_FROM_DEV_CONFIG (This);
@@ -107,6 +108,7 @@ UfsRwUfsFlag (
if (Status == EFI_TIMEOUT) {
Status = EFI_DEVICE_ERROR;
}
return Status;
}
@@ -136,20 +138,20 @@ UfsRwUfsFlag (
EFI_STATUS
EFIAPI
UfsRwUfsAttribute (
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
IN BOOLEAN Read,
IN UINT8 AttrId,
IN UINT8 Index,
IN UINT8 Selector,
IN OUT UINT8 *Attribute,
IN OUT UINT32 *AttrSize
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
IN BOOLEAN Read,
IN UINT8 AttrId,
IN UINT8 Index,
IN UINT8 Selector,
IN OUT UINT8 *Attribute,
IN OUT UINT32 *AttrSize
)
{
EFI_STATUS Status;
UFS_PASS_THRU_PRIVATE_DATA *Private;
UINT32 Attribute32;
EFI_STATUS Status;
UFS_PASS_THRU_PRIVATE_DATA *Private;
UINT32 Attribute32;
Private = UFS_PASS_THRU_PRIVATE_DATA_FROM_DEV_CONFIG (This);
Private = UFS_PASS_THRU_PRIVATE_DATA_FROM_DEV_CONFIG (This);
Attribute32 = 0;
if ((This == NULL) || (Attribute == NULL) || (AttrSize == NULL)) {
@@ -186,5 +188,6 @@ UfsRwUfsAttribute (
Status = EFI_DEVICE_ERROR;
}
}
return Status;
}

View File

@@ -11,9 +11,9 @@
//
// Template for Ufs Pass Thru private data.
//
UFS_PASS_THRU_PRIVATE_DATA gUfsPassThruTemplate = {
UFS_PASS_THRU_SIG, // Signature
NULL, // Handle
UFS_PASS_THRU_PRIVATE_DATA gUfsPassThruTemplate = {
UFS_PASS_THRU_SIG, // Signature
NULL, // Handle
{ // ExtScsiPassThruMode
0xFFFFFFFF,
EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_PHYSICAL | EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_LOGICAL | EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_NONBLOCKIO,
@@ -34,17 +34,17 @@ UFS_PASS_THRU_PRIVATE_DATA gUfsPassThruTemplate = {
UfsRwUfsFlag,
UfsRwUfsAttribute
},
0, // UfsHostController
0, // UfsHcBase
{0, 0}, // UfsHcInfo
{NULL, NULL}, // UfsHcDriverInterface
0, // TaskTag
0, // UtpTrlBase
0, // Nutrs
0, // TrlMapping
0, // UtpTmrlBase
0, // Nutmrs
0, // TmrlMapping
0, // UfsHostController
0, // UfsHcBase
{ 0, 0 }, // UfsHcInfo
{ NULL, NULL }, // UfsHcDriverInterface
0, // TaskTag
0, // UtpTrlBase
0, // Nutrs
0, // TrlMapping
0, // UtpTmrlBase
0, // Nutmrs
0, // TmrlMapping
{ // Luns
{
UFS_LUN_0, // Ufs Common Lun 0
@@ -60,17 +60,17 @@ UFS_PASS_THRU_PRIVATE_DATA gUfsPassThruTemplate = {
UFS_WLUN_BOOT, // Ufs Boot Well Known Lun
UFS_WLUN_RPMB // RPMB Well Known Lun
},
0x0000, // By default don't expose any Luns.
0x0000, // By default don't expose any Luns.
0x0
},
NULL, // TimerEvent
NULL, // TimerEvent
{ // Queue
NULL,
NULL
}
};
EFI_DRIVER_BINDING_PROTOCOL gUfsPassThruDriverBinding = {
EFI_DRIVER_BINDING_PROTOCOL gUfsPassThruDriverBinding = {
UfsPassThruDriverBindingSupported,
UfsPassThruDriverBindingStart,
UfsPassThruDriverBindingStop,
@@ -79,20 +79,20 @@ EFI_DRIVER_BINDING_PROTOCOL gUfsPassThruDriverBinding = {
NULL
};
UFS_DEVICE_PATH mUfsDevicePathTemplate = {
UFS_DEVICE_PATH mUfsDevicePathTemplate = {
{
MESSAGING_DEVICE_PATH,
MSG_UFS_DP,
{
(UINT8) (sizeof (UFS_DEVICE_PATH)),
(UINT8) ((sizeof (UFS_DEVICE_PATH)) >> 8)
(UINT8)(sizeof (UFS_DEVICE_PATH)),
(UINT8)((sizeof (UFS_DEVICE_PATH)) >> 8)
}
},
0,
0
};
UINT8 mUfsTargetId[TARGET_MAX_BYTES];
UINT8 mUfsTargetId[TARGET_MAX_BYTES];
GLOBAL_REMOVE_IF_UNREFERENCED EDKII_UFS_HC_PLATFORM_PROTOCOL *mUfsHcPlatform;
@@ -140,17 +140,17 @@ GLOBAL_REMOVE_IF_UNREFERENCED EDKII_UFS_HC_PLATFORM_PROTOCOL *mUfsHcPlatform;
EFI_STATUS
EFIAPI
UfsPassThruPassThru (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun,
IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,
IN EFI_EVENT Event OPTIONAL
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun,
IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,
IN EFI_EVENT Event OPTIONAL
)
{
EFI_STATUS Status;
UFS_PASS_THRU_PRIVATE_DATA *Private;
UINT8 UfsLun;
UINT16 Index;
EFI_STATUS Status;
UFS_PASS_THRU_PRIVATE_DATA *Private;
UINT8 UfsLun;
UINT16 Index;
Private = UFS_PASS_THRU_PRIVATE_DATA_FROM_THIS (This);
@@ -162,7 +162,8 @@ UfsPassThruPassThru (
// Don't support variable length CDB
//
if ((Packet->CdbLength != 6) && (Packet->CdbLength != 10) &&
(Packet->CdbLength != 12) && (Packet->CdbLength != 16)) {
(Packet->CdbLength != 12) && (Packet->CdbLength != 16))
{
return EFI_INVALID_PARAMETER;
}
@@ -170,15 +171,15 @@ UfsPassThruPassThru (
return EFI_INVALID_PARAMETER;
}
if ((This->Mode->IoAlign > 1) && !IS_ALIGNED(Packet->InDataBuffer, This->Mode->IoAlign)) {
if ((This->Mode->IoAlign > 1) && !IS_ALIGNED (Packet->InDataBuffer, This->Mode->IoAlign)) {
return EFI_INVALID_PARAMETER;
}
if ((This->Mode->IoAlign > 1) && !IS_ALIGNED(Packet->OutDataBuffer, This->Mode->IoAlign)) {
if ((This->Mode->IoAlign > 1) && !IS_ALIGNED (Packet->OutDataBuffer, This->Mode->IoAlign)) {
return EFI_INVALID_PARAMETER;
}
if ((This->Mode->IoAlign > 1) && !IS_ALIGNED(Packet->SenseData, This->Mode->IoAlign)) {
if ((This->Mode->IoAlign > 1) && !IS_ALIGNED (Packet->SenseData, This->Mode->IoAlign)) {
return EFI_INVALID_PARAMETER;
}
@@ -186,7 +187,7 @@ UfsPassThruPassThru (
// For UFS 2.0 compatible device, 0 is always used to represent the location of the UFS device.
//
SetMem (mUfsTargetId, TARGET_MAX_BYTES, 0x00);
if ((Target == NULL) || (CompareMem(Target, mUfsTargetId, TARGET_MAX_BYTES) != 0)) {
if ((Target == NULL) || (CompareMem (Target, mUfsTargetId, TARGET_MAX_BYTES) != 0)) {
return EFI_INVALID_PARAMETER;
}
@@ -196,9 +197,9 @@ UfsPassThruPassThru (
// The second 8 bits of the 64-bit address saves the corresponding 8-bit UFS LUN.
//
if ((UINT8)Lun == UFS_WLUN_PREFIX) {
UfsLun = BIT7 | (((UINT8*)&Lun)[1] & 0xFF);
UfsLun = BIT7 | (((UINT8 *)&Lun)[1] & 0xFF);
} else if ((UINT8)Lun == 0) {
UfsLun = ((UINT8*)&Lun)[1] & 0xFF;
UfsLun = ((UINT8 *)&Lun)[1] & 0xFF;
} else {
return EFI_INVALID_PARAMETER;
}
@@ -251,19 +252,19 @@ UfsPassThruPassThru (
EFI_STATUS
EFIAPI
UfsPassThruGetNextTargetLun (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN OUT UINT8 **Target,
IN OUT UINT64 *Lun
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN OUT UINT8 **Target,
IN OUT UINT64 *Lun
)
{
UFS_PASS_THRU_PRIVATE_DATA *Private;
UINT8 UfsLun;
UINT16 Index;
UINT16 Next;
UFS_PASS_THRU_PRIVATE_DATA *Private;
UINT8 UfsLun;
UINT16 Index;
UINT16 Next;
Private = UFS_PASS_THRU_PRIVATE_DATA_FROM_THIS (This);
if (Target == NULL || Lun == NULL) {
if ((Target == NULL) || (Lun == NULL)) {
return EFI_INVALID_PARAMETER;
}
@@ -284,14 +285,16 @@ UfsPassThruGetNextTargetLun (
break;
}
}
if (Index != UFS_MAX_LUNS) {
*Lun = 0;
if ((UfsLun & BIT7) == BIT7) {
((UINT8*)Lun)[0] = UFS_WLUN_PREFIX;
((UINT8*)Lun)[1] = UfsLun & ~BIT7;
((UINT8 *)Lun)[0] = UFS_WLUN_PREFIX;
((UINT8 *)Lun)[1] = UfsLun & ~BIT7;
} else {
((UINT8*)Lun)[1] = UfsLun;
((UINT8 *)Lun)[1] = UfsLun;
}
return EFI_SUCCESS;
} else {
return EFI_NOT_FOUND;
@@ -300,10 +303,10 @@ UfsPassThruGetNextTargetLun (
SetMem (mUfsTargetId, TARGET_MAX_BYTES, 0x00);
if (CompareMem (*Target, mUfsTargetId, TARGET_MAX_BYTES) == 0) {
if (((UINT8*)Lun)[0] == UFS_WLUN_PREFIX) {
UfsLun = BIT7 | (((UINT8*)Lun)[1] & 0xFF);
} else if (((UINT8*)Lun)[0] == 0) {
UfsLun = ((UINT8*)Lun)[1] & 0xFF;
if (((UINT8 *)Lun)[0] == UFS_WLUN_PREFIX) {
UfsLun = BIT7 | (((UINT8 *)Lun)[1] & 0xFF);
} else if (((UINT8 *)Lun)[0] == 0) {
UfsLun = ((UINT8 *)Lun)[1] & 0xFF;
} else {
return EFI_NOT_FOUND;
}
@@ -334,11 +337,12 @@ UfsPassThruGetNextTargetLun (
if (Index != UFS_MAX_LUNS) {
*Lun = 0;
if ((UfsLun & BIT7) == BIT7) {
((UINT8*)Lun)[0] = UFS_WLUN_PREFIX;
((UINT8*)Lun)[1] = UfsLun & ~BIT7;
((UINT8 *)Lun)[0] = UFS_WLUN_PREFIX;
((UINT8 *)Lun)[1] = UfsLun & ~BIT7;
} else {
((UINT8*)Lun)[1] = UfsLun;
((UINT8 *)Lun)[1] = UfsLun;
}
return EFI_SUCCESS;
} else {
return EFI_NOT_FOUND;
@@ -378,16 +382,16 @@ UfsPassThruGetNextTargetLun (
EFI_STATUS
EFIAPI
UfsPassThruBuildDevicePath (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun,
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun,
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
)
{
UFS_PASS_THRU_PRIVATE_DATA *Private;
EFI_DEV_PATH *DevicePathNode;
UINT8 UfsLun;
UINT16 Index;
UFS_PASS_THRU_PRIVATE_DATA *Private;
EFI_DEV_PATH *DevicePathNode;
UINT8 UfsLun;
UINT16 Index;
Private = UFS_PASS_THRU_PRIVATE_DATA_FROM_THIS (This);
@@ -400,9 +404,9 @@ UfsPassThruBuildDevicePath (
}
if ((UINT8)Lun == UFS_WLUN_PREFIX) {
UfsLun = BIT7 | (((UINT8*)&Lun)[1] & 0xFF);
UfsLun = BIT7 | (((UINT8 *)&Lun)[1] & 0xFF);
} else if ((UINT8)Lun == 0) {
UfsLun = ((UINT8*)&Lun)[1] & 0xFF;
UfsLun = ((UINT8 *)&Lun)[1] & 0xFF;
} else {
return EFI_NOT_FOUND;
}
@@ -429,7 +433,7 @@ UfsPassThruBuildDevicePath (
DevicePathNode->Ufs.Pun = 0;
DevicePathNode->Ufs.Lun = UfsLun;
*DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) DevicePathNode;
*DevicePath = (EFI_DEVICE_PATH_PROTOCOL *)DevicePathNode;
return EFI_SUCCESS;
}
@@ -456,24 +460,24 @@ UfsPassThruBuildDevicePath (
EFI_STATUS
EFIAPI
UfsPassThruGetTargetLun (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
OUT UINT8 **Target,
OUT UINT64 *Lun
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
OUT UINT8 **Target,
OUT UINT64 *Lun
)
{
UFS_PASS_THRU_PRIVATE_DATA *Private;
EFI_DEV_PATH *DevicePathNode;
UINT8 Pun;
UINT8 UfsLun;
UINT16 Index;
UFS_PASS_THRU_PRIVATE_DATA *Private;
EFI_DEV_PATH *DevicePathNode;
UINT8 Pun;
UINT8 UfsLun;
UINT16 Index;
Private = UFS_PASS_THRU_PRIVATE_DATA_FROM_THIS (This);
//
// Validate parameters passed in.
//
if (DevicePath == NULL || Target == NULL || Lun == NULL) {
if ((DevicePath == NULL) || (Target == NULL) || (Lun == NULL)) {
return EFI_INVALID_PARAMETER;
}
@@ -485,14 +489,15 @@ UfsPassThruGetTargetLun (
// Check whether the DevicePath belongs to UFS_DEVICE_PATH
//
if ((DevicePath->Type != MESSAGING_DEVICE_PATH) || (DevicePath->SubType != MSG_UFS_DP) ||
(DevicePathNodeLength(DevicePath) != sizeof(UFS_DEVICE_PATH))) {
(DevicePathNodeLength (DevicePath) != sizeof (UFS_DEVICE_PATH)))
{
return EFI_UNSUPPORTED;
}
DevicePathNode = (EFI_DEV_PATH *) DevicePath;
DevicePathNode = (EFI_DEV_PATH *)DevicePath;
Pun = (UINT8) DevicePathNode->Ufs.Pun;
UfsLun = (UINT8) DevicePathNode->Ufs.Lun;
Pun = (UINT8)DevicePathNode->Ufs.Pun;
UfsLun = (UINT8)DevicePathNode->Ufs.Lun;
if (Pun != 0) {
return EFI_NOT_FOUND;
@@ -515,11 +520,12 @@ UfsPassThruGetTargetLun (
SetMem (*Target, TARGET_MAX_BYTES, 0x00);
*Lun = 0;
if ((UfsLun & BIT7) == BIT7) {
((UINT8*)Lun)[0] = UFS_WLUN_PREFIX;
((UINT8*)Lun)[1] = UfsLun & ~BIT7;
((UINT8 *)Lun)[0] = UFS_WLUN_PREFIX;
((UINT8 *)Lun)[1] = UfsLun & ~BIT7;
} else {
((UINT8*)Lun)[1] = UfsLun;
((UINT8 *)Lun)[1] = UfsLun;
}
return EFI_SUCCESS;
}
@@ -537,7 +543,7 @@ UfsPassThruGetTargetLun (
EFI_STATUS
EFIAPI
UfsPassThruResetChannel (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This
)
{
//
@@ -568,9 +574,9 @@ UfsPassThruResetChannel (
EFI_STATUS
EFIAPI
UfsPassThruResetTargetLun (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun
)
{
//
@@ -604,16 +610,16 @@ UfsPassThruResetTargetLun (
EFI_STATUS
EFIAPI
UfsPassThruGetNextTarget (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN OUT UINT8 **Target
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN OUT UINT8 **Target
)
{
if (Target == NULL || *Target == NULL) {
if ((Target == NULL) || (*Target == NULL)) {
return EFI_INVALID_PARAMETER;
}
SetMem (mUfsTargetId, TARGET_MAX_BYTES, 0xFF);
if (CompareMem(*Target, mUfsTargetId, TARGET_MAX_BYTES) == 0) {
if (CompareMem (*Target, mUfsTargetId, TARGET_MAX_BYTES) == 0) {
SetMem (*Target, TARGET_MAX_BYTES, 0x00);
return EFI_SUCCESS;
}
@@ -666,14 +672,14 @@ UfsPassThruGetNextTarget (
EFI_STATUS
EFIAPI
UfsPassThruDriverBindingSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
{
EFI_STATUS Status;
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHostController;
EFI_STATUS Status;
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHostController;
//
// Ufs Pass Thru driver is a device driver, and should ingore the
@@ -682,7 +688,7 @@ UfsPassThruDriverBindingSupported (
Status = gBS->OpenProtocol (
Controller,
&gEfiDevicePathProtocolGuid,
(VOID *) &ParentDevicePath,
(VOID *)&ParentDevicePath,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -693,20 +699,21 @@ UfsPassThruDriverBindingSupported (
//
return Status;
}
//
// Close the protocol because we don't use it here
//
gBS->CloseProtocol (
Controller,
&gEfiDevicePathProtocolGuid,
This->DriverBindingHandle,
Controller
);
Controller,
&gEfiDevicePathProtocolGuid,
This->DriverBindingHandle,
Controller
);
Status = gBS->OpenProtocol (
Controller,
&gEdkiiUfsHostControllerProtocolGuid,
(VOID **) &UfsHostController,
(VOID **)&UfsHostController,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -723,11 +730,11 @@ UfsPassThruDriverBindingSupported (
// Close the I/O Abstraction(s) used to perform the supported test
//
gBS->CloseProtocol (
Controller,
&gEdkiiUfsHostControllerProtocolGuid,
This->DriverBindingHandle,
Controller
);
Controller,
&gEdkiiUfsHostControllerProtocolGuid,
This->DriverBindingHandle,
Controller
);
return EFI_SUCCESS;
}
@@ -748,8 +755,8 @@ UfsFinishDeviceInitialization (
)
{
EFI_STATUS Status;
UINT8 DeviceInitStatus;
UINT32 Timeout;
UINT8 DeviceInitStatus;
UINT32 Timeout;
DeviceInitStatus = 0xFF;
@@ -770,6 +777,7 @@ UfsFinishDeviceInitialization (
if (EFI_ERROR (Status)) {
return Status;
}
MicroSecondDelay (1);
Timeout--;
} while (DeviceInitStatus != 0 && Timeout != 0);
@@ -821,20 +829,20 @@ UfsFinishDeviceInitialization (
EFI_STATUS
EFIAPI
UfsPassThruDriverBindingStart (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
{
EFI_STATUS Status;
EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHc;
UFS_PASS_THRU_PRIVATE_DATA *Private;
UINTN UfsHcBase;
UINT32 Index;
UFS_UNIT_DESC UnitDescriptor;
UFS_DEV_DESC DeviceDescriptor;
UINT32 UnitDescriptorSize;
UINT32 DeviceDescriptorSize;
EFI_STATUS Status;
EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHc;
UFS_PASS_THRU_PRIVATE_DATA *Private;
UINTN UfsHcBase;
UINT32 Index;
UFS_UNIT_DESC UnitDescriptor;
UFS_DEV_DESC DeviceDescriptor;
UINT32 UnitDescriptorSize;
UINT32 DeviceDescriptorSize;
Status = EFI_SUCCESS;
UfsHc = NULL;
@@ -843,14 +851,14 @@ UfsPassThruDriverBindingStart (
DEBUG ((DEBUG_INFO, "==UfsPassThru Start== Controller = %x\n", Controller));
Status = gBS->OpenProtocol (
Controller,
&gEdkiiUfsHostControllerProtocolGuid,
(VOID **) &UfsHc,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
Status = gBS->OpenProtocol (
Controller,
&gEdkiiUfsHostControllerProtocolGuid,
(VOID **)&UfsHc,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "Open Ufs Host Controller Protocol Error, Status = %r\n", Status));
@@ -876,11 +884,11 @@ UfsPassThruDriverBindingStart (
goto Error;
}
Private->ExtScsiPassThru.Mode = &Private->ExtScsiPassThruMode;
Private->UfsHostController = UfsHc;
Private->UfsHcBase = UfsHcBase;
Private->Handle = Controller;
Private->UfsHcDriverInterface.UfsHcProtocol = UfsHc;
Private->ExtScsiPassThru.Mode = &Private->ExtScsiPassThruMode;
Private->UfsHostController = UfsHc;
Private->UfsHcBase = UfsHcBase;
Private->Handle = Controller;
Private->UfsHcDriverInterface.UfsHcProtocol = UfsHc;
Private->UfsHcDriverInterface.UfsExecUicCommand = UfsHcDriverInterfaceExecUicCommand;
InitializeListHead (&Private->Queue);
@@ -888,7 +896,7 @@ UfsPassThruDriverBindingStart (
// This has to be done before initializing UfsHcInfo or calling the UfsControllerInit
//
if (mUfsHcPlatform == NULL) {
Status = gBS->LocateProtocol (&gEdkiiUfsHcPlatformProtocolGuid, NULL, (VOID**)&mUfsHcPlatform);
Status = gBS->LocateProtocol (&gEdkiiUfsHcPlatformProtocolGuid, NULL, (VOID **)&mUfsHcPlatform);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_INFO, "No UfsHcPlatformProtocol present\n"));
}
@@ -931,11 +939,12 @@ UfsPassThruDriverBindingStart (
//
UnitDescriptorSize = sizeof (UFS_UNIT_DESC);
for (Index = 0; Index < 8; Index++) {
Status = UfsRwDeviceDesc (Private, TRUE, UfsUnitDesc, (UINT8) Index, 0, &UnitDescriptor, &UnitDescriptorSize);
Status = UfsRwDeviceDesc (Private, TRUE, UfsUnitDesc, (UINT8)Index, 0, &UnitDescriptor, &UnitDescriptorSize);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "Failed to read unit descriptor, index = %X, status = %r\n", Index, Status));
continue;
}
if (UnitDescriptor.LunEn == 0x1) {
DEBUG ((DEBUG_INFO, "UFS LUN %X is enabled\n", Index));
Private->Luns.BitMask |= (BIT0 << Index);
@@ -946,7 +955,7 @@ UfsPassThruDriverBindingStart (
// Check if RPMB WLUN is supported and set corresponding bit mask.
//
DeviceDescriptorSize = sizeof (UFS_DEV_DESC);
Status = UfsRwDeviceDesc (Private, TRUE, UfsDeviceDesc, 0, 0, &DeviceDescriptor, &DeviceDescriptorSize);
Status = UfsRwDeviceDesc (Private, TRUE, UfsDeviceDesc, 0, 0, &DeviceDescriptor, &DeviceDescriptorSize);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "Failed to read device descriptor, status = %r\n", Status));
} else {
@@ -998,6 +1007,7 @@ Error:
if (Private->TmrlMapping != NULL) {
UfsHc->Unmap (UfsHc, Private->TmrlMapping);
}
if (Private->UtpTmrlBase != NULL) {
UfsHc->FreeBuffer (UfsHc, EFI_SIZE_TO_PAGES (Private->Nutmrs * sizeof (UTP_TMRD)), Private->UtpTmrlBase);
}
@@ -1005,6 +1015,7 @@ Error:
if (Private->TrlMapping != NULL) {
UfsHc->Unmap (UfsHc, Private->TrlMapping);
}
if (Private->UtpTrlBase != NULL) {
UfsHc->FreeBuffer (UfsHc, EFI_SIZE_TO_PAGES (Private->Nutrs * sizeof (UTP_TMRD)), Private->UtpTrlBase);
}
@@ -1057,26 +1068,26 @@ Error:
EFI_STATUS
EFIAPI
UfsPassThruDriverBindingStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
{
EFI_STATUS Status;
UFS_PASS_THRU_PRIVATE_DATA *Private;
EFI_EXT_SCSI_PASS_THRU_PROTOCOL *ExtScsiPassThru;
EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHc;
UFS_PASS_THRU_TRANS_REQ *TransReq;
LIST_ENTRY *Entry;
LIST_ENTRY *NextEntry;
EFI_STATUS Status;
UFS_PASS_THRU_PRIVATE_DATA *Private;
EFI_EXT_SCSI_PASS_THRU_PROTOCOL *ExtScsiPassThru;
EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHc;
UFS_PASS_THRU_TRANS_REQ *TransReq;
LIST_ENTRY *Entry;
LIST_ENTRY *NextEntry;
DEBUG ((DEBUG_INFO, "==UfsPassThru Stop== Controller Controller = %x\n", Controller));
Status = gBS->OpenProtocol (
Controller,
&gEfiExtScsiPassThruProtocolGuid,
(VOID **) &ExtScsiPassThru,
(VOID **)&ExtScsiPassThru,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
@@ -1092,9 +1103,9 @@ UfsPassThruDriverBindingStop (
//
// Cleanup the resources of I/O requests in the async I/O queue
//
if (!IsListEmpty(&Private->Queue)) {
if (!IsListEmpty (&Private->Queue)) {
BASE_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Private->Queue) {
TransReq = UFS_PASS_THRU_TRANS_REQ_FROM_THIS (Entry);
TransReq = UFS_PASS_THRU_TRANS_REQ_FROM_THIS (Entry);
//
// TODO: Should find/add a proper host adapter return status for this
@@ -1129,6 +1140,7 @@ UfsPassThruDriverBindingStop (
if (Private->TmrlMapping != NULL) {
UfsHc->Unmap (UfsHc, Private->TmrlMapping);
}
if (Private->UtpTmrlBase != NULL) {
UfsHc->FreeBuffer (UfsHc, EFI_SIZE_TO_PAGES (Private->Nutmrs * sizeof (UTP_TMRD)), Private->UtpTmrlBase);
}
@@ -1136,6 +1148,7 @@ UfsPassThruDriverBindingStop (
if (Private->TrlMapping != NULL) {
UfsHc->Unmap (UfsHc, Private->TrlMapping);
}
if (Private->UtpTrlBase != NULL) {
UfsHc->FreeBuffer (UfsHc, EFI_SIZE_TO_PAGES (Private->Nutrs * sizeof (UTP_TMRD)), Private->UtpTrlBase);
}
@@ -1159,7 +1172,6 @@ UfsPassThruDriverBindingStop (
return Status;
}
/**
The user Entry Point for module UfsPassThru. The user code starts with this function.
@@ -1173,11 +1185,11 @@ UfsPassThruDriverBindingStop (
EFI_STATUS
EFIAPI
InitializeUfsPassThru (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_STATUS Status;
EFI_STATUS Status;
//
// Install driver model protocol(s).

View File

@@ -28,7 +28,7 @@
#include "UfsPassThruHci.h"
#define UFS_PASS_THRU_SIG SIGNATURE_32 ('U', 'F', 'S', 'P')
#define UFS_PASS_THRU_SIG SIGNATURE_32 ('U', 'F', 'S', 'P')
//
// Lun 0~7 is for 8 common luns.
@@ -38,46 +38,46 @@
// Lun 10: BOOT
// Lun 11: RPMB
//
#define UFS_MAX_LUNS 12
#define UFS_WLUN_PREFIX 0xC1
#define UFS_INIT_COMPLETION_TIMEOUT 600000
#define UFS_MAX_LUNS 12
#define UFS_WLUN_PREFIX 0xC1
#define UFS_INIT_COMPLETION_TIMEOUT 600000
typedef struct {
UINT8 Lun[UFS_MAX_LUNS];
UINT16 BitMask:12; // Bit 0~7 is 1/1 mapping to common luns. Bit 8~11 is 1/1 mapping to well-known luns.
UINT16 Rsvd:4;
UINT8 Lun[UFS_MAX_LUNS];
UINT16 BitMask : 12; // Bit 0~7 is 1/1 mapping to common luns. Bit 8~11 is 1/1 mapping to well-known luns.
UINT16 Rsvd : 4;
} UFS_EXPOSED_LUNS;
typedef struct _UFS_PASS_THRU_PRIVATE_DATA {
UINT32 Signature;
EFI_HANDLE Handle;
EFI_EXT_SCSI_PASS_THRU_MODE ExtScsiPassThruMode;
EFI_EXT_SCSI_PASS_THRU_PROTOCOL ExtScsiPassThru;
EFI_UFS_DEVICE_CONFIG_PROTOCOL UfsDevConfig;
EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHostController;
UINTN UfsHcBase;
EDKII_UFS_HC_INFO UfsHcInfo;
EDKII_UFS_HC_DRIVER_INTERFACE UfsHcDriverInterface;
UINT32 Signature;
EFI_HANDLE Handle;
EFI_EXT_SCSI_PASS_THRU_MODE ExtScsiPassThruMode;
EFI_EXT_SCSI_PASS_THRU_PROTOCOL ExtScsiPassThru;
EFI_UFS_DEVICE_CONFIG_PROTOCOL UfsDevConfig;
EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHostController;
UINTN UfsHcBase;
EDKII_UFS_HC_INFO UfsHcInfo;
EDKII_UFS_HC_DRIVER_INTERFACE UfsHcDriverInterface;
UINT8 TaskTag;
UINT8 TaskTag;
VOID *UtpTrlBase;
UINT8 Nutrs;
VOID *TrlMapping;
VOID *UtpTmrlBase;
UINT8 Nutmrs;
VOID *TmrlMapping;
VOID *UtpTrlBase;
UINT8 Nutrs;
VOID *TrlMapping;
VOID *UtpTmrlBase;
UINT8 Nutmrs;
VOID *TmrlMapping;
UFS_EXPOSED_LUNS Luns;
UFS_EXPOSED_LUNS Luns;
//
// For Non-blocking operation.
//
EFI_EVENT TimerEvent;
LIST_ENTRY Queue;
EFI_EVENT TimerEvent;
LIST_ENTRY Queue;
} UFS_PASS_THRU_PRIVATE_DATA;
#define UFS_PASS_THRU_TRANS_REQ_SIG SIGNATURE_32 ('U', 'F', 'S', 'T')
#define UFS_PASS_THRU_TRANS_REQ_SIG SIGNATURE_32 ('U', 'F', 'S', 'T')
typedef struct {
UINT32 Signature;
@@ -100,12 +100,12 @@ typedef struct {
#define UFS_PASS_THRU_TRANS_REQ_FROM_THIS(a) \
CR(a, UFS_PASS_THRU_TRANS_REQ, TransferList, UFS_PASS_THRU_TRANS_REQ_SIG)
#define UFS_TIMEOUT EFI_TIMER_PERIOD_SECONDS(3)
#define UFS_HC_ASYNC_TIMER EFI_TIMER_PERIOD_MILLISECONDS(1)
#define UFS_TIMEOUT EFI_TIMER_PERIOD_SECONDS(3)
#define UFS_HC_ASYNC_TIMER EFI_TIMER_PERIOD_MILLISECONDS(1)
#define ROUNDUP8(x) (((x) % 8 == 0) ? (x) : ((x) / 8 + 1) * 8)
#define ROUNDUP8(x) (((x) % 8 == 0) ? (x) : ((x) / 8 + 1) * 8)
#define IS_ALIGNED(addr, size) (((UINTN) (addr) & (size - 1)) == 0)
#define IS_ALIGNED(addr, size) (((UINTN) (addr) & (size - 1)) == 0)
#define UFS_PASS_THRU_PRIVATE_DATA_FROM_THIS(a) \
CR (a, \
@@ -129,19 +129,20 @@ typedef struct {
)
typedef struct _UFS_DEVICE_MANAGEMENT_REQUEST_PACKET {
UINT64 Timeout;
VOID *DataBuffer;
UINT8 Opcode;
UINT8 DescId;
UINT8 Index;
UINT8 Selector;
UINT32 TransferLength;
UINT8 DataDirection;
UINT64 Timeout;
VOID *DataBuffer;
UINT8 Opcode;
UINT8 DescId;
UINT8 Index;
UINT8 Selector;
UINT32 TransferLength;
UINT8 DataDirection;
} UFS_DEVICE_MANAGEMENT_REQUEST_PACKET;
//
// function prototype
//
/**
Tests to see if this driver supports a given controller. If a child device is provided,
it further tests to see if this driver supports creating a handle for the specified child device.
@@ -264,15 +265,16 @@ UfsPassThruDriverBindingStart (
EFI_STATUS
EFIAPI
UfsPassThruDriverBindingStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
);
//
// EFI Component Name Functions
//
/**
Retrieves a Unicode string that is the user readable name of the driver.
@@ -320,7 +322,6 @@ UfsPassThruComponentNameGetDriverName (
OUT CHAR16 **DriverName
);
/**
Retrieves a Unicode string that is the user readable name of the controller
that is being managed by a driver.
@@ -392,11 +393,11 @@ UfsPassThruComponentNameGetDriverName (
EFI_STATUS
EFIAPI
UfsPassThruComponentNameGetControllerName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
);
/**
@@ -443,11 +444,11 @@ UfsPassThruComponentNameGetControllerName (
EFI_STATUS
EFIAPI
UfsPassThruPassThru (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun,
IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,
IN EFI_EVENT Event OPTIONAL
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun,
IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,
IN EFI_EVENT Event OPTIONAL
);
/**
@@ -479,9 +480,9 @@ UfsPassThruPassThru (
EFI_STATUS
EFIAPI
UfsPassThruGetNextTargetLun (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN OUT UINT8 **Target,
IN OUT UINT64 *Lun
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN OUT UINT8 **Target,
IN OUT UINT64 *Lun
);
/**
@@ -514,10 +515,10 @@ UfsPassThruGetNextTargetLun (
EFI_STATUS
EFIAPI
UfsPassThruBuildDevicePath (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun,
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun,
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
);
/**
@@ -542,10 +543,10 @@ UfsPassThruBuildDevicePath (
EFI_STATUS
EFIAPI
UfsPassThruGetTargetLun (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
OUT UINT8 **Target,
OUT UINT64 *Lun
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
OUT UINT8 **Target,
OUT UINT64 *Lun
);
/**
@@ -562,7 +563,7 @@ UfsPassThruGetTargetLun (
EFI_STATUS
EFIAPI
UfsPassThruResetChannel (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This
);
/**
@@ -587,9 +588,9 @@ UfsPassThruResetChannel (
EFI_STATUS
EFIAPI
UfsPassThruResetTargetLun (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun
);
/**
@@ -617,8 +618,8 @@ UfsPassThruResetTargetLun (
EFI_STATUS
EFIAPI
UfsPassThruGetNextTarget (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN OUT UINT8 **Target
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN OUT UINT8 **Target
);
/**
@@ -664,7 +665,7 @@ UfsExecScsiCmds (
**/
EFI_STATUS
UfsControllerInit (
IN UFS_PASS_THRU_PRIVATE_DATA *Private
IN UFS_PASS_THRU_PRIVATE_DATA *Private
);
/**
@@ -678,7 +679,7 @@ UfsControllerInit (
**/
EFI_STATUS
UfsControllerStop (
IN UFS_PASS_THRU_PRIVATE_DATA *Private
IN UFS_PASS_THRU_PRIVATE_DATA *Private
);
/**
@@ -697,11 +698,11 @@ UfsControllerStop (
**/
EFI_STATUS
UfsAllocateAlignCommonBuffer (
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
IN UINTN Size,
OUT VOID **CmdDescHost,
OUT EFI_PHYSICAL_ADDRESS *CmdDescPhyAddr,
OUT VOID **CmdDescMapping
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
IN UINTN Size,
OUT VOID **CmdDescHost,
OUT EFI_PHYSICAL_ADDRESS *CmdDescPhyAddr,
OUT VOID **CmdDescMapping
);
/**
@@ -717,8 +718,8 @@ UfsAllocateAlignCommonBuffer (
**/
EFI_STATUS
UfsSetFlag (
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
IN UINT8 FlagId
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
IN UINT8 FlagId
);
/**
@@ -735,9 +736,9 @@ UfsSetFlag (
**/
EFI_STATUS
UfsReadFlag (
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
IN UINT8 FlagId,
OUT UINT8 *Value
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
IN UINT8 FlagId,
OUT UINT8 *Value
);
/**
@@ -755,10 +756,10 @@ UfsReadFlag (
**/
EFI_STATUS
UfsRwFlags (
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
IN BOOLEAN Read,
IN UINT8 FlagId,
IN OUT UINT8 *Value
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
IN BOOLEAN Read,
IN UINT8 FlagId,
IN OUT UINT8 *Value
);
/**
@@ -781,13 +782,13 @@ UfsRwFlags (
**/
EFI_STATUS
UfsRwDeviceDesc (
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
IN BOOLEAN Read,
IN UINT8 DescId,
IN UINT8 Index,
IN UINT8 Selector,
IN OUT VOID *Descriptor,
IN OUT UINT32 *DescSize
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
IN BOOLEAN Read,
IN UINT8 DescId,
IN UINT8 Index,
IN UINT8 Selector,
IN OUT VOID *Descriptor,
IN OUT UINT32 *DescSize
);
/**
@@ -807,12 +808,12 @@ UfsRwDeviceDesc (
**/
EFI_STATUS
UfsRwAttributes (
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
IN BOOLEAN Read,
IN UINT8 AttrId,
IN UINT8 Index,
IN UINT8 Selector,
IN OUT UINT32 *Attributes
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
IN BOOLEAN Read,
IN UINT8 AttrId,
IN UINT8 Index,
IN UINT8 Selector,
IN OUT UINT32 *Attributes
);
/**
@@ -830,7 +831,7 @@ UfsRwAttributes (
**/
EFI_STATUS
UfsExecNopCmds (
IN UFS_PASS_THRU_PRIVATE_DATA *Private
IN UFS_PASS_THRU_PRIVATE_DATA *Private
);
/**
@@ -843,8 +844,8 @@ UfsExecNopCmds (
VOID
EFIAPI
ProcessAsyncTaskList (
IN EFI_EVENT Event,
IN VOID *Context
IN EFI_EVENT Event,
IN VOID *Context
);
/**
@@ -860,8 +861,8 @@ ProcessAsyncTaskList (
VOID
EFIAPI
SignalCallerEvent (
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
IN UFS_PASS_THRU_TRANS_REQ *TransReq
IN UFS_PASS_THRU_PRIVATE_DATA *Private,
IN UFS_PASS_THRU_TRANS_REQ *TransReq
);
/**
@@ -890,13 +891,13 @@ SignalCallerEvent (
EFI_STATUS
EFIAPI
UfsRwUfsDescriptor (
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
IN BOOLEAN Read,
IN UINT8 DescId,
IN UINT8 Index,
IN UINT8 Selector,
IN OUT UINT8 *Descriptor,
IN OUT UINT32 *DescSize
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
IN BOOLEAN Read,
IN UINT8 DescId,
IN UINT8 Index,
IN UINT8 Selector,
IN OUT UINT8 *Descriptor,
IN OUT UINT32 *DescSize
);
/**
@@ -920,10 +921,10 @@ UfsRwUfsDescriptor (
EFI_STATUS
EFIAPI
UfsRwUfsFlag (
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
IN BOOLEAN Read,
IN UINT8 FlagId,
IN OUT UINT8 *Flag
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
IN BOOLEAN Read,
IN UINT8 FlagId,
IN OUT UINT8 *Flag
);
/**
@@ -952,13 +953,13 @@ UfsRwUfsFlag (
EFI_STATUS
EFIAPI
UfsRwUfsAttribute (
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
IN BOOLEAN Read,
IN UINT8 AttrId,
IN UINT8 Index,
IN UINT8 Selector,
IN OUT UINT8 *Attribute,
IN OUT UINT32 *AttrSize
IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This,
IN BOOLEAN Read,
IN UINT8 AttrId,
IN UINT8 Index,
IN UINT8 Selector,
IN OUT UINT8 *Attribute,
IN OUT UINT32 *AttrSize
);
/**
@@ -991,9 +992,9 @@ GetUfsHcInfo (
IN UFS_PASS_THRU_PRIVATE_DATA *Private
);
extern EFI_COMPONENT_NAME_PROTOCOL gUfsPassThruComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gUfsPassThruComponentName2;
extern EFI_DRIVER_BINDING_PROTOCOL gUfsPassThruDriverBinding;
extern EFI_COMPONENT_NAME_PROTOCOL gUfsPassThruComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gUfsPassThruComponentName2;
extern EFI_DRIVER_BINDING_PROTOCOL gUfsPassThruDriverBinding;
extern EDKII_UFS_HC_PLATFORM_PROTOCOL *mUfsHcPlatform;
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff