public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wu, Hao A" <hao.a.wu@intel.com>
To: devel@edk2.groups.io
Cc: Hao A Wu <hao.a.wu@intel.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	Michael D Kinney <michael.d.kinney@intel.com>
Subject: [edk2-platforms][PATCH v2 06/18] Hisilicon/D0x: Use StatusCode Router & Handler in MdeModulePkg
Date: Mon, 20 May 2019 16:40:53 +0800	[thread overview]
Message-ID: <20190520084105.9028-7-hao.a.wu@intel.com> (raw)
In-Reply-To: <20190520084105.9028-1-hao.a.wu@intel.com>

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

This commit adopts a similar approach to edk2 commit
a6d594c5fabd8da2273d2794826ec086cf9c3c04.

Currently, Hisilicon platforms use modules from under
"IntelFrameworkModulePkg/Universal/StatusCode/", which produce
EFI_PEI_PROGRESS_CODE_PPI and EFI_STATUS_CODE_PROTOCOL directly, and write
the status codes, as they are reported, to the serial port or to a memory
buffer. This is called "handling" the status codes.

MdeModulePkg offers a PEIM under
"MdeModulePkg/Universal/ReportStatusCodeRouter/Pei" that produces both
EFI_PEI_PROGRESS_CODE_PPI and EFI_PEI_RSC_HANDLER_PPI, and a runtime DXE
driver under "MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe"
that produces both EFI_STATUS_CODE_PROTOCOL and EFI_RSC_HANDLER_PROTOCOL.

MdeModulePkg also offers status code handler modules under
MdeModulePkg/Universal/StatusCodeHandler/ that depend on
EFI_PEI_RSC_HANDLER_PPI and EFI_RSC_HANDLER_PROTOCOL, respectively.

The StatusCodeHandler modules register themselves with
ReportStatusCodeRouter through EFI_PEI_RSC_HANDLER_PPI /
EFI_RSC_HANDLER_PROTOCOL. When another module reports a status code
through EFI_PEI_PROGRESS_CODE_PPI / EFI_STATUS_CODE_PROTOCOL, it reaches
the phase-matching ReportStatusCodeRouter module first, which in turn
passes the status code to the pre-registered, phase-matching
StatusCodeHandler module.

The status code handling in the StatusCodeHandler modules is identical to
the one currently provided by the IntelFrameworkModulePkg modules. Replace
the IntelFrameworkModulePkg modules with the MdeModulePkg ones, so we can
decrease our dependency on IntelFrameworkModulePkg.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Hao A Wu <hao.a.wu@intel.com>
---
 Platform/Hisilicon/D03/D03.dsc | 6 ++++--
 Platform/Hisilicon/D05/D05.dsc | 6 ++++--
 Platform/Hisilicon/D06/D06.dsc | 6 ++++--
 Platform/Hisilicon/D03/D03.fdf | 6 ++++--
 Platform/Hisilicon/D05/D05.fdf | 6 ++++--
 Platform/Hisilicon/D06/D06.fdf | 6 ++++--
 6 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/Platform/Hisilicon/D03/D03.dsc b/Platform/Hisilicon/D03/D03.dsc
index 574636a059..5e85069158 100644
--- a/Platform/Hisilicon/D03/D03.dsc
+++ b/Platform/Hisilicon/D03/D03.dsc
@@ -297,7 +297,8 @@ [Components.common]
 
   Platform/Hisilicon/D03/MemoryInitPei/MemoryInitPeim.inf
   ArmPkg/Drivers/CpuPei/CpuPei.inf
-  IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf
+  MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf
+  MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
   MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf
   MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
 
@@ -370,7 +371,8 @@ [Components.common]
   ArmPkg/Drivers/TimerDxe/TimerDxe.inf
 
   MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
-  IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf
+  MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
+  MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
   #
   #ACPI
   #
diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc
index 51e26681b2..ce58777cdd 100644
--- a/Platform/Hisilicon/D05/D05.dsc
+++ b/Platform/Hisilicon/D05/D05.dsc
@@ -433,7 +433,8 @@ [Components.common]
 
   Platform/Hisilicon/D05/MemoryInitPei/MemoryInitPeim.inf
   ArmPkg/Drivers/CpuPei/CpuPei.inf
-  IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf
+  MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf
+  MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
   MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf
   MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
 
@@ -503,7 +504,8 @@ [Components.common]
   ArmPkg/Drivers/TimerDxe/TimerDxe.inf
 
   MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
-  IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf
+  MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
+  MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
   #
   #ACPI
   #
diff --git a/Platform/Hisilicon/D06/D06.dsc b/Platform/Hisilicon/D06/D06.dsc
index a4a813bec0..a2f2b911be 100644
--- a/Platform/Hisilicon/D06/D06.dsc
+++ b/Platform/Hisilicon/D06/D06.dsc
@@ -249,7 +249,8 @@ [Components.common]
   ArmPlatformPkg/PlatformPei/PlatformPeim.inf
 
   ArmPkg/Drivers/CpuPei/CpuPei.inf
-  IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf
+  MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf
+  MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
   MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf
   MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
 
@@ -311,7 +312,8 @@ [Components.common]
   ArmPkg/Drivers/TimerDxe/TimerDxe.inf
 
   MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
-  IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf
+  MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
+  MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
   #
   #ACPI
   #
diff --git a/Platform/Hisilicon/D03/D03.fdf b/Platform/Hisilicon/D03/D03.fdf
index f5d0c66f63..327e1d0359 100644
--- a/Platform/Hisilicon/D03/D03.fdf
+++ b/Platform/Hisilicon/D03/D03.fdf
@@ -193,7 +193,8 @@ [FV.FvMain]
   INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
   INF FatPkg/EnhancedFatDxe/Fat.inf
   INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
-  INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf
+  INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
+  INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
 
   #
   # Usb Support
@@ -323,7 +324,8 @@ [FV.FVMAIN_COMPACT]
   INF Platform/Hisilicon/D03/MemoryInitPei/MemoryInitPeim.inf
   INF ArmPkg/Drivers/CpuPei/CpuPei.inf
   INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
-  INF IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf
+  INF MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf
+  INF MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
   INF Platform/Hisilicon/D03/EarlyConfigPeim/EarlyConfigPeimD03.inf
 
   INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
diff --git a/Platform/Hisilicon/D05/D05.fdf b/Platform/Hisilicon/D05/D05.fdf
index 812f7f2690..c9229a022f 100644
--- a/Platform/Hisilicon/D05/D05.fdf
+++ b/Platform/Hisilicon/D05/D05.fdf
@@ -197,7 +197,8 @@ [FV.FvMain]
   INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
   INF FatPkg/EnhancedFatDxe/Fat.inf
   INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
-  INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf
+  INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
+  INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
 
   #
   # Usb Support
@@ -345,7 +346,8 @@ [FV.FVMAIN_COMPACT]
   INF Platform/Hisilicon/D05/MemoryInitPei/MemoryInitPeim.inf
   INF ArmPkg/Drivers/CpuPei/CpuPei.inf
   INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
-  INF IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf
+  INF MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf
+  INF MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
   INF Platform/Hisilicon/D05/EarlyConfigPeim/EarlyConfigPeimD05.inf
 
   INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
diff --git a/Platform/Hisilicon/D06/D06.fdf b/Platform/Hisilicon/D06/D06.fdf
index 976b597647..cce2ee3775 100644
--- a/Platform/Hisilicon/D06/D06.fdf
+++ b/Platform/Hisilicon/D06/D06.fdf
@@ -198,7 +198,8 @@ [FV.FvMain]
   INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
   INF FatPkg/EnhancedFatDxe/Fat.inf
   INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
-  INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf
+  INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
+  INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
 
   #
   # Usb Support
@@ -339,7 +340,8 @@ [FV.FVMAIN_COMPACT]
   INF Platform/Hisilicon/D06/MemoryInitPei/MemoryInitPeim.inf
   INF ArmPkg/Drivers/CpuPei/CpuPei.inf
   INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
-  INF IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf
+  INF MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf
+  INF MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
   INF Platform/Hisilicon/D06/EarlyConfigPeim/EarlyConfigPeimD06.inf
 
   INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
-- 
2.12.0.windows.1


  parent reply	other threads:[~2019-05-20  8:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20  8:40 [edk2-platforms][PATCH v2 00/18] Drop IntelFramework[Module]Pkg dependency Wu, Hao A
2019-05-20  8:40 ` [edk2-platforms][PATCH v2 01/18] Platform/AMD: Use Lzma decompress lib in MdeModulePkg Wu, Hao A
2019-05-20  8:40 ` [edk2-platforms][PATCH v2 02/18] Platform/BeagleBoard: Use ReportStatusCodeLib null instance Wu, Hao A
2019-05-20  8:40 ` [edk2-platforms][PATCH v2 03/18] Platform/BeagleBoard: Drop the consume of PcdShellFile Wu, Hao A
2019-05-20  8:40 ` [edk2-platforms][PATCH v2 04/18] Hisilicon/D0x: Use Lzma decompress lib in MdeModulePkg Wu, Hao A
2019-05-20  8:40 ` [edk2-platforms][PATCH v2 05/18] Hisilicon/D0x: Drop the consume of GenericBdsLib & PlatformBdsLib Wu, Hao A
2019-05-20  8:40 ` Wu, Hao A [this message]
2019-05-20  8:40 ` [edk2-platforms][PATCH v2 07/18] Hisilicon/D06: Drop the consume of PcdShellFile Wu, Hao A
2019-05-20  8:40 ` [edk2-platforms][PATCH v2 08/18] Silicon/Hisilicon: Use Lzma decompress lib in MdeModulePkg Wu, Hao A
2019-05-20  8:40 ` [edk2-platforms][PATCH v2 09/18] Silicon/Hisilicon: Use ReportStatusCodeLib (DXE) " Wu, Hao A
2019-05-20  8:40 ` [edk2-platforms][PATCH v2 10/18] Silicon/Hisilicon: Use DebugLib (DXE_RUNTIME_DRIVER) " Wu, Hao A
2019-05-20  8:40 ` [edk2-platforms][PATCH v2 11/18] Silicon/Hisilicon/Smbios: Drop IntelFramework[Module]Pkg dependency Wu, Hao A
2019-05-20  8:40 ` [edk2-platforms][PATCH v2 12/18] Silicon/Hisilicon/PlatformIntelBdsLib: Remove Hisilicon PlatformBdsLib Wu, Hao A
2019-05-20  8:41 ` [edk2-platforms][PATCH v2 13/18] Platform/LeMaker: Use Lzma decompress lib in MdeModulePkg Wu, Hao A
2019-05-20  8:41 ` [edk2-platforms][PATCH v2 14/18] Platform/LeMaker: Use ReportStatusCodeLib null instance Wu, Hao A
2019-05-20  8:41 ` [edk2-platforms][PATCH v2 15/18] Platform/SoftIron: Use Lzma decompress lib in MdeModulePkg Wu, Hao A
2019-05-20  8:41 ` [edk2-platforms][PATCH v2 16/18] Platform/SoftIron: Use ReportStatusCodeLib null instance Wu, Hao A
2019-05-20  8:41 ` [edk2-platforms][PATCH v2 17/18] Platform/RPi3: " Wu, Hao A
2019-05-20  8:41 ` [edk2-platforms][PATCH v2 18/18] Platform/RaspberryPi: Drop the consume of PcdShellFile Wu, Hao A
2019-05-27  2:43 ` [edk2-devel] [edk2-platforms][PATCH v2 00/18] Drop IntelFramework[Module]Pkg dependency Wu, Hao A
2019-06-10  5:13   ` Wu, Hao A
2019-06-10 15:12     ` Leif Lindholm
2019-06-11  6:19       ` Wu, Hao A
2019-06-11  9:38         ` Leif Lindholm
2019-06-12  0:21           ` Wu, Hao A

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190520084105.9028-7-hao.a.wu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox