From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=91.189.89.112; helo=youngberry.canonical.com; envelope-from=dann.frazier@canonical.com; receiver=edk2-devel@lists.01.org Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C9815203525EB for ; Thu, 26 Oct 2017 12:52:20 -0700 (PDT) Received: from mail-oi0-f71.google.com ([209.85.218.71]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1e7oG5-00073d-E2 for edk2-devel@lists.01.org; Thu, 26 Oct 2017 19:56:05 +0000 Received: by mail-oi0-f71.google.com with SMTP id c202so4544985oih.8 for ; Thu, 26 Oct 2017 12:56:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YN/LnMsnqhIrI9mAaZTXcBaxDtvvXqQkyL+b8HpF7ko=; b=idKZmrpqqHbCwNL6oD0XpMEatSXMESnV48th4uZRAHaTWN9fR9ysexd/63QcV0bRSY HBqCbnjBqVwXm5C0A/dgFGggMRkiR5WOUR8qc7CnyH08Ao/fPYnnZaz3OAJrzhVFvu6s hIOr/gw6Fd9eMgeisCuvQOlb55PyhyAii/hRIaLYzMGNueAxG5oqkWGv0tTJqTVGBtes FBldXKC/vah61vH/rG/7Fxxal8r14ksyYdFj/sw1NRY1wR+tp8Sd8PA2F+KJkk9Fsk2r ZVWoYbO/Ur75X6r5oQGPw7rb2IR3ov5oX4edRcOZ4cRtAJnn4XMUD4VTTuvTMkESQu3M gzvA== X-Gm-Message-State: AMCzsaWz0QVhRyeNQsd6IgXpt9na9VJFMNJEOSoKClWUxITpsGldxBdV 1dOdR/KQ1BvT/ncce8FHNTLyNmo2cyHWWAfh8rVDyN6gLFP3ObG3x/QS+Z8NiKVW8naEy2641/M TP7SOw9sJs9SiH49cgT/wzTFixrH1CJCI5X9j6eD/iJS/lDB6fm8= X-Received: by 10.202.81.84 with SMTP id f81mr3629127oib.171.1509047764230; Thu, 26 Oct 2017 12:56:04 -0700 (PDT) X-Google-Smtp-Source: ABhQp+R6a+YWaMk6eeptdTkzeW/VGC9ttOPTd+mz+yCZtvHp5jwyg1jY9+tbrKogQw4ZN7RqYYAz6g1tVcOGvCR7h8o= X-Received: by 10.202.81.84 with SMTP id f81mr3629107oib.171.1509047763847; Thu, 26 Oct 2017 12:56:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.173.200 with HTTP; Thu, 26 Oct 2017 12:56:03 -0700 (PDT) In-Reply-To: <20171026154819.20865-1-lersek@redhat.com> References: <20171026154819.20865-1-lersek@redhat.com> From: dann frazier Date: Thu, 26 Oct 2017 13:56:03 -0600 Message-ID: To: Laszlo Ersek Cc: edk2-devel-01 , Aleksei Kovura , Ard Biesheuvel , Dann Frazier , Eric Dong , Star Zeng Subject: Re: [PATCH] MdeModulePkg/AtaAtapiPassThru: disable only BM-DMA at ExitBootServices() X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Oct 2017 19:52:21 -0000 Content-Type: text/plain; charset="UTF-8" On Thu, Oct 26, 2017 at 9:48 AM, Laszlo Ersek 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