]> git.proxmox.com Git - mirror_edk2.git/commit - ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
ArmVirtPkg/PlatformBootManagerLib: init console vars in BeforeConsole()
authorLaszlo Ersek <lersek@redhat.com>
Thu, 5 May 2016 14:24:00 +0000 (16:24 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Fri, 6 May 2016 08:04:49 +0000 (10:04 +0200)
commite2a193b733aa1fa33a8b1c4ed062c6dc092c267c
tree7e1c11488a72e41fee303684e8108016057cb230
parent2c5c33cd2978cb6c33b651fd0ed101598d921c46
ArmVirtPkg/PlatformBootManagerLib: init console vars in BeforeConsole()

With IntelFrameworkModulePkg BDS, the platform code is responsible for
updating console variables (e.g., with BdsLibUpdateConsoleVariable()), and
then connecting them (e.g., with BdsLibConnectAllDefaultConsoles()). This
is usually (although not necessarily) done in PlatformBdsPolicyBehavior().

With MdeModulePkg BDS, the platform is responsible for updating the
console variables in PlatformBootManagerBeforeConsole(). When that
function returns, BdsEntry() will automatically connect the consoles; the
platform is not responsible for the connection.

IntelFrameworkModulePkg               MdeModulePkg
  BdsEntry                              BdsEntry
    PlatformBdsInit                       PlatformBootManagerBeforeConsole
                                     +----> EfiBootManagerUpdateConsoleVariable
                                     |
    dispatch Driver####              |    dispatch Driver####
                                     | +> connect consoles
                                     | |
    PlatformBdsPolicyBehavior        | |  PlatformBootManagerAfterConsole
      BdsLibUpdateConsoleVariable <--+ |
      BdsLibConnectAllDefaultConsoles <+
      display splash screen                 display splash screen

Thus, move the console variable massaging from the beginning of
PlatformBootManagerAfterConsole() (originally PlatformBdsPolicyBehavior())
to the end of PlatformBootManagerBeforeConsole(), and drop the explicit
BdsLibConnectAllDefaultConsoles() call.

This patch parallels OvmfPkg commit e9e9ad644fab.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c