public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access
@ 2021-03-15  3:58 Dandan Bi
  2021-03-15  3:58 ` [patch 01/28] MdePkg: Add RegisterFilterLib class and NULL instance Dandan Bi
                   ` (27 more replies)
  0 siblings, 28 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel
  Cc: Andrew Fish, Leif Lindholm, Laszlo Ersek, Michael D Kinney,
	Liming Gao, Zhiguang Liu

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
RFC: https://edk2.groups.io/g/devel/message/72530


Patch 1 is to add RegisterFilterLib Library Class in edk2 to filter/trace port IO/MMIO/MSR access and add a RegisterFilterLibNull instance.
Last 2 patches are to update APIs in IoLib and BaseLib to filter/trace port IO/MMIO/MSR access.
Remaining patches are to update related dsc files to consume RegisterFilterLibNull instance.

Will submit patch 1 firstly and then update related dsc files in edk2 and edk2platform repo to consume RegisterFilterLibNull instance.
At last will submit the patches to update IoLib and BaseLib to filter/trace port IO/MMIO/MSR access.


Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Dandan Bi (28):
  MdePkg: Add RegisterFilterLib class and NULL instance
  ArmPkg: Consume RegisterFilterLibNull instance
  ArmPlatformPkg: Consume RegisterFilterLibNull instance
  ArmVirtPkg: Consume RegisterFilterLibNull instance
  CryptoPkg: Consume RegisterFilterLibNull instance
  DynamicTablesPkg: Consume RegisterFilterLibNull instance
  EmbeddedPkg: Consume RegisterFilterLibNull instance
  EmulatorPkg: Consume RegisterFilterLibNull instance
  FatPkg: Consume RegisterFilterLibNull instance
  FmpDevicePkg: Consume RegisterFilterLibNull instance
  IntelFsp2Pkg: Consume RegisterFilterLibNull instance
  IntelFsp2WrapperPkg: Consume RegisterFilterLibNull instance
  MdeModulePkg: Consume RegisterFilterLibNull instance
  MdePkg: Consume RegisterFilterLibNull instance
  NetworkPkg: Consume RegisterFilterLibNull instance
  OvmfPkg: Consume RegisterFilterLibNull instance
  PcAtChipsetPkg: Consume RegisterFilterLibNull instance
  RedfishPkg: Consume RegisterFilterLibNull instance
  SecurityPkg: Consume RegisterFilterLibNull instance
  ShellPkg: Consume RegisterFilterLibNull instance
  SignedCapsulePkg: Consume RegisterFilterLibNull instance
  SourceLevelDebugPkg: Consume RegisterFilterLibNull instance
  StandaloneMmPkg: Consume RegisterFilterLibNull instance
  UefiCpuPkg: Consume RegisterFilterLibNull instance
  UefiPayloadPkg: Consume RegisterFilterLibNull instance
  UnitTestFrameworkPkg: Consume RegisterFilterLibNull instance
  MdePkg/IoLib: Filter/trace port IO/MMIO access
  MdePkg/Baseib: Filter/trace MSR access for IA32/X64

 ArmPkg/ArmPkg.dsc                             |   1 +
 ArmPlatformPkg/ArmPlatformPkg.dsc             |   1 +
 ArmVirtPkg/ArmVirt.dsc.inc                    |   1 +
 CryptoPkg/CryptoPkg.dsc                       |   1 +
 DynamicTablesPkg/DynamicTablesPkg.dsc         |   1 +
 EmbeddedPkg/EmbeddedPkg.dsc                   |   1 +
 EmulatorPkg/EmulatorPkg.dsc                   |   1 +
 FatPkg/FatPkg.dsc                             |   1 +
 FmpDevicePkg/FmpDevicePkg.dsc                 |   1 +
 IntelFsp2Pkg/IntelFsp2Pkg.dsc                 |   1 +
 IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc   |   1 +
 MdeModulePkg/MdeModulePkg.dsc                 |   1 +
 MdePkg/Include/Library/RegisterFilterLib.h    | 225 ++++++++++++++++
 .../BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf |   3 +-
 .../BaseIoLibIntrinsicArmVirt.inf             |   3 +-
 .../BaseIoLibIntrinsicInternal.h              |   3 +-
 .../BaseIoLibIntrinsicSev.inf                 |   3 +-
 MdePkg/Library/BaseIoLibIntrinsic/IoLib.c     |  95 +++++--
 .../Library/BaseIoLibIntrinsic/IoLibArmVirt.c |  82 +++++-
 MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c  |  58 +++-
 MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c  |  81 ++++--
 MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c |  74 ++++-
 MdePkg/Library/BaseLib/BaseLib.inf            |   5 +-
 MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c   |  36 ++-
 MdePkg/Library/BaseLib/Ia32/ReadMsr64.c       |  38 ++-
 MdePkg/Library/BaseLib/Ia32/WriteMsr64.c      |  22 +-
 MdePkg/Library/BaseLib/X64/GccInlinePriv.c    |  41 ++-
 MdePkg/Library/BaseLib/X64/ReadMsr64.c        |  15 +-
 MdePkg/Library/BaseLib/X64/WriteMsr64.c       |  13 +-
 .../RegisterFilterLibNull.c                   | 253 ++++++++++++++++++
 .../RegisterFilterLibNull.inf                 |  23 ++
 .../RegisterFilterLibNull.uni                 |  13 +
 MdePkg/MdePkg.dec                             |   7 +-
 MdePkg/MdePkg.dsc                             |   5 +-
 NetworkPkg/NetworkPkg.dsc                     |   1 +
 OvmfPkg/OvmfPkgIa32.dsc                       |   1 +
 OvmfPkg/OvmfPkgIa32X64.dsc                    |   1 +
 OvmfPkg/OvmfPkgX64.dsc                        |   1 +
 OvmfPkg/OvmfXen.dsc                           |   1 +
 PcAtChipsetPkg/PcAtChipsetPkg.dsc             |   1 +
 RedfishPkg/RedfishPkg.dsc                     |   1 +
 SecurityPkg/SecurityPkg.dsc                   |   1 +
 ShellPkg/ShellPkg.dsc                         |   1 +
 SignedCapsulePkg/SignedCapsulePkg.dsc         |   1 +
 SourceLevelDebugPkg/SourceLevelDebugPkg.dsc   |   1 +
 StandaloneMmPkg/StandaloneMmPkg.dsc           |   1 +
 UefiCpuPkg/UefiCpuPkg.dsc                     |   1 +
 UefiPayloadPkg/UefiPayloadPkg.dsc             |   1 +
 .../UnitTestFrameworkPkgTarget.dsc.inc        |   1 +
 49 files changed, 1008 insertions(+), 117 deletions(-)
 create mode 100644 MdePkg/Include/Library/RegisterFilterLib.h
 create mode 100644 MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c
 create mode 100644 MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 create mode 100644 MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.uni

-- 
2.18.0.windows.1


^ permalink raw reply	[flat|nested] 42+ messages in thread

* [patch 01/28] MdePkg: Add RegisterFilterLib class and NULL instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  5:21   ` [edk2-devel] " Abner Chang
  2021-03-15  3:58 ` [patch 02/28] ArmPkg: Consume RegisterFilterLibNull instance Dandan Bi
                   ` (26 subsequent siblings)
  27 siblings, 1 reply; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Liming Gao, Zhiguang Liu

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

1. Add a new library class (RegisterFilterLib) to filter
and trace port IO/MMIO/MSR access.
2. Add a NULL instance (RegisterFilterLibNull) can be used
to keep current behavior.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdePkg/Include/Library/RegisterFilterLib.h    | 225 ++++++++++++++++
 .../RegisterFilterLibNull.c                   | 253 ++++++++++++++++++
 .../RegisterFilterLibNull.inf                 |  23 ++
 .../RegisterFilterLibNull.uni                 |  13 +
 MdePkg/MdePkg.dec                             |   7 +-
 MdePkg/MdePkg.dsc                             |   4 +-
 6 files changed, 523 insertions(+), 2 deletions(-)
 create mode 100644 MdePkg/Include/Library/RegisterFilterLib.h
 create mode 100644 MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c
 create mode 100644 MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 create mode 100644 MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.uni

diff --git a/MdePkg/Include/Library/RegisterFilterLib.h b/MdePkg/Include/Library/RegisterFilterLib.h
new file mode 100644
index 0000000000..df0adb3a42
--- /dev/null
+++ b/MdePkg/Include/Library/RegisterFilterLib.h
@@ -0,0 +1,225 @@
+/** @file
+  Public include file for the Port IO/MMIO/MSR RegisterFilterLib.
+
+Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
+
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef REGISTER_FILTER_LIB_H_
+#define REGISTER_FILTER_LIB_H_
+
+typedef enum {
+  FilterWidth8,
+  FilterWidth16,
+  FilterWidth32,
+  FilterWidth64
+} FILTER_IO_WIDTH;
+
+/**
+  Filter IO read operation before read IO port.
+  It is used to filter IO read operation.
+
+  It will return the flag to decide whether require read real IO port.
+  It can be used for emulation environment.
+
+  @param[in]       Width    Signifies the width of the I/O operation.
+  @param[in]       Address  The base address of the I/O operation.
+  @param[in]       Buffer   The destination buffer to store the results.
+
+**/
+BOOLEAN
+EFIAPI
+FilterBeforeIoRead (
+  IN FILTER_IO_WIDTH   Width,
+  IN UINTN             Address,
+  IN OUT VOID          *Buffer
+  );
+
+/**
+  Trace IO read operation after read IO port.
+  It is used to trace IO operation.
+
+  @param[in]       Width    Signifies the width of the I/O operation.
+  @param[in]       Address  The base address of the I/O operation.
+  @param[in]       Buffer   The destination buffer to store the results.
+
+**/
+VOID
+EFIAPI
+FilterAfterIoRead (
+  IN FILTER_IO_WIDTH  Width,
+  IN UINTN            Address,
+  IN VOID             *Buffer
+  );
+/**
+  Filter IO Write operation before wirte IO port.
+  It is used to filter IO operation.
+
+  It will return the flag to decide whether require read write IO port.
+  It can be used for emulation environment.
+
+  @param[in]       Width    Signifies the width of the I/O operation.
+  @param[in]       Address  The base address of the I/O operation.
+  @param[in]       Buffer   The source buffer from which to BeforeWrite data.
+
+**/
+BOOLEAN
+EFIAPI
+FilterBeforeIoWrite (
+  IN FILTER_IO_WIDTH  Width,
+  IN UINTN            Address,
+  IN VOID             *Buffer
+  );
+
+  /**
+  Trace IO Write operation after wirte IO port.
+  It is used to trace IO operation.
+
+  @param[in]       Width    Signifies the width of the I/O operation.
+  @param[in]       Address  The base address of the I/O operation.
+  @param[in]       Buffer   The source buffer from which to BeforeWrite data.
+
+**/
+VOID
+EFIAPI
+FilterAfterIoWrite (
+  IN FILTER_IO_WIDTH  Width,
+  IN UINTN            Address,
+  IN VOID             *Buffer
+  );
+
+/**
+  Filter memory IO before Read operation.
+
+  It will return the flag to decide whether require read real MMIO.
+  It can be used for emulation environment.
+
+  @param[in]       Width    Signifies the width of the memory I/O operation.
+  @param[in]       Address  The base address of the memory I/O operation.
+  @param[in]       Buffer   The destination buffer to store the results.
+
+**/
+BOOLEAN
+EFIAPI
+FilterBeforeMmIoRead (
+  IN FILTER_IO_WIDTH  Width,
+  IN UINTN            Address,
+  IN OUT VOID         *Buffer
+  );
+
+/**
+  Tracer memory IO after read operation
+
+  @param[in]       Width    Signifies the width of the memory I/O operation.
+  @param[in]       Address  The base address of the memory I/O operation.
+  @param[in]       Buffer   The destination buffer to store the results.
+
+**/
+VOID
+EFIAPI
+FilterAfterMmIoRead (
+  IN FILTER_IO_WIDTH  Width,
+  IN UINTN            Address,
+  IN VOID             *Buffer
+  );
+
+/**
+  Filter memory IO before write operation
+
+  It will return the flag to decide whether require wirte real MMIO.
+  It can be used for emulation environment.
+
+  @param[in]       Width    Signifies the width of the memory I/O operation.
+  @param[in]       Address  The base address of the memory I/O operation.
+  @param[in]       Buffer   The source buffer from which to BeforeWrite data.
+
+**/
+BOOLEAN
+EFIAPI
+FilterBeforeMmIoWrite (
+  IN FILTER_IO_WIDTH  Width,
+  IN UINTN            Address,
+  IN VOID             *Buffer
+  );
+
+/**
+  Tracer memory IO after write operation
+
+  @param[in]       Width    Signifies the width of the memory I/O operation.
+  @param[in]       Address  The base address of the memory I/O operation.
+  @param[in]       Buffer   The source buffer from which to BeforeWrite data.
+
+**/
+VOID
+EFIAPI
+FilterAfterMmIoWrite (
+  IN FILTER_IO_WIDTH  Width,
+  IN UINTN            Address,
+  IN VOID             *Buffer
+  );
+
+/**
+  Filter MSR before read operation.
+
+  It will return the flag to decide whether require read real MSR.
+  It can be used for emulation environment.
+
+  @param  Index                     The 8-bit Machine Specific Register index to BeforeWrite.
+  @param  Value                     The 64-bit value to BeforeRead from the Machine Specific Register.
+
+**/
+BOOLEAN
+EFIAPI
+FilterBeforeMsrRead (
+  IN UINT32           Index,
+  IN OUT UINT64       *Value
+  );
+
+/**
+  Trace MSR after read operation
+
+  @param  Index                     The 8-bit Machine Specific Register index to BeforeWrite.
+  @param  Value                     The 64-bit value to BeforeRead from the Machine Specific Register.
+
+**/
+VOID
+EFIAPI
+FilterAfterMsrRead (
+  IN UINT32            Index,
+  IN UINT64            *Value
+  );
+
+/**
+  Filter MSR before write operation
+
+  It will return the flag to decide whether require write real MSR.
+  It can be used for emulation environment.
+
+  @param  Index                     The 8-bit Machine Specific Register index to BeforeWrite.
+  @param  Value                     The 64-bit value to BeforeWrite to the Machine Specific Register.
+
+**/
+BOOLEAN
+EFIAPI
+FilterBeforeMsrWrite (
+  IN UINT32           Index,
+  IN UINT64           *Value
+  );
+
+/**
+  Trace MSR after write operation
+
+  @param  Index                     The 8-bit Machine Specific Register index to BeforeWrite.
+  @param  Value                     The 64-bit value to BeforeWrite to the Machine Specific Register.
+
+**/
+VOID
+EFIAPI
+FilterAfterMsrWrite (
+  IN UINT32            Index,
+  IN UINT64            *Value
+  );
+
+#endif // REGISTER_FILTER_LIB_H_
diff --git a/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c
new file mode 100644
index 0000000000..5c2bc2864a
--- /dev/null
+++ b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c
@@ -0,0 +1,253 @@
+/** @file
+  Null instance of RegisterFilterLib.
+
+  Copyright (c) 2021 Intel Corporation. All rights reserved.<BR>
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Library/RegisterFilterLib.h>
+
+/**
+  Filter IO read operation before read IO port.
+  It is used to filter IO read operation.
+
+  It will return the flag to decide whether require read real IO port.
+  It can be used for emulation environment.
+
+  @param[in]       Width    Signifies the width of the I/O operation.
+  @param[in]       Address  The base address of the I/O operation.
+  @param[in,out]   Buffer   The destination buffer to store the results.
+
+**/
+BOOLEAN
+EFIAPI
+FilterBeforeIoRead (
+  IN FILTER_IO_WIDTH  Width,
+  IN UINTN            Address,
+  IN OUT VOID         *Buffer
+  )
+{
+  return TRUE;
+}
+
+/**
+  Trace IO read operation after read IO port.
+  It is used to trace IO operation.
+
+  @param[in]       Width    Signifies the width of the I/O operation.
+  @param[in]       Address  The base address of the I/O operation.
+  @param[in]       Buffer   The destination buffer to store the results.
+
+**/
+VOID
+EFIAPI
+FilterAfterIoRead (
+  IN FILTER_IO_WIDTH  Width,
+  IN UINTN            Address,
+  IN VOID             *Buffer
+  )
+{
+  return;
+}
+
+/**
+  Filter IO Write operation before wirte IO port.
+  It is used to filter IO operation.
+
+  It will return the flag to decide whether require read write IO port.
+  It can be used for emulation environment.
+
+  @param[in]       Width    Signifies the width of the I/O operation.
+  @param[in]       Address  The base address of the I/O operation.
+  @param[in]       Buffer   The source buffer from which to write data.
+
+**/
+BOOLEAN
+EFIAPI
+FilterBeforeIoWrite (
+  IN FILTER_IO_WIDTH  Width,
+  IN UINTN            Address,
+  IN VOID             *Buffer
+  )
+{
+  return TRUE;
+}
+
+  /**
+  Trace IO Write operation after wirte IO port.
+  It is used to trace IO operation.
+
+  @param[in]       Width    Signifies the width of the I/O operation.
+  @param[in]       Address  The base address of the I/O operation.
+  @param[in]       Buffer   The source buffer from which to Write data.
+
+**/
+VOID
+EFIAPI
+FilterAfterIoWrite (
+  IN FILTER_IO_WIDTH  Width,
+  IN UINTN            Address,
+  IN VOID             *Buffer
+  )
+{
+  return;
+}
+
+/**
+  Filter memory IO before Read operation.
+
+  It will return the flag to decide whether require read real MMIO.
+  It can be used for emulation environment.
+
+  @param[in]       Width    Signifies the width of the memory I/O operation.
+  @param[in]       Address  The base address of the memory I/O operation.
+  @param[in,out]   Buffer   The destination buffer to store the results.
+
+**/
+BOOLEAN
+EFIAPI
+FilterBeforeMmIoRead (
+  IN FILTER_IO_WIDTH  Width,
+  IN UINTN            Address,
+  IN OUT VOID         *Buffer
+  )
+{
+  return TRUE;
+}
+
+/**
+  Tracer memory IO after read operation.
+
+  @param[in]       Width    Signifies the width of the memory I/O operation.
+  @param[in]       Address  The base address of the memory I/O operation.
+  @param[in]       Buffer   The destination buffer to store the results.
+
+**/
+VOID
+EFIAPI
+FilterAfterMmIoRead (
+  IN FILTER_IO_WIDTH  Width,
+  IN UINTN            Address,
+  IN VOID             *Buffer
+  )
+{
+  return;
+}
+
+/**
+  Filter memory IO before write operation.
+
+  It will return the flag to decide whether require wirte real MMIO.
+  It can be used for emulation environment.
+
+  @param[in]       Width    Signifies the width of the memory I/O operation.
+  @param[in]       Address  The base address of the memory I/O operation.
+  @param[in]       Buffer   The source buffer from which to write data.
+
+**/
+BOOLEAN
+EFIAPI
+FilterBeforeMmIoWrite (
+  IN FILTER_IO_WIDTH  Width,
+  IN UINTN            Address,
+  IN VOID             *Buffer
+  )
+{
+  return TRUE;
+}
+
+/**
+  Tracer memory IO after write operation.
+
+  @param[in]       Width    Signifies the width of the memory I/O operation.
+  @param[in]       Address  The base address of the memory I/O operation.
+  @param[in]       Buffer   The source buffer from which to write data.
+
+**/
+VOID
+EFIAPI
+FilterAfterMmIoWrite (
+  IN FILTER_IO_WIDTH  Width,
+  IN UINTN            Address,
+  IN VOID             *Buffer
+  )
+{
+  return;
+}
+
+/**
+  Filter MSR before read operation.
+
+  It will return the flag to decide whether require read real MSR.
+  It can be used for emulation environment.
+
+  @param  Index                     The Register index of the MSR.
+  @param  Value                     Point to the data will be read from the MSR.
+
+**/
+BOOLEAN
+EFIAPI
+FilterBeforeMsrRead (
+  IN UINT32        Index,
+  IN OUT UINT64    *Value
+  )
+{
+  return TRUE;
+}
+
+/**
+  Trace MSR after read operation.
+
+  @param  Index                     The Register index of the MSR.
+  @param  Value                     Point to the data has been be read from the MSR.
+
+**/
+VOID
+EFIAPI
+FilterAfterMsrRead (
+  IN UINT32    Index,
+  IN UINT64    *Value
+  )
+{
+  return;
+}
+
+/**
+  Filter MSR before write operation.
+
+  It will return the flag to decide whether require write real MSR.
+  It can be used for emulation environment.
+
+  @param  Index                     The Register index of the MSR.
+  @param  Value                     Point to the data want to be written to the MSR.
+
+**/
+BOOLEAN
+EFIAPI
+FilterBeforeMsrWrite (
+  IN UINT32    Index,
+  IN UINT64    *Value
+  )
+{
+  return TRUE;
+}
+
+/**
+  Trace MSR after write operation.
+
+  @param  Index                     The Register index of the MSR.
+  @param  Value                     Point to the data has been be written to the MSR.
+
+**/
+VOID
+EFIAPI
+FilterAfterMsrWrite (
+  IN UINT32    Index,
+  IN UINT64    *Value
+  )
+{
+  return;
+}
+
diff --git a/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
new file mode 100644
index 0000000000..a7fc7497ed
--- /dev/null
+++ b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
@@ -0,0 +1,23 @@
+## @file
+#  Null instance of RegisterFilterLib.
+#
+#  Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
+#
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  INF_VERSION                    = 0x00010005
+  BASE_NAME                      = FilterLibNull
+  MODULE_UNI_FILE                = FilterLibNull.uni
+  FILE_GUID                      = 9F555194-A410-4AD6-B3FC-53F6E10FA793
+  MODULE_TYPE                    = BASE
+  VERSION_STRING                 = 1.0
+  LIBRARY_CLASS                  = RegisterFilterLib
+
+[Sources]
+  RegisterFilterLibNull.c
+
+[Packages]
+  MdePkg/MdePkg.dec
diff --git a/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.uni b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.uni
new file mode 100644
index 0000000000..8a8f1c4a77
--- /dev/null
+++ b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.uni
@@ -0,0 +1,13 @@
+// /** @file
+// Null instance of RegisterFilterLib.
+//
+// Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
+//
+// SPDX-License-Identifier: BSD-2-Clause-Patent
+//
+// **/
+
+
+#string STR_MODULE_ABSTRACT              #language en-US "Null instance of RegisterFilterLib.
+#string STR_MODULE_DESCRIPTION           #language en-US "Null instance of RegisterFilterLib."
+
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 1d2637acc2..c437e2a065 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -2,11 +2,11 @@
 # This Package provides all definitions, library classes and libraries instances.
 #
 # It also provides the definitions(including PPIs/PROTOCOLs/GUIDs) of
 # EFI1.10/UEFI2.7/PI1.7 and some Industry Standards.
 #
-# Copyright (c) 2007 - 2020, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
 # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
 # (C) Copyright 2016 - 2020 Hewlett Packard Enterprise Development LP<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -255,10 +255,15 @@
   ## @libraryclass Extension to BaseLib for host based unit tests that allows a
   #                subset of BaseLib services to be hooked for emulation.
   #
   UnitTestHostBaseLib|Test/UnitTest/Include/Library/UnitTestHostBaseLib.h
 
+  ##  @libraryclass
+  #
+  #
+  RegisterFilterLib|Include/Library/RegisterFilterLib.h
+
   ##  @libraryclass  This library provides an interface to request non-MMRAM pages to be mapped
   #                  or unblocked from inside MM environment.
   #
   MmUnblockMemoryLib|Include/Library/MmUnblockMemoryLib.h
 
diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc
index 79629e3f93..be89e28eef 100644
--- a/MdePkg/MdePkg.dsc
+++ b/MdePkg/MdePkg.dsc
@@ -1,9 +1,9 @@
 ## @file
 # EFI/PI MdePkg Package
 #
-# Copyright (c) 2007 - 2020, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
 # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
 # (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
 #
 #    SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -125,10 +125,12 @@
   MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
 
   MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf
   MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.inf
 
+  MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
+
 [Components.IA32, Components.X64, Components.ARM, Components.AARCH64]
   #
   # Add UEFI Target Based Unit Tests
   #
   MdePkg/Test/UnitTest/Library/BaseLib/BaseLibUnitTestsUefi.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 02/28] ArmPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
  2021-03-15  3:58 ` [patch 01/28] MdePkg: Add RegisterFilterLib class and NULL instance Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  3:58 ` [patch 03/28] ArmPlatformPkg: " Dandan Bi
                   ` (25 subsequent siblings)
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Leif Lindholm, Ard Biesheuvel

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 ArmPkg/ArmPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc
index 7194eb2d3c..dd477e08e3 100644
--- a/ArmPkg/ArmPkg.dsc
+++ b/ArmPkg/ArmPkg.dsc
@@ -48,10 +48,11 @@
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
 
   SemihostLib|ArmPkg/Library/SemihostLib/SemihostLib.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 03/28] ArmPlatformPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
  2021-03-15  3:58 ` [patch 01/28] MdePkg: Add RegisterFilterLib class and NULL instance Dandan Bi
  2021-03-15  3:58 ` [patch 02/28] ArmPkg: Consume RegisterFilterLibNull instance Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  3:58 ` [patch 04/28] ArmVirtPkg: " Dandan Bi
                   ` (24 subsequent siblings)
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Leif Lindholm, Ard Biesheuvel

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 ArmPlatformPkg/ArmPlatformPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ArmPlatformPkg/ArmPlatformPkg.dsc b/ArmPlatformPkg/ArmPlatformPkg.dsc
index 88fe1247c0..c850c952f3 100644
--- a/ArmPlatformPkg/ArmPlatformPkg.dsc
+++ b/ArmPlatformPkg/ArmPlatformPkg.dsc
@@ -71,10 +71,11 @@
   UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
   NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
 
 [LibraryClasses.common.PEIM]
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 04/28] ArmVirtPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (2 preceding siblings ...)
  2021-03-15  3:58 ` [patch 03/28] ArmPlatformPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-16 16:38   ` Laszlo Ersek
  2021-03-15  3:58 ` [patch 05/28] CryptoPkg: " Dandan Bi
                   ` (23 subsequent siblings)
  27 siblings, 1 reply; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Laszlo Ersek, Ard Biesheuvel, Leif Lindholm

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 ArmVirtPkg/ArmVirt.dsc.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
index d9abadbe70..4d4ebc5f0c 100644
--- a/ArmVirtPkg/ArmVirt.dsc.inc
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
@@ -51,10 +51,11 @@
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicArmVirt.inf
   UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   HobLib|ArmVirtPkg/Library/ArmVirtDxeHobLib/ArmVirtDxeHobLib.inf
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 05/28] CryptoPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (3 preceding siblings ...)
  2021-03-15  3:58 ` [patch 04/28] ArmVirtPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  3:58 ` [patch 06/28] DynamicTablesPkg: " Dandan Bi
                   ` (22 subsequent siblings)
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Jian J Wang, Xiaoyu Lu, Guomin Jiang

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 CryptoPkg/CryptoPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CryptoPkg/CryptoPkg.dsc b/CryptoPkg/CryptoPkg.dsc
index 55383f2722..f1eaef9f3b 100644
--- a/CryptoPkg/CryptoPkg.dsc
+++ b/CryptoPkg/CryptoPkg.dsc
@@ -59,10 +59,11 @@
   UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
   BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
   TlsLib|CryptoPkg/Library/TlsLibNull/TlsLibNull.inf
   HashApiLib|CryptoPkg/Library/BaseHashApiLib/BaseHashApiLib.inf
   RngLib|MdePkg/Library/BaseRngLibNull/BaseRngLibNull.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.ARM, LibraryClasses.AARCH64]
   #
   # It is not possible to prevent the ARM compiler for generic intrinsic functions.
   # This library provides the instrinsic functions generate by a given compiler.
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 06/28] DynamicTablesPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (4 preceding siblings ...)
  2021-03-15  3:58 ` [patch 05/28] CryptoPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  3:58 ` [patch 07/28] EmbeddedPkg: " Dandan Bi
                   ` (21 subsequent siblings)
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Sami Mujawar, Alexei Fedorov

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Sami Mujawar <Sami.Mujawar@arm.com>
Cc: Alexei Fedorov <Alexei.Fedorov@arm.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 DynamicTablesPkg/DynamicTablesPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/DynamicTablesPkg/DynamicTablesPkg.dsc b/DynamicTablesPkg/DynamicTablesPkg.dsc
index 0232bda459..c68c733f92 100644
--- a/DynamicTablesPkg/DynamicTablesPkg.dsc
+++ b/DynamicTablesPkg/DynamicTablesPkg.dsc
@@ -28,10 +28,11 @@
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.ARM, LibraryClasses.AARCH64]
   NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
   PL011UartLib|ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf
 
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 07/28] EmbeddedPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (5 preceding siblings ...)
  2021-03-15  3:58 ` [patch 06/28] DynamicTablesPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  3:58 ` [patch 08/28] EmulatorPkg: " Dandan Bi
                   ` (20 subsequent siblings)
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Leif Lindholm, Ard Biesheuvel

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 EmbeddedPkg/EmbeddedPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/EmbeddedPkg/EmbeddedPkg.dsc b/EmbeddedPkg/EmbeddedPkg.dsc
index 8e83e50c3e..8033fb5940 100644
--- a/EmbeddedPkg/EmbeddedPkg.dsc
+++ b/EmbeddedPkg/EmbeddedPkg.dsc
@@ -50,10 +50,11 @@
   BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
   PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
   PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
   UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   ReportStatusCodeLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
 
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 08/28] EmulatorPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (6 preceding siblings ...)
  2021-03-15  3:58 ` [patch 07/28] EmbeddedPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  3:58 ` [patch 09/28] FatPkg: " Dandan Bi
                   ` (19 subsequent siblings)
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Andrew Fish, Ray Ni

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Andrew Fish <afish@apple.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 EmulatorPkg/EmulatorPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc
index a7ded49000..90b8b4de35 100644
--- a/EmulatorPkg/EmulatorPkg.dsc
+++ b/EmulatorPkg/EmulatorPkg.dsc
@@ -62,10 +62,11 @@
   CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
   FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   #
   # UEFI & PI
   #
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 09/28] FatPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (7 preceding siblings ...)
  2021-03-15  3:58 ` [patch 08/28] EmulatorPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  3:58 ` [patch 10/28] FmpDevicePkg: " Dandan Bi
                   ` (18 subsequent siblings)
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Ray Ni

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 FatPkg/FatPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/FatPkg/FatPkg.dsc b/FatPkg/FatPkg.dsc
index d86256068b..b00a279799 100644
--- a/FatPkg/FatPkg.dsc
+++ b/FatPkg/FatPkg.dsc
@@ -44,10 +44,11 @@
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
   DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.common.PEIM]
   PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
   PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
   PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 10/28] FmpDevicePkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (8 preceding siblings ...)
  2021-03-15  3:58 ` [patch 09/28] FatPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  3:58 ` [patch 11/28] IntelFsp2Pkg: " Dandan Bi
                   ` (17 subsequent siblings)
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Liming Gao, Michael D Kinney

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 FmpDevicePkg/FmpDevicePkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/FmpDevicePkg/FmpDevicePkg.dsc b/FmpDevicePkg/FmpDevicePkg.dsc
index cfeadd8330..ebd3e397f8 100644
--- a/FmpDevicePkg/FmpDevicePkg.dsc
+++ b/FmpDevicePkg/FmpDevicePkg.dsc
@@ -65,10 +65,11 @@
   FmpDeviceLib|FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLibNull.inf
   FmpDependencyLib|FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.inf
   FmpDependencyCheckLib|FmpDevicePkg/Library/FmpDependencyCheckLibNull/FmpDependencyCheckLibNull.inf
   FmpDependencyDeviceLib|FmpDevicePkg/Library/FmpDependencyDeviceLibNull/FmpDependencyDeviceLibNull.inf
   TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.ARM, LibraryClasses.AARCH64]
   #
   # It is not possible to prevent the ARM compiler for generic intrinsic functions.
   # This library provides the intrinsic functions generate by a given compiler.
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 11/28] IntelFsp2Pkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (9 preceding siblings ...)
  2021-03-15  3:58 ` [patch 10/28] FmpDevicePkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  4:09   ` Chiu, Chasel
  2021-03-15  3:58 ` [patch 12/28] IntelFsp2WrapperPkg: " Dandan Bi
                   ` (16 subsequent siblings)
  27 siblings, 1 reply; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Chasel Chiu, Nate DeSimone, Star Zeng

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 IntelFsp2Pkg/IntelFsp2Pkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/IntelFsp2Pkg/IntelFsp2Pkg.dsc b/IntelFsp2Pkg/IntelFsp2Pkg.dsc
index 309411630d..7422526d5e 100644
--- a/IntelFsp2Pkg/IntelFsp2Pkg.dsc
+++ b/IntelFsp2Pkg/IntelFsp2Pkg.dsc
@@ -24,10 +24,11 @@
   DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
   PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
   PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
   SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
   ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 12/28] IntelFsp2WrapperPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (10 preceding siblings ...)
  2021-03-15  3:58 ` [patch 11/28] IntelFsp2Pkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  4:09   ` Chiu, Chasel
  2021-03-15  3:58 ` [patch 13/28] MdeModulePkg: " Dandan Bi
                   ` (15 subsequent siblings)
  27 siblings, 1 reply; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Chasel Chiu, Nate DeSimone, Star

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
index 738342b69b..031a6b71ff 100644
--- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
+++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
@@ -27,10 +27,11 @@
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
   SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
   ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
   TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 13/28] MdeModulePkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (11 preceding siblings ...)
  2021-03-15  3:58 ` [patch 12/28] IntelFsp2WrapperPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  6:02   ` Wu, Hao A
  2021-03-15  3:58 ` [patch 14/28] MdePkg: " Dandan Bi
                   ` (14 subsequent siblings)
  27 siblings, 1 reply; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Jian J Wang, Hao A Wu

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdeModulePkg/MdeModulePkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc
index 9272da89a9..d8a8185f07 100644
--- a/MdeModulePkg/MdeModulePkg.dsc
+++ b/MdeModulePkg/MdeModulePkg.dsc
@@ -41,10 +41,11 @@
   PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
   CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   SortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
   #
   # UEFI & PI
   #
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 14/28] MdePkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (12 preceding siblings ...)
  2021-03-15  3:58 ` [patch 13/28] MdeModulePkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  3:58 ` [patch 15/28] NetworkPkg: " Dandan Bi
                   ` (13 subsequent siblings)
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Liming Gao, Zhiguang Liu

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdePkg/MdePkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc
index be89e28eef..f20d0296f6 100644
--- a/MdePkg/MdePkg.dsc
+++ b/MdePkg/MdePkg.dsc
@@ -29,10 +29,11 @@
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000000
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE0000000
 
 [LibraryClasses]
   SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [Components]
   MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
   MdePkg/Library/BaseCacheMaintenanceLibNull/BaseCacheMaintenanceLibNull.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 15/28] NetworkPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (13 preceding siblings ...)
  2021-03-15  3:58 ` [patch 14/28] MdePkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  3:58 ` [patch 16/28] OvmfPkg: " Dandan Bi
                   ` (12 subsequent siblings)
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Maciej Rabeda, Jiaxin Wu, Siyuan Fu

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 NetworkPkg/NetworkPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/NetworkPkg/NetworkPkg.dsc b/NetworkPkg/NetworkPkg.dsc
index 531da841e9..f269a421fb 100644
--- a/NetworkPkg/NetworkPkg.dsc
+++ b/NetworkPkg/NetworkPkg.dsc
@@ -41,10 +41,11 @@
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
   DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
   SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
   RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 !ifdef CONTINUOUS_INTEGRATION
   BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
   TlsLib|CryptoPkg/Library/TlsLibNull/TlsLibNull.inf
 !else
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 16/28] OvmfPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (14 preceding siblings ...)
  2021-03-15  3:58 ` [patch 15/28] NetworkPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-16 16:42   ` Laszlo Ersek
  2021-03-15  3:58 ` [patch 17/28] PcAtChipsetPkg: " Dandan Bi
                   ` (11 subsequent siblings)
  27 siblings, 1 reply; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Laszlo Ersek, Ard Biesheuvel, Jordan Justen

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 OvmfPkg/OvmfPkgIa32.dsc    | 1 +
 OvmfPkg/OvmfPkgIa32X64.dsc | 1 +
 OvmfPkg/OvmfPkgX64.dsc     | 1 +
 OvmfPkg/OvmfXen.dsc        | 1 +
 4 files changed, 4 insertions(+)

diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index 1eaf3e99c6..46a2bc02a9 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -169,10 +169,11 @@
   QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf
   QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParserLib.inf
   VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
   LoadLinuxLib|OvmfPkg/Library/LoadLinuxLib/LoadLinuxLib.inf
   MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 !if $(SMM_REQUIRE) == FALSE
   LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf
 !endif
   CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
   FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index 4a5a430147..812c2af48b 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -173,10 +173,11 @@
   QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf
   QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParserLib.inf
   VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
   LoadLinuxLib|OvmfPkg/Library/LoadLinuxLib/LoadLinuxLib.inf
   MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 !if $(SMM_REQUIRE) == FALSE
   LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf
 !endif
   CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
   FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index d4d601b444..76a41aa351 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -173,10 +173,11 @@
   QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf
   QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParserLib.inf
   VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
   LoadLinuxLib|OvmfPkg/Library/LoadLinuxLib/LoadLinuxLib.inf
   MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 !if $(SMM_REQUIRE) == FALSE
   LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf
 !endif
   CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
   FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
index 507029404f..f057c9d7c1 100644
--- a/OvmfPkg/OvmfXen.dsc
+++ b/OvmfPkg/OvmfXen.dsc
@@ -163,10 +163,11 @@
   QemuLoadImageLib|OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.inf
   MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf
   LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf
   CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
   FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 !if $(SOURCE_DEBUG_ENABLE) == TRUE
   PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
   DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
 !else
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 17/28] PcAtChipsetPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (15 preceding siblings ...)
  2021-03-15  3:58 ` [patch 16/28] OvmfPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  3:58 ` [patch 18/28] RedfishPkg: " Dandan Bi
                   ` (10 subsequent siblings)
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Ray Ni

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 PcAtChipsetPkg/PcAtChipsetPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PcAtChipsetPkg/PcAtChipsetPkg.dsc b/PcAtChipsetPkg/PcAtChipsetPkg.dsc
index 3d1fb816f5..228a0c721b 100644
--- a/PcAtChipsetPkg/PcAtChipsetPkg.dsc
+++ b/PcAtChipsetPkg/PcAtChipsetPkg.dsc
@@ -41,10 +41,11 @@
   IoApicLib|PcAtChipsetPkg/Library/BaseIoApicLib/BaseIoApicLib.inf
   LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
   UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
   ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [Components]
   PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
   PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeControllerDxe.inf
   PcAtChipsetPkg/Library/SerialIoLib/SerialIoLib.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 18/28] RedfishPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (16 preceding siblings ...)
  2021-03-15  3:58 ` [patch 17/28] PcAtChipsetPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  5:21   ` Abner Chang
  2021-03-15  5:27   ` Nickle Wang
  2021-03-15  3:58 ` [patch 19/28] SecurityPkg: " Dandan Bi
                   ` (9 subsequent siblings)
  27 siblings, 2 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Abner Chang, Nickle Wang

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Abner Chang <abner.chang@hpe.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 RedfishPkg/RedfishPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/RedfishPkg/RedfishPkg.dsc b/RedfishPkg/RedfishPkg.dsc
index e0052290b5..e93010fe7d 100644
--- a/RedfishPkg/RedfishPkg.dsc
+++ b/RedfishPkg/RedfishPkg.dsc
@@ -36,10 +36,11 @@
   HttpIoLib|NetworkPkg/Library/DxeHttpIoLib/DxeHttpIoLib.inf
   NetLib|NetworkPkg/Library/DxeNetLib/DxeNetLib.inf
   DpcLib|NetworkPkg/Library/DxeDpcLib/DxeDpcLib.inf
   RedfishPlatformCredentialLib|RedfishPkg/Library/PlatformCredentialLibNull/PlatformCredentialLibNull.inf
   RedfishContentCodingLib|RedfishPkg/Library/RedfishContentCodingLibNull/RedfishContentCodingLibNull.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.ARM, LibraryClasses.AARCH64]
   #
   # This library provides the instrinsic functions generated by a given compiler.
   #
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 19/28] SecurityPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (17 preceding siblings ...)
  2021-03-15  3:58 ` [patch 18/28] RedfishPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  3:58 ` [patch 20/28] ShellPkg: " Dandan Bi
                   ` (8 subsequent siblings)
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Jian J Wang

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 SecurityPkg/SecurityPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/SecurityPkg/SecurityPkg.dsc b/SecurityPkg/SecurityPkg.dsc
index a77665518b..e02797d2c4 100644
--- a/SecurityPkg/SecurityPkg.dsc
+++ b/SecurityPkg/SecurityPkg.dsc
@@ -28,10 +28,11 @@
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
   UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
   PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
   UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 20/28] ShellPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (18 preceding siblings ...)
  2021-03-15  3:58 ` [patch 19/28] SecurityPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-16  8:08   ` Gao, Zhichao
  2021-03-15  3:58 ` [patch 21/28] SignedCapsulePkg: " Dandan Bi
                   ` (7 subsequent siblings)
  27 siblings, 1 reply; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Ray Ni, Zhichao Gao

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 ShellPkg/ShellPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc
index a8b6de3342..e6ad8e8960 100644
--- a/ShellPkg/ShellPkg.dsc
+++ b/ShellPkg/ShellPkg.dsc
@@ -51,10 +51,11 @@
 
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
   AcpiViewCommandLib|ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
   PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
   DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 21/28] SignedCapsulePkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (19 preceding siblings ...)
  2021-03-15  3:58 ` [patch 20/28] ShellPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  3:58 ` [patch 22/28] SourceLevelDebugPkg: " Dandan Bi
                   ` (6 subsequent siblings)
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Jian

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Jian J Wang <jian.j.wang@intel.com
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 SignedCapsulePkg/SignedCapsulePkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/SignedCapsulePkg/SignedCapsulePkg.dsc b/SignedCapsulePkg/SignedCapsulePkg.dsc
index c5080ec1dd..3eb07dff7a 100644
--- a/SignedCapsulePkg/SignedCapsulePkg.dsc
+++ b/SignedCapsulePkg/SignedCapsulePkg.dsc
@@ -39,10 +39,11 @@
   PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
   CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   SortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
   #
   # UEFI & PI
   #
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 22/28] SourceLevelDebugPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (20 preceding siblings ...)
  2021-03-15  3:58 ` [patch 21/28] SignedCapsulePkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  6:03   ` Wu, Hao A
  2021-03-15  3:58 ` [patch 23/28] StandaloneMmPkg: " Dandan Bi
                   ` (5 subsequent siblings)
  27 siblings, 1 reply; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Hao A Wu

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 SourceLevelDebugPkg/SourceLevelDebugPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
index 20eb10ba07..73a6555077 100644
--- a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
+++ b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
@@ -40,10 +40,11 @@
   TimerLib|UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/SecPeiDxeTimerLibUefiCpu.inf
   ResetSystemLib|MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.inf
   PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
   PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
   PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 !ifdef $(SOURCE_DEBUG_USE_USB)
   DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibUsb/DebugCommunicationLibUsb.inf
 !else
 !ifndef $(SOURCE_DEBUG_USE_USB3)
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 23/28] StandaloneMmPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (21 preceding siblings ...)
  2021-03-15  3:58 ` [patch 22/28] SourceLevelDebugPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  3:58 ` [patch 24/28] UefiCpuPkg: " Dandan Bi
                   ` (4 subsequent siblings)
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Ard Biesheuvel, Sami Mujawar, Jiewen Yao, Supreeth Venkatesh

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 StandaloneMmPkg/StandaloneMmPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/StandaloneMmPkg/StandaloneMmPkg.dsc b/StandaloneMmPkg/StandaloneMmPkg.dsc
index 73f3f0f6b1..92b8b31b35 100644
--- a/StandaloneMmPkg/StandaloneMmPkg.dsc
+++ b/StandaloneMmPkg/StandaloneMmPkg.dsc
@@ -54,10 +54,11 @@
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
   ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
   StandaloneMmCoreEntryPoint|StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf
   StandaloneMmDriverEntryPoint|MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf
   VariableMmDependency|StandaloneMmPkg/Library/VariableMmDependency/VariableMmDependency.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.AARCH64]
   ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
   StandaloneMmMmuLib|ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf
   ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 24/28] UefiCpuPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (22 preceding siblings ...)
  2021-03-15  3:58 ` [patch 23/28] StandaloneMmPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-16 16:42   ` Laszlo Ersek
  2021-03-15  3:58 ` [patch 25/28] UefiPayloadPkg: " Dandan Bi
                   ` (3 subsequent siblings)
  27 siblings, 1 reply; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Eric Dong, Ray Ni, Laszlo Ersek, Rahul Kumar

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 UefiCpuPkg/UefiCpuPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/UefiCpuPkg/UefiCpuPkg.dsc b/UefiCpuPkg/UefiCpuPkg.dsc
index 7db419471d..9e5dbb271f 100644
--- a/UefiCpuPkg/UefiCpuPkg.dsc
+++ b/UefiCpuPkg/UefiCpuPkg.dsc
@@ -56,10 +56,11 @@
   SmmCpuFeaturesLib|UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
   TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
   VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
 [LibraryClasses.common.SEC]
   PlatformSecLib|UefiCpuPkg/Library/PlatformSecLibNull/PlatformSecLibNull.inf
 !if $(TOOL_CHAIN_TAG) == "XCODE5"
   CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 25/28] UefiPayloadPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (23 preceding siblings ...)
  2021-03-15  3:58 ` [patch 24/28] UefiCpuPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15 16:06   ` Ma, Maurice
  2021-03-15  3:58 ` [patch 26/28] UnitTestFrameworkPkg: " Dandan Bi
                   ` (2 subsequent siblings)
  27 siblings, 1 reply; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Maurice Ma, Guo Dong, Benjamin You

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 23edd163e9..56c8147f01 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -141,10 +141,11 @@
   PciSegmentInfoLib|UefiPayloadPkg/Library/PciSegmentInfoLibAcpiBoardInfo/PciSegmentInfoLibAcpiBoardInfo.inf
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
   SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   #
   # UEFI & PI
   #
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 26/28] UnitTestFrameworkPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (24 preceding siblings ...)
  2021-03-15  3:58 ` [patch 25/28] UefiPayloadPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  3:58 ` [patch 27/28] MdePkg/IoLib: Filter/trace port IO/MMIO access Dandan Bi
  2021-03-15  3:58 ` [patch 28/28] MdePkg/Baseib: Filter/trace MSR access for IA32/X64 Dandan Bi
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Sean Brogan, Bret

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Add RegisterFilterLibNull in dsc which will be consumed
by IoLib and BaseLib.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc b/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc
index 8adf690098..a43e52a9f6 100644
--- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc
+++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc
@@ -23,10 +23,11 @@
   PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
   PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
   PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
+  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
 
   UnitTestLib|UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.inf
   UnitTestPersistenceLib|UnitTestFrameworkPkg/Library/UnitTestPersistenceLibNull/UnitTestPersistenceLibNull.inf
   UnitTestResultReportLib|UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.inf
   NULL|UnitTestFrameworkPkg/Library/UnitTestDebugAssertLib/UnitTestDebugAssertLib.inf
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 27/28] MdePkg/IoLib: Filter/trace port IO/MMIO access
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (25 preceding siblings ...)
  2021-03-15  3:58 ` [patch 26/28] UnitTestFrameworkPkg: " Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  2021-03-15  3:58 ` [patch 28/28] MdePkg/Baseib: Filter/trace MSR access for IA32/X64 Dandan Bi
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Liming Gao, Zhiguang Liu

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 .../BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf |  3 +-
 .../BaseIoLibIntrinsicArmVirt.inf             |  3 +-
 .../BaseIoLibIntrinsicInternal.h              |  3 +-
 .../BaseIoLibIntrinsicSev.inf                 |  3 +-
 MdePkg/Library/BaseIoLibIntrinsic/IoLib.c     | 95 ++++++++++++++-----
 .../Library/BaseIoLibIntrinsic/IoLibArmVirt.c | 82 ++++++++++++++--
 MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c  | 58 +++++++++--
 MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c  | 81 ++++++++++++----
 MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c | 74 +++++++++++++--
 9 files changed, 329 insertions(+), 73 deletions(-)

diff --git a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
index 690b95d440..97eeada065 100644
--- a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
+++ b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
@@ -5,11 +5,11 @@
 #  for IA-32 and x64.  On IPF, I/O port requests are translated into MMIO requests.
 #  MMIO requests are forwarded directly to memory.  For EBC, I/O port requests
 #  ASSERT(). For ARM, AARCH64 and RISCV64, this I/O library only provides non I/O
 #  read and write.
 #
-#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
 #  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
 #  Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
 #  Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -64,6 +64,7 @@
   MdePkg/MdePkg.dec
 
 [LibraryClasses]
   DebugLib
   BaseLib
+  RegisterFilterLib
 
diff --git a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicArmVirt.inf b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicArmVirt.inf
index ad68f841fb..cea6857926 100644
--- a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicArmVirt.inf
+++ b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicArmVirt.inf
@@ -1,9 +1,9 @@
 ## @file
 #  Instance of I/O Library using KVM/ARM safe assembler routines
 #
-#  Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
 #  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
 #  Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
 #  Copyright (c) 2018, Linaro, Ltd. All rights reserved.<BR>
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -42,5 +42,6 @@
   MdePkg/MdePkg.dec
 
 [LibraryClasses]
   DebugLib
   BaseLib
+  RegisterFilterLib
diff --git a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicInternal.h b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicInternal.h
index 1aae45fa8a..79b2eb3e7b 100644
--- a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicInternal.h
+++ b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicInternal.h
@@ -1,11 +1,11 @@
 /** @file
   Common header file shared by all source files.
 
   This file includes package header files, dependent library classes.
 
-  Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
    SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
 
 #ifndef __BASEIOLIB_INTRINSIC_INTERNAL_H_
 #define __BASEIOLIB_INTRINSIC_INTERNAL_H_
@@ -15,7 +15,8 @@
 #include <Base.h>
 
 #include <Library/IoLib.h>
 #include <Library/BaseLib.h>
 #include <Library/DebugLib.h>
+#include <Library/RegisterFilterLib.h>
 
 #endif
diff --git a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicSev.inf b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicSev.inf
index 86a07e60f8..34f9d1d106 100644
--- a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicSev.inf
+++ b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicSev.inf
@@ -2,11 +2,11 @@
 #  Instance of I/O Library using compiler intrinsics.
 #
 #  I/O Library that uses compiler intrinsics to perform IN and OUT instructions
 #  for IA-32 and x64.
 #
-#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
 #  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
 #  Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -47,6 +47,7 @@
   MdePkg/MdePkg.dec
 
 [LibraryClasses]
   DebugLib
   BaseLib
+  RegisterFilterLib
 
diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLib.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLib.c
index a6bbc92546..d0d7044f09 100644
--- a/MdePkg/Library/BaseIoLibIntrinsic/IoLib.c
+++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLib.c
@@ -1,9 +1,9 @@
 /** @file
   Common I/O Library routines.
 
-  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
 #include "BaseIoLibIntrinsicInternal.h"
@@ -80,14 +80,19 @@ EFIAPI
 MmioRead8 (
   IN      UINTN                     Address
   )
 {
   UINT8                             Value;
+  BOOLEAN                           Flag;
 
-  MemoryFence ();
-  Value = *(volatile UINT8*)Address;
-  MemoryFence ();
+  Flag = FilterBeforeMmIoRead (FilterWidth8, Address, &Value);
+  if (Flag) {
+    MemoryFence ();
+    Value = *(volatile UINT8*)Address;
+    MemoryFence ();
+  }
+  FilterAfterMmIoRead (FilterWidth8, Address, &Value);
 
   return Value;
 }
 
 /**
@@ -110,13 +115,19 @@ EFIAPI
 MmioWrite8 (
   IN      UINTN                     Address,
   IN      UINT8                     Value
   )
 {
-  MemoryFence ();
-  *(volatile UINT8*)Address = Value;
-  MemoryFence ();
+  BOOLEAN                           Flag;
+
+  Flag = FilterBeforeMmIoWrite (FilterWidth8, Address, &Value);
+  if (Flag) {
+    MemoryFence ();
+    *(volatile UINT8*)Address = Value;
+    MemoryFence ();
+  }
+  FilterAfterMmIoWrite (FilterWidth8, Address, &Value);
 
   return Value;
 }
 
 /**
@@ -139,16 +150,20 @@ EFIAPI
 MmioRead16 (
   IN      UINTN                     Address
   )
 {
   UINT16                            Value;
+  BOOLEAN                           Flag;
 
   ASSERT ((Address & 1) == 0);
-
-  MemoryFence ();
-  Value = *(volatile UINT16*)Address;
-  MemoryFence ();
+  Flag = FilterBeforeMmIoRead (FilterWidth16, Address, &Value);
+  if (Flag) {
+    MemoryFence ();
+    Value = *(volatile UINT16*)Address;
+    MemoryFence ();
+  }
+  FilterAfterMmIoRead (FilterWidth16, Address, &Value);
 
   return Value;
 }
 
 /**
@@ -172,15 +187,21 @@ EFIAPI
 MmioWrite16 (
   IN      UINTN                     Address,
   IN      UINT16                    Value
   )
 {
+  BOOLEAN                           Flag;
+
   ASSERT ((Address & 1) == 0);
 
-  MemoryFence ();
-  *(volatile UINT16*)Address = Value;
-  MemoryFence ();
+  Flag = FilterBeforeMmIoWrite (FilterWidth16, Address, &Value);
+  if (Flag) {
+    MemoryFence ();
+    *(volatile UINT16*)Address = Value;
+    MemoryFence ();
+  }
+  FilterAfterMmIoWrite (FilterWidth16, Address, &Value);
 
   return Value;
 }
 
 /**
@@ -203,16 +224,21 @@ EFIAPI
 MmioRead32 (
   IN      UINTN                     Address
   )
 {
   UINT32                            Value;
+  BOOLEAN                           Flag;
 
   ASSERT ((Address & 3) == 0);
 
-  MemoryFence ();
-  Value = *(volatile UINT32*)Address;
-  MemoryFence ();
+  Flag = FilterBeforeMmIoRead (FilterWidth32, Address, &Value);
+  if (Flag) {
+    MemoryFence ();
+    Value = *(volatile UINT32*)Address;
+    MemoryFence ();
+  }
+  FilterAfterMmIoRead (FilterWidth32, Address, &Value);
 
   return Value;
 }
 
 /**
@@ -236,15 +262,21 @@ EFIAPI
 MmioWrite32 (
   IN      UINTN                     Address,
   IN      UINT32                    Value
   )
 {
+  BOOLEAN                           Flag;
+
   ASSERT ((Address & 3) == 0);
 
-  MemoryFence ();
-  *(volatile UINT32*)Address = Value;
-  MemoryFence ();
+  Flag = FilterBeforeMmIoWrite (FilterWidth32, Address, &Value);
+  if (Flag) {
+    MemoryFence ();
+    *(volatile UINT32*)Address = Value;
+    MemoryFence ();
+  }
+  FilterAfterMmIoWrite (FilterWidth32, Address, &Value);
 
   return Value;
 }
 
 /**
@@ -267,16 +299,21 @@ EFIAPI
 MmioRead64 (
   IN      UINTN                     Address
   )
 {
   UINT64                            Value;
+  BOOLEAN                           Flag;
 
   ASSERT ((Address & 7) == 0);
 
-  MemoryFence ();
-  Value = *(volatile UINT64*)Address;
-  MemoryFence ();
+  Flag = FilterBeforeMmIoRead (FilterWidth64, Address, &Value);
+  if (Flag) {
+    MemoryFence ();
+    Value = *(volatile UINT64*)Address;
+    MemoryFence ();
+  }
+  FilterAfterMmIoRead (FilterWidth64, Address, &Value);
 
   return Value;
 }
 
 /**
@@ -298,14 +335,20 @@ EFIAPI
 MmioWrite64 (
   IN      UINTN                     Address,
   IN      UINT64                    Value
   )
 {
+  BOOLEAN                           Flag;
+
   ASSERT ((Address & 7) == 0);
 
-  MemoryFence ();
-  *(volatile UINT64*)Address = Value;
-  MemoryFence ();
+  Flag = FilterBeforeMmIoWrite (FilterWidth64, Address, &Value);
+  if (Flag) {
+    MemoryFence ();
+    *(volatile UINT64*)Address = Value;
+    MemoryFence ();
+  }
+  FilterAfterMmIoWrite (FilterWidth64, Address, &Value);
 
   return Value;
 }
 
diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibArmVirt.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLibArmVirt.c
index 9715705ee0..6140840769 100644
--- a/MdePkg/Library/BaseIoLibIntrinsic/IoLibArmVirt.c
+++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibArmVirt.c
@@ -1,9 +1,9 @@
 /** @file
   I/O Library for ARM.
 
-  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
   Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
   Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
   Copyright (c) 2018, Linaro, Ltd. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -544,11 +544,20 @@ UINT8
 EFIAPI
 MmioRead8 (
   IN      UINTN                     Address
   )
 {
-  return MmioRead8Internal (Address);
+  UINT8      Value;
+  BOOLEAN    Flag;
+
+  Flag = FilterBeforeMmIoRead (FilterWidth8, Address, &Value);
+  if (Flag) {
+    Value = MmioRead8Internal (Address);
+  }
+  FilterAfterMmIoRead (FilterWidth8, Address, &Value);
+
+  return Value;
 }
 
 /**
   Writes an 8-bit MMIO register.
 
@@ -567,11 +576,18 @@ EFIAPI
 MmioWrite8 (
   IN      UINTN                     Address,
   IN      UINT8                     Value
   )
 {
-  MmioWrite8Internal (Address, Value);
+  BOOLEAN               Flag;
+
+  Flag = FilterBeforeMmIoWrite (FilterWidth8, Address, &Value);
+  if (Flag) {
+    MmioWrite8Internal (Address, Value);
+  }
+  FilterAfterMmIoWrite (FilterWidth8, Address, &Value);
+
   return Value;
 }
 
 /**
   Reads a 16-bit MMIO register.
@@ -591,13 +607,22 @@ UINT16
 EFIAPI
 MmioRead16 (
   IN      UINTN                     Address
   )
 {
+  BOOLEAN    Flag;
+  UINT16     Value;
+
   ASSERT ((Address & 1) == 0);
 
-  return MmioRead16Internal (Address);
+  Flag = FilterBeforeMmIoRead (FilterWidth16, Address, &Value);
+  if (Flag) {
+    Value = MmioRead16Internal (Address);
+  }
+  FilterAfterMmIoRead (FilterWidth16, Address, &Value);
+
+  return Value;
 }
 
 /**
   Writes a 16-bit MMIO register.
 
@@ -616,13 +641,20 @@ EFIAPI
 MmioWrite16 (
   IN      UINTN                     Address,
   IN      UINT16                    Value
   )
 {
+  BOOLEAN    Flag;
+
   ASSERT ((Address & 1) == 0);
 
-  MmioWrite16Internal (Address, Value);
+  Flag = FilterBeforeMmIoWrite (FilterWidth16, Address, &Value);
+  if (Flag) {
+    MmioWrite16Internal (Address, Value);
+  }
+  FilterAfterMmIoWrite (FilterWidth16, Address, &Value);
+
   return Value;
 }
 
 /**
   Reads a 32-bit MMIO register.
@@ -642,13 +674,22 @@ UINT32
 EFIAPI
 MmioRead32 (
   IN      UINTN                     Address
   )
 {
+  BOOLEAN   Flag;
+  UINT32    Value;
+
   ASSERT ((Address & 3) == 0);
 
-  return MmioRead32Internal (Address);
+  Flag = FilterBeforeMmIoRead (FilterWidth32, Address, &Value);
+  if (Flag) {
+    Value = MmioRead32Internal (Address);
+  }
+  FilterAfterMmIoRead (FilterWidth32, Address, &Value);
+
+  return Value;
 }
 
 /**
   Writes a 32-bit MMIO register.
 
@@ -667,13 +708,20 @@ EFIAPI
 MmioWrite32 (
   IN      UINTN                     Address,
   IN      UINT32                    Value
   )
 {
+  BOOLEAN   Flag;
+
   ASSERT ((Address & 3) == 0);
 
-  MmioWrite32Internal (Address, Value);
+  Flag = FilterBeforeMmIoWrite (FilterWidth32, Address, &Value);
+  if (Flag) {
+    MmioWrite32Internal (Address, Value);
+  }
+  FilterAfterMmIoWrite (FilterWidth32, Address, &Value);
+
   return Value;
 }
 
 /**
   Reads a 64-bit MMIO register.
@@ -693,13 +741,22 @@ UINT64
 EFIAPI
 MmioRead64 (
   IN      UINTN                     Address
   )
 {
+  BOOLEAN   Flag;
+  UINT64    Value;
+
   ASSERT ((Address & 7) == 0);
 
-  return MmioRead64Internal (Address);
+  Flag = FilterBeforeMmIoRead (FilterWidth64, Address, &Value);
+  if (Flag) {
+    Value = MmioRead64Internal (Address);
+  }
+  FilterAfterMmIoRead (FilterWidth64, Address, &Value);
+
+  return Value;
 }
 
 /**
   Writes a 64-bit MMIO register.
 
@@ -718,10 +775,17 @@ EFIAPI
 MmioWrite64 (
   IN      UINTN                     Address,
   IN      UINT64                    Value
   )
 {
+  BOOLEAN   Flag;
+
   ASSERT ((Address & 7) == 0);
 
-  MmioWrite64Internal (Address, Value);
+  Flag = FilterBeforeMmIoWrite (FilterWidth64, Address, &Value);
+  if (Flag) {
+    MmioWrite64Internal (Address, Value);
+  }
+  FilterAfterMmIoWrite (FilterWidth64, Address, &Value);
+
   return Value;
 }
diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c
index b3a1a20256..ecf9ed6191 100644
--- a/MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c
+++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c
@@ -8,11 +8,11 @@
   with EFIAPI assembler.
 
   We don't advocate putting compiler specifics in libraries or drivers but there
   is no other way to make this work.
 
-  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
 
@@ -37,12 +37,18 @@ EFIAPI
 IoRead8 (
   IN      UINTN                     Port
   )
 {
   UINT8   Data;
+  BOOLEAN Flag;
+
+  Flag = FilterBeforeIoRead (FilterWidth8, Port, &Data);
+  if (Flag) {
+    __asm__ __volatile__ ("inb %w1,%b0" : "=a" (Data) : "d" ((UINT16)Port));
+  }
+  FilterAfterIoRead (FilterWidth8, Port, &Data);
 
-  __asm__ __volatile__ ("inb %w1,%b0" : "=a" (Data) : "d" ((UINT16)Port));
   return Data;
 }
 
 /**
   Writes an 8-bit I/O port.
@@ -64,11 +70,18 @@ EFIAPI
 IoWrite8 (
   IN      UINTN                     Port,
   IN      UINT8                     Value
   )
 {
-  __asm__ __volatile__ ("outb %b0,%w1" : : "a" (Value), "d" ((UINT16)Port));
+  BOOLEAN Flag;
+
+  Flag = FilterBeforeIoWrite (FilterWidth8, Port, &Value);
+  if (Flag) {
+    __asm__ __volatile__ ("outb %b0,%w1" : : "a" (Value), "d" ((UINT16)Port));
+  }
+  FilterAfterIoWrite (FilterWidth8, Port, &Value);
+
   return Value;;
 }
 
 /**
   Reads a 16-bit I/O port.
@@ -90,13 +103,20 @@ EFIAPI
 IoRead16 (
   IN      UINTN                     Port
   )
 {
   UINT16   Data;
+  BOOLEAN  Flag;
 
   ASSERT ((Port & 1) == 0);
-  __asm__ __volatile__ ("inw %w1,%w0" : "=a" (Data) : "d" ((UINT16)Port));
+
+  Flag = FilterBeforeIoRead (FilterWidth16, Port, &Data);
+  if (Flag) {
+     __asm__ __volatile__ ("inw %w1,%w0" : "=a" (Data) : "d" ((UINT16)Port));
+  }
+  FilterAfterIoRead (FilterWidth16, Port, &Data);
+
   return Data;
 }
 
 /**
   Writes a 16-bit I/O port.
@@ -119,12 +139,21 @@ EFIAPI
 IoWrite16 (
   IN      UINTN                     Port,
   IN      UINT16                    Value
   )
 {
+
+  BOOLEAN Flag;
+
   ASSERT ((Port & 1) == 0);
-  __asm__ __volatile__ ("outw %w0,%w1" : : "a" (Value), "d" ((UINT16)Port));
+
+  Flag = FilterBeforeIoWrite (FilterWidth16, Port, &Value);
+  if (Flag) {
+    __asm__ __volatile__ ("outw %w0,%w1" : : "a" (Value), "d" ((UINT16)Port));
+  }
+  FilterAfterIoWrite (FilterWidth16, Port, &Value);
+
   return Value;;
 }
 
 /**
   Reads a 32-bit I/O port.
@@ -146,13 +175,20 @@ EFIAPI
 IoRead32 (
   IN      UINTN                     Port
   )
 {
   UINT32   Data;
+  BOOLEAN  Flag;
 
   ASSERT ((Port & 3) == 0);
-  __asm__ __volatile__ ("inl %w1,%0" : "=a" (Data) : "d" ((UINT16)Port));
+
+  Flag = FilterBeforeIoRead (FilterWidth32, Port, &Data);
+  if (Flag) {
+    __asm__ __volatile__ ("inl %w1,%0" : "=a" (Data) : "d" ((UINT16)Port));
+  }
+  FilterAfterIoRead (FilterWidth32, Port, &Data);
+
   return Data;
 }
 
 /**
   Writes a 32-bit I/O port.
@@ -175,10 +211,18 @@ EFIAPI
 IoWrite32 (
   IN      UINTN                     Port,
   IN      UINT32                    Value
   )
 {
+  BOOLEAN  Flag;
+
   ASSERT ((Port & 3) == 0);
-  __asm__ __volatile__ ("outl %0,%w1" : : "a" (Value), "d" ((UINT16)Port));
+
+  Flag = FilterBeforeIoWrite (FilterWidth32, Port, &Value);
+  if (Flag) {
+    __asm__ __volatile__ ("outl %0,%w1" : : "a" (Value), "d" ((UINT16)Port));
+  }
+  FilterAfterIoWrite (FilterWidth32, Port, &Value);
+
   return Value;
 }
 
diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c
index 769dddfce2..d2bc5f527c 100644
--- a/MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c
+++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c
@@ -6,11 +6,11 @@
   overhead.
 
   We don't advocate putting compiler specifics in libraries or drivers but there
   is no other way to make this work.
 
-  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
 
@@ -64,14 +64,20 @@ EFIAPI
 IoRead8 (
   IN      UINTN                     Port
   )
 {
   UINT8                             Value;
+  BOOLEAN                           Flag;
+
+  Flag = FilterBeforeIoRead (FilterWidth8, Port, &Value);
+  if (Flag) {
+    _ReadWriteBarrier ();
+    Value = (UINT8)_inp ((UINT16)Port);
+    _ReadWriteBarrier ();
+  }
+  FilterAfterIoRead (FilterWidth8, Port, &Value);
 
-  _ReadWriteBarrier ();
-  Value = (UINT8)_inp ((UINT16)Port);
-  _ReadWriteBarrier ();
   return Value;
 }
 
 /**
   Writes an 8-bit I/O port.
@@ -93,13 +99,20 @@ EFIAPI
 IoWrite8 (
   IN      UINTN                     Port,
   IN      UINT8                     Value
   )
 {
-  _ReadWriteBarrier ();
-  (UINT8)_outp ((UINT16)Port, Value);
-  _ReadWriteBarrier ();
+  BOOLEAN                           Flag;
+
+  Flag = FilterBeforeIoWrite(FilterWidth8, Port, &Value);
+  if (Flag) {
+    _ReadWriteBarrier ();
+    (UINT8)_outp ((UINT16)Port, Value);
+    _ReadWriteBarrier ();
+  }
+  FilterAfterIoWrite (FilterWidth8, Port, &Value);
+
   return Value;
 }
 
 /**
   Reads a 16-bit I/O port.
@@ -121,15 +134,22 @@ EFIAPI
 IoRead16 (
   IN      UINTN                     Port
   )
 {
   UINT16                            Value;
+  BOOLEAN                           Flag;
 
   ASSERT ((Port & 1) == 0);
-  _ReadWriteBarrier ();
-  Value = _inpw ((UINT16)Port);
-  _ReadWriteBarrier ();
+
+  Flag = FilterBeforeIoRead (FilterWidth16, Port, &Value);
+  if (Flag) {
+    _ReadWriteBarrier ();
+    Value = _inpw ((UINT16)Port);
+    _ReadWriteBarrier ();
+  }
+  FilterBeforeIoRead (FilterWidth16, Port, &Value);
+
   return Value;
 }
 
 /**
   Writes a 16-bit I/O port.
@@ -152,14 +172,22 @@ EFIAPI
 IoWrite16 (
   IN      UINTN                     Port,
   IN      UINT16                    Value
   )
 {
+  BOOLEAN                           Flag;
+
   ASSERT ((Port & 1) == 0);
-  _ReadWriteBarrier ();
-  _outpw ((UINT16)Port, Value);
-  _ReadWriteBarrier ();
+
+  Flag = FilterBeforeIoWrite(FilterWidth16, Port, &Value);
+  if (Flag) {
+    _ReadWriteBarrier ();
+    _outpw ((UINT16)Port, Value);
+    _ReadWriteBarrier ();
+  }
+  FilterAfterIoWrite (FilterWidth16, Port, &Value);
+
   return Value;
 }
 
 /**
   Reads a 32-bit I/O port.
@@ -181,15 +209,22 @@ EFIAPI
 IoRead32 (
   IN      UINTN                     Port
   )
 {
   UINT32                            Value;
+  BOOLEAN                           Flag;
 
   ASSERT ((Port & 3) == 0);
-  _ReadWriteBarrier ();
-  Value = _inpd ((UINT16)Port);
-  _ReadWriteBarrier ();
+
+  Flag = FilterBeforeIoRead(FilterWidth32, Port, &Value);
+  if (Flag) {
+    _ReadWriteBarrier ();
+    Value = _inpd ((UINT16)Port);
+    _ReadWriteBarrier ();
+  }
+  FilterAfterIoRead (FilterWidth32, Port, &Value);
+
   return Value;
 }
 
 /**
   Writes a 32-bit I/O port.
@@ -212,11 +247,19 @@ EFIAPI
 IoWrite32 (
   IN      UINTN                     Port,
   IN      UINT32                    Value
   )
 {
+  BOOLEAN                           Flag;
+
   ASSERT ((Port & 3) == 0);
-  _ReadWriteBarrier ();
-  _outpd ((UINT16)Port, Value);
-  _ReadWriteBarrier ();
+
+  Flag = FilterBeforeIoWrite(FilterWidth32, Port, &Value);
+  if (Flag) {
+    _ReadWriteBarrier ();
+    _outpd ((UINT16)Port, Value);
+    _ReadWriteBarrier ();
+  }
+  FilterAfterIoWrite (FilterWidth32, Port, &Value);
+
   return Value;
 }
diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c
index a107136a74..937d6c5a55 100644
--- a/MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c
+++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c
@@ -1,10 +1,10 @@
 /** @file
   I/O library for non I/O read and write access (memory map I/O read and
   write only) architecture, such as ARM and RISC-V processor.
 
-  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
   Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
   Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
   Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -406,12 +406,18 @@ EFIAPI
 MmioRead8 (
   IN      UINTN                     Address
   )
 {
   UINT8                             Value;
+  BOOLEAN                           Flag;
+
+  Flag = FilterBeforeMmIoRead (FilterWidth8, Address, &Value);
+  if (Flag {
+    Value = *(volatile UINT8*)Address;
+  }
+  FilterAfterMmIoRead (FilterWidth8, Address, &Value);
 
-  Value = *(volatile UINT8*)Address;
   return Value;
 }
 
 /**
   Writes an 8-bit MMIO register.
@@ -431,11 +437,18 @@ EFIAPI
 MmioWrite8 (
   IN      UINTN                     Address,
   IN      UINT8                     Value
   )
 {
-  *(volatile UINT8*)Address = Value;
+  BOOLEAN                           Flag;
+
+  Flag = FilterBeforeMmIoWrite (FilterWidth8, Address, &Value);
+  if (Flag {
+    *(volatile UINT8*)Address = Value;
+  }
+  FilterAfterMmIoWrite (FilterWidth8, Address, &Value);
+
   return Value;
 }
 
 /**
   Reads a 16-bit MMIO register.
@@ -456,13 +469,20 @@ EFIAPI
 MmioRead16 (
   IN      UINTN                     Address
   )
 {
   UINT16                            Value;
+  BOOLEAN                           Flag;
 
   ASSERT ((Address & 1) == 0);
-  Value = *(volatile UINT16*)Address;
+
+  Flag = FilterBeforeMmIoRead (FilterWidth16, Address, &Value);
+  if (Flag {
+    Value = *(volatile UINT16*)Address;
+  }
+  FilterAfterMmIoRead (FilterWidth16, Address, &Value);
+
   return Value;
 }
 
 /**
   Writes a 16-bit MMIO register.
@@ -482,12 +502,20 @@ EFIAPI
 MmioWrite16 (
   IN      UINTN                     Address,
   IN      UINT16                    Value
   )
 {
+  BOOLEAN                           Flag;
+
   ASSERT ((Address & 1) == 0);
-  *(volatile UINT16*)Address = Value;
+
+  Flag = FilterBeforeMmIoWrite (FilterWidth16, Address, &Value);
+  if (Flag {
+    *(volatile UINT16*)Address = Value;
+  }
+  FilterAfterMmIoWrite (FilterWidth16, Address, &Value);
+
   return Value;
 }
 
 /**
   Reads a 32-bit MMIO register.
@@ -508,13 +536,20 @@ EFIAPI
 MmioRead32 (
   IN      UINTN                     Address
   )
 {
   UINT32                            Value;
+  BOOLEAN                           Flag;
 
   ASSERT ((Address & 3) == 0);
-  Value = *(volatile UINT32*)Address;
+
+  Flag = FilterBeforeMmIoRead (FilterWidth32, Address, &Value);
+  if (Flag {
+    Value = *(volatile UINT32*)Address;
+  }
+  FilterAfterMmIoRead (FilterWidth32, Address, &Value);
+
   return Value;
 }
 
 /**
   Writes a 32-bit MMIO register.
@@ -534,12 +569,20 @@ EFIAPI
 MmioWrite32 (
   IN      UINTN                     Address,
   IN      UINT32                    Value
   )
 {
+  BOOLEAN                           Flag;
+
   ASSERT ((Address & 3) == 0);
+
+  Flag = FilterBeforeMmIoWrite (FilterWidth32, Address, &Value);
+  if (Flag {
   *(volatile UINT32*)Address = Value;
+  }
+  FilterAfterMmIoWrite (FilterWidth32, Address, &Value);
+
   return Value;
 }
 
 /**
   Reads a 64-bit MMIO register.
@@ -560,13 +603,20 @@ EFIAPI
 MmioRead64 (
   IN      UINTN                     Address
   )
 {
   UINT64                            Value;
+  BOOLEAN                           Flag;
 
   ASSERT ((Address & 7) == 0);
-  Value = *(volatile UINT64*)Address;
+
+  Flag = FilterBeforeMmIoRead (FilterWidth64, Address, &Value);
+  if (Flag {
+    Value = *(volatile UINT64*)Address;
+  }
+  FilterAfterMmIoRead (FilterWidth64, Address, &Value);
+
   return Value;
 }
 
 /**
   Writes a 64-bit MMIO register.
@@ -586,10 +636,18 @@ EFIAPI
 MmioWrite64 (
   IN      UINTN                     Address,
   IN      UINT64                    Value
   )
 {
+  BOOLEAN                           Flag;
+
   ASSERT ((Address & 7) == 0);
-  *(volatile UINT64*)Address = Value;
+
+  Flag = FilterBeforeMmIoWrite (FilterWidth64, Address, &Value);
+  if (Flag {
+    *(volatile UINT64*)Address = Value;
+  }
+  FilterAfterMmIoWrite (FilterWidth64, Address, &Value);
+
   return Value;
 }
 
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [patch 28/28] MdePkg/Baseib: Filter/trace MSR access for IA32/X64
  2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
                   ` (26 preceding siblings ...)
  2021-03-15  3:58 ` [patch 27/28] MdePkg/IoLib: Filter/trace port IO/MMIO access Dandan Bi
@ 2021-03-15  3:58 ` Dandan Bi
  27 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15  3:58 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Liming Gao, Zhiguang Liu

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdePkg/Library/BaseLib/BaseLib.inf          |  5 ++-
 MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c | 36 ++++++++++++------
 MdePkg/Library/BaseLib/Ia32/ReadMsr64.c     | 38 +++++++++++++++++--
 MdePkg/Library/BaseLib/Ia32/WriteMsr64.c    | 22 +++++++----
 MdePkg/Library/BaseLib/X64/GccInlinePriv.c  | 41 ++++++++++++++-------
 MdePkg/Library/BaseLib/X64/ReadMsr64.c      | 15 +++++++-
 MdePkg/Library/BaseLib/X64/WriteMsr64.c     | 13 ++++++-
 7 files changed, 128 insertions(+), 42 deletions(-)

diff --git a/MdePkg/Library/BaseLib/BaseLib.inf b/MdePkg/Library/BaseLib/BaseLib.inf
index 3b85c56c3c..58e29cc7af 100644
--- a/MdePkg/Library/BaseLib/BaseLib.inf
+++ b/MdePkg/Library/BaseLib/BaseLib.inf
@@ -1,9 +1,9 @@
 ## @file
 #  Base Library implementation.
 #
-#  Copyright (c) 2007 - 2020, Intel Corporation. All rights reserved.<BR>
+#  Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
 #  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
 #  Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR>
 #  Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -409,10 +409,13 @@
 [LibraryClasses]
   PcdLib
   DebugLib
   BaseMemoryLib
 
+[LibraryClasses.X64, LibraryClasses.IA32]
+  RegisterFilterLib
+
 [Pcd]
   gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength      ## SOMETIMES_CONSUMES
   gEfiMdePkgTokenSpaceGuid.PcdMaximumAsciiStringLength     ## SOMETIMES_CONSUMES
   gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength   ## SOMETIMES_CONSUMES
   gEfiMdePkgTokenSpaceGuid.PcdControlFlowEnforcementPropertyMask   ## SOMETIMES_CONSUMES
diff --git a/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c b/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c
index 30aa63243b..7e9cd82c94 100644
--- a/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c
+++ b/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c
@@ -8,10 +8,11 @@
 
 **/
 
 
 #include "BaseLibInternals.h"
+#include <Library/RegisterFilterLib.h>
 
 /**
   Enables CPU interrupts.
 
   Enables CPU interrupts.
@@ -61,16 +62,21 @@ EFIAPI
 AsmReadMsr64 (
   IN      UINT32                    Index
   )
 {
   UINT64 Data;
-
-  __asm__ __volatile__ (
-    "rdmsr"
-    : "=A" (Data)   // %0
-    : "c"  (Index)  // %1
-    );
+  BOOLEAN Flag;
+
+  Flag = FilterBeforeMsrRead (Index, &Data);
+  if (Flag) {
+    __asm__ __volatile__ (
+      "rdmsr"
+      : "=A" (Data)   // %0
+      : "c"  (Index)  // %1
+      );
+  }
+  FilterAfterMsrRead (Index, &Data);
 
   return Data;
 }
 
 /**
@@ -95,16 +101,22 @@ EFIAPI
 AsmWriteMsr64 (
   IN      UINT32                    Index,
   IN      UINT64                    Value
   )
 {
-  __asm__ __volatile__ (
-    "wrmsr"
-    :
-    : "c" (Index),
-      "A" (Value)
-    );
+  BOOLEAN  Flag;
+
+  Flag = FilterBeforeMsrWrite (Index, &Value);
+  if (Flag) {
+    __asm__ __volatile__ (
+      "wrmsr"
+      :
+      : "c" (Index),
+        "A" (Value)
+      );
+  }
+  FilterAfterMsrWrite (Index, &Value);
 
   return Value;
 }
 
 /**
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c
index 6d2394b1a3..afe3aa5bdc 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c
@@ -1,15 +1,15 @@
 /** @file
   AsmReadMsr64 function
 
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
 
-
+#include <Library/RegisterFilterLib.h>
 
 /**
   Returns a 64-bit Machine Specific Register(MSR).
 
   Reads and returns the 64-bit MSR specified by Index. No parameter checking is
@@ -22,16 +22,46 @@
 
   @return The value of the MSR identified by Index.
 
 **/
 UINT64
-EFIAPI
-AsmReadMsr64 (
+AsmReadMsr64Internal (
   IN UINT32  Index
   )
 {
   _asm {
     mov     ecx, Index
     rdmsr
   }
 }
 
+/**
+  Returns a 64-bit Machine Specific Register(MSR).
+
+  Reads and returns the 64-bit MSR specified by Index. No parameter checking is
+  performed on Index, and some Index values may cause CPU exceptions. The
+  caller must either guarantee that Index is valid, or the caller must set up
+  exception handlers to catch the exceptions. This function is only available
+  on IA-32 and x64.
+
+  @param  Index The 32-bit MSR index to read.
+
+  @return The value of the MSR identified by Index.
+
+**/
+UINT64
+EFIAPI
+AsmReadMsr64 (
+  IN UINT32  Index
+  )
+{
+  UINT64                            Value;
+  BOOLEAN                           Flag;
+
+  Flag = FilterBeforeMsrRead (Index, &Value);
+  if (Flag) {
+    Value = AsmReadMsr64Internal (Index);
+  }
+  FilterAfterMsrRead (Index, &Value);
+
+  return Value;
+}
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c
index badf1d8e58..ba0cf3f74c 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c
@@ -1,15 +1,15 @@
 /** @file
   AsmWriteMsr64 function
 
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
 
-
+#include <Library/RegisterFilterLib.h>
 
 /**
   Writes a 64-bit value to a Machine Specific Register(MSR), and returns the
   value.
 
@@ -31,13 +31,21 @@ EFIAPI
 AsmWriteMsr64 (
   IN UINT32  Index,
   IN UINT64  Value
   )
 {
-  _asm {
-    mov     edx, dword ptr [Value + 4]
-    mov     eax, dword ptr [Value + 0]
-    mov     ecx, Index
-    wrmsr
+  BOOLEAN                           Flag;
+
+  Flag = FilterBeforeMsrWrite (Index, &Value);
+  if (Flag) {
+    _asm {
+      mov     edx, dword ptr [Value + 4]
+      mov     eax, dword ptr [Value + 0]
+      mov     ecx, Index
+      wrmsr
+    }
   }
+  FilterAfterMsrWrite (Index, &Value);
+
+  return Value;
 }
 
diff --git a/MdePkg/Library/BaseLib/X64/GccInlinePriv.c b/MdePkg/Library/BaseLib/X64/GccInlinePriv.c
index 98be19b3c7..7f92da6a0c 100644
--- a/MdePkg/Library/BaseLib/X64/GccInlinePriv.c
+++ b/MdePkg/Library/BaseLib/X64/GccInlinePriv.c
@@ -8,10 +8,11 @@
 
 **/
 
 
 #include "BaseLibInternals.h"
+#include <Library/RegisterFilterLib.h>
 
 /**
   Enables CPU interrupts.
 
   Enables CPU interrupts.
@@ -62,17 +63,24 @@ AsmReadMsr64 (
   IN      UINT32                    Index
   )
 {
   UINT32 LowData;
   UINT32 HighData;
-
-  __asm__ __volatile__ (
-    "rdmsr"
-    : "=a" (LowData),   // %0
-      "=d" (HighData)   // %1
-    : "c"  (Index)      // %2
-    );
+  UINT64 Value;
+  BOOLEAN Flag;
+
+  Flag = FilterBeforeMsrRead (Index, &Value);
+  if (Flag) {
+    __asm__ __volatile__ (
+      "rdmsr"
+      : "=a" (LowData),   // %0
+        "=d" (HighData)   // %1
+      : "c"  (Index)      // %2
+      );
+    Value = (((UINT64)HighData) << 32) | LowData;
+  }
+  FilterAfterMsrRead (Index, &Value);
 
   return (((UINT64)HighData) << 32) | LowData;
 }
 
 /**
@@ -99,21 +107,26 @@ AsmWriteMsr64 (
   IN      UINT64                    Value
   )
 {
   UINT32 LowData;
   UINT32 HighData;
+  BOOLEAN Flag;
 
   LowData  = (UINT32)(Value);
   HighData = (UINT32)(Value >> 32);
 
-  __asm__ __volatile__ (
-    "wrmsr"
-    :
-    : "c" (Index),
-      "a" (LowData),
-      "d" (HighData)
-    );
+  Flag = FilterBeforeMsrWrite (Index, &Value);
+  if (Flag) {
+    __asm__ __volatile__ (
+      "wrmsr"
+      :
+      : "c" (Index),
+        "a" (LowData),
+        "d" (HighData)
+      );
+  }
+  FilterAfterMsrWrite (Index, &Value);
 
   return Value;
 }
 
 /**
diff --git a/MdePkg/Library/BaseLib/X64/ReadMsr64.c b/MdePkg/Library/BaseLib/X64/ReadMsr64.c
index 5ee7ca53f3..36a349432c 100644
--- a/MdePkg/Library/BaseLib/X64/ReadMsr64.c
+++ b/MdePkg/Library/BaseLib/X64/ReadMsr64.c
@@ -1,17 +1,19 @@
 /** @file
   CpuBreakpoint function.
 
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
 /**
   Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics.
 **/
 
+#include <Library/RegisterFilterLib.h>
+
 unsigned __int64 __readmsr (int register);
 
 #pragma intrinsic(__readmsr)
 
 /**
@@ -26,8 +28,17 @@ UINT64
 EFIAPI
 AsmReadMsr64 (
   IN UINT32  Index
   )
 {
-  return __readmsr (Index);
+  UINT64                            Value;
+  BOOLEAN                           Flag;
+
+  Flag = FilterBeforeMsrRead (Index, &Value);
+  if (Flag) {
+    Value = __readmsr (Index);
+  }
+  FilterAfterMsrRead (Index, &Value);
+
+  return Value;
 }
 
diff --git a/MdePkg/Library/BaseLib/X64/WriteMsr64.c b/MdePkg/Library/BaseLib/X64/WriteMsr64.c
index 98c5458d8a..bb030832c4 100644
--- a/MdePkg/Library/BaseLib/X64/WriteMsr64.c
+++ b/MdePkg/Library/BaseLib/X64/WriteMsr64.c
@@ -1,17 +1,19 @@
 /** @file
   CpuBreakpoint function.
 
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
 /**
   Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics.
 **/
 
+#include <Library/RegisterFilterLib.h>
+
 void __writemsr (unsigned long Register, unsigned __int64 Value);
 
 #pragma intrinsic(__writemsr)
 
 /**
@@ -28,9 +30,16 @@ EFIAPI
 AsmWriteMsr64 (
   IN UINT32  Index,
   IN UINT64  Value
   )
 {
-  __writemsr (Index, Value);
+  BOOLEAN                           Flag;
+
+  Flag = FilterBeforeMsrWrite (Index, &Value);
+  if (Flag) {
+    __writemsr (Index, Value);
+  }
+  FilterAfterMsrWrite (Index, &Value);
+
   return Value;
 }
 
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

* Re: [patch 12/28] IntelFsp2WrapperPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 ` [patch 12/28] IntelFsp2WrapperPkg: " Dandan Bi
@ 2021-03-15  4:09   ` Chiu, Chasel
  0 siblings, 0 replies; 42+ messages in thread
From: Chiu, Chasel @ 2021-03-15  4:09 UTC (permalink / raw)
  To: Bi, Dandan, devel@edk2.groups.io; +Cc: Desimone, Nathaniel L, Zeng, Star


Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>


> -----Original Message-----
> From: Bi, Dandan <dandan.bi@intel.com>
> Sent: Monday, March 15, 2021 11:58 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Star
> Subject: [patch 12/28] IntelFsp2WrapperPkg: Consume RegisterFilterLibNull
> instance
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.
> 
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Star Zeng <star.zeng@intel.com
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> index 738342b69b..031a6b71ff 100644
> --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> @@ -27,10 +27,11 @@
>    IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> 
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeC
> offGetEntryPointLib.inf
> 
> PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCo
> ffExtraActionLibNull.inf
>    PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> 
> CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCache
> MaintenanceLib.inf
> +
> + RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterL
> + ibNull.inf
> 
> 
> PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLib
> Null.inf
>    SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
> 
> ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseRepo
> rtStatusCodeLibNull.inf
> 
> TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplat
> e.inf
> --
> 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [patch 11/28] IntelFsp2Pkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 ` [patch 11/28] IntelFsp2Pkg: " Dandan Bi
@ 2021-03-15  4:09   ` Chiu, Chasel
  0 siblings, 0 replies; 42+ messages in thread
From: Chiu, Chasel @ 2021-03-15  4:09 UTC (permalink / raw)
  To: Bi, Dandan, devel@edk2.groups.io; +Cc: Desimone, Nathaniel L, Zeng, Star


Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>

> -----Original Message-----
> From: Bi, Dandan <dandan.bi@intel.com>
> Sent: Monday, March 15, 2021 11:58 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Zeng, Star <star.zeng@intel.com>
> Subject: [patch 11/28] IntelFsp2Pkg: Consume RegisterFilterLibNull instance
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.
> 
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  IntelFsp2Pkg/IntelFsp2Pkg.dsc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/IntelFsp2Pkg/IntelFsp2Pkg.dsc b/IntelFsp2Pkg/IntelFsp2Pkg.dsc index
> 309411630d..7422526d5e 100644
> --- a/IntelFsp2Pkg/IntelFsp2Pkg.dsc
> +++ b/IntelFsp2Pkg/IntelFsp2Pkg.dsc
> @@ -24,10 +24,11 @@
> 
> DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDe
> bugPrintErrorLevelLib.inf
>    PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
>    IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> 
> UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecomp
> ressLib.inf
>    UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
> +
> + RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterL
> + ibNull.inf
> 
> 
> ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseRepo
> rtStatusCodeLibNull.inf
> 
> PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLib
> Null.inf
>    SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
> 
> ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseRepo
> rtStatusCodeLibNull.inf
> --
> 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [edk2-devel] [patch 01/28] MdePkg: Add RegisterFilterLib class and NULL instance
  2021-03-15  3:58 ` [patch 01/28] MdePkg: Add RegisterFilterLib class and NULL instance Dandan Bi
@ 2021-03-15  5:21   ` Abner Chang
  2021-03-15 12:03     ` Dandan Bi
  0 siblings, 1 reply; 42+ messages in thread
From: Abner Chang @ 2021-03-15  5:21 UTC (permalink / raw)
  To: devel@edk2.groups.io, dandan.bi@intel.com
  Cc: Michael D Kinney, Liming Gao, Zhiguang Liu



> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Dandan Bi
> Sent: Monday, March 15, 2021 11:58 AM
> To: devel@edk2.groups.io
> Cc: Michael D Kinney <michael.d.kinney@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>
> Subject: [edk2-devel] [patch 01/28] MdePkg: Add RegisterFilterLib class and
> NULL instance
> 
> REF: INVALID URI REMOVED
> 3A__bugzilla.tianocore.org_show-5Fbug.cgi-3Fid-
> 3D3246&d=DwIBAg&c=C5b8zRQO1miGmBeVZ2LFWg&r=_SN6FZBN4Vgi4Ulks
> kz6qU3NYRO03nHp9P7Z5q59A3E&m=2NiPCGng1TEgIa1agqNkkCSJR3rLRI9362
> Sft59aE3A&s=0NN1lyRHr9srqeFrm4i9O4Y31EP4QO7TRYz8Cl8-pI8&e=
> 
> 1. Add a new library class (RegisterFilterLib) to filter and trace port
> IO/MMIO/MSR access.
> 2. Add a NULL instance (RegisterFilterLibNull) can be used to keep current
> behavior.
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  MdePkg/Include/Library/RegisterFilterLib.h    | 225 ++++++++++++++++
>  .../RegisterFilterLibNull.c                   | 253 ++++++++++++++++++
>  .../RegisterFilterLibNull.inf                 |  23 ++
>  .../RegisterFilterLibNull.uni                 |  13 +
>  MdePkg/MdePkg.dec                             |   7 +-
>  MdePkg/MdePkg.dsc                             |   4 +-
>  6 files changed, 523 insertions(+), 2 deletions(-)  create mode 100644
> MdePkg/Include/Library/RegisterFilterLib.h
>  create mode 100644
> MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c
>  create mode 100644
> MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
>  create mode 100644
> MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.uni
> 
> diff --git a/MdePkg/Include/Library/RegisterFilterLib.h
> b/MdePkg/Include/Library/RegisterFilterLib.h
> new file mode 100644
> index 0000000000..df0adb3a42
> --- /dev/null
> +++ b/MdePkg/Include/Library/RegisterFilterLib.h
> @@ -0,0 +1,225 @@
> +/** @file
> +  Public include file for the Port IO/MMIO/MSR RegisterFilterLib.
> +
> +Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
> +
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef REGISTER_FILTER_LIB_H_
> +#define REGISTER_FILTER_LIB_H_
> +
> +typedef enum {
> +  FilterWidth8,
> +  FilterWidth16,
> +  FilterWidth32,
> +  FilterWidth64
> +} FILTER_IO_WIDTH;
> +
> +/**
> +  Filter IO read operation before read IO port.
> +  It is used to filter IO read operation.
> +
> +  It will return the flag to decide whether require read real IO port.
> +  It can be used for emulation environment.
Can we have the description of meaning of the return flag in @retval in both header and source files? Also for all of below functions.

> +
> +  @param[in]       Width    Signifies the width of the I/O operation.
> +  @param[in]       Address  The base address of the I/O operation.
> +  @param[in]       Buffer   The destination buffer to store the results.
> +
> +**/
> +BOOLEAN
> +EFIAPI
> +FilterBeforeIoRead (
> +  IN FILTER_IO_WIDTH   Width,
> +  IN UINTN             Address,
> +  IN OUT VOID          *Buffer
> +  );
> +
> +/**
> +  Trace IO read operation after read IO port.
> +  It is used to trace IO operation.
> +
> +  @param[in]       Width    Signifies the width of the I/O operation.
> +  @param[in]       Address  The base address of the I/O operation.
> +  @param[in]       Buffer   The destination buffer to store the results.
> +
> +**/
> +VOID
> +EFIAPI
> +FilterAfterIoRead (
> +  IN FILTER_IO_WIDTH  Width,
> +  IN UINTN            Address,
> +  IN VOID             *Buffer
> +  );
> +/**
> +  Filter IO Write operation before wirte IO port.
> +  It is used to filter IO operation.
> +
> +  It will return the flag to decide whether require read write IO port.
> +  It can be used for emulation environment.
> +
> +  @param[in]       Width    Signifies the width of the I/O operation.
> +  @param[in]       Address  The base address of the I/O operation.
> +  @param[in]       Buffer   The source buffer from which to BeforeWrite data.
> +
> +**/
> +BOOLEAN
> +EFIAPI
> +FilterBeforeIoWrite (
> +  IN FILTER_IO_WIDTH  Width,
> +  IN UINTN            Address,
> +  IN VOID             *Buffer
> +  );
> +
> +  /**
> +  Trace IO Write operation after wirte IO port.
> +  It is used to trace IO operation.
> +
> +  @param[in]       Width    Signifies the width of the I/O operation.
> +  @param[in]       Address  The base address of the I/O operation.
> +  @param[in]       Buffer   The source buffer from which to BeforeWrite data.
> +
> +**/
> +VOID
> +EFIAPI
> +FilterAfterIoWrite (
> +  IN FILTER_IO_WIDTH  Width,
> +  IN UINTN            Address,
> +  IN VOID             *Buffer
> +  );
> +
> +/**
> +  Filter memory IO before Read operation.
> +
> +  It will return the flag to decide whether require read real MMIO.
> +  It can be used for emulation environment.
> +
> +  @param[in]       Width    Signifies the width of the memory I/O operation.
> +  @param[in]       Address  The base address of the memory I/O operation.
> +  @param[in]       Buffer   The destination buffer to store the results.
> +
> +**/
> +BOOLEAN
> +EFIAPI
> +FilterBeforeMmIoRead (
> +  IN FILTER_IO_WIDTH  Width,
> +  IN UINTN            Address,
> +  IN OUT VOID         *Buffer
> +  );
> +
> +/**
> +  Tracer memory IO after read operation
> +
> +  @param[in]       Width    Signifies the width of the memory I/O operation.
> +  @param[in]       Address  The base address of the memory I/O operation.
> +  @param[in]       Buffer   The destination buffer to store the results.
> +
> +**/
> +VOID
> +EFIAPI
> +FilterAfterMmIoRead (
> +  IN FILTER_IO_WIDTH  Width,
> +  IN UINTN            Address,
> +  IN VOID             *Buffer
> +  );
> +
> +/**
> +  Filter memory IO before write operation
> +
> +  It will return the flag to decide whether require wirte real MMIO.
> +  It can be used for emulation environment.
> +
> +  @param[in]       Width    Signifies the width of the memory I/O operation.
> +  @param[in]       Address  The base address of the memory I/O operation.
> +  @param[in]       Buffer   The source buffer from which to BeforeWrite data.
> +
> +**/
> +BOOLEAN
> +EFIAPI
> +FilterBeforeMmIoWrite (
> +  IN FILTER_IO_WIDTH  Width,
> +  IN UINTN            Address,
> +  IN VOID             *Buffer
> +  );
> +
> +/**
> +  Tracer memory IO after write operation
> +
> +  @param[in]       Width    Signifies the width of the memory I/O operation.
> +  @param[in]       Address  The base address of the memory I/O operation.
> +  @param[in]       Buffer   The source buffer from which to BeforeWrite data.
> +
> +**/
> +VOID
> +EFIAPI
> +FilterAfterMmIoWrite (
> +  IN FILTER_IO_WIDTH  Width,
> +  IN UINTN            Address,
> +  IN VOID             *Buffer
> +  );
> +
> +/**
> +  Filter MSR before read operation.
> +
> +  It will return the flag to decide whether require read real MSR.
> +  It can be used for emulation environment.
> +
> +  @param  Index                     The 8-bit Machine Specific Register index to
> BeforeWrite.
> +  @param  Value                     The 64-bit value to BeforeRead from the
> Machine Specific Register.
> +
> +**/
> +BOOLEAN
> +EFIAPI
> +FilterBeforeMsrRead (
> +  IN UINT32           Index,
> +  IN OUT UINT64       *Value
> +  );
> +
> +/**
> +  Trace MSR after read operation
> +
> +  @param  Index                     The 8-bit Machine Specific Register index to
> BeforeWrite.
> +  @param  Value                     The 64-bit value to BeforeRead from the
> Machine Specific Register.
> +
> +**/
> +VOID
> +EFIAPI
> +FilterAfterMsrRead (
> +  IN UINT32            Index,
> +  IN UINT64            *Value
> +  );
> +
> +/**
> +  Filter MSR before write operation
> +
> +  It will return the flag to decide whether require write real MSR.
> +  It can be used for emulation environment.
> +
> +  @param  Index                     The 8-bit Machine Specific Register index to
> BeforeWrite.
> +  @param  Value                     The 64-bit value to BeforeWrite to the Machine
> Specific Register.
> +
> +**/
> +BOOLEAN
> +EFIAPI
> +FilterBeforeMsrWrite (
> +  IN UINT32           Index,
> +  IN UINT64           *Value
> +  );
> +
> +/**
> +  Trace MSR after write operation
> +
> +  @param  Index                     The 8-bit Machine Specific Register index to
> BeforeWrite.
> +  @param  Value                     The 64-bit value to BeforeWrite to the Machine
> Specific Register.
> +
> +**/
> +VOID
> +EFIAPI
> +FilterAfterMsrWrite (
> +  IN UINT32            Index,
> +  IN UINT64            *Value
> +  );
> +
> +#endif // REGISTER_FILTER_LIB_H_
> diff --git a/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c
> b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c
> new file mode 100644
> index 0000000000..5c2bc2864a
> --- /dev/null
> +++ b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c
> @@ -0,0 +1,253 @@
> +/** @file
> +  Null instance of RegisterFilterLib.
> +
> +  Copyright (c) 2021 Intel Corporation. All rights reserved.<BR>
> +
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#include <Library/RegisterFilterLib.h>
> +
> +/**
> +  Filter IO read operation before read IO port.
> +  It is used to filter IO read operation.
> +
> +  It will return the flag to decide whether require read real IO port.
> +  It can be used for emulation environment.
> +
> +  @param[in]       Width    Signifies the width of the I/O operation.
> +  @param[in]       Address  The base address of the I/O operation.
> +  @param[in,out]   Buffer   The destination buffer to store the results.
> +
> +**/
> +BOOLEAN
> +EFIAPI
> +FilterBeforeIoRead (
> +  IN FILTER_IO_WIDTH  Width,
> +  IN UINTN            Address,
> +  IN OUT VOID         *Buffer
> +  )
> +{
> +  return TRUE;
> +}
> +
> +/**
> +  Trace IO read operation after read IO port.
> +  It is used to trace IO operation.
> +
> +  @param[in]       Width    Signifies the width of the I/O operation.
> +  @param[in]       Address  The base address of the I/O operation.
> +  @param[in]       Buffer   The destination buffer to store the results.
> +
> +**/
> +VOID
> +EFIAPI
> +FilterAfterIoRead (
> +  IN FILTER_IO_WIDTH  Width,
> +  IN UINTN            Address,
> +  IN VOID             *Buffer
> +  )
> +{
> +  return;
> +}
> +
> +/**
> +  Filter IO Write operation before wirte IO port.
> +  It is used to filter IO operation.
> +
> +  It will return the flag to decide whether require read write IO port.
> +  It can be used for emulation environment.
> +
> +  @param[in]       Width    Signifies the width of the I/O operation.
> +  @param[in]       Address  The base address of the I/O operation.
> +  @param[in]       Buffer   The source buffer from which to write data.
> +
> +**/
> +BOOLEAN
> +EFIAPI
> +FilterBeforeIoWrite (
> +  IN FILTER_IO_WIDTH  Width,
> +  IN UINTN            Address,
> +  IN VOID             *Buffer
> +  )
> +{
> +  return TRUE;
> +}
> +
> +  /**
> +  Trace IO Write operation after wirte IO port.
> +  It is used to trace IO operation.
> +
> +  @param[in]       Width    Signifies the width of the I/O operation.
> +  @param[in]       Address  The base address of the I/O operation.
> +  @param[in]       Buffer   The source buffer from which to Write data.
> +
> +**/
> +VOID
> +EFIAPI
> +FilterAfterIoWrite (
> +  IN FILTER_IO_WIDTH  Width,
> +  IN UINTN            Address,
> +  IN VOID             *Buffer
> +  )
> +{
> +  return;
> +}
> +
> +/**
> +  Filter memory IO before Read operation.
> +
> +  It will return the flag to decide whether require read real MMIO.
> +  It can be used for emulation environment.
> +
> +  @param[in]       Width    Signifies the width of the memory I/O operation.
> +  @param[in]       Address  The base address of the memory I/O operation.
> +  @param[in,out]   Buffer   The destination buffer to store the results.
> +
> +**/
> +BOOLEAN
> +EFIAPI
> +FilterBeforeMmIoRead (
> +  IN FILTER_IO_WIDTH  Width,
> +  IN UINTN            Address,
> +  IN OUT VOID         *Buffer
> +  )
> +{
> +  return TRUE;
> +}
> +
> +/**
> +  Tracer memory IO after read operation.
> +
> +  @param[in]       Width    Signifies the width of the memory I/O operation.
> +  @param[in]       Address  The base address of the memory I/O operation.
> +  @param[in]       Buffer   The destination buffer to store the results.
> +
> +**/
> +VOID
> +EFIAPI
> +FilterAfterMmIoRead (
> +  IN FILTER_IO_WIDTH  Width,
> +  IN UINTN            Address,
> +  IN VOID             *Buffer
> +  )
> +{
> +  return;
> +}
> +
> +/**
> +  Filter memory IO before write operation.
> +
> +  It will return the flag to decide whether require wirte real MMIO.
> +  It can be used for emulation environment.
> +
> +  @param[in]       Width    Signifies the width of the memory I/O operation.
> +  @param[in]       Address  The base address of the memory I/O operation.
> +  @param[in]       Buffer   The source buffer from which to write data.
> +
> +**/
> +BOOLEAN
> +EFIAPI
> +FilterBeforeMmIoWrite (
> +  IN FILTER_IO_WIDTH  Width,
> +  IN UINTN            Address,
> +  IN VOID             *Buffer
> +  )
> +{
> +  return TRUE;
> +}
> +
> +/**
> +  Tracer memory IO after write operation.
> +
> +  @param[in]       Width    Signifies the width of the memory I/O operation.
> +  @param[in]       Address  The base address of the memory I/O operation.
> +  @param[in]       Buffer   The source buffer from which to write data.
> +
> +**/
> +VOID
> +EFIAPI
> +FilterAfterMmIoWrite (
> +  IN FILTER_IO_WIDTH  Width,
> +  IN UINTN            Address,
> +  IN VOID             *Buffer
> +  )
> +{
> +  return;
> +}
> +
> +/**
> +  Filter MSR before read operation.
> +
> +  It will return the flag to decide whether require read real MSR.
> +  It can be used for emulation environment.
> +
> +  @param  Index                     The Register index of the MSR.
> +  @param  Value                     Point to the data will be read from the MSR.
> +
> +**/
> +BOOLEAN
> +EFIAPI
> +FilterBeforeMsrRead (
> +  IN UINT32        Index,
> +  IN OUT UINT64    *Value
> +  )
> +{
> +  return TRUE;
> +}
> +
> +/**
> +  Trace MSR after read operation.
> +
> +  @param  Index                     The Register index of the MSR.
> +  @param  Value                     Point to the data has been be read from the MSR.
> +
> +**/
> +VOID
> +EFIAPI
> +FilterAfterMsrRead (
> +  IN UINT32    Index,
> +  IN UINT64    *Value
> +  )
> +{
> +  return;
> +}
> +
> +/**
> +  Filter MSR before write operation.
> +
> +  It will return the flag to decide whether require write real MSR.
> +  It can be used for emulation environment.
> +
> +  @param  Index                     The Register index of the MSR.
> +  @param  Value                     Point to the data want to be written to the MSR.
> +
> +**/
> +BOOLEAN
> +EFIAPI
> +FilterBeforeMsrWrite (
> +  IN UINT32    Index,
> +  IN UINT64    *Value
> +  )
> +{
> +  return TRUE;
> +}
> +
> +/**
> +  Trace MSR after write operation.
> +
> +  @param  Index                     The Register index of the MSR.
> +  @param  Value                     Point to the data has been be written to the MSR.
> +
> +**/
> +VOID
> +EFIAPI
> +FilterAfterMsrWrite (
> +  IN UINT32    Index,
> +  IN UINT64    *Value
> +  )
> +{
> +  return;
> +}
> +
> diff --git a/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
> b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
> new file mode 100644
> index 0000000000..a7fc7497ed
> --- /dev/null
> +++ b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
> @@ -0,0 +1,23 @@
> +## @file
> +#  Null instance of RegisterFilterLib.
> +#
> +#  Copyright (c) 2021, Intel Corporation. All rights reserved.<BR> # #
> +SPDX-License-Identifier: BSD-2-Clause-Patent # ##
> +
> +[Defines]
> +  INF_VERSION                    = 0x00010005
> +  BASE_NAME                      = FilterLibNull
> +  MODULE_UNI_FILE                = FilterLibNull.uni
> +  FILE_GUID                      = 9F555194-A410-4AD6-B3FC-53F6E10FA793
> +  MODULE_TYPE                    = BASE
> +  VERSION_STRING                 = 1.0
> +  LIBRARY_CLASS                  = RegisterFilterLib
> +
> +[Sources]
> +  RegisterFilterLibNull.c
> +
> +[Packages]
> +  MdePkg/MdePkg.dec
> diff --git a/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.uni
> b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.uni
> new file mode 100644
> index 0000000000..8a8f1c4a77
> --- /dev/null
> +++ b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.uni
> @@ -0,0 +1,13 @@
> +// /** @file
> +// Null instance of RegisterFilterLib.
> +//
> +// Copyright (c) 2021, Intel Corporation. All rights reserved.<BR> //
> +// SPDX-License-Identifier: BSD-2-Clause-Patent // // **/
> +
> +
> +#string STR_MODULE_ABSTRACT              #language en-US "Null instance of
> RegisterFilterLib.
> +#string STR_MODULE_DESCRIPTION           #language en-US "Null instance of
> RegisterFilterLib."
> +
> diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
> index 1d2637acc2..c437e2a065 100644
> --- a/MdePkg/MdePkg.dec
> +++ b/MdePkg/MdePkg.dec
> @@ -2,11 +2,11 @@
>  # This Package provides all definitions, library classes and libraries instances.
>  #
>  # It also provides the definitions(including PPIs/PROTOCOLs/GUIDs) of
>  # EFI1.10/UEFI2.7/PI1.7 and some Industry Standards.
>  #
> -# Copyright (c) 2007 - 2020, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
>  # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
>  # (C) Copyright 2016 - 2020 Hewlett Packard Enterprise Development LP<BR>
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
> @@ -255,10 +255,15 @@
>    ## @libraryclass Extension to BaseLib for host based unit tests that allows a
>    #                subset of BaseLib services to be hooked for emulation.
>    #
>    UnitTestHostBaseLib|Test/UnitTest/Include/Library/UnitTestHostBaseLib.h
> 
> +  ##  @libraryclass
> +  #
> +  #
> +  RegisterFilterLib|Include/Library/RegisterFilterLib.h
> +
>    ##  @libraryclass  This library provides an interface to request non-MMRAM
> pages to be mapped
>    #                  or unblocked from inside MM environment.
>    #
>    MmUnblockMemoryLib|Include/Library/MmUnblockMemoryLib.h
> 
> diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc
> index 79629e3f93..be89e28eef 100644
> --- a/MdePkg/MdePkg.dsc
> +++ b/MdePkg/MdePkg.dsc
> @@ -1,9 +1,9 @@
>  ## @file
>  # EFI/PI MdePkg Package
>  #
> -# Copyright (c) 2007 - 2020, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR>
>  # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
>  # (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
>  #
>  #    SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
> @@ -125,10 +125,12 @@
> 
> MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.
> inf
> 
> 
> MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntry
> Point.inf
> 
> MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTab
> leLib.inf
> 
> +  MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
> +
>  [Components.IA32, Components.X64, Components.ARM,
> Components.AARCH64]
>    #
>    # Add UEFI Target Based Unit Tests
>    #
>    MdePkg/Test/UnitTest/Library/BaseLib/BaseLibUnitTestsUefi.inf
> --
> 2.18.0.windows.1
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [patch 18/28] RedfishPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 ` [patch 18/28] RedfishPkg: " Dandan Bi
@ 2021-03-15  5:21   ` Abner Chang
  2021-03-15  5:27   ` Nickle Wang
  1 sibling, 0 replies; 42+ messages in thread
From: Abner Chang @ 2021-03-15  5:21 UTC (permalink / raw)
  To: Dandan Bi, devel@edk2.groups.io; +Cc: Wang, Nickle (HPS SW)

Reviewed-by: Abner Chang <abner.chang@hpe.com>

> -----Original Message-----
> From: Dandan Bi [mailto:dandan.bi@intel.com]
> Sent: Monday, March 15, 2021 11:59 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>;
> Wang, Nickle (HPS SW) <nickle.wang@hpe.com>
> Subject: [patch 18/28] RedfishPkg: Consume RegisterFilterLibNull instance
> 
> REF: INVALID URI REMOVED
> 3A__bugzilla.tianocore.org_show-5Fbug.cgi-3Fid-
> 3D3246&d=DwIBAg&c=C5b8zRQO1miGmBeVZ2LFWg&r=_SN6FZBN4Vgi4Ulks
> kz6qU3NYRO03nHp9P7Z5q59A3E&m=b44ADTngga-
> k5Mk_1e5q6BwQ7bB6eC43oAgZ7klICfs&s=DbYLYO_cLla0TObYFGhNUkA0KEx
> Z63aVYPPMJnB5Ne4&e=
> 
> Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.
> 
> Cc: Abner Chang <abner.chang@hpe.com>
> Cc: Nickle Wang <nickle.wang@hpe.com>
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  RedfishPkg/RedfishPkg.dsc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/RedfishPkg/RedfishPkg.dsc b/RedfishPkg/RedfishPkg.dsc index
> e0052290b5..e93010fe7d 100644
> --- a/RedfishPkg/RedfishPkg.dsc
> +++ b/RedfishPkg/RedfishPkg.dsc
> @@ -36,10 +36,11 @@
>    HttpIoLib|NetworkPkg/Library/DxeHttpIoLib/DxeHttpIoLib.inf
>    NetLib|NetworkPkg/Library/DxeNetLib/DxeNetLib.inf
>    DpcLib|NetworkPkg/Library/DxeDpcLib/DxeDpcLib.inf
> 
> RedfishPlatformCredentialLib|RedfishPkg/Library/PlatformCredentialLibNull/
> PlatformCredentialLibNull.inf
> 
> RedfishContentCodingLib|RedfishPkg/Library/RedfishContentCodingLibNull/
> RedfishContentCodingLibNull.inf
> +
> + RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterL
> + ibNull.inf
> 
>  [LibraryClasses.ARM, LibraryClasses.AARCH64]
>    #
>    # This library provides the instrinsic functions generated by a given compiler.
>    #
> --
> 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [patch 18/28] RedfishPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 ` [patch 18/28] RedfishPkg: " Dandan Bi
  2021-03-15  5:21   ` Abner Chang
@ 2021-03-15  5:27   ` Nickle Wang
  1 sibling, 0 replies; 42+ messages in thread
From: Nickle Wang @ 2021-03-15  5:27 UTC (permalink / raw)
  To: Dandan Bi, devel@edk2.groups.io; +Cc: Chang, Abner (HPS SW/FW Technologist)

Reviewed-by: Nickle Wang <nickle.wang@hpe.com>

Thanks,
Nickle
> -----Original Message-----
> From: Dandan Bi <dandan.bi@intel.com>
> Sent: Monday, March 15, 2021 11:59 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>;
> Wang, Nickle (HPS SW) <nickle.wang@hpe.com>
> Subject: [patch 18/28] RedfishPkg: Consume RegisterFilterLibNull instance
> 
> REF: INVALID URI REMOVED
> 3A__bugzilla.tianocore.org_show-5Fbug.cgi-3Fid-
> 3D3246&d=DwIBAg&c=C5b8zRQO1miGmBeVZ2LFWg&r=EyDVgu7wEWp3Fu
> WhtKB5mKTlF7DSyiKCS3SYOqNSrkM&m=UkwwZjd0xCb7cXNhG8MmbBhxRT
> BS7cO0-jhgHlX6Uzk&s=8nmbdnQkORj4MRMh96hH-3j7Uf3xvSaCgUs-
> UPbFLPc&e=
> 
> Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.
> 
> Cc: Abner Chang <abner.chang@hpe.com>
> Cc: Nickle Wang <nickle.wang@hpe.com>
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  RedfishPkg/RedfishPkg.dsc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/RedfishPkg/RedfishPkg.dsc b/RedfishPkg/RedfishPkg.dsc index
> e0052290b5..e93010fe7d 100644
> --- a/RedfishPkg/RedfishPkg.dsc
> +++ b/RedfishPkg/RedfishPkg.dsc
> @@ -36,10 +36,11 @@
>    HttpIoLib|NetworkPkg/Library/DxeHttpIoLib/DxeHttpIoLib.inf
>    NetLib|NetworkPkg/Library/DxeNetLib/DxeNetLib.inf
>    DpcLib|NetworkPkg/Library/DxeDpcLib/DxeDpcLib.inf
> 
> RedfishPlatformCredentialLib|RedfishPkg/Library/PlatformCredentialLibNull/
> PlatformCredentialLibNull.inf
> 
> RedfishContentCodingLib|RedfishPkg/Library/RedfishContentCodingLibNull/
> RedfishContentCodingLibNull.inf
> +
> + RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterL
> + ibNull.inf
> 
>  [LibraryClasses.ARM, LibraryClasses.AARCH64]
>    #
>    # This library provides the instrinsic functions generated by a given compiler.
>    #
> --
> 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [patch 13/28] MdeModulePkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 ` [patch 13/28] MdeModulePkg: " Dandan Bi
@ 2021-03-15  6:02   ` Wu, Hao A
  0 siblings, 0 replies; 42+ messages in thread
From: Wu, Hao A @ 2021-03-15  6:02 UTC (permalink / raw)
  To: Bi, Dandan, devel@edk2.groups.io; +Cc: Wang, Jian J

> -----Original Message-----
> From: Bi, Dandan <dandan.bi@intel.com>
> Sent: Monday, March 15, 2021 11:58 AM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>
> Subject: [patch 13/28] MdeModulePkg: Consume RegisterFilterLibNull
> instance
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.
> 
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  MdeModulePkg/MdeModulePkg.dsc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/MdeModulePkg/MdeModulePkg.dsc
> b/MdeModulePkg/MdeModulePkg.dsc index 9272da89a9..d8a8185f07
> 100644
> --- a/MdeModulePkg/MdeModulePkg.dsc
> +++ b/MdeModulePkg/MdeModulePkg.dsc
> @@ -41,10 +41,11 @@
> 
> PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibP
> ci.inf
> 
> CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCac
> heMaintenanceLib.inf
>    PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> 
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/Base
> PeCoffGetEntryPointLib.inf
>    SortLib|MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
> +
> + RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterL
> + ibNull.inf


Reviewed-by: Hao A Wu <hao.a.wu@intel.com>

Best Regards,
Hao Wu


>    #
>    # UEFI & PI
>    #
> 
> UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo
> otServicesTableLib.inf
> 
> UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib
> /UefiRuntimeServicesTableLib.inf
> --
> 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [patch 22/28] SourceLevelDebugPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 ` [patch 22/28] SourceLevelDebugPkg: " Dandan Bi
@ 2021-03-15  6:03   ` Wu, Hao A
  0 siblings, 0 replies; 42+ messages in thread
From: Wu, Hao A @ 2021-03-15  6:03 UTC (permalink / raw)
  To: Bi, Dandan, devel@edk2.groups.io

> -----Original Message-----
> From: Bi, Dandan <dandan.bi@intel.com>
> Sent: Monday, March 15, 2021 11:59 AM
> To: devel@edk2.groups.io
> Cc: Wu, Hao A <hao.a.wu@intel.com>
> Subject: [patch 22/28] SourceLevelDebugPkg: Consume RegisterFilterLibNull
> instance
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.
> 
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  SourceLevelDebugPkg/SourceLevelDebugPkg.dsc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
> b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
> index 20eb10ba07..73a6555077 100644
> --- a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
> +++ b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
> @@ -40,10 +40,11 @@
> 
> TimerLib|UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/SecPeiDxeTimerLi
> bUefiCpu.inf
> 
> ResetSystemLib|MdeModulePkg/Library/BaseResetSystemLibNull/BaseRes
> etSystemLibNull.inf
>    PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
>    PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
> 
> PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePla
> tformHookLibNull.inf
> +
> + RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterL
> + ibNull.inf


Reviewed-by: Hao A Wu <hao.a.wu@intel.com>

Best Regards,
Hao Wu


> 
>  !ifdef $(SOURCE_DEBUG_USE_USB)
> 
> DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicati
> onLibUsb/DebugCommunicationLibUsb.inf
>  !else
>  !ifndef $(SOURCE_DEBUG_USE_USB3)
> --
> 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [edk2-devel] [patch 01/28] MdePkg: Add RegisterFilterLib class and NULL instance
  2021-03-15  5:21   ` [edk2-devel] " Abner Chang
@ 2021-03-15 12:03     ` Dandan Bi
  0 siblings, 0 replies; 42+ messages in thread
From: Dandan Bi @ 2021-03-15 12:03 UTC (permalink / raw)
  To: Chang, Abner (HPS SW/FW Technologist), devel@edk2.groups.io
  Cc: Kinney, Michael D, Liming Gao, Liu, Zhiguang

> -----Original Message-----
> From: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
> Sent: Monday, March 15, 2021 1:21 PM
> To: devel@edk2.groups.io; Bi, Dandan <dandan.bi@intel.com>
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>
> Subject: RE: [edk2-devel] [patch 01/28] MdePkg: Add RegisterFilterLib class
> and NULL instance
> 
> 
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> > Dandan Bi
> > Sent: Monday, March 15, 2021 11:58 AM
> > To: devel@edk2.groups.io
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>; Liming Gao
> > <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>
> > Subject: [edk2-devel] [patch 01/28] MdePkg: Add RegisterFilterLib
> > class and NULL instance
> >
> > REF: https://urldefense.proofpoint.com/v2/url?u=https-
> > 3A__bugzilla.tianocore.org_show-5Fbug.cgi-3Fid-
> >
> 3D3246&d=DwIBAg&c=C5b8zRQO1miGmBeVZ2LFWg&r=_SN6FZBN4Vgi4Ulks
> >
> kz6qU3NYRO03nHp9P7Z5q59A3E&m=2NiPCGng1TEgIa1agqNkkCSJR3rLRI9362
> > Sft59aE3A&s=0NN1lyRHr9srqeFrm4i9O4Y31EP4QO7TRYz8Cl8-pI8&e=
> >
> > 1. Add a new library class (RegisterFilterLib) to filter and trace
> > port IO/MMIO/MSR access.
> > 2. Add a NULL instance (RegisterFilterLibNull) can be used to keep
> > current behavior.
> >
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> > ---
> >  MdePkg/Include/Library/RegisterFilterLib.h    | 225 ++++++++++++++++
> >  .../RegisterFilterLibNull.c                   | 253 ++++++++++++++++++
> >  .../RegisterFilterLibNull.inf                 |  23 ++
> >  .../RegisterFilterLibNull.uni                 |  13 +
> >  MdePkg/MdePkg.dec                             |   7 +-
> >  MdePkg/MdePkg.dsc                             |   4 +-
> >  6 files changed, 523 insertions(+), 2 deletions(-)  create mode
> > 100644 MdePkg/Include/Library/RegisterFilterLib.h
> >  create mode 100644
> > MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c
> >  create mode 100644
> > MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
> >  create mode 100644
> > MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.uni
> >
> > diff --git a/MdePkg/Include/Library/RegisterFilterLib.h
> > b/MdePkg/Include/Library/RegisterFilterLib.h
> > new file mode 100644
> > index 0000000000..df0adb3a42
> > --- /dev/null
> > +++ b/MdePkg/Include/Library/RegisterFilterLib.h
> > @@ -0,0 +1,225 @@
> > +/** @file
> > +  Public include file for the Port IO/MMIO/MSR RegisterFilterLib.
> > +
> > +Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
> > +
> > +SPDX-License-Identifier: BSD-2-Clause-Patent
> > +
> > +**/
> > +
> > +#ifndef REGISTER_FILTER_LIB_H_
> > +#define REGISTER_FILTER_LIB_H_
> > +
> > +typedef enum {
> > +  FilterWidth8,
> > +  FilterWidth16,
> > +  FilterWidth32,
> > +  FilterWidth64
> > +} FILTER_IO_WIDTH;
> > +
> > +/**
> > +  Filter IO read operation before read IO port.
> > +  It is used to filter IO read operation.
> > +
> > +  It will return the flag to decide whether require read real IO port.
> > +  It can be used for emulation environment.
> Can we have the description of meaning of the return flag in @retval in both
> header and source files? Also for all of below functions.
Sure, thanks Abner. 
I will wait to see whether there is more comment and handle them together in later new patch version. 


Thanks,
Dandan
> 
> > +
> > +  @param[in]       Width    Signifies the width of the I/O operation.
> > +  @param[in]       Address  The base address of the I/O operation.
> > +  @param[in]       Buffer   The destination buffer to store the results.
> > +
> > +**/
> > +BOOLEAN
> > +EFIAPI
> > +FilterBeforeIoRead (
> > +  IN FILTER_IO_WIDTH   Width,
> > +  IN UINTN             Address,
> > +  IN OUT VOID          *Buffer
> > +  );
> > +
> > +/**
> > +  Trace IO read operation after read IO port.
> > +  It is used to trace IO operation.
> > +
> > +  @param[in]       Width    Signifies the width of the I/O operation.
> > +  @param[in]       Address  The base address of the I/O operation.
> > +  @param[in]       Buffer   The destination buffer to store the results.
> > +
> > +**/
> > +VOID
> > +EFIAPI
> > +FilterAfterIoRead (
> > +  IN FILTER_IO_WIDTH  Width,
> > +  IN UINTN            Address,
> > +  IN VOID             *Buffer
> > +  );
> > +/**
> > +  Filter IO Write operation before wirte IO port.
> > +  It is used to filter IO operation.
> > +
> > +  It will return the flag to decide whether require read write IO port.
> > +  It can be used for emulation environment.
> > +
> > +  @param[in]       Width    Signifies the width of the I/O operation.
> > +  @param[in]       Address  The base address of the I/O operation.
> > +  @param[in]       Buffer   The source buffer from which to BeforeWrite
> data.
> > +
> > +**/
> > +BOOLEAN
> > +EFIAPI
> > +FilterBeforeIoWrite (
> > +  IN FILTER_IO_WIDTH  Width,
> > +  IN UINTN            Address,
> > +  IN VOID             *Buffer
> > +  );
> > +
> > +  /**
> > +  Trace IO Write operation after wirte IO port.
> > +  It is used to trace IO operation.
> > +
> > +  @param[in]       Width    Signifies the width of the I/O operation.
> > +  @param[in]       Address  The base address of the I/O operation.
> > +  @param[in]       Buffer   The source buffer from which to BeforeWrite
> data.
> > +
> > +**/
> > +VOID
> > +EFIAPI
> > +FilterAfterIoWrite (
> > +  IN FILTER_IO_WIDTH  Width,
> > +  IN UINTN            Address,
> > +  IN VOID             *Buffer
> > +  );
> > +
> > +/**
> > +  Filter memory IO before Read operation.
> > +
> > +  It will return the flag to decide whether require read real MMIO.
> > +  It can be used for emulation environment.
> > +
> > +  @param[in]       Width    Signifies the width of the memory I/O operation.
> > +  @param[in]       Address  The base address of the memory I/O operation.
> > +  @param[in]       Buffer   The destination buffer to store the results.
> > +
> > +**/
> > +BOOLEAN
> > +EFIAPI
> > +FilterBeforeMmIoRead (
> > +  IN FILTER_IO_WIDTH  Width,
> > +  IN UINTN            Address,
> > +  IN OUT VOID         *Buffer
> > +  );
> > +
> > +/**
> > +  Tracer memory IO after read operation
> > +
> > +  @param[in]       Width    Signifies the width of the memory I/O operation.
> > +  @param[in]       Address  The base address of the memory I/O operation.
> > +  @param[in]       Buffer   The destination buffer to store the results.
> > +
> > +**/
> > +VOID
> > +EFIAPI
> > +FilterAfterMmIoRead (
> > +  IN FILTER_IO_WIDTH  Width,
> > +  IN UINTN            Address,
> > +  IN VOID             *Buffer
> > +  );
> > +
> > +/**
> > +  Filter memory IO before write operation
> > +
> > +  It will return the flag to decide whether require wirte real MMIO.
> > +  It can be used for emulation environment.
> > +
> > +  @param[in]       Width    Signifies the width of the memory I/O operation.
> > +  @param[in]       Address  The base address of the memory I/O operation.
> > +  @param[in]       Buffer   The source buffer from which to BeforeWrite
> data.
> > +
> > +**/
> > +BOOLEAN
> > +EFIAPI
> > +FilterBeforeMmIoWrite (
> > +  IN FILTER_IO_WIDTH  Width,
> > +  IN UINTN            Address,
> > +  IN VOID             *Buffer
> > +  );
> > +
> > +/**
> > +  Tracer memory IO after write operation
> > +
> > +  @param[in]       Width    Signifies the width of the memory I/O operation.
> > +  @param[in]       Address  The base address of the memory I/O operation.
> > +  @param[in]       Buffer   The source buffer from which to BeforeWrite
> data.
> > +
> > +**/
> > +VOID
> > +EFIAPI
> > +FilterAfterMmIoWrite (
> > +  IN FILTER_IO_WIDTH  Width,
> > +  IN UINTN            Address,
> > +  IN VOID             *Buffer
> > +  );
> > +
> > +/**
> > +  Filter MSR before read operation.
> > +
> > +  It will return the flag to decide whether require read real MSR.
> > +  It can be used for emulation environment.
> > +
> > +  @param  Index                     The 8-bit Machine Specific Register index to
> > BeforeWrite.
> > +  @param  Value                     The 64-bit value to BeforeRead from the
> > Machine Specific Register.
> > +
> > +**/
> > +BOOLEAN
> > +EFIAPI
> > +FilterBeforeMsrRead (
> > +  IN UINT32           Index,
> > +  IN OUT UINT64       *Value
> > +  );
> > +
> > +/**
> > +  Trace MSR after read operation
> > +
> > +  @param  Index                     The 8-bit Machine Specific Register index to
> > BeforeWrite.
> > +  @param  Value                     The 64-bit value to BeforeRead from the
> > Machine Specific Register.
> > +
> > +**/
> > +VOID
> > +EFIAPI
> > +FilterAfterMsrRead (
> > +  IN UINT32            Index,
> > +  IN UINT64            *Value
> > +  );
> > +
> > +/**
> > +  Filter MSR before write operation
> > +
> > +  It will return the flag to decide whether require write real MSR.
> > +  It can be used for emulation environment.
> > +
> > +  @param  Index                     The 8-bit Machine Specific Register index to
> > BeforeWrite.
> > +  @param  Value                     The 64-bit value to BeforeWrite to the Machine
> > Specific Register.
> > +
> > +**/
> > +BOOLEAN
> > +EFIAPI
> > +FilterBeforeMsrWrite (
> > +  IN UINT32           Index,
> > +  IN UINT64           *Value
> > +  );
> > +
> > +/**
> > +  Trace MSR after write operation
> > +
> > +  @param  Index                     The 8-bit Machine Specific Register index to
> > BeforeWrite.
> > +  @param  Value                     The 64-bit value to BeforeWrite to the Machine
> > Specific Register.
> > +
> > +**/
> > +VOID
> > +EFIAPI
> > +FilterAfterMsrWrite (
> > +  IN UINT32            Index,
> > +  IN UINT64            *Value
> > +  );
> > +
> > +#endif // REGISTER_FILTER_LIB_H_
> > diff --git
> > a/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c
> > b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c
> > new file mode 100644
> > index 0000000000..5c2bc2864a
> > --- /dev/null
> > +++ b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c
> > @@ -0,0 +1,253 @@
> > +/** @file
> > +  Null instance of RegisterFilterLib.
> > +
> > +  Copyright (c) 2021 Intel Corporation. All rights reserved.<BR>
> > +
> > +  SPDX-License-Identifier: BSD-2-Clause-Patent
> > +
> > +**/
> > +
> > +#include <Library/RegisterFilterLib.h>
> > +
> > +/**
> > +  Filter IO read operation before read IO port.
> > +  It is used to filter IO read operation.
> > +
> > +  It will return the flag to decide whether require read real IO port.
> > +  It can be used for emulation environment.
> > +
> > +  @param[in]       Width    Signifies the width of the I/O operation.
> > +  @param[in]       Address  The base address of the I/O operation.
> > +  @param[in,out]   Buffer   The destination buffer to store the results.
> > +
> > +**/
> > +BOOLEAN
> > +EFIAPI
> > +FilterBeforeIoRead (
> > +  IN FILTER_IO_WIDTH  Width,
> > +  IN UINTN            Address,
> > +  IN OUT VOID         *Buffer
> > +  )
> > +{
> > +  return TRUE;
> > +}
> > +
> > +/**
> > +  Trace IO read operation after read IO port.
> > +  It is used to trace IO operation.
> > +
> > +  @param[in]       Width    Signifies the width of the I/O operation.
> > +  @param[in]       Address  The base address of the I/O operation.
> > +  @param[in]       Buffer   The destination buffer to store the results.
> > +
> > +**/
> > +VOID
> > +EFIAPI
> > +FilterAfterIoRead (
> > +  IN FILTER_IO_WIDTH  Width,
> > +  IN UINTN            Address,
> > +  IN VOID             *Buffer
> > +  )
> > +{
> > +  return;
> > +}
> > +
> > +/**
> > +  Filter IO Write operation before wirte IO port.
> > +  It is used to filter IO operation.
> > +
> > +  It will return the flag to decide whether require read write IO port.
> > +  It can be used for emulation environment.
> > +
> > +  @param[in]       Width    Signifies the width of the I/O operation.
> > +  @param[in]       Address  The base address of the I/O operation.
> > +  @param[in]       Buffer   The source buffer from which to write data.
> > +
> > +**/
> > +BOOLEAN
> > +EFIAPI
> > +FilterBeforeIoWrite (
> > +  IN FILTER_IO_WIDTH  Width,
> > +  IN UINTN            Address,
> > +  IN VOID             *Buffer
> > +  )
> > +{
> > +  return TRUE;
> > +}
> > +
> > +  /**
> > +  Trace IO Write operation after wirte IO port.
> > +  It is used to trace IO operation.
> > +
> > +  @param[in]       Width    Signifies the width of the I/O operation.
> > +  @param[in]       Address  The base address of the I/O operation.
> > +  @param[in]       Buffer   The source buffer from which to Write data.
> > +
> > +**/
> > +VOID
> > +EFIAPI
> > +FilterAfterIoWrite (
> > +  IN FILTER_IO_WIDTH  Width,
> > +  IN UINTN            Address,
> > +  IN VOID             *Buffer
> > +  )
> > +{
> > +  return;
> > +}
> > +
> > +/**
> > +  Filter memory IO before Read operation.
> > +
> > +  It will return the flag to decide whether require read real MMIO.
> > +  It can be used for emulation environment.
> > +
> > +  @param[in]       Width    Signifies the width of the memory I/O operation.
> > +  @param[in]       Address  The base address of the memory I/O operation.
> > +  @param[in,out]   Buffer   The destination buffer to store the results.
> > +
> > +**/
> > +BOOLEAN
> > +EFIAPI
> > +FilterBeforeMmIoRead (
> > +  IN FILTER_IO_WIDTH  Width,
> > +  IN UINTN            Address,
> > +  IN OUT VOID         *Buffer
> > +  )
> > +{
> > +  return TRUE;
> > +}
> > +
> > +/**
> > +  Tracer memory IO after read operation.
> > +
> > +  @param[in]       Width    Signifies the width of the memory I/O operation.
> > +  @param[in]       Address  The base address of the memory I/O operation.
> > +  @param[in]       Buffer   The destination buffer to store the results.
> > +
> > +**/
> > +VOID
> > +EFIAPI
> > +FilterAfterMmIoRead (
> > +  IN FILTER_IO_WIDTH  Width,
> > +  IN UINTN            Address,
> > +  IN VOID             *Buffer
> > +  )
> > +{
> > +  return;
> > +}
> > +
> > +/**
> > +  Filter memory IO before write operation.
> > +
> > +  It will return the flag to decide whether require wirte real MMIO.
> > +  It can be used for emulation environment.
> > +
> > +  @param[in]       Width    Signifies the width of the memory I/O operation.
> > +  @param[in]       Address  The base address of the memory I/O operation.
> > +  @param[in]       Buffer   The source buffer from which to write data.
> > +
> > +**/
> > +BOOLEAN
> > +EFIAPI
> > +FilterBeforeMmIoWrite (
> > +  IN FILTER_IO_WIDTH  Width,
> > +  IN UINTN            Address,
> > +  IN VOID             *Buffer
> > +  )
> > +{
> > +  return TRUE;
> > +}
> > +
> > +/**
> > +  Tracer memory IO after write operation.
> > +
> > +  @param[in]       Width    Signifies the width of the memory I/O operation.
> > +  @param[in]       Address  The base address of the memory I/O operation.
> > +  @param[in]       Buffer   The source buffer from which to write data.
> > +
> > +**/
> > +VOID
> > +EFIAPI
> > +FilterAfterMmIoWrite (
> > +  IN FILTER_IO_WIDTH  Width,
> > +  IN UINTN            Address,
> > +  IN VOID             *Buffer
> > +  )
> > +{
> > +  return;
> > +}
> > +
> > +/**
> > +  Filter MSR before read operation.
> > +
> > +  It will return the flag to decide whether require read real MSR.
> > +  It can be used for emulation environment.
> > +
> > +  @param  Index                     The Register index of the MSR.
> > +  @param  Value                     Point to the data will be read from the MSR.
> > +
> > +**/
> > +BOOLEAN
> > +EFIAPI
> > +FilterBeforeMsrRead (
> > +  IN UINT32        Index,
> > +  IN OUT UINT64    *Value
> > +  )
> > +{
> > +  return TRUE;
> > +}
> > +
> > +/**
> > +  Trace MSR after read operation.
> > +
> > +  @param  Index                     The Register index of the MSR.
> > +  @param  Value                     Point to the data has been be read from the
> MSR.
> > +
> > +**/
> > +VOID
> > +EFIAPI
> > +FilterAfterMsrRead (
> > +  IN UINT32    Index,
> > +  IN UINT64    *Value
> > +  )
> > +{
> > +  return;
> > +}
> > +
> > +/**
> > +  Filter MSR before write operation.
> > +
> > +  It will return the flag to decide whether require write real MSR.
> > +  It can be used for emulation environment.
> > +
> > +  @param  Index                     The Register index of the MSR.
> > +  @param  Value                     Point to the data want to be written to the
> MSR.
> > +
> > +**/
> > +BOOLEAN
> > +EFIAPI
> > +FilterBeforeMsrWrite (
> > +  IN UINT32    Index,
> > +  IN UINT64    *Value
> > +  )
> > +{
> > +  return TRUE;
> > +}
> > +
> > +/**
> > +  Trace MSR after write operation.
> > +
> > +  @param  Index                     The Register index of the MSR.
> > +  @param  Value                     Point to the data has been be written to the
> MSR.
> > +
> > +**/
> > +VOID
> > +EFIAPI
> > +FilterAfterMsrWrite (
> > +  IN UINT32    Index,
> > +  IN UINT64    *Value
> > +  )
> > +{
> > +  return;
> > +}
> > +
> > diff --git
> > a/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
> > b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
> > new file mode 100644
> > index 0000000000..a7fc7497ed
> > --- /dev/null
> > +++ b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
> > @@ -0,0 +1,23 @@
> > +## @file
> > +#  Null instance of RegisterFilterLib.
> > +#
> > +#  Copyright (c) 2021, Intel Corporation. All rights reserved.<BR> #
> > +#
> > +SPDX-License-Identifier: BSD-2-Clause-Patent # ##
> > +
> > +[Defines]
> > +  INF_VERSION                    = 0x00010005
> > +  BASE_NAME                      = FilterLibNull
> > +  MODULE_UNI_FILE                = FilterLibNull.uni
> > +  FILE_GUID                      = 9F555194-A410-4AD6-B3FC-53F6E10FA793
> > +  MODULE_TYPE                    = BASE
> > +  VERSION_STRING                 = 1.0
> > +  LIBRARY_CLASS                  = RegisterFilterLib
> > +
> > +[Sources]
> > +  RegisterFilterLibNull.c
> > +
> > +[Packages]
> > +  MdePkg/MdePkg.dec
> > diff --git
> > a/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.uni
> > b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.uni
> > new file mode 100644
> > index 0000000000..8a8f1c4a77
> > --- /dev/null
> > +++ b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.uni
> > @@ -0,0 +1,13 @@
> > +// /** @file
> > +// Null instance of RegisterFilterLib.
> > +//
> > +// Copyright (c) 2021, Intel Corporation. All rights reserved.<BR> //
> > +// SPDX-License-Identifier: BSD-2-Clause-Patent // // **/
> > +
> > +
> > +#string STR_MODULE_ABSTRACT              #language en-US "Null instance of
> > RegisterFilterLib.
> > +#string STR_MODULE_DESCRIPTION           #language en-US "Null instance
> of
> > RegisterFilterLib."
> > +
> > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index
> > 1d2637acc2..c437e2a065 100644
> > --- a/MdePkg/MdePkg.dec
> > +++ b/MdePkg/MdePkg.dec
> > @@ -2,11 +2,11 @@
> >  # This Package provides all definitions, library classes and libraries instances.
> >  #
> >  # It also provides the definitions(including PPIs/PROTOCOLs/GUIDs) of
> > # EFI1.10/UEFI2.7/PI1.7 and some Industry Standards.
> >  #
> > -# Copyright (c) 2007 - 2020, Intel Corporation. All rights
> > reserved.<BR>
> > +# Copyright (c) 2007 - 2021, Intel Corporation. All rights
> > +reserved.<BR>
> >  # Portions copyright (c) 2008 - 2009, Apple Inc. All rights
> > reserved.<BR>  # (C) Copyright 2016 - 2020 Hewlett Packard Enterprise
> > Development LP<BR>  #  # SPDX-License-Identifier: BSD-2-Clause-Patent
> > # @@ -255,10 +255,15 @@
> >    ## @libraryclass Extension to BaseLib for host based unit tests that allows
> a
> >    #                subset of BaseLib services to be hooked for emulation.
> >    #
> >
> > UnitTestHostBaseLib|Test/UnitTest/Include/Library/UnitTestHostBaseLib.
> > h
> >
> > +  ##  @libraryclass
> > +  #
> > +  #
> > +  RegisterFilterLib|Include/Library/RegisterFilterLib.h
> > +
> >    ##  @libraryclass  This library provides an interface to request
> > non-MMRAM pages to be mapped
> >    #                  or unblocked from inside MM environment.
> >    #
> >    MmUnblockMemoryLib|Include/Library/MmUnblockMemoryLib.h
> >
> > diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc index
> > 79629e3f93..be89e28eef 100644
> > --- a/MdePkg/MdePkg.dsc
> > +++ b/MdePkg/MdePkg.dsc
> > @@ -1,9 +1,9 @@
> >  ## @file
> >  # EFI/PI MdePkg Package
> >  #
> > -# Copyright (c) 2007 - 2020, Intel Corporation. All rights
> > reserved.<BR>
> > +# Copyright (c) 2007 - 2021, Intel Corporation. All rights
> > +reserved.<BR>
> >  # Portions copyright (c) 2008 - 2009, Apple Inc. All rights
> > reserved.<BR>  # (C) Copyright 2020 Hewlett Packard Enterprise
> > Development LP<BR>  #
> >  #    SPDX-License-Identifier: BSD-2-Clause-Patent
> >  #
> > @@ -125,10 +125,12 @@
> >
> >
> MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.
> > inf
> >
> >
> >
> MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntry
> > Point.inf
> >
> >
> MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTab
> > leLib.inf
> >
> > +  MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
> > +
> >  [Components.IA32, Components.X64, Components.ARM,
> Components.AARCH64]
> >    #
> >    # Add UEFI Target Based Unit Tests
> >    #
> >    MdePkg/Test/UnitTest/Library/BaseLib/BaseLibUnitTestsUefi.inf
> > --
> > 2.18.0.windows.1
> >
> >
> >
> > 
> >
> 


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [patch 25/28] UefiPayloadPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 ` [patch 25/28] UefiPayloadPkg: " Dandan Bi
@ 2021-03-15 16:06   ` Ma, Maurice
  0 siblings, 0 replies; 42+ messages in thread
From: Ma, Maurice @ 2021-03-15 16:06 UTC (permalink / raw)
  To: Bi, Dandan, devel@edk2.groups.io; +Cc: Dong, Guo, You, Benjamin

Reviewed-by:  Maurice Ma <maurice.ma@intel.com>

Regards
Maurice
> -----Original Message-----
> From: Bi, Dandan <dandan.bi@intel.com>
> Sent: Sunday, March 14, 2021 20:59
> To: devel@edk2.groups.io
> Cc: Ma, Maurice <maurice.ma@intel.com>; Dong, Guo
> <guo.dong@intel.com>; You, Benjamin <benjamin.you@intel.com>
> Subject: [patch 25/28] UefiPayloadPkg: Consume RegisterFilterLibNull
> instance
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.
> 
> Cc: Maurice Ma <maurice.ma@intel.com>
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Benjamin You <benjamin.you@intel.com>
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  UefiPayloadPkg/UefiPayloadPkg.dsc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc
> b/UefiPayloadPkg/UefiPayloadPkg.dsc
> index 23edd163e9..56c8147f01 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
> @@ -141,10 +141,11 @@
> 
> PciSegmentInfoLib|UefiPayloadPkg/Library/PciSegmentInfoLibAcpiBoardInf
> o/PciSegmentInfoLibAcpiBoardInfo.inf
>    PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> 
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/Base
> PeCoffGetEntryPointLib.inf
> 
> CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCac
> heMaintenanceLib.inf
>    SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
> +
> + RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterL
> + ibNull.inf
> 
>    #
>    # UEFI & PI
>    #
> 
> UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo
> otServicesTableLib.inf
> --
> 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [patch 20/28] ShellPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 ` [patch 20/28] ShellPkg: " Dandan Bi
@ 2021-03-16  8:08   ` Gao, Zhichao
  0 siblings, 0 replies; 42+ messages in thread
From: Gao, Zhichao @ 2021-03-16  8:08 UTC (permalink / raw)
  To: Bi, Dandan, devel@edk2.groups.io; +Cc: Ni, Ray

Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>

Thanks,
Zhichao

> -----Original Message-----
> From: Bi, Dandan <dandan.bi@intel.com>
> Sent: Monday, March 15, 2021 11:59 AM
> To: devel@edk2.groups.io
> Cc: Ni, Ray <ray.ni@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>
> Subject: [patch 20/28] ShellPkg: Consume RegisterFilterLibNull instance
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> Add RegisterFilterLibNull in dsc which will be consumed by IoLib and BaseLib.
> 
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  ShellPkg/ShellPkg.dsc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc index
> a8b6de3342..e6ad8e8960 100644
> --- a/ShellPkg/ShellPkg.dsc
> +++ b/ShellPkg/ShellPkg.dsc
> @@ -51,10 +51,11 @@
> 
> 
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/Base
> PeCoffGetEntryPointLib.inf
> 
> BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfg
> CommandLib.inf
> 
> AcpiViewCommandLib|ShellPkg/Library/UefiShellAcpiViewCommandLib/Uef
> iShellAcpiViewCommandLib.inf
>    IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> +
> + RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterL
> + ibNull.inf
> 
> 
> UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBoo
> tManagerLib.inf
>    HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> 
> PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanc
> eLibNull.inf
> 
> DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTabl
> eLib.inf
> --
> 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [patch 04/28] ArmVirtPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 ` [patch 04/28] ArmVirtPkg: " Dandan Bi
@ 2021-03-16 16:38   ` Laszlo Ersek
  0 siblings, 0 replies; 42+ messages in thread
From: Laszlo Ersek @ 2021-03-16 16:38 UTC (permalink / raw)
  To: Dandan Bi, devel; +Cc: Ard Biesheuvel, Leif Lindholm

Hi Dandan,

On 03/15/21 04:58, Dandan Bi wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> Add RegisterFilterLibNull in dsc which will be consumed
> by IoLib and BaseLib.
> 
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  ArmVirtPkg/ArmVirt.dsc.inc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
> index d9abadbe70..4d4ebc5f0c 100644
> --- a/ArmVirtPkg/ArmVirt.dsc.inc
> +++ b/ArmVirtPkg/ArmVirt.dsc.inc
> @@ -51,10 +51,11 @@
>    PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
>    PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
>    IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicArmVirt.inf
>    UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
>    CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
> +  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
>  
>    UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
>    HobLib|ArmVirtPkg/Library/ArmVirtDxeHobLib/ArmVirtDxeHobLib.inf
>    UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
>    DevicePathLib|MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLibDevicePathProtocol.inf
> 

your git setup does not include the setting for formatting the @@ hunk
headers into the patches. This makes it more difficult for me to
determine which [LibraryClasses] section is being modified. If you run
SetupGit.py, that should take care of the setting. Please fix this.

Anyway, it appears that [LibraryClasses.common] is the section being
modified, so that should be OK.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks
Laszlo


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [patch 16/28] OvmfPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 ` [patch 16/28] OvmfPkg: " Dandan Bi
@ 2021-03-16 16:42   ` Laszlo Ersek
  0 siblings, 0 replies; 42+ messages in thread
From: Laszlo Ersek @ 2021-03-16 16:42 UTC (permalink / raw)
  To: Dandan Bi, devel; +Cc: Ard Biesheuvel, Jordan Justen

On 03/15/21 04:58, Dandan Bi wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> Add RegisterFilterLibNull in dsc which will be consumed
> by IoLib and BaseLib.
> 
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  OvmfPkg/OvmfPkgIa32.dsc    | 1 +
>  OvmfPkg/OvmfPkgIa32X64.dsc | 1 +
>  OvmfPkg/OvmfPkgX64.dsc     | 1 +
>  OvmfPkg/OvmfXen.dsc        | 1 +
>  4 files changed, 4 insertions(+)
> 
> diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> index 1eaf3e99c6..46a2bc02a9 100644
> --- a/OvmfPkg/OvmfPkgIa32.dsc
> +++ b/OvmfPkg/OvmfPkgIa32.dsc
> @@ -169,10 +169,11 @@
>    QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf
>    QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParserLib.inf
>    VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
>    LoadLinuxLib|OvmfPkg/Library/LoadLinuxLib/LoadLinuxLib.inf
>    MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf
> +  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
>  !if $(SMM_REQUIRE) == FALSE
>    LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf
>  !endif
>    CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
>    FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
> diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
> index 4a5a430147..812c2af48b 100644
> --- a/OvmfPkg/OvmfPkgIa32X64.dsc
> +++ b/OvmfPkg/OvmfPkgIa32X64.dsc
> @@ -173,10 +173,11 @@
>    QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf
>    QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParserLib.inf
>    VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
>    LoadLinuxLib|OvmfPkg/Library/LoadLinuxLib/LoadLinuxLib.inf
>    MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf
> +  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
>  !if $(SMM_REQUIRE) == FALSE
>    LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf
>  !endif
>    CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
>    FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index d4d601b444..76a41aa351 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -173,10 +173,11 @@
>    QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf
>    QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParserLib.inf
>    VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
>    LoadLinuxLib|OvmfPkg/Library/LoadLinuxLib/LoadLinuxLib.inf
>    MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf
> +  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
>  !if $(SMM_REQUIRE) == FALSE
>    LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf
>  !endif
>    CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
>    FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
> diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
> index 507029404f..f057c9d7c1 100644
> --- a/OvmfPkg/OvmfXen.dsc
> +++ b/OvmfPkg/OvmfXen.dsc
> @@ -163,10 +163,11 @@
>    QemuLoadImageLib|OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.inf
>    MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf
>    LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf
>    CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
>    FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
> +  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
>  
>  !if $(SOURCE_DEBUG_ENABLE) == TRUE
>    PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
>    DebugCommunicationLib|SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.inf
>  !else
> 

(1) There are more DSC files under OvmfPkg -- the total set is:

OvmfPkg/AmdSev/AmdSevX64.dsc
OvmfPkg/Bhyve/BhyveX64.dsc
OvmfPkg/OvmfPkgIa32.dsc
OvmfPkg/OvmfPkgIa32X64.dsc
OvmfPkg/OvmfPkgX64.dsc
OvmfPkg/OvmfXen.dsc

(2) Can we please pick a spot that looks similar in all of those DSC
files? If this new class is going to be a dependency of BaseLib, can we
add it near the BaseLib resolution, in each DSC? (E.g., between BaseLib
and SafeIntLib.)

Thanks
Laszlo


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [patch 24/28] UefiCpuPkg: Consume RegisterFilterLibNull instance
  2021-03-15  3:58 ` [patch 24/28] UefiCpuPkg: " Dandan Bi
@ 2021-03-16 16:42   ` Laszlo Ersek
  0 siblings, 0 replies; 42+ messages in thread
From: Laszlo Ersek @ 2021-03-16 16:42 UTC (permalink / raw)
  To: Dandan Bi, devel; +Cc: Eric Dong, Ray Ni, Rahul Kumar

On 03/15/21 04:58, Dandan Bi wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
> 
> Add RegisterFilterLibNull in dsc which will be consumed
> by IoLib and BaseLib.
> 
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Rahul Kumar <rahul1.kumar@intel.com>
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  UefiCpuPkg/UefiCpuPkg.dsc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/UefiCpuPkg/UefiCpuPkg.dsc b/UefiCpuPkg/UefiCpuPkg.dsc
> index 7db419471d..9e5dbb271f 100644
> --- a/UefiCpuPkg/UefiCpuPkg.dsc
> +++ b/UefiCpuPkg/UefiCpuPkg.dsc
> @@ -56,10 +56,11 @@
>    SmmCpuFeaturesLib|UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
>    PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
>    PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
>    TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
>    VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
> +  RegisterFilterLib|MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf
>  
>  [LibraryClasses.common.SEC]
>    PlatformSecLib|UefiCpuPkg/Library/PlatformSecLibNull/PlatformSecLibNull.inf
>  !if $(TOOL_CHAIN_TAG) == "XCODE5"
>    CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2021-03-16 16:42 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-15  3:58 [patch 00/28] Add a new library class RegisterFilterLib in edk2 to filter/trace port IO/MMIO/MSR access Dandan Bi
2021-03-15  3:58 ` [patch 01/28] MdePkg: Add RegisterFilterLib class and NULL instance Dandan Bi
2021-03-15  5:21   ` [edk2-devel] " Abner Chang
2021-03-15 12:03     ` Dandan Bi
2021-03-15  3:58 ` [patch 02/28] ArmPkg: Consume RegisterFilterLibNull instance Dandan Bi
2021-03-15  3:58 ` [patch 03/28] ArmPlatformPkg: " Dandan Bi
2021-03-15  3:58 ` [patch 04/28] ArmVirtPkg: " Dandan Bi
2021-03-16 16:38   ` Laszlo Ersek
2021-03-15  3:58 ` [patch 05/28] CryptoPkg: " Dandan Bi
2021-03-15  3:58 ` [patch 06/28] DynamicTablesPkg: " Dandan Bi
2021-03-15  3:58 ` [patch 07/28] EmbeddedPkg: " Dandan Bi
2021-03-15  3:58 ` [patch 08/28] EmulatorPkg: " Dandan Bi
2021-03-15  3:58 ` [patch 09/28] FatPkg: " Dandan Bi
2021-03-15  3:58 ` [patch 10/28] FmpDevicePkg: " Dandan Bi
2021-03-15  3:58 ` [patch 11/28] IntelFsp2Pkg: " Dandan Bi
2021-03-15  4:09   ` Chiu, Chasel
2021-03-15  3:58 ` [patch 12/28] IntelFsp2WrapperPkg: " Dandan Bi
2021-03-15  4:09   ` Chiu, Chasel
2021-03-15  3:58 ` [patch 13/28] MdeModulePkg: " Dandan Bi
2021-03-15  6:02   ` Wu, Hao A
2021-03-15  3:58 ` [patch 14/28] MdePkg: " Dandan Bi
2021-03-15  3:58 ` [patch 15/28] NetworkPkg: " Dandan Bi
2021-03-15  3:58 ` [patch 16/28] OvmfPkg: " Dandan Bi
2021-03-16 16:42   ` Laszlo Ersek
2021-03-15  3:58 ` [patch 17/28] PcAtChipsetPkg: " Dandan Bi
2021-03-15  3:58 ` [patch 18/28] RedfishPkg: " Dandan Bi
2021-03-15  5:21   ` Abner Chang
2021-03-15  5:27   ` Nickle Wang
2021-03-15  3:58 ` [patch 19/28] SecurityPkg: " Dandan Bi
2021-03-15  3:58 ` [patch 20/28] ShellPkg: " Dandan Bi
2021-03-16  8:08   ` Gao, Zhichao
2021-03-15  3:58 ` [patch 21/28] SignedCapsulePkg: " Dandan Bi
2021-03-15  3:58 ` [patch 22/28] SourceLevelDebugPkg: " Dandan Bi
2021-03-15  6:03   ` Wu, Hao A
2021-03-15  3:58 ` [patch 23/28] StandaloneMmPkg: " Dandan Bi
2021-03-15  3:58 ` [patch 24/28] UefiCpuPkg: " Dandan Bi
2021-03-16 16:42   ` Laszlo Ersek
2021-03-15  3:58 ` [patch 25/28] UefiPayloadPkg: " Dandan Bi
2021-03-15 16:06   ` Ma, Maurice
2021-03-15  3:58 ` [patch 26/28] UnitTestFrameworkPkg: " Dandan Bi
2021-03-15  3:58 ` [patch 27/28] MdePkg/IoLib: Filter/trace port IO/MMIO access Dandan Bi
2021-03-15  3:58 ` [patch 28/28] MdePkg/Baseib: Filter/trace MSR access for IA32/X64 Dandan Bi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox