[PATCH 0/3] Add APIs IsZeroBuffer and IsZeroGuid in BaseMemoryLib


Wu, Hao A
 

The patch series will add two APIs in BaseMemoryLib:
1. IsZeroBuffer()
The API is used to check if the contents of a buffer are all zeros.

2. IsZeroGuid()
The API is used to check if the given GUID is a zero GUID.

In order to resolve build issues in SecurityPkg, the series will also
remove the internal implementation of IsZeroBuffer() in modules within
SecurityPkg\Tcg and use the one in BaseMemoryLib instead.

Hao Wu (3):
MdePkg BaseMemoryLib: Add implementation of API IsZeroGuid()
MdePkg BaseMemoryLib: Add implementation of API IsZeroBuffer()
SecurityPkg Tcg2: Remove internal implementation of IsZeroBuffer()

MdePkg/Include/Library/BaseMemoryLib.h | 43 ++++++++++++++
MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf | 1 +
MdePkg/Library/BaseMemoryLib/IsZeroBuffer.c | 65 ++++++++++++++++++++++
MdePkg/Library/BaseMemoryLib/MemLibGuid.c | 31 ++++++++++-
.../Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf | 1 +
MdePkg/Library/BaseMemoryLibMmx/IsZeroBuffer.c | 65 ++++++++++++++++++++++
MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c | 31 ++++++++++-
.../BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf | 2 +
MdePkg/Library/BaseMemoryLibOptDxe/IsZeroBuffer.c | 65 ++++++++++++++++++++++
MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c | 31 ++++++++++-
.../BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf | 2 +
MdePkg/Library/BaseMemoryLibOptPei/IsZeroBuffer.c | 65 ++++++++++++++++++++++
MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c | 31 ++++++++++-
.../BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf | 1 +
MdePkg/Library/BaseMemoryLibRepStr/IsZeroBuffer.c | 65 ++++++++++++++++++++++
MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c | 31 ++++++++++-
.../BaseMemoryLibSse2/BaseMemoryLibSse2.inf | 1 +
MdePkg/Library/BaseMemoryLibSse2/IsZeroBuffer.c | 65 ++++++++++++++++++++++
MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c | 31 ++++++++++-
MdePkg/Library/PeiMemoryLib/IsZeroBuffer.c | 65 ++++++++++++++++++++++
MdePkg/Library/PeiMemoryLib/MemLibGuid.c | 31 ++++++++++-
MdePkg/Library/PeiMemoryLib/PeiMemoryLib.inf | 1 +
MdePkg/Library/UefiMemoryLib/IsZeroBuffer.c | 65 ++++++++++++++++++++++
MdePkg/Library/UefiMemoryLib/MemLibGuid.c | 31 ++++++++++-
MdePkg/Library/UefiMemoryLib/UefiMemoryLib.inf | 1 +
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c | 27 ---------
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 27 ---------
SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 27 ---------
28 files changed, 813 insertions(+), 89 deletions(-)
create mode 100644 MdePkg/Library/BaseMemoryLib/IsZeroBuffer.c
create mode 100644 MdePkg/Library/BaseMemoryLibMmx/IsZeroBuffer.c
create mode 100644 MdePkg/Library/BaseMemoryLibOptDxe/IsZeroBuffer.c
create mode 100644 MdePkg/Library/BaseMemoryLibOptPei/IsZeroBuffer.c
create mode 100644 MdePkg/Library/BaseMemoryLibRepStr/IsZeroBuffer.c
create mode 100644 MdePkg/Library/BaseMemoryLibSse2/IsZeroBuffer.c
create mode 100644 MdePkg/Library/PeiMemoryLib/IsZeroBuffer.c
create mode 100644 MdePkg/Library/UefiMemoryLib/IsZeroBuffer.c

--
1.9.5.msysgit.0

Join devel@edk2.groups.io to automatically receive all group messages.