Using non-page-aligned buffers should raise EFI_INVALID_PARAMETER according to the spec. I would suspect the efipart_readwrite call just above this is not necessarily kosher, but I have not thought about it too much.
PR: 240572
Differential D21655
efipart: use page-aligned buffer for BlockIO kevans on Sep 14 2019, 2:06 AM. Authored by Tags None Referenced Files
Subscribers
Details
Diff Detail
Event TimelineComment Actions Yes, this fix is not complete. We should always use "bounce buffer" here and only use aligned memory. Of course the disk write is also broken here (unless I'm mistaken)... Comment Actions Any chance you have a little bit for this? I've run out of time for loader stuff for now. Comment Actions Actually yes, this change isn't correct. See https://github.com/tianocore/edk2/blob/master/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c for an example of how to allocate aligned memory (InternalAllocateAlignedPages etc.) Comment Actions It is not just about an allocation; we actually should check ioalign property... kevans: Im not sure when exactly I can look on it, also I 'm not sure about testing - does the qemu help me there? |