* [PATCH] OvmfPkg: use StatusCode Router and Handler from MdeModulePkg @ 2016-08-01 7:08 Cinnamon Shia 2016-08-02 1:13 ` Laszlo Ersek 0 siblings, 1 reply; 3+ messages in thread From: Cinnamon Shia @ 2016-08-01 7:08 UTC (permalink / raw) To: edk2-devel; +Cc: jordan.l.justen, lersek, liming.gao, Cinnamon Shia Use StatusCode Router and Handler from MdeModulePkg instead of IntelFrameworkModulePkg. MdeModulePkg ones follows PI spec to implement StatusCode Router/Handler and provide StatusCode service. It allows the different status code handlers to be registered. IntelFrameworkModulePkg one just provides StatusCode service. It has no Router services. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com> --- OvmfPkg/OvmfPkgIa32.dsc | 7 +++++-- OvmfPkg/OvmfPkgIa32.fdf | 7 +++++-- OvmfPkg/OvmfPkgIa32X64.dsc | 7 +++++-- OvmfPkg/OvmfPkgIa32X64.fdf | 7 +++++-- OvmfPkg/OvmfPkgX64.dsc | 7 +++++-- OvmfPkg/OvmfPkgX64.fdf | 7 +++++-- 6 files changed, 30 insertions(+), 12 deletions(-) diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 8af3267..aeb87b9 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -2,6 +2,7 @@ # EFI/Framework Open Virtual Machine Firmware (OVMF) platform # # Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -497,7 +498,8 @@ <LibraryClasses> PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf } - IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf + MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf + MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf { <LibraryClasses> PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf @@ -534,7 +536,8 @@ DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf } - IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf + MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf + MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf MdeModulePkg/Universal/PCD/Dxe/Pcd.inf { <LibraryClasses> PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf index 1369734..258938a 100644 --- a/OvmfPkg/OvmfPkgIa32.fdf +++ b/OvmfPkg/OvmfPkgIa32.fdf @@ -2,6 +2,7 @@ # Open Virtual Machine Firmware: FDF # # Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -154,7 +155,8 @@ APRIORI PEI { # INF MdeModulePkg/Core/Pei/PeiMain.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 OvmfPkg/PlatformPei/PlatformPei.inf INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf INF UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf @@ -198,8 +200,9 @@ APRIORI DXE { # INF MdeModulePkg/Core/Dxe/DxeMain.inf -INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf +INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf +INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 4bb38d0..44da638 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -2,6 +2,7 @@ # EFI/Framework Open Virtual Machine Firmware (OVMF) platform # # Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -505,7 +506,8 @@ <LibraryClasses> PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf } - IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf + MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf + MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf { <LibraryClasses> PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf @@ -543,7 +545,8 @@ DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf } - IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf + MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf + MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf MdeModulePkg/Universal/PCD/Dxe/Pcd.inf { <LibraryClasses> PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf index 34f8938..dc9374c 100644 --- a/OvmfPkg/OvmfPkgIa32X64.fdf +++ b/OvmfPkg/OvmfPkgIa32X64.fdf @@ -2,6 +2,7 @@ # Open Virtual Machine Firmware: FDF # # Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -154,7 +155,8 @@ APRIORI PEI { # INF MdeModulePkg/Core/Pei/PeiMain.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 OvmfPkg/PlatformPei/PlatformPei.inf INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf INF UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf @@ -198,8 +200,9 @@ APRIORI DXE { # INF MdeModulePkg/Core/Dxe/DxeMain.inf -INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf +INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf +INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index be3aa1f..89cd3a1 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -2,6 +2,7 @@ # EFI/Framework Open Virtual Machine Firmware (OVMF) platform # # Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -504,7 +505,8 @@ <LibraryClasses> PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf } - IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf + MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf + MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf { <LibraryClasses> PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf @@ -541,7 +543,8 @@ DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf } - IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf + MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf + MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf MdeModulePkg/Universal/PCD/Dxe/Pcd.inf { <LibraryClasses> PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf index 630c295..119e226 100644 --- a/OvmfPkg/OvmfPkgX64.fdf +++ b/OvmfPkg/OvmfPkgX64.fdf @@ -2,6 +2,7 @@ # Open Virtual Machine Firmware: FDF # # Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -154,7 +155,8 @@ APRIORI PEI { # INF MdeModulePkg/Core/Pei/PeiMain.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 OvmfPkg/PlatformPei/PlatformPei.inf INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf INF UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf @@ -198,8 +200,9 @@ APRIORI DXE { # INF MdeModulePkg/Core/Dxe/DxeMain.inf -INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf +INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf +INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf -- 2.9.0.windows.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] OvmfPkg: use StatusCode Router and Handler from MdeModulePkg 2016-08-01 7:08 [PATCH] OvmfPkg: use StatusCode Router and Handler from MdeModulePkg Cinnamon Shia @ 2016-08-02 1:13 ` Laszlo Ersek 2016-08-02 8:29 ` Laszlo Ersek 0 siblings, 1 reply; 3+ messages in thread From: Laszlo Ersek @ 2016-08-02 1:13 UTC (permalink / raw) To: Cinnamon Shia, edk2-devel; +Cc: jordan.l.justen, liming.gao On 08/01/16 09:08, Cinnamon Shia wrote: > Use StatusCode Router and Handler from MdeModulePkg instead of > IntelFrameworkModulePkg. > > MdeModulePkg ones follows PI spec to implement StatusCode > Router/Handler and provide StatusCode service. > It allows the different status code handlers to be registered. > > IntelFrameworkModulePkg one just provides StatusCode service. > It has no Router services. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com> > --- > OvmfPkg/OvmfPkgIa32.dsc | 7 +++++-- > OvmfPkg/OvmfPkgIa32.fdf | 7 +++++-- > OvmfPkg/OvmfPkgIa32X64.dsc | 7 +++++-- > OvmfPkg/OvmfPkgIa32X64.fdf | 7 +++++-- > OvmfPkg/OvmfPkgX64.dsc | 7 +++++-- > OvmfPkg/OvmfPkgX64.fdf | 7 +++++-- > 6 files changed, 30 insertions(+), 12 deletions(-) Thanks for the patch! I'd like to see a lot more documentation in the commit message. I was completely unfamiliar with this area before Liming's suggestion and your patch. I understand it now, I think, but in retrospect, I just can't fathom why you guys didn't provide me with more info weeks ago. I've been in the dark, even though the explanation is fairly simple. :( (1) So, here's what I would like to see in the commit message: ---------- In the Platform Init v1.4a spec, - Volume 1 "4.7 Status Code Service" defines the EFI_PEI_REPORT_STATUS_CODE.ReportStatusCode() service, - Volume 1 "6.3.5 Status Code PPI (Optional)" defines the EFI_PEI_PROGRESS_CODE_PPI (equivalent to the above), - Volume 2 "14.2 Status Code Runtime Protocol" defines the EFI_STATUS_CODE_PROTOCOL. These allow PEIMs and DXE (and later) modules to report status codes. Currently OvmfPkg uses modules from under "IntelFrameworkModulePkg/Universal/StatusCode/", which produce the above abstractions (PPI and 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. In the Platform Init v1.4a spec, - Volume 3 "7.2.2 Report Status Code Handler PPI" defines EFI_PEI_RSC_HANDLER_PPI, - Volume 3 "7.2.1 Report Status Code Handler Protocol" defines EFI_RSC_HANDLER_PROTOCOL. These allow PEIMs and runtime DXE drivers to register several callbacks for status code handling. MdeModulePkg offers a PEIM under "MdeModulePkg/Universal/ReportStatusCodeRouter/Pei" that procudes 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 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 IntelFareworkModulePkg modules with the MdeModulePkg ones, so we can decrease our dependency on IntelFareworkModulePkg. ---------- (2) The commit message should contain the following tags as well: Suggested-by: Liming Gao <liming.gao@intel.com> Fixes: https://tianocore.acgmultimedia.com/show_bug.cgi?id=63 Then, > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc > index 8af3267..aeb87b9 100644 > --- a/OvmfPkg/OvmfPkgIa32.dsc > +++ b/OvmfPkg/OvmfPkgIa32.dsc > @@ -2,6 +2,7 @@ > # EFI/Framework Open Virtual Machine Firmware (OVMF) platform > # > # Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> > +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> > # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the BSD License > @@ -497,7 +498,8 @@ > <LibraryClasses> > PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > } > - IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf > + MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf > + MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf > MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf { > <LibraryClasses> > PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf > @@ -534,7 +536,8 @@ > DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf > } > > - IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf > + MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf > + MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf > MdeModulePkg/Universal/PCD/Dxe/Pcd.inf { > <LibraryClasses> > PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf > index 1369734..258938a 100644 > --- a/OvmfPkg/OvmfPkgIa32.fdf > +++ b/OvmfPkg/OvmfPkgIa32.fdf > @@ -2,6 +2,7 @@ > # Open Virtual Machine Firmware: FDF > # > # Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> > +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> > # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the BSD License > @@ -154,7 +155,8 @@ APRIORI PEI { > # > INF MdeModulePkg/Core/Pei/PeiMain.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 OvmfPkg/PlatformPei/PlatformPei.inf > INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > INF UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf > @@ -198,8 +200,9 @@ APRIORI DXE { > # > INF MdeModulePkg/Core/Dxe/DxeMain.inf > > -INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf > INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf > +INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf > +INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf (3) Any particular reason that you add the replacement text under the Pcd.inf module? In all the other places, the replacements are more focused. Looks good to me otherwise. Can you please submit a v2? Thanks! Laszlo > > INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf > INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf > diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc > index 4bb38d0..44da638 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.dsc > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc > @@ -2,6 +2,7 @@ > # EFI/Framework Open Virtual Machine Firmware (OVMF) platform > # > # Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> > +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> > # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the BSD License > @@ -505,7 +506,8 @@ > <LibraryClasses> > PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > } > - IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf > + MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf > + MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf > MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf { > <LibraryClasses> > PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf > @@ -543,7 +545,8 @@ > DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf > } > > - IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf > + MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf > + MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf > MdeModulePkg/Universal/PCD/Dxe/Pcd.inf { > <LibraryClasses> > PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf > index 34f8938..dc9374c 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.fdf > +++ b/OvmfPkg/OvmfPkgIa32X64.fdf > @@ -2,6 +2,7 @@ > # Open Virtual Machine Firmware: FDF > # > # Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> > +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> > # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the BSD License > @@ -154,7 +155,8 @@ APRIORI PEI { > # > INF MdeModulePkg/Core/Pei/PeiMain.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 OvmfPkg/PlatformPei/PlatformPei.inf > INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > INF UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf > @@ -198,8 +200,9 @@ APRIORI DXE { > # > INF MdeModulePkg/Core/Dxe/DxeMain.inf > > -INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf > INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf > +INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf > +INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf > > INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf > INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc > index be3aa1f..89cd3a1 100644 > --- a/OvmfPkg/OvmfPkgX64.dsc > +++ b/OvmfPkg/OvmfPkgX64.dsc > @@ -2,6 +2,7 @@ > # EFI/Framework Open Virtual Machine Firmware (OVMF) platform > # > # Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> > +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> > # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the BSD License > @@ -504,7 +505,8 @@ > <LibraryClasses> > PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > } > - IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.inf > + MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf > + MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf > MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf { > <LibraryClasses> > PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf > @@ -541,7 +543,8 @@ > DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf > } > > - IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf > + MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf > + MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf > MdeModulePkg/Universal/PCD/Dxe/Pcd.inf { > <LibraryClasses> > PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf > index 630c295..119e226 100644 > --- a/OvmfPkg/OvmfPkgX64.fdf > +++ b/OvmfPkg/OvmfPkgX64.fdf > @@ -2,6 +2,7 @@ > # Open Virtual Machine Firmware: FDF > # > # Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> > +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> > # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the BSD License > @@ -154,7 +155,8 @@ APRIORI PEI { > # > INF MdeModulePkg/Core/Pei/PeiMain.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 OvmfPkg/PlatformPei/PlatformPei.inf > INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > INF UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf > @@ -198,8 +200,9 @@ APRIORI DXE { > # > INF MdeModulePkg/Core/Dxe/DxeMain.inf > > -INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf > INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf > +INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf > +INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf > > INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf > INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf > ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] OvmfPkg: use StatusCode Router and Handler from MdeModulePkg 2016-08-02 1:13 ` Laszlo Ersek @ 2016-08-02 8:29 ` Laszlo Ersek 0 siblings, 0 replies; 3+ messages in thread From: Laszlo Ersek @ 2016-08-02 8:29 UTC (permalink / raw) To: Cinnamon Shia, edk2-devel; +Cc: jordan.l.justen, liming.gao On 08/02/16 03:13, Laszlo Ersek wrote: > (1) So, here's what I would like to see in the commit message: > > ---------- > > In the Platform Init v1.4a spec, > - Volume 1 "4.7 Status Code Service" defines the > EFI_PEI_REPORT_STATUS_CODE.ReportStatusCode() service, sorry, the above is a typo, I meant EFI_PEI_SERVICES.ReportStatusCode(). > - Volume 1 "6.3.5 Status Code PPI (Optional)" defines the > EFI_PEI_PROGRESS_CODE_PPI (equivalent to the above), > - Volume 2 "14.2 Status Code Runtime Protocol" defines the > EFI_STATUS_CODE_PROTOCOL. > > These allow PEIMs and DXE (and later) modules to report status codes. > > Currently OvmfPkg uses modules from under > "IntelFrameworkModulePkg/Universal/StatusCode/", which produce the above > abstractions (PPI and 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. > > In the Platform Init v1.4a spec, > - Volume 3 "7.2.2 Report Status Code Handler PPI" defines > EFI_PEI_RSC_HANDLER_PPI, > - Volume 3 "7.2.1 Report Status Code Handler Protocol" defines > EFI_RSC_HANDLER_PROTOCOL. > > These allow PEIMs and runtime DXE drivers to register several callbacks > for status code handling. The woring here would also be better if we said "These allow several PEIMs and runtime DXE drivers to register callbacks for status code handling". In other words, "several" should refer to the drivers, not the callbacks. > > MdeModulePkg offers a PEIM under > "MdeModulePkg/Universal/ReportStatusCodeRouter/Pei" that procudes 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 > phase-matching ReportStatusCodeRouter module first, which in turn passes "it reaches [the] phase-matching" -- the definite article missing. Sorry about these typos, it was very late last night when I wrote the email. Thanks! Laszlo > 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 IntelFareworkModulePkg modules with the MdeModulePkg ones, > so we can decrease our dependency on IntelFareworkModulePkg. > > ---------- ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-02 8:29 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-08-01 7:08 [PATCH] OvmfPkg: use StatusCode Router and Handler from MdeModulePkg Cinnamon Shia 2016-08-02 1:13 ` Laszlo Ersek 2016-08-02 8:29 ` Laszlo Ersek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox