diff options
author | Laszlo Ersek <lersek@redhat.com> | 2016-05-05 15:39:59 +0200 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2016-05-06 10:04:49 +0200 |
commit | e3fe3c0ff94d96b8a03a169fecab49a5f5cc0c11 (patch) | |
tree | 82597b2ce14832e3540555fe045eebac420085a1 /ArmVirtPkg | |
parent | 8d6203223ab18b541d0f0a510c20988de45e3026 (diff) | |
download | edk2-e3fe3c0ff94d96b8a03a169fecab49a5f5cc0c11.zip edk2-e3fe3c0ff94d96b8a03a169fecab49a5f5cc0c11.tar.gz edk2-e3fe3c0ff94d96b8a03a169fecab49a5f5cc0c11.tar.bz2 |
ArmVirtPkg/PlatformBootManagerLib: follow PlatformBootManagerLib interfaces
"IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h" declares the
following interfaces:
- PlatformBdsInit
- PlatformBdsPolicyBehavior
- PlatformBdsBootFail
- PlatformBdsBootSuccess
- PlatformBdsLockNonUpdatableFlash
- LockKeyboards
From these, we've been using PlatformBdsInit() and
PlatformBdsPolicyBehavior().
"MdeModulePkg/Include/Library/PlatformBootManagerLib.h" declares the three
interfaces below:
- PlatformBootManagerBeforeConsole
- PlatformBootManagerAfterConsole
- PlatformBootManagerWaitCallback
Comparing the BdsEntry() functions between
- "IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c" and
- "MdeModulePkg/Universal/BdsDxe/BdsEntry.c",
we can establish the following mapping:
IntelFrameworkModulePkg MdeModulePkg
BdsEntry() BdsEntry()
PlatformBdsInit() <--------------> PlatformBootManagerBeforeConsole()
dispatch Driver#### <--------------> dispatch Driver####
connect consoles
PlatformBdsPolicyBehavior() <------> PlatformBootManagerAfterConsole()
The difference in connecting the consoles will be addressed in a later
patch, now we just rename the functions according to the mapping above,
and copy the call site comments from MdeModulePkg's BdsEntry().
For the third interface, PlatformBootManagerWaitCallback(), add an empty
implementation (and copy the comment from the library class header).
Platform BDS can use this callback to draw a progress bar, for example.
This patch parallels OvmfPkg commit a7566234e92c.
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>
Diffstat (limited to 'ArmVirtPkg')
-rw-r--r-- | ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c | 54 | ||||
-rw-r--r-- | ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 4 |
2 files changed, 37 insertions, 21 deletions
diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c index f841d7c..4920621 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -18,7 +18,6 @@ #include <IndustryStandard/Pci22.h>
#include <Library/DevicePathLib.h>
#include <Library/PcdLib.h>
-#include <Library/PlatformBdsLib.h>
#include <Library/QemuBootOrderLib.h>
#include <Protocol/DevicePath.h>
#include <Protocol/GraphicsOutput.h>
@@ -126,13 +125,19 @@ STATIC PLATFORM_USB_KEYBOARD mUsbKeyboard = { // BDS Platform Functions
//
/**
- Platform Bds init. Include the platform firmware vendor, revision
- and so crc check.
-
+ Do the platform init, can be customized by OEM/IBV
+ Possible things that can be done in PlatformBootManagerBeforeConsole:
+ > Update console variable: 1. include hot-plug devices;
+ > 2. Clear ConIn and add SOL for AMT
+ > Register new Driver#### or Boot####
+ > Register new Key####: e.g.: F12
+ > Signal ReadyToLock event
+ > Authentication action: 1. connect Auth devices;
+ > 2. Identify auto logon user.
**/
VOID
EFIAPI
-PlatformBdsInit (
+PlatformBootManagerBeforeConsole (
VOID
)
{
@@ -344,23 +349,20 @@ AddOutput ( /**
- The function will execute with as the platform policy, current policy
- is driven by boot mode. IBV/OEM can customize this code for their specific
- policy action.
-
- @param DriverOptionList The header of the driver option link list
- @param BootOptionList The header of the boot option link list
- @param ProcessCapsules A pointer to ProcessCapsules()
- @param BaseMemoryTest A pointer to BaseMemoryTest()
-
+ Do the platform specific action after the console is ready
+ Possible things that can be done in PlatformBootManagerAfterConsole:
+ > Console post action:
+ > Dynamically switch output mode from 100x31 to 80x25 for certain senarino
+ > Signal console ready platform customized event
+ > Run diagnostics like memory testing
+ > Connect certain devices
+ > Dispatch aditional option roms
+ > Special boot: e.g.: USB boot, enter UI
**/
VOID
EFIAPI
-PlatformBdsPolicyBehavior (
- IN LIST_ENTRY *DriverOptionList,
- IN LIST_ENTRY *BootOptionList,
- IN PROCESS_CAPSULES ProcessCapsules,
- IN BASEM_MEMORY_TEST BaseMemoryTest
+PlatformBootManagerAfterConsole (
+ VOID
)
{
//
@@ -489,3 +491,17 @@ PlatformBdsLockNonUpdatableFlash ( {
return;
}
+
+/**
+ This function is called each second during the boot manager waits the
+ timeout.
+
+ @param TimeoutRemain The remaining timeout.
+**/
+VOID
+EFIAPI
+PlatformBootManagerWaitCallback (
+ UINT16 TimeoutRemain
+ )
+{
+}
diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf index 1ad4c6f..d2013b0 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -18,11 +18,11 @@ [Defines]
INF_VERSION = 0x00010005
- BASE_NAME = PlatformIntelBdsLib
+ BASE_NAME = PlatformBootManagerLib
FILE_GUID = 469184E8-FADA-41E4-8823-012CA19B40D4
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
- LIBRARY_CLASS = PlatformBdsLib|DXE_DRIVER
+ LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER
#
# The following information is for reference only and not required by the build tools.
|