From nobody Tue Nov 26 14:38:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+52232+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+52232+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1576287162; cv=none; d=zohomail.com; s=zohoarc; b=NNdKnSkFdMXnmSttI2IRaljwTwk9yHjkuoZ4mASW3giHYoyAqimdyRMl+ENBqYlPRln69sNJdpt9TftOSqfdFj1tSsfrLuY8yNnrKDlB88AO98l+vv8IAjSvN5ljpwKfdRH/G+skEJQ8MWTJ1Jfdc680cTTGHgZqATz9jwu2VDM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576287162; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=vG+Avm0YReyyEqHCw0ymErKysylq3fmKEN3J4wXl3Qo=; b=lbFqjpuvdcy+WatvcruEp/RS2Ou8exq8uCu7PAOyup4gg5dIw1GcJXFeT8AU5PEmaPo6zo2i/f8LJcnPCzfaOET1aAj8Scb7V4OT9IjsiSDjxeSHN1gX3vyos59gVjt5AB9HwmthDdGsSSQeBSLtiWTMNAAzbBRJycw4k1mBH58= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+52232+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1576287162796317.2780286598239; Fri, 13 Dec 2019 17:32:42 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id lK8LYY1788612xwmW7U9XY9P; Fri, 13 Dec 2019 17:32:41 -0800 X-Received: from mga04.intel.com (mga04.intel.com []) by mx.groups.io with SMTP id smtpd.web09.2403.1576287159525865036 for ; Fri, 13 Dec 2019 17:32:40 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2019 17:32:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,311,1571727600"; d="scan'208";a="297091535" X-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: Nate DeSimone , Michael Kubacki Subject: [edk2-devel] [edk2-platforms] [PATCH 10/11] SimicsOpenBoardPkg: Add BDS Board Boot Manager library Date: Fri, 13 Dec 2019 17:32:36 -0800 Message-Id: <6c40c7b6ebde73fcaa110be9ff55de3e58f7bb47.1576282834.git.prince.agyeman@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,prince.agyeman@intel.com X-Gm-Message-State: bWJrnpHlTHBKP6bBE7yFht42x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1576287161; bh=SphqkBhdsDvmZpHO6Sklsr/baClvOzb1dyDHM1Dx88Y=; h=Cc:Date:From:Reply-To:Subject:To; b=PRA527hlxe6OvJuVcYN86SRqN2mmZNVbrkJSUhc7eMLX62huBg6OolJioSbIMNu6tfy ihNxvBwCwhxtlmrSr+zMFuj8xlQoJCEYr5xn6y0HuubuyLXeTuOIvLPz+L1d8qMDOlPGG R/l4B4HUIHI/cNzzk1yKo8ElkMmt7pzU7rM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2336 This library implements PlatformBootManagerWaitCallback and PlatformBootManagerUnableToBoot which can be linked Minplatform's PlatformBootManager libary instance. Cc: Nate DeSimone Cc: Michael Kubacki Signed-off-by: Prince Agyeman Reviewed-by: Nate DeSimone --- .../BoardBootManagerLib/BoardBootManager.c | 67 +++++++++++++++++++ .../BoardBootManagerLib.inf | 45 +++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootMana= gerLib/BoardBootManager.c create mode 100644 Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootMana= gerLib/BoardBootManagerLib.inf diff --git a/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/= BoardBootManager.c b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootMan= agerLib/BoardBootManager.c new file mode 100644 index 0000000000..58035f2766 --- /dev/null +++ b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBo= otManager.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.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/** + 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 =3D PcdGet16 (PcdPlatformBootTimeOut); + + Black.Raw =3D 0x00000000; + White.Raw =3D 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/BoardBo= otManagerLib/BoardBootManagerLib.inf new file mode 100644 index 0000000000..20778981bc --- /dev/null +++ b/Platform/Intel/SimicsOpenBoardPkg/Library/BoardBootManagerLib/BoardBo= otManagerLib.inf @@ -0,0 +1,45 @@ +## @file +# Definition file for the Board Boot Manager Library. +# +# Copyright (c) 2019 Intel Corporation. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D BoardBootManagerLib + FILE_GUID =3D EBBB176A-3883-4BA4-A74D-1510D0C35B37 + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D BoardBootManagerLib|DXE_DRIVER + +# +# The following information is for reference only and not required by the = build tools. +# +# VALID_ARCHITECTURES =3D 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 --=20 2.19.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52232): https://edk2.groups.io/g/devel/message/52232 Mute This Topic: https://groups.io/mt/68590740/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-