From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com []) by mx.groups.io with SMTP id smtpd.web10.2430.1576287158438932734 for ; Fri, 13 Dec 2019 17:32:39 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: prince.agyeman@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2019 17:32:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,311,1571727600"; d="scan'208";a="297091516" Received: from paagyema-desk2.amr.corp.intel.com ([10.24.15.84]) by orsmga001.jf.intel.com with ESMTP; 13 Dec 2019 17:32:38 -0800 From: "Agyeman, Prince" To: devel@edk2.groups.io Cc: Michael Kubacki , Chasel Chiu , Nate DeSimone Subject: [edk2-platforms] [PATCH 04/11] MinPlatformPkg: Add BDS Board Boot Manager library Date: Fri, 13 Dec 2019 17:32:30 -0800 Message-Id: <1a09aca176f54fff55f69ad40935d01d7330350a.1576282834.git.prince.agyeman@intel.com> X-Mailer: git-send-email 2.19.1.windows.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2336 As Minplatform's PlatformBootManager library instance implements event signals (as specified in the minimum platform specification) to trigger board actions, some of its functions namely PlatformBootManagerWaitCallback and PlatformBootManagerUnableToBoot will not have events signaled for boards to take action. This library implements PlatformBootManagerWaitCallback and PlatformBootManagerUnableToBoot which will be linked to Minplatform's PlatformBootManager libary instance. Added is an interface/header file that defines the board boot manager library. Also added is a NULL implementation of the board boot manager library Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Prince Agyeman --- .../BoardBootManagerLib.c | 38 ++++++++++++++++++ .../BoardBootManagerLibNull.inf | 31 +++++++++++++++ .../Include/Library/BoardBootManagerLib.h | 39 +++++++++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLib.c create mode 100644 Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLibNull.inf create mode 100644 Platform/Intel/MinPlatformPkg/Include/Library/BoardBootManagerLib.h diff --git a/Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLib.c b/Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLib.c new file mode 100644 index 0000000000..46fce8f59f --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLib.c @@ -0,0 +1,38 @@ +/** @file + This file include board specific boot manager callbacks + + Copyright (c) 2018, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include + +/** + This function is called each second during the boot manager waits timeout. + + @param TimeoutRemain The remaining timeout. +**/ +VOID +EFIAPI +BoardBootManagerWaitCallback ( + IN UINT16 TimeoutRemain + ) +{ + return; +} + +/** + The function is called when no boot option could be launched, + including platform recovery options and options pointing to applications + built into firmware volumes. + +**/ +VOID +EFIAPI +BoardBootManagerUnableToBoot ( + VOID + ) +{ + return; +} + diff --git a/Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLibNull.inf b/Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLibNull.inf new file mode 100644 index 0000000000..084207b111 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/Bds/Library/BoardBootManagerLibNull/BoardBootManagerLibNull.inf @@ -0,0 +1,31 @@ +## @file +# The module definition file for BoardBootManagerLib. +# +# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = BoardBootManagerLib + FILE_GUID = 7BA684A4-5B32-4F0C-B0FF-581F143E606C + 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] + BoardBootManagerLib.c + + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + MinPlatformPkg/MinPlatformPkg.dec diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/BoardBootManagerLib.h b/Platform/Intel/MinPlatformPkg/Include/Library/BoardBootManagerLib.h new file mode 100644 index 0000000000..4240142073 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/Include/Library/BoardBootManagerLib.h @@ -0,0 +1,39 @@ +/** @file + Board Boot Manager library definition. A platform can implement + instances to support platform-specific behavior. + + Copyright (c) 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + +#ifndef __BOARD_BOOT_MANAGER_LIB_H_ +#define __BOARD_BOOT_MANAGER_LIB_H_ +#include + + +/** + This function is called each second during boot manager waits the timeout. + + @param TimeoutRemain The remaining timeout. +**/ +VOID +EFIAPI +BoardBootManagerWaitCallback ( + IN UINT16 TimeoutRemain + ); + +/** + The function is called when no boot option could be launched, + including platform recovery options and options pointing to applications + built into firmware volumes. + +**/ +VOID +EFIAPI +BoardBootManagerUnableToBoot ( + VOID + ); + +#endif -- 2.19.1.windows.1