On 2017-05-11 11:01:57, Brijesh Singh wrote: > > > On 05/11/2017 12:43 PM, Jordan Justen wrote: > > On 2017-05-11 08:53:39, Laszlo Ersek wrote: > >> (5) Please mention that the driver is being added to the APRIORI DXE > >> file for a separate reason as well (not just for the early clearing of > >> the C bit on MMIO/NonExistent): OvmfPkg's DXE phase modules that tailor > >> their behavior to SEV presence will assume that the IOMMU protocol > >> exported by this driver is available *at once*. > > > > What other code depends on this being run apriori? > > > > We basically need some kind of guarantee that this driver is run before any > other > drivers or libs access MMIO register/buffers. In additional to clearing > encryption > bit from MMIO spaces, the driver also installs IOMMU protocol. So far, IOMMU > protocol > is directly consumed by PciHostBridgeDxe driver and QemuFwCfgDxeLib.
What about adding a NULL protocol named gOvmfIoMmuDetectionProtocolGuid? (Better name suggestions welcomed. :) Then we can use this protocol in a depex where needed. Maybe we should consider naming the driver IoMmuDxe instead? I think the generic PciRoot bridge driver shouldn't need this in the depex because it will not start until the BDS phase, and the IoMmuDxe driver would have been dispatched by then. -Jordan > To answer your question, any code which uses MMIO or DMA in Dxe phase depends > on this > driver run as APRIORI. > > -Brijesh > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel