On 24/02/2022 12:09, Ard Biesheuvel wrote:
On Thu, 24 Feb 2022 at 12:58, Ard Biesheuvel <[email protected]> wrote:
On Thu, 24 Feb 2022 at 12:48, Tomas Pilar <[email protected]> wrote:
Delay and move the allocation and mapping of memory that backs the DMA
engine in NvmExpress devices to NvmeInit() to ensure that
the allocation only happens after the
EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE attribute is set
on the PciIo controller.
This ensures that the DMA-backing memory is not forcibly allocated
below 4G in system address map. Otherwise the allocation fails on
platforms that do not have any memory below the 4G mark and the drive
initialisation fails.
Cc: Ray Ni <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Leif Lindholm <[email protected]>
Signed-off-by: Tomas Pilar <[email protected]>
NvmeControllerInit () can be called multiple times, no? So you should
probably make sure that the buffer is not allocated and mapped again
if one already exists.
Alternatively, you could move all PCI attribute handling into the
start() hook. Other drivers keep it there as well, and it seems like a
more natural place for it (given the fact that NvmeControllerInit() is
also called on a host controller reset)
Brilliant idea, I'll do this!
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86968): https://edk2.groups.io/g/devel/message/86968
Mute This Topic: https://groups.io/mt/89363151/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-