diff mbox

[edk2,4/7] OvmfPkg: BDS: optimize second argument in PlatformBdsEnterFrontPage() call

Message ID 1413984117-20000-5-git-send-email-lersek@redhat.com
State New
Headers show

Commit Message

Laszlo Ersek Oct. 22, 2014, 1:21 p.m. UTC
The second parameter of said function is "ConnectAllHappened", and if set
to TRUE, the function sets "gConnectAllHappened" to TRUE.

This global variable in turn controls whether Intel BDS code *itself*
calls BdsLibConnectAllDriversToAllControllers() in various places -- if
the indicator is TRUE, then the "connect all" is assumed to have been
performed, and Intel BDS doesn't do it itself.

OVMF should pass TRUE as "ConnectAllHappened", because a few lines before
our call to PlatformBdsEnterFrontPage(), we already connect everything
with BdsLibConnectAll(), which includes the effects of
BdsLibConnectAllDriversToAllControllers():

PlatformBdsPolicyBehavior()                   [OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c]
  BdsLibConnectAll()                          [IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConnect.c]
    BdsLibConnectAllDriversToAllControllers()
  PlatformBdsEnterFrontPage()                 [IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c]

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c
index f2ece66..9fa48c9 100644
--- a/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c
+++ b/OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c
@@ -1193,7 +1193,7 @@  Returns:
     //
     // Enter Setup if user input
     //
-    PlatformBdsEnterFrontPage (Timeout, FALSE);
+    PlatformBdsEnterFrontPage (Timeout, TRUE);
   }
 }