Dear MdeModulePkg maintainers, I'm a bit baffled about a way
physical addresses passed to UFS HCI at UfsPassThruDxe driver.
For example, UFS HCI V.2.1 declares Data Base Address in PRDT structure as
two 32 bit words,
where bits 0 and 1 of a physical address are reserved.
As well UTP Command Descriptor Base Address (UCDBA) shall be aligned to
128-byte address,
i.e. bits [06:00] are reserved.
In common such reserved bits are being cleared by AND operation
with appropriate mask, while in UfsPassThruDxe right shift operator is used
as below:
Prdt[PrdtIndex].DbAddr = (UINT32)RShiftU64 ((UINT64)(UINTN)Remaining,
2);
Prdt[PrdtIndex].DbAddrU = (UINT32)RShiftU64 ((UINT64)(UINTN)Remaining,
32);
and
Trd->UcdBa = (UINT32)RShiftU64 ((UINT64)CmdDescPhyAddr, 7);
Trd->UcdBaU = (UINT32)RShiftU64 ((UINT64)CmdDescPhyAddr, 32);
How does UFS HCI deal with such values? This doesn't look correct.
Would you like I prepare a patch replacing RShiftU64 operator with bitwise
AND operator
for lower 32-bit of a physical address value?
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel