Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaAccessTest\BlockIO2ProtocolTest - ReadBlocksEx_Func run failed with NVME devices (Bugzilla Bug 3852) #228

Open
tianocore-issues opened this issue Feb 28, 2022 · 6 comments

Comments

@tianocore-issues
Copy link

This issue was created automatically with bugzilla2github

Bugzilla Bug 3852

Date: 2022-02-28T01:24:01+00:00
From: xiao.x.chen
To: xiao.x.chen
CC: arvin.chen, Carolyn.Gjertsen, edhaya.chandran, eric.jin, gaojie, samer.el-haj-mahmoud, supreeth.venkatesh

Last updated: 2024-08-26T12:08:00+00:00

@tianocore-issues
Copy link
Author

Comment 18469

Date: 2022-02-28 01:24:01 +0000
From: xiao.x.chen

  • Industry Specification: ---
  • Release Observed: EDK II Master
  • Releases to Fix: EDK II Master
  • Target OS: ---
  • Bugzilla Assignee(s): xiao.x.chen

Created attachment 937
SCT log

When run the SCT testcase MediaAccessTest\BlockIO2ProtocolTest on NVME device, the BBTestReadBlocksExFunctionAutoTestCheckpoint1 report failed.
As the code showed https://github.com/tianocore/edk2-test/blob/master/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/BlockIo2/BlackBoxTest/BlockIo2BBTestFunction.c#L1482,
SCT allocate pool as read buffer for ReadBlocksEx, but not free the buffer until all for loop completed and callback returned. For some devices with large capacity, there is no enough buffer below 4GB, so BBTestReadBlocksExFunctionAutoTestCheckpoint1 allocate pool with address above 4GB. But for NVME device, it use PCI IO command to transfer with NVME device, so for the address above 4GB, it need to allocate a buffer below 4GB to map the transfer to. But there already no enough buffer below 4GB, so allocatePage failed with error code "Out of resource", (code refer to https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c#L1418). So ReadBlocksEx failed

Attachment: BZ-937-teraterm_Iomap

@tianocore-issues
Copy link
Author

Comment 18539

Date: 2022-03-03 09:51:32 +0000
From: Edhay <<edhaya.chandran>>

Hi Xiao Chen,

Do you have a solution proposal for this issue?

Can you contribute a patch?

@tianocore-issues
Copy link
Author

Comment 18562

Date: 2022-03-06 22:18:08 +0000
From: xiao.x.chen

Created attachment 957
sct blockIO->readBlockEx patch

Attachment: BZ-957-sct.patch

@tianocore-issues
Copy link
Author

Comment 18563

Date: 2022-03-06 22:20:22 +0000
From: xiao.x.chen

(In reply to Edhay from comment #1)
> Hi Xiao Chen,
>
> Do you have a solution proposal for this issue?
> Can you contribute a patch?

currently device doesn't support DMA above 4GB, if the allocated address for PCI IO command is above 4GB, doesn't send the command.
I attach the patch "sct blockIO->readBlockEx patch" for reference

@tianocore-issues
Copy link
Author

Comment 18778

Date: 2022-04-07 10:29:46 +0000
From: Edhay <<edhaya.chandran>>

Hi Xiao Chen
The patch solution is not generic

  1. There are boards that dont have memory below 4GB
  2. The correction should aim to the change the test to require less memory. This patch may solve the issue only on your specific board

Could you re-evaluate and submit a new patch.

@tianocore-issues
Copy link
Author

Comment 20017

Date: 2022-11-15 01:42:43 +0000
From: Edhay <<edhaya.chandran>>

Hi Xiao Chen,

Do we have an update on this patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant