[edk2-devel] [edk2-platforms] [PATCH 10/11] SimicsOpenBoardPkg: Add BDS Board Boot Manager library
Nate DeSimone
nathaniel.l.desimone at intel.com
Wed Dec 18 01:35:41 UTC 2019
Hi Prince,
Reviewed-by: Nate DeSimone <nathaniel.l.desimone at intel.com>
Thanks,
Nate
On Sat, Dec 14, 2019 at 01:32:36AM +0000, Agyeman, Prince wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2336
>
> This library implements PlatformBootManagerWaitCallback
> and PlatformBootManagerUnableToBoot which can be linked Minplatform's
> PlatformBootManager libary instance.
>
> Cc: Nate DeSimone <nathaniel.l.desimone at intel.com>
> Cc: Michael Kubacki <michael.a.kubacki at intel.com>
>
> Signed-off-by: Prince Agyeman <prince.agyeman at intel.com>
> ---
> .../BoardBootManagerLib/BoardBootManager.c | 67 +++++++++++++++++++
> .../BoardBootManagerLib.inf | 45 +++++++++++++
> 2 files changed, 112 insertions(+)
> create mode 100644 Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBootManager.c
> create mode 100644 Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBootManagerLib.inf
>
> diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBootManager.c b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBootManager.c
> new file mode 100644
> index 0000000000..58035f2766
> --- /dev/null
> +++ b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBootManager.c
> @@ -0,0 +1,67 @@
> +/** @file
> + The Board Boot Manager Library implements BoardBootManagerWaitCallback
> + and BoardBootManagerUnableToBoot callback, which is linked to the
> + Platform Boot Manager Library
> +
> + Copyright (c) 2019 Intel Corporation. All rights reserved. <BR>
> +
> + SPDX-License-Identifier: BSD-2-Clause-Patent
> +**/
> +
> +#include <Library/DebugLib.h>
> +#include <Library/UefiBootServicesTableLib.h>
> +#include <Library/PlatformBootManagerLib.h>
> +#include <Library/UefiLib.h>
> +#include <Library/HobLib.h>
> +#include <Library/PcdLib.h>
> +#include <Library/PrintLib.h>
> +#include <Library/PerformanceLib.h>
> +#include <Library/BootLogoLib.h>
> +#include <Library/BoardBootManagerLib.h>
> +
> +/**
> + This function is called each second during the boot manager waits the
> + timeout.
> +
> + @param TimeoutRemain The remaining timeout.
> +**/
> +VOID
> +EFIAPI
> +BoardBootManagerWaitCallback (
> + UINT16 TimeoutRemain
> + )
> +{
> + EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Black;
> + EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION White;
> + UINT16 Timeout;
> +
> + Timeout = PcdGet16 (PcdPlatformBootTimeOut);
> +
> + Black.Raw = 0x00000000;
> + White.Raw = 0x00FFFFFF;
> +
> + BootLogoUpdateProgress (
> + White.Pixel,
> + Black.Pixel,
> + L"Start boot option",
> + White.Pixel,
> + (Timeout - TimeoutRemain) * 100 / Timeout,
> + 0
> + );
> +}
> +
> +/**
> + The function is called when no boot option could be launched,
> + including platform recovery options and options pointing to applications
> + built into firmware volumes.
> +
> + If this function returns, BDS attempts to enter an infinite loop.
> +**/
> +VOID
> +EFIAPI
> +BoardBootManagerUnableToBoot (
> + VOID
> + )
> +{
> +
> +}
> diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBootManagerLib.inf b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBootManagerLib.inf
> new file mode 100644
> index 0000000000..20778981bc
> --- /dev/null
> +++ b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBootManagerLib.inf
> @@ -0,0 +1,45 @@
> +## @file
> +# Definition file for the Board Boot Manager Library.
> +#
> +# Copyright (c) 2019 Intel Corporation. All rights reserved. <BR>
> +#
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +##
> +
> +[Defines]
> + INF_VERSION = 0x00010005
> + BASE_NAME = BoardBootManagerLib
> + FILE_GUID = EBBB176A-3883-4BA4-A74D-1510D0C35B37
> + MODULE_TYPE = DXE_DRIVER
> + VERSION_STRING = 1.0
> + LIBRARY_CLASS = BoardBootManagerLib|DXE_DRIVER
> +
> +#
> +# The following information is for reference only and not required by the build tools.
> +#
> +# VALID_ARCHITECTURES = IA32 X64 EBC
> +#
> +
> +[Sources]
> + BoardBootManager.c
> +
> +[Packages]
> + MdePkg/MdePkg.dec
> + MdeModulePkg/MdeModulePkg.dec
> + MinPlatformPkg/MinPlatformPkg.dec
> +
> +[LibraryClasses]
> + BaseLib
> + UefiBootServicesTableLib
> + DebugLib
> + UefiLib
> + HobLib
> + UefiBootManagerLib
> + TimerLib
> + BoardBootManagerLib
> + BootLogoLib
> + PcdLib
> +
> +[Pcd]
> + gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut
> --
> 2.19.1.windows.1
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#52310): https://edk2.groups.io/g/devel/message/52310
Mute This Topic: https://groups.io/mt/68590740/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list