Hi Jordan, On 5/15/17 12:47 PM, Jordan Justen wrote: > On 2017-05-11 11:01:57, Brijesh Singh wrote: >> >> 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. It should be doable, If I find better name then I will use that :) > 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. Are you suggesting that we introduce a new IoMmuDxe driver and install IOMMU protocol unconditionally ? I was hoping that we install IOMMU protocol only when SEV is enabled. A non-SEV guest will still use the old approach. I was minimizing changes into non-SEV code flow. Please note that since AmdSevDxe driver does *two* things; a) clear C-bit from MMIO b) installs IOMMU protocol hence I will not able to remove AmdSevDxe completely. But I can remove IOMMU protocol installation part from AmdSevDxe and move it into new IoMmuDxe driver. Please let me know if this is what you are asking. thanks
-Brijesh _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel