audk/MdeModulePkg/Bus/Ata/AtaAtapiPassThru
Laszlo Ersek 76fd5a660d MdeModulePkg/AtaAtapiPassThru: disable only BM-DMA at ExitBootServices()
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 issue (boot time) on
i440fx, and does not regress q35/AHCI.

Cc: Aleksei Kovura <alex3kov@zoho.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Dann Frazier <dannf@ubuntu.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Reported-by: Aleksei Kovura <alex3kov@zoho.com>
Reported-by: Dann Frazier <dannf@ubuntu.com>
Reported-by: https://launchpad.net/~cjkrupp
Bisected-by: Dann Frazier <dannf@ubuntu.com>
Bisected-by: https://launchpad.net/~cjkrupp
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Suggested-by: Star Zeng <star.zeng@intel.com>
Ref: https://bugs.launchpad.net/ubuntu/+source/edk2/+bug/1725560
Fixes: 6fb8ddd36b
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: dann frazier <dann.frazier@canonical.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Tested-by: Aleksei Kovura <alex3kov@zoho.com>
2017-10-27 18:05:07 +02:00
..
AhciMode.c MdeModulePkg/AtaAtapiPassThru: Fix possible out of range left shift 2017-09-29 16:14:17 +08:00
AhciMode.h MdeModulePkg/AtaAtapiPassThru: relax PHY detect timeout 2017-06-28 12:47:13 +00:00
AtaAtapiPassThru.c MdeModulePkg/AtaAtapiPassThru: disable only BM-DMA at ExitBootServices() 2017-10-27 18:05:07 +02:00
AtaAtapiPassThru.h MdeModulePkg/AtaAtapiPassThru: disable only BM-DMA at ExitBootServices() 2017-10-27 18:05:07 +02:00
AtaAtapiPassThru.inf MdeModulePkg: INF/DEC file updates to EDK II packages 2014-08-28 06:34:06 +00:00
AtaAtapiPassThruDxe.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
AtaAtapiPassThruDxeExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
ComponentName.c Fix the comments to follow UEFI Spec regarding how to check an EFI_HANDLE is valid/invalid. 2011-07-06 03:55:36 +00:00
IdeMode.c MdeModulePkg/.../IdeMode: correctly report length of returned data 2016-01-25 11:33:37 +00:00
IdeMode.h Add BlockIO2 Protocol. 2011-05-03 10:31:41 +00:00