On Thu, Oct 26, 2017 at 9:48 AM, Laszlo Ersek <[email protected]> wrote:
> Clearing I/O port decoding in the PCI command register at
> ExitBootServices() breaks IDE boot in Windows, on QEMU's "pc" (i440fx)
> machine type. (AHCI boot on "q35" is unaffected.) Windows seems repeatedly
> stuck, apparently waiting for a timeout of sorts.
>
> This is arguably a Windows bug; a native OS driver should not expect the
> firmware to leave the PCI command register in any particular state.
>
> Strictly speaking, we only need to disable BM-DMA at ExitBootServices(),
> in order to abort pending transfers to/from RAM, which is soon to be owned
> by the OS. BM-DMA is also the only bit that's explicitly named by the UEFI
> Driver Writers' Guide, for clearing at ExitBootServices().
>
> I've verified that clearing only BM-DMA fixes the isse (boot time) on
> i440fx, and does not regress q35/AHCI.

Worked for my test case (booting a Win10 install ISO in ~30s). Thanks Laszlo!

Tested-by: dann frazier <[email protected]>
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to