summaryrefslogtreecommitdiff
path: root/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2016-04-20 17:36:14 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2016-05-04 08:47:39 +0800
commite9e9ad644fab65b8dd66772df1bb139e3a1d2854 (patch)
tree95d26d334393081e648e7ab4d1f332116e818b54 /OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
parent77f47588a76c4388dde1d5e3641d8c6eba794aff (diff)
downloadedk2-platforms-e9e9ad644fab65b8dd66772df1bb139e3a1d2854.tar.xz
OvmfPkg/PlatformBootManagerLib: Init console vars in *BeforeConsole()
The major difference between IntelFrameworkModulePkg/BDS and MdeModulePkg/BDS is the latter connects the consoles in core code while the former connects in platform code. The change initializes the console variables in PlatformBootManagerBeforeConsole() and removes the console connection code. It also removes unused functions: PlatformBdsNoConsoleAction() and LockKeyboards(). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c')
-rw-r--r--OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c97
1 files changed, 7 insertions, 90 deletions
diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
index 5c053ce99e..cae2192f9a 100644
--- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
+++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
@@ -164,6 +164,8 @@ Returns:
&gEfiDxeSmmReadyToLockProtocolGuid, EFI_NATIVE_INTERFACE,
NULL);
ASSERT_EFI_ERROR (Status);
+
+ PlatformInitializeConsole (gPlatformConsole);
}
@@ -669,9 +671,9 @@ DetectAndPreparePlatformPciDevicePaths (
}
-EFI_STATUS
-PlatformBdsConnectConsole (
- IN BDS_CONSOLE_CONNECT_ENTRY *PlatformConsole
+VOID
+PlatformInitializeConsole (
+ IN PLATFORM_CONSOLE_CONNECT_ENTRY *PlatformConsole
)
/*++
@@ -683,37 +685,17 @@ Routine Description:
Arguments:
PlatformConsole - Predfined platform default console device array.
-
-Returns:
-
- EFI_SUCCESS - Success connect at least one ConIn and ConOut
- device, there must have one ConOut device is
- active vga device.
-
- EFI_STATUS - Return the status of
- BdsLibConnectAllDefaultConsoles ()
-
--*/
{
- EFI_STATUS Status;
UINTN Index;
EFI_DEVICE_PATH_PROTOCOL *VarConout;
EFI_DEVICE_PATH_PROTOCOL *VarConin;
- UINTN DevicePathSize;
//
// Connect RootBridge
//
- VarConout = BdsLibGetVariableAndSize (
- VarConsoleOut,
- &gEfiGlobalVariableGuid,
- &DevicePathSize
- );
- VarConin = BdsLibGetVariableAndSize (
- VarConsoleInp,
- &gEfiGlobalVariableGuid,
- &DevicePathSize
- );
+ GetEfiGlobalVariable2 (EFI_CON_OUT_VARIABLE_NAME, (VOID **) &VarConout, NULL);
+ GetEfiGlobalVariable2 (EFI_CON_IN_VARIABLE_NAME, (VOID **) &VarConin, NULL);
if (VarConout == NULL || VarConin == NULL) {
//
@@ -746,16 +728,6 @@ Returns:
//
DetectAndPreparePlatformPciDevicePaths (TRUE);
}
-
- //
- // Connect the all the default console with current cosole variable
- //
- Status = BdsLibConnectAllDefaultConsoles ();
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- return EFI_SUCCESS;
}
@@ -1294,16 +1266,6 @@ Routine Description:
// Notes: this part code can be change with the table policy
//
ASSERT (BootMode == BOOT_WITH_FULL_CONFIGURATION);
- //
- // Connect platform console
- //
- Status = PlatformBdsConnectConsole (gPlatformConsole);
- if (EFI_ERROR (Status)) {
- //
- // Here OEM/IBV can customize with defined action
- //
- PlatformBdsNoConsoleAction ();
- }
//
// Memory test and Logo show
@@ -1417,31 +1379,6 @@ Returns:
}
}
-EFI_STATUS
-PlatformBdsNoConsoleAction (
- VOID
- )
-/*++
-
-Routine Description:
-
- This function is remained for IBV/OEM to do some platform action,
- if there no console device can be connected.
-
-Arguments:
-
- None.
-
-Returns:
-
- EFI_SUCCESS - Direct return success now.
-
---*/
-{
- DEBUG ((EFI_D_INFO, "PlatformBdsNoConsoleAction\n"));
- return EFI_SUCCESS;
-}
-
VOID
EFIAPI
PlatformBdsLockNonUpdatableFlash (
@@ -1566,23 +1503,3 @@ PlatformBootManagerWaitCallback (
{
}
-/**
- Lock the ConsoleIn device in system table. All key
- presses will be ignored until the Password is typed in. The only way to
- disable the password is to type it in to a ConIn device.
-
- @param Password Password used to lock ConIn device.
-
- @retval EFI_SUCCESS lock the Console In Spliter virtual handle successfully.
- @retval EFI_UNSUPPORTED Password not found
-
-**/
-EFI_STATUS
-EFIAPI
-LockKeyboards (
- IN CHAR16 *Password
- )
-{
- return EFI_UNSUPPORTED;
-}
-