summaryrefslogtreecommitdiff
path: root/Silicon
diff options
context:
space:
mode:
authorMichael Kubacki <michael.a.kubacki@intel.com>2019-10-14 14:22:04 -0700
committerMichael Kubacki <michael.a.kubacki@intel.com>2019-10-16 10:42:04 -0700
commit9939ef9599949e42bfb455fde110379e2abc9f3f (patch)
treea0d45f658bb8bc73ff1558c085d776147e137b1e /Silicon
parentbd26e41375259cf18bcca4c67090db456f87d362 (diff)
IntelSiliconPkg/BootMediaLib: Reduce library API
Removes the following functions from FirmwareBootMediaLib.h: * FirmwareBootMediaIsSpi () * FirmwareBootMediaIsUfs () * FirmwareBootMediaIsEmmc () * FirmwareBootMediaIsNvme () It is preferred to have a single method to retrieve the firmware boot media. To reduce overall maintenance effort over time, the FirmwareBootMediaIsXxx () pattern is removed in favor of returning the firmware boot media type via GetFirmwareBootMediaType (). Cc: Sai Chaganty <rangasai.v.chaganty@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com> Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'Silicon')
-rw-r--r--Silicon/Intel/IntelSiliconPkg/Include/Library/FirmwareBootMediaLib.h48
-rw-r--r--Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/DxeSmmFirmwareBootMediaLib.inf1
-rw-r--r--Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/FirmwareBootMediaLib.c109
-rw-r--r--Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/PeiFirmwareBootMediaLib.inf1
4 files changed, 0 insertions, 159 deletions
diff --git a/Silicon/Intel/IntelSiliconPkg/Include/Library/FirmwareBootMediaLib.h b/Silicon/Intel/IntelSiliconPkg/Include/Library/FirmwareBootMediaLib.h
index aca9593a..b36ebacf 100644
--- a/Silicon/Intel/IntelSiliconPkg/Include/Library/FirmwareBootMediaLib.h
+++ b/Silicon/Intel/IntelSiliconPkg/Include/Library/FirmwareBootMediaLib.h
@@ -55,52 +55,4 @@ FirmwareBootMediaIsKnown (
VOID
);
-/**
- Determines if the platform firmware is booting from SPI.
-
- @retval TRUE Platform firmware is booting from SPI
- @retval FALSE Platform firmware is booting from a non-SPI device or the boot media is unknown
-**/
-BOOLEAN
-EFIAPI
-FirmwareBootMediaIsSpi (
- VOID
- );
-
-/**
- Determines if the platform firmware is booting from UFS.
-
- @retval TRUE Platform firmware is booting from UFS
- @retval FALSE Platform firmware is booting from a non-UFS device or the boot media is unknown
-**/
-BOOLEAN
-EFIAPI
-FirmwareBootMediaIsUfs (
- VOID
- );
-
-/**
- Determines if the platform firmware is booting from eMMC.
-
- @retval TRUE Platform firmware is booting from eMMC
- @retval FALSE Platform firmware is booting from a non-eMMC device or the boot media is unknown
-**/
-BOOLEAN
-EFIAPI
-FirmwareBootMediaIsEmmc (
- VOID
- );
-
-/**
- Determines if the platform firmware is booting from NVMe.
-
- @retval TRUE Platform firmware is booting from NVMe.
- @retval FALSE Platform firmware is booting from a non-NVMe device or the boot media is unknown
-**/
-BOOLEAN
-EFIAPI
-FirmwareBootMediaIsNvme (
- VOID
- );
-
#endif
diff --git a/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/DxeSmmFirmwareBootMediaLib.inf b/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/DxeSmmFirmwareBootMediaLib.inf
index 83ed5f04..7e10b5f7 100644
--- a/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/DxeSmmFirmwareBootMediaLib.inf
+++ b/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/DxeSmmFirmwareBootMediaLib.inf
@@ -27,7 +27,6 @@
#
[Sources]
- FirmwareBootMediaLib.c
DxeSmmFirmwareBootMediaLib.c
[Packages]
diff --git a/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/FirmwareBootMediaLib.c b/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/FirmwareBootMediaLib.c
deleted file mode 100644
index 11a14d17..00000000
--- a/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/FirmwareBootMediaLib.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/** @file
- This library identifies the firmware boot media device.
-
- The firmware boot media device is used to make system initialization decisions in the boot flow dependent
- upon firmware boot media. Note that the firmware boot media is the storage media that the boot firmware is stored on.
- It is not the OS storage media which may be stored upon a different non-volatile storage device.
-
- This file contains library implementation common to all boot phases.
-
-Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#include <Library/BaseLib.h>
-#include <Library/DebugLib.h>
-#include <Library/FirmwareBootMediaLib.h>
-
-/**
- Determines if the platform firmware is booting from SPI.
-
- @retval TRUE Platform firmware is booting from SPI
- @retval FALSE Platform firmware is booting from a non-SPI device or the boot media is unknown
-**/
-BOOLEAN
-EFIAPI
-FirmwareBootMediaIsSpi (
- VOID
- )
-{
- EFI_STATUS Status;
- FW_BOOT_MEDIA_TYPE BootMedia;
-
- Status = GetFirmwareBootMediaType (&BootMedia);
- if (EFI_ERROR (Status) || BootMedia != FwBootMediaSpi) {
- return FALSE;
- } else {
- return TRUE;
- }
-}
-
-/**
- Determines if the platform firmware is booting from UFS.
-
- @retval TRUE Platform firmware is booting from UFS
- @retval FALSE Platform firmware is booting from a non-UFS device or the boot media is unknown
-**/
-BOOLEAN
-EFIAPI
-FirmwareBootMediaIsUfs (
- VOID
- )
-{
- EFI_STATUS Status;
- FW_BOOT_MEDIA_TYPE BootMedia;
-
- Status = GetFirmwareBootMediaType (&BootMedia);
- if (EFI_ERROR (Status) || BootMedia != FwBootMediaUfs) {
- return FALSE;
- } else {
- return TRUE;
- }
-}
-
-/**
- Determines if the platform firmware is booting from eMMC.
-
- @retval TRUE Platform firmware is booting from eMMC
- @retval FALSE Platform firmware is booting from a non-eMMC device or the boot media is unknown
-**/
-BOOLEAN
-EFIAPI
-FirmwareBootMediaIsEmmc (
- VOID
- )
-{
- EFI_STATUS Status;
- FW_BOOT_MEDIA_TYPE BootMedia;
-
- Status = GetFirmwareBootMediaType (&BootMedia);
- if (EFI_ERROR (Status) || BootMedia != FwBootMediaEmmc) {
- return FALSE;
- } else {
- return TRUE;
- }
-}
-
-/**
- Determines if the platform firmware is booting from NVMe.
-
- @retval TRUE Platform firmware is booting from NVMe.
- @retval FALSE Platform firmware is booting from a non-NVMe device or the boot media is unknown
-**/
-BOOLEAN
-EFIAPI
-FirmwareBootMediaIsNvme (
- VOID
- )
-{
- EFI_STATUS Status;
- FW_BOOT_MEDIA_TYPE BootMedia;
-
- Status = GetFirmwareBootMediaType (&BootMedia);
- if (EFI_ERROR (Status) || BootMedia != FwBootMediaNvme) {
- return FALSE;
- } else {
- return TRUE;
- }
-}
diff --git a/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/PeiFirmwareBootMediaLib.inf b/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/PeiFirmwareBootMediaLib.inf
index 063c4027..ff1da313 100644
--- a/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/PeiFirmwareBootMediaLib.inf
+++ b/Silicon/Intel/IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/PeiFirmwareBootMediaLib.inf
@@ -22,7 +22,6 @@
LIBRARY_CLASS = FirmwareBootMediaLib
[Sources]
- FirmwareBootMediaLib.c
PeiFirmwareBootMediaLib.c
[Packages]