From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0E0801A1E18 for ; Tue, 2 Aug 2016 12:47:27 -0700 (PDT) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8A0EA12B28; Tue, 2 Aug 2016 19:47:26 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-83.phx2.redhat.com [10.3.116.83]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u72JlO3K007950; Tue, 2 Aug 2016 15:47:25 -0400 To: Jordan Justen , Cinnamon Shia References: <20160802172510.18264-1-cinnamon.shia@hpe.com> <147016223891.9848.2530802500112770528@jljusten-ivb> Cc: edk2-devel@ml01.01.org, liming.gao@intel.com From: Laszlo Ersek Message-ID: <9c2b480b-f46b-415b-9d49-f260ddfa6964@redhat.com> Date: Tue, 2 Aug 2016 21:47:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <147016223891.9848.2530802500112770528@jljusten-ivb> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 02 Aug 2016 19:47:26 +0000 (UTC) Subject: Re: [PATCH v2] OvmfPkg: use StatusCode Router and Handler from MdeModulePkg X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2016 19:47:27 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 08/02/16 20:23, Jordan Justen wrote: > On 2016-08-02 10:25:10, Cinnamon Shia wrote: >> In the Platform Init v1.4a spec, >> - Volume 1 "4.7 Status Code Service" defines the >> EFI_PEI_SERVICES.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 several PEIMs and runtime DXE drivers to register callbacks >> for status code handling. >> >> 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 IntelFareworkModulePkg modules with the MdeModulePkg ones, >> so we can decrease our dependency on IntelFareworkModulePkg. > > Noting two typos of 'Farework' here. We can fix during commit. Yeah, that's just more mess from me. I should probably not propose commit messages at 3 AM :) > Reviewed-by: Jordan Justen > > I'll give Laszlo some time to respond too since he's already spent > some time on it previously. Thank you. [jordan.l.justen@intel.com: point out IntelFareworkModulePkg typos] Reviewed-by: Jordan Justen [lersek@redhat.com: rewrap to 74 cols; fix IntelFareworkModulePkg typos] Reviewed-by: Laszlo Ersek Regression-tested-by: Laszlo Ersek Commit a6d594c5fabd. I also closed . Thank you Cinnamon for the contribution! Cheers Laszlo > > -Jordan > >> >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Cinnamon Shia >> Suggested-by: Liming Gao >> Fixes: https://tianocore.acgmultimedia.com/show_bug.cgi?id=63 >> --- >> 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.
>> +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
>> # >> # This program and the accompanying materials >> # are licensed and made available under the terms and conditions of the BSD License >> @@ -497,7 +498,8 @@ >> >> 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 { >> >> 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 { >> >> PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf >> diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf >> index 1369734..b4b0a22 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.
>> +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
>> # >> # 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,7 +200,8 @@ APRIORI DXE { >> # >> INF MdeModulePkg/Core/Dxe/DxeMain.inf >> >> -INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf >> +INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf >> +INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf >> INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf >> >> INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.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.
>> +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
>> # >> # This program and the accompanying materials >> # are licensed and made available under the terms and conditions of the BSD License >> @@ -505,7 +506,8 @@ >> >> 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 { >> >> 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 { >> >> PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf >> diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf >> index 34f8938..552ab2a 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.
>> +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
>> # >> # 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,7 +200,8 @@ APRIORI DXE { >> # >> INF MdeModulePkg/Core/Dxe/DxeMain.inf >> >> -INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf >> +INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf >> +INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf >> INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf >> >> INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.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.
>> +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
>> # >> # This program and the accompanying materials >> # are licensed and made available under the terms and conditions of the BSD License >> @@ -504,7 +505,8 @@ >> >> 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 { >> >> 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 { >> >> PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf >> diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf >> index 630c295..28b98a9 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.
>> +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
>> # >> # 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,7 +200,8 @@ APRIORI DXE { >> # >> INF MdeModulePkg/Core/Dxe/DxeMain.inf >> >> -INF IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf >> +INF MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf >> +INF MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf >> INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf >> >> INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf >> -- >> 2.9.0.windows.1 >> > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel >