public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Agyeman, Prince" <prince.agyeman@intel.com>
To: devel@edk2.groups.io
Cc: Michael Kubacki <michael.a.kubacki@intel.com>,
	Chasel Chiu <chasel.chiu@intel.com>,
	Nate DeSimone <nathaniel.l.desimone@intel.com>
Subject: [edk2-platforms] [PATCH 04/11] MinPlatformPkg: Add BDS Board Boot Manager library
Date: Fri, 13 Dec 2019 17:32:30 -0800	[thread overview]
Message-ID: <1a09aca176f54fff55f69ad40935d01d7330350a.1576282834.git.prince.agyeman@intel.com> (raw)
In-Reply-To: <cover.1576282834.git.prince.agyeman@intel.com>

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 <michael.a.kubacki@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>

Signed-off-by: Prince Agyeman <prince.agyeman@intel.com>
---
 .../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.<BR>
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#include <Library/BoardBootManagerLib.h>
+
+/**
+  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.<BR>
+#  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.<BR>
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+
+#ifndef __BOARD_BOOT_MANAGER_LIB_H_
+#define __BOARD_BOOT_MANAGER_LIB_H_
+#include <Library/UefiBootManagerLib.h>
+
+
+/**
+  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


  parent reply	other threads:[~2019-12-14  1:32 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-14  1:32 [edk2-platforms] [PATCH 00/11] Add BDS Hook Points Agyeman, Prince
2019-12-14  1:32 ` [edk2-platforms] [PATCH 01/11] MinPlatformPkg: Add BDS Hook Point Guids Agyeman, Prince
2019-12-16  1:31   ` Chiu, Chasel
2019-12-16  8:50     ` [edk2-devel] " Ni, Ray
2019-12-17 23:58       ` Kubacki, Michael A
2019-12-18  0:11         ` Ni, Ray
2019-12-18  1:31   ` Nate DeSimone
2019-12-21  2:36   ` Kubacki, Michael A
2019-12-14  1:32 ` [edk2-platforms] [PATCH 02/11] BoardModulePkg: Add BDS Hook Library Agyeman, Prince
2019-12-18  1:19   ` Nate DeSimone
2019-12-21  2:36   ` Kubacki, Michael A
2019-12-14  1:32 ` [edk2-platforms] [PATCH 03/11] BoardModulePkg: Add BDS Hook DXE Driver Agyeman, Prince
2019-12-18  1:32   ` Nate DeSimone
2019-12-21  2:36   ` Kubacki, Michael A
2019-12-14  1:32 ` Agyeman, Prince [this message]
2019-12-17  4:24   ` [edk2-platforms] [PATCH 04/11] MinPlatformPkg: Add BDS Board Boot Manager library Chiu, Chasel
2019-12-18  1:33   ` Nate DeSimone
2019-12-21  2:36   ` Kubacki, Michael A
2019-12-14  1:32 ` [edk2-platforms] [PATCH 05/11] MinPlatformPkg: Add BDS Hook Points Agyeman, Prince
2019-12-17  5:44   ` Chiu, Chasel
2019-12-18  1:33   ` Nate DeSimone
2019-12-21  2:36   ` Kubacki, Michael A
2019-12-14  1:32 ` [edk2-platforms] [PATCH 06/11] BoardModulePkg: Add Generic BoardBootManagerLib Agyeman, Prince
2019-12-18  1:34   ` Nate DeSimone
2019-12-21  2:36   ` Kubacki, Michael A
2019-12-14  1:32 ` [edk2-platforms] [PATCH 07/11] KabylakeOpenBoardPkg: Add BDS Hook Dxe Driver Agyeman, Prince
2019-12-17  5:44   ` Chiu, Chasel
2019-12-18  1:35   ` Nate DeSimone
2019-12-21  2:36   ` Kubacki, Michael A
2019-12-14  1:32 ` [edk2-platforms] [PATCH 08/11] WhiskeylakeOpenBoardPkg: " Agyeman, Prince
2019-12-17  5:45   ` Chiu, Chasel
2019-12-18  1:35   ` Nate DeSimone
2019-12-21  2:36   ` Kubacki, Michael A
2019-12-14  1:32 ` [edk2-platforms] [PATCH 09/11] SimicsOpenBoardPkg: Add Bds Hook Library Agyeman, Prince
2019-12-18  1:29   ` Nate DeSimone
2019-12-21  2:37   ` Kubacki, Michael A
2019-12-14  1:32 ` [edk2-platforms] [PATCH 10/11] SimicsOpenBoardPkg: Add BDS Board Boot Manager library Agyeman, Prince
2019-12-18  1:35   ` Nate DeSimone
2019-12-21  2:37   ` Kubacki, Michael A
2019-12-14  1:32 ` [edk2-platforms] [PATCH 11/11] SimicsOpenBoardPkg: Add Bds Hook Points Agyeman, Prince
2019-12-18  1:36   ` Nate DeSimone
2019-12-21  2:37   ` Kubacki, Michael A
2020-04-21 20:37 ` [edk2-devel] [edk2-platforms] [PATCH 00/11] Add BDS " Nate DeSimone
2020-04-22 10:31   ` Leif Lindholm
2020-04-22 22:13     ` Nate DeSimone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a09aca176f54fff55f69ad40935d01d7330350a.1576282834.git.prince.agyeman@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox