Re: [PATCH v2] MdeModulePkg: Correct high-memory use in NvmExpressDxe

Tomas Pilar (tpilar)

On 24/02/2022 13:13, Ard Biesheuvel wrote:
On Thu, 24 Feb 2022 at 13:58, Tomas Pilar (tpilar)
<quic_tpilar@...> wrote:

attribute to DriverBindingStart() before the memory that backs the

DMA engine is allocated.

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 <>

Cc: Ard Biesheuvel <ardb+tianocore@...>

Cc: Leif Lindholm <leif@...>

Signed-off-by: Tomas Pilar <quic_tpilar@...>
Ehm, nope, that is not exactly what I meant.

The existing code stores the original PCI attributes in the controller
private data, enables MMIO/IO decoding and bus mastering, and only
then sets the dual address cycle attribute.

All of that needs to move, so that the captured attributes are accurate.

Okay, I was wondering. My thought was that we probably want to re-enable bus mastering
on reset so I kept that bit of code in the original location.

Join to automatically receive all group messages.