MdePkg: Add new JedecJep106Lib to fetch JEDEC JEP106 manufacturer

Add a new library, JedecJep106Lib which provides a service to return the
JEDEC JEP106 manufacturer string given the code and continuation bytes
values.

Signed-off-by: Rebecca Cran <rebecca@quicinc.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
Rebecca Cran 2023-02-14 09:58:29 -07:00 committed by mergify[bot]
parent f9278458b6
commit 5430f7f60d
5 changed files with 1898 additions and 0 deletions

View File

@ -0,0 +1,29 @@
/** @file
Provides JEDEC JEP-106 Manufacturer functions.
Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef JEDEC_JEP106_LIB_H_
#define JEDEC_JEP106_LIB_H_
/**
Looks up the JEP-106 manufacturer.
@param Code Last non-zero byte of the manufacturer's ID code.
@param ContinuationBytes Number of continuation bytes indicated in JEP-106.
@return The manufacturer string, or NULL if an error occurred or the
combination of Code and ContinuationBytes are not valid.
**/
CONST CHAR8 *
EFIAPI
Jep106GetManufacturerName (
IN UINT8 Code,
IN UINT8 ContinuationBytes
);
#endif /* JEDEC_JEP106_LIB_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
## @file
# Instance of JEDEC JEP106 Library
#
# JedecJep106Lib fetches the manufacturer string given the JEP106
# Code and Continuation Bytes.
#
# Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x0001001d
BASE_NAME = JedecJep106Lib
FILE_GUID = d48d43d7-ba31-4463-9433-ccb233cf0df7
MODULE_TYPE = BASE
VERSION_STRING = 1.0
LIBRARY_CLASS = JedecJep106Lib
[Sources]
JedecJep106Lib.c
[Packages]
MdePkg/MdePkg.dec

View File

@ -259,6 +259,9 @@
#
UnitTestLib|Include/Library/UnitTestLib.h
## @libraryclass Provides service to get the manufacturer given JEP106 bytes.
JedecJep106Lib|Include/Library/JedecJep106Lib.h
## @libraryclass Extension to BaseLib for host based unit tests that allows a
# subset of BaseLib services to be hooked for emulation.
#

View File

@ -136,6 +136,8 @@
MdePkg/Library/CcProbeLibNull/CcProbeLibNull.inf
MdePkg/Library/SmmCpuRendezvousLibNull/SmmCpuRendezvousLibNull.inf
MdePkg/Library/JedecJep106Lib/JedecJep106Lib.inf
[Components.IA32, Components.X64, Components.ARM, Components.AARCH64]
#
# Add UEFI Target Based Unit Tests