public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Dong, Eric" <eric.dong@intel.com>
To: "Kubacki, Michael A" <michael.a.kubacki@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Gao, Liming" <liming.gao@intel.com>
Subject: Re: [edk2-platforms][PATCH V1 2/3] BoardModulePkg/FirmwareBootMediaInfoLib: Add library
Date: Tue, 8 Oct 2019 07:01:27 +0000	[thread overview]
Message-ID: <ED077930C258884BBCB450DB737E662259F0953F@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20191001011547.14588-3-michael.a.kubacki@intel.com>

Reviewed-by: Eric Dong <eric .dong@intel.com>

> -----Original Message-----
> From: Kubacki, Michael A
> Sent: Tuesday, October 1, 2019 9:16 AM
> To: devel@edk2.groups.io
> Cc: Dong, Eric <eric.dong@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [edk2-platforms][PATCH V1 2/3]
> BoardModulePkg/FirmwareBootMediaInfoLib: Add library
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2229
> 
> Introduces a new library class FirmwareBootMediaInfoLib that is used to
> report the firmware boot media device. A default library instance is provided
> that always returns the firmware boot media is SPI flash. For platforms with
> other firmware boot media options, a board-specific instance of this library
> should be used instead to provide the correct firmware boot media device
> information.
> 
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
> ---
>  Platform/Intel/BoardModulePkg/BoardModulePkg.dec
> |  3 ++
>  Platform/Intel/BoardModulePkg/BoardModulePkg.dsc
> |  3 ++
> 
> Platform/Intel/BoardModulePkg/Library/PeiFirmwareBootMediaInfoLib/PeiFir
> mwareBootMediaInfoLib.inf | 35 ++++++++++++++++++++
>  Platform/Intel/BoardModulePkg/Include/Library/FirmwareBootMediaInfoLib.h
> | 26 +++++++++++++++
> 
> Platform/Intel/BoardModulePkg/Library/PeiFirmwareBootMediaInfoLib/PeiFir
> mwareBootMediaInfoLib.c   | 24 ++++++++++++++
>  5 files changed, 91 insertions(+)
> 
> diff --git a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec
> b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec
> index 6f13945ca8..c42f38c32a 100644
> --- a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec
> +++ b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec
> @@ -33,6 +33,9 @@
>    ##  @libraryclass    Provide services to get BIOS ID information.
>    BiosIdLib|Include/Library/BiosIdLib.h
> 
> +  ## @libraryclass     Provide a service to determine the firmware boot media
> device.
> +  FirmwareBootMediaInfoLib|Include/Library/FirmwareBootMediaInfoLib.h
> +
>  [Guids]
>    ## Include Include/Guid/BiosId.h
>    gBiosIdGuid = { 0xC3E36D09, 0x8294, 0x4b97, { 0xA8, 0x57, 0xD5, 0x28, 0x8F,
> 0xE3, 0x3E, 0x28 } } diff --git
> a/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc
> b/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc
> index 734ead9be8..78c09fbf82 100644
> --- a/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc
> +++ b/Platform/Intel/BoardModulePkg/BoardModulePkg.dsc
> @@ -33,6 +33,8 @@
>    DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> 
>  [LibraryClasses.common.PEIM]
> +
> +
> FirmwareBootMediaLib|IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/Pei
> + FirmwareBootMediaLib.inf
> +
> FirmwareBootMediaInfoLib|BoardModulePkg/Library/PeiFirmwareBootMediaI
> n
> + foLib/PeiFirmwareBootMediaInfoLib.inf
>    HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> 
> MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAll
> ocationLib.inf
> 
> @@ -42,6 +44,7 @@
>  [LibraryClasses.common.DXE_DRIVER]
>    HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> 
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemory
> AllocationLib.inf
> +
> +
> FirmwareBootMediaLib|IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/Dxe
> + SmmFirmwareBootMediaLib.inf
> 
>  [LibraryClasses.common.UEFI_DRIVER]
>    HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> diff --git
> a/Platform/Intel/BoardModulePkg/Library/PeiFirmwareBootMediaInfoLib/PeiFi
> rmwareBootMediaInfoLib.inf
> b/Platform/Intel/BoardModulePkg/Library/PeiFirmwareBootMediaInfoLib/PeiFi
> rmwareBootMediaInfoLib.inf
> new file mode 100644
> index 0000000000..637aeca2af
> --- /dev/null
> +++ b/Platform/Intel/BoardModulePkg/Library/PeiFirmwareBootMediaInfoLib/
> +++ PeiFirmwareBootMediaInfoLib.inf
> @@ -0,0 +1,35 @@
> +## @file
> +# Firmware Boot Media Info Library
> +#
> +# This library identifies firmware boot media device information used
> +in the boot flow for system initialization # decisions dependent upon the
> firmware boot media.
> +#
> +# This library instance provides a default implementation of the
> +FirmwareBootMediaInfoLib library class that always # returns SPI flash
> +as the boot media device. For any system firmware in which this is not the
> case, an instance # of this library class should be provided that returns the
> correct boot media for the platform.
> +#
> +# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> # #
> +SPDX-License-Identifier: BSD-2-Clause-Patent # ##
> +
> +[Defines]
> +  INF_VERSION          = 0x00010005
> +  BASE_NAME            = PeiFirmwareBootMediaInfoLib
> +  FILE_GUID            = 91CC29F5-AEAD-4108-9E91-C8DECDC1C654
> +  MODULE_TYPE          = PEIM
> +  VERSION_STRING       = 1.0
> +  LIBRARY_CLASS        = FirmwareBootMediaInfoLib
> +
> +[Sources]
> +  PeiFirmwareBootMediaInfoLib.c
> +
> +[Packages]
> +  MdePkg/MdePkg.dec
> +  IntelSiliconPkg/IntelSiliconPkg.dec
> +  BoardModulePkg/BoardModulePkg.dec
> +
> +[LibraryClasses]
> +  BaseLib
> +  FirmwareBootMediaLib
> diff --git
> a/Platform/Intel/BoardModulePkg/Include/Library/FirmwareBootMediaInfoLib
> .h
> b/Platform/Intel/BoardModulePkg/Include/Library/FirmwareBootMediaInfoLib
> .h
> new file mode 100644
> index 0000000000..b08f21ac74
> --- /dev/null
> +++ b/Platform/Intel/BoardModulePkg/Include/Library/FirmwareBootMediaInf
> +++ oLib.h
> @@ -0,0 +1,26 @@
> +/** @file
> +  This library identifies the firmware boot media device.
> +
> +Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef _FIRMWARE_BOOT_MEDIA_INFO_LIB_H_ #define
> +_FIRMWARE_BOOT_MEDIA_INFO_LIB_H_
> +
> +#include <Uefi.h>
> +#include <Library/FirmwareBootMediaLib.h>
> +
> +/**
> +  Identifies the firmware boot media type for the current boot.
> +
> +  @retval BOOT_MEDIA_TYPE   The boot media type. A value of
> FwBootMediaTypeMax indicates the firmware boot media
> +                            information is unavailable.
> +**/
> +FW_BOOT_MEDIA_TYPE
> +IdentifyFirmwareBootMediaType (
> +  VOID
> +  );
> +
> +#endif
> diff --git
> a/Platform/Intel/BoardModulePkg/Library/PeiFirmwareBootMediaInfoLib/PeiFi
> rmwareBootMediaInfoLib.c
> b/Platform/Intel/BoardModulePkg/Library/PeiFirmwareBootMediaInfoLib/PeiFi
> rmwareBootMediaInfoLib.c
> new file mode 100644
> index 0000000000..0c29d96033
> --- /dev/null
> +++ b/Platform/Intel/BoardModulePkg/Library/PeiFirmwareBootMediaInfoLib/
> +++ PeiFirmwareBootMediaInfoLib.c
> @@ -0,0 +1,24 @@
> +/** @file
> +  This library identifies the firmware boot media device.
> +
> +Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#include <Library/BaseLib.h>
> +#include <Library/FirmwareBootMediaInfoLib.h>
> +
> +/**
> +  Identifies the firmware boot media type for the current boot.
> +
> +  @retval BOOT_MEDIA_TYPE   The boot media type. A value of
> FwBootMediaTypeMax indicates the firmware boot media
> +                            information is unavailable.
> +**/
> +FW_BOOT_MEDIA_TYPE
> +IdentifyFirmwareBootMediaType (
> +  VOID
> +  )
> +{
> +  return FwBootMediaSpi;
> +}
> --
> 2.16.2.windows.1


  reply	other threads:[~2019-10-08  7:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-01  1:15 [edk2-platforms][PATCH V1 0/3] Add FW Boot Media Device Indicator Kubacki, Michael A
2019-10-01  1:15 ` [edk2-platforms][PATCH V1 1/3] IntelSiliconPkg/FirmwareBootMediaLib: Add library Kubacki, Michael A
2019-10-01  1:15 ` [edk2-platforms][PATCH V1 2/3] BoardModulePkg/FirmwareBootMediaInfoLib: " Kubacki, Michael A
2019-10-08  7:01   ` Dong, Eric [this message]
2019-10-01  1:15 ` [edk2-platforms][PATCH V1 3/3] BoardModulePkg/FirmwareBootMediaInfoPei: Add module Kubacki, Michael A
2019-10-02 23:03 ` [edk2-platforms][PATCH V1 0/3] Add FW Boot Media Device Indicator Chaganty, Rangasai V
2019-10-03  1:02   ` Kubacki, Michael A
2019-10-03  4:20     ` [edk2-devel] " Andrew Fish
2019-10-03  7:54       ` Kubacki, Michael A
2019-10-07  1:34         ` Chaganty, Rangasai V

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=ED077930C258884BBCB450DB737E662259F0953F@shsmsx102.ccr.corp.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