Re: [edk2-devel] [PATCH v3 1/1] MdePkg: Add Cxl20.h into IndustryStandard
Thanks and will send v4 soon. From: Kinney, Michael D Sent: Wednesday, August 23, 2023 1:47 AM To: Chris Li OS; Nong, Foster; devel@edk2.groups.io; Gao, Liming Cc: Yao, Jiewen; Ni, Ray; Open Source Submission; Kinney, Michael D Subject: RE: [edk2-devel] [PATCH v3 1/1] MdePkg: Add Cxl20.h into IndustryStandard Yes. Mike > -Original Message- > From: Chris Li OS > Sent: Tuesday, August 22, 2023 2:42 AM > To: Nong, Foster ; Kinney, Michael D > ; devel@edk2.groups.io; Gao, Liming > > Cc: Yao, Jiewen ; Ni, Ray ; Open > Source Submission > Subject: Re: [edk2-devel] [PATCH v3 1/1] MdePkg: Add Cxl20.h into > IndustryStandard > > Hi Mike and Foster, > So the preferred definition is as below? > > RegisterBlock[]; // offset 0x0C > > > From: Nong, Foster > Sent: Monday, August 21, 2023 9:59 AM > To: Kinney, Michael D; Chris Li OS; devel@edk2.groups.io; Gao, Liming > Cc: Yao, Jiewen; Ni, Ray; Open Source Submission > Subject: RE: [edk2-devel] [PATCH v3 1/1] MdePkg: Add Cxl20.h into > IndustryStandard > > Hi Mike, > > Yes. In CXL SPEC chapter 8.1.9, the number of register blocks need > calculate from DVSEC length value of DVSEC header1 register. > > -Original Message- > From: Kinney, Michael D > Sent: Friday, August 18, 2023 11:30 PM > To: Chris Li OS ; devel@edk2.groups.io; > Nong, Foster ; Gao, Liming > > Cc: Yao, Jiewen ; Ni, Ray ; Open > Source Submission ; Kinney, Michael D > > Subject: RE: [edk2-devel] [PATCH v3 1/1] MdePkg: Add Cxl20.h into > IndustryStandard > > Is RegisterBlock a flexible array member? > > If so, then [] is the compatible syntax. > > Mike > > > -Original Message- > > From: Chris Li OS > > Sent: Friday, August 18, 2023 2:29 AM > > To: devel@edk2.groups.io; Nong, Foster ; Gao, > > Liming > > Cc: Yao, Jiewen ; Ni, Ray ; > > Kinney, Michael D ; Open Source Submission > > > > Subject: [edk2-devel] [PATCH v3 1/1] MdePkg: Add Cxl20.h into > > IndustryStandard > > > > Absorbed Foster's input with minor delta. > > @Nong, Foster @Liming and all kindly help review/vote again. > > > > One change compared with Intel's proposal is the below line, we prefer > > [1] style to be safer to work across all compilers. > > Let us know if you folks have different suggestions here. > > > > > > - CXL_DVSEC_REGISTER_LOCATOR_REGISTER_BLOCK > > RegisterBlock[0]; // offset 0x0C > > + CXL_DVSEC_REGISTER_LOCATOR_REGISTER_BLOCK > > RegisterBlock[1]; // offset 0x0C > > > > > > Thanks all! > > > > - > > 1) Add CXL 2.0 header file to comply with CXL 2.0 specification > > 2) CXL 2.0 header will embed Cxl11.h > > 3) Updated Cxl.h to point to 2.0 header file > > > > Signed-off-by: Chris Li > > --- > > MdePkg/Include/IndustryStandard/Cxl.h | 2 +- > > MdePkg/Include/IndustryStandard/Cxl20.h | 465 > > > > 2 files changed, 466 insertions(+), 1 deletion(-) create mode 100644 > > MdePkg/Include/IndustryStandard/Cxl20.h > > > > diff --git a/MdePkg/Include/IndustryStandard/Cxl.h > > b/MdePkg/Include/IndustryStandard/Cxl.h > > index 06c1230e3e..9ad3242e25 100644 > > --- a/MdePkg/Include/IndustryStandard/Cxl.h > > +++ b/MdePkg/Include/IndustryStandard/Cxl.h > > @@ -12,7 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > > #ifndef _CXL_MAIN_H_ #define _CXL_MAIN_H_ > > > > -#include > > +#include > > // > > // CXL assigned new Vendor ID > > // > > diff --git a/MdePkg/Include/IndustryStandard/Cxl20.h > > b/MdePkg/Include/IndustryStandard/Cxl20.h > > new file mode 100644 > > index 00..a5fe22b4a2 > > --- /dev/null > > +++ b/MdePkg/Include/IndustryStandard/Cxl20.h > > @@ -0,0 +1,465 @@ > > +/** @file > > + CXL 2.0 Register definitions > > + > > + This file contains the register definitions based on the Compute > > Express Link > > + (CXL) Specification Revision 2.0. > > + > > + Copyright (c) 2023, Ampere Computing LLC. All rights reserved. > > + > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > + > > +**/ > > +#ifndef CXL20_H_ > > +#define CXL20_H_ > > + > > +#include > > + > > +// > > +// CXL DVSEC IDs > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.1.1 // > > +#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_CXL_DEVICE0x0 > > +#define CXL_DVSEC_ID_NON_CXL_FUNCTION_MAP 0x2 > > +#define CXL_DVSEC_ID_CXL20_EXTENSIONS_DVSEC_FOR_PORTS 0x3 > > +#define CXL_DVSEC_ID_GPF_DVSEC_FOR_CXL_PORTS 0x4 > > +#define CXL_DVSEC_ID_GPF_DVSEC_FOR_CXL_DEVICES0x5 > > +#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_FLEX_BUS_PORT 0x7 > > +#define CXL_DVSEC_ID_REGISTER_LOCATOR 0x8 > > +#define CXL_DVSEC_ID_MLD 0x9 > > +#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_TEST_CAPABILITY 0xA > > + > > +// > > +// Register Block ID > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.1.9.1 > > +// >
Re: [edk2-devel] [edk2-discuss] PLDM messages via MCTP over KCS
[AMD Official Use Only - General] Please see my answers inline. > -Original Message- > From: disc...@edk2.groups.io On Behalf Of > Konstantin Aladyshev via groups.io > Sent: Wednesday, August 23, 2023 1:54 AM > To: Chang, Abner > Cc: disc...@edk2.groups.io; devel@edk2.groups.io > Subject: Re: [edk2-discuss] PLDM messages via MCTP over KCS > > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > Thanks for the answer! > > I was a little bit confused about the part, that in the same package I > actually need to provide different library implementations for the > same 'ManageabilityTransportLib', thanks for the clarification! > I think your DSC example should go into the package documentation. Yes, this is a good idea. I will update it. > > As for me, I'm working with the OpenBMC distribution > (https://github.com/openbmc/openbmc) and my goal is to transfer data > from the BIOS to the BMC via MCTP/PLDM. > Currently there is no solution for the MCTP over KCS binding in Linux, > so I need to add this support: > - either to the MCTP userspace library > (https://github.com/openbmc/libmctp) [old OpenBMC way, but probably > easier] > - or to the MCTP kernel binding > (https://github.com/torvalds/linux/tree/master/drivers/net/mctp) > [modern mctp Linux driver approach] > > Both don't sound like an easy task, so can I ask, what MC (i.e. > management controller) device and firmware do you use on the other > side of the MCTP KCS transmissions? We use OpenBMC as well, but as you mention there are some missing pieces to fully support manageability between host and BMC. We don’t have code to handle MCTP IPMI either, the edk2 ManageabilityPkg provides the framework while MCTP/PLDM/KCS implementation provides a sample other than IPMI/KCS to prove the flexibility of ManageabilityPkg. Actually, MCTP over KCS is not supported in our BMC firmware yet, thus BMC just returns the invalid command. However, the transport framework has been verified to make sure the implementation works fine as expect. We need help from community to provide more manageability protocols and transport interface libraries to this package. > > You've also mentioned PLDM SMBIOS, isn't it covered by the > https://github.com/tianocore/edk2- > platforms/blob/master/Features/ManageabilityPkg/Universal/PldmSmbiosTr > ansferDxe/PldmSmbiosTransferDxe.c > ? Ah hah, yes I forget I upstream it. Please just feel free to send patch to make more functionalities to this package. Thanks Abner > > > Best regards, > Konstantin Aladyshev > > On Tue, Aug 22, 2023 at 7:26 PM Chang, Abner > wrote: > > > > [AMD Official Use Only - General] > > > > Hi Aladyshev, > > We use library class to specify the desire transport interface for the > management protocol, such as MCTP, PLDM and IPMI. This way we can > flexibly support any transport interface for the management protocol. > > > > Here is the example of using ManageabilityPkg, which is PLDM over MCTP > over KCS. > > ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocolDxe.inf { > > > > > ManageabilityTransportLib|ManageabilityPkg/Library/ManageabilityTranspor > tKcsLib/Dxe/DxeManageabilityTransportKcs.inf > > } > > ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocolDxe.inf { > > > > > ManageabilityTransportLib|ManageabilityPkg/Library/ManageabilityTranspor > tKcsLib/Dxe/DxeManageabilityTransportKcs.inf > > } > > ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocolDxe.inf { > > > > > ManageabilityTransportLib|ManageabilityPkg/Library/ManageabilityTranspor > tMctpLib/Dxe/DxeManageabilityTransportMctp.inf > > } > > > > So you can implement ManageabilityTransport library for either industry > standard or proprietary implementation for the specific management > protocol. > > > > BTW, We do have PLDM SMBIOS over MCTP implementation but not > upstream yet. > > > > Hope this information helps. > > Thanks > > Abner > > > > > > > -Original Message- > > > From: disc...@edk2.groups.io On Behalf Of > > > Konstantin Aladyshev via groups.io > > > Sent: Tuesday, August 22, 2023 7:00 PM > > > To: discuss ; devel@edk2.groups.io > > > Subject: [edk2-discuss] PLDM messages via MCTP over KCS > > > > > > Caution: This message originated from an External Source. Use proper > caution > > > when opening attachments, clicking links, or responding. > > > > > > > > > Hi! > > > > > > I'm trying to build `ManageabilityPkg` from the edk2-platforms > > > repo to issue PLDM messages via MCTP over KCS. Is it possible with > > > the current code? I see all the building blocks, but have trouble > > > putting it all together. > > > > > > The main question that bothers me is what implementation should I set > > > for the `ManageabilityTransportLib`? > > > By default it is set to dummy `BaseManageabilityTransportNull.inf` > > > (https://github.com/tianocore/edk2- > > > >
[edk2-devel] [PATCH v2 6/6] uefi-sct/SctPkg: TCG MORLOCK Locked with Key State Test
SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419 -Implement MemoryOverwriteRequestControlLock Locked with Key State test cases -Add remaining Assertions 33 - 49 from SCT spec -Add Test Case to MemoryOverwriteRequestFunctionTest Cc: G Edhaya Chandran Cc: Barton Gao Cc: Carolyn Gjertsen Signed-off-by: Abhi Singh Change-Id: Ifade96b0c6ec9e7f9bfb0eba8ceeb92380271e8b --- uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h | 85 +++ uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h | 11 +- uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c | 34 ++ uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c | 623 4 files changed, 752 insertions(+), 1 deletion(-) diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h index 023e7a37322c..cf7f3e180f54 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h @@ -121,6 +121,57 @@ Abstract: #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_032_GUID \ { 0xc8894201, 0x7a3a, 0x47d4, {0xa8, 0x8d, 0xdf, 0x4b, 0x03, 0xff, 0xde, 0x4f }} +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_033_GUID \ +{ 0x38a813ac, 0x8eb9, 0x46ce, {0xa8, 0x6b, 0x40, 0x8c, 0x07, 0x5f, 0xc7, 0xed }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_034_GUID \ +{ 0x919b8392, 0xcb78, 0x49ff, {0xa3, 0x18, 0x49, 0x78, 0x76, 0xe0, 0xf8, 0xf8 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_035_GUID \ +{ 0x219abaf2, 0x04a9, 0x407c, {0xb5, 0xde, 0xa0, 0x03, 0x6e, 0x65, 0xb0, 0xb9 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_036_GUID \ +{ 0x9a51640a, 0xff14, 0x402b, {0xb0, 0x57, 0xa0, 0xc4, 0xf7, 0x20, 0x8e, 0x44 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_037_GUID \ +{ 0x8ccd0dbb, 0x9b0a, 0x4bfb, {0xa0, 0x7e, 0xc6, 0x06, 0x8b, 0x91, 0x0d, 0xfb }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_038_GUID \ +{ 0xde6f4e17, 0xe375, 0x4dcb, {0x8f, 0x07, 0x77, 0x7e, 0x62, 0x49, 0xea, 0x2c }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_039_GUID \ +{ 0x4ab6927b, 0x5ee4, 0x4748, {0xa4, 0x9d, 0x2d, 0xf3, 0x70, 0x01, 0x41, 0xd5 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_040_GUID \ +{ 0x33142ecf, 0x0f92, 0x4625, {0xb7, 0xf6, 0x7f, 0x15, 0x25, 0x74, 0xd3, 0x03 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_041_GUID \ +{ 0xf73c04df, 0x2e42, 0x4174, {0x82, 0x18, 0x0f, 0x25, 0x46, 0x4a, 0x55, 0xe9 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_042_GUID \ +{ 0xd4eacf82, 0x55d1, 0x4ba1, {0xbe, 0x89, 0x6a, 0x2e, 0x44, 0x0f, 0xc7, 0xc0 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_043_GUID \ +{ 0xfd88fe63, 0x5ed4, 0x482a, {0x98, 0x44, 0x23, 0x90, 0xf9, 0x09, 0x1c, 0x20 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_044_GUID \ +{ 0x176f16cb, 0xf3a4, 0x4f12, {0x8f, 0x96, 0x4a, 0xc1, 0x8b, 0xdd, 0x6e, 0x3c }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_045_GUID \ +{ 0xf0d5e7b3, 0xdc0f, 0x4a18, {0xb9, 0x78, 0x09, 0x3b, 0x15, 0x55, 0x66, 0xbf }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_046_GUID \ +{ 0x9bf14c4b, 0x2950, 0x4c4e, {0x8b, 0xa3, 0x06, 0x46, 0xf1, 0x27, 0x8c, 0x05 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_047_GUID \ +{ 0xb0468dee, 0xb1d0, 0x4795, {0x9f, 0xbf, 0xbe, 0x3f, 0x40, 0x2f, 0x3d, 0x6f }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_048_GUID \ +{ 0x1f7dd903, 0xcd58, 0x4d6f, {0x80, 0xd6, 0x4f, 0x6d, 0xcb, 0x4a, 0xd6, 0xc9 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_049_GUID \ +{ 0x439179c2, 0x744d, 0x43bc, {0xb0, 0x67, 0x7b, 0x65, 0x60, 0x62, 0x6f, 0x5e }} + extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid001; extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002; @@ -184,3 +235,37 @@ extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid030; extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid031; extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid032; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid033; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid034; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid035; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid036; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid037; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid038; +
[edk2-devel] [PATCH v2 1/6] uefi-sct/SctPkg: TCG Platform Reset Check Test
From: "Abhi.Singh" SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419 -Implement initial test infrastructure for all test cases including updates to: CommonGenFramework.sh, UEFI_SCT.dsc, and Category.ini. -Add Guid.c and Guid.h files to cover the assertions 4/49 assertions defined in the SCT spec -Add TCGMemoryOverwriteRequestBBTestMain.h alongside used define/global variables -Add Platform Reset Check Test -check if the platform creates the MOR & MORLOCK EFI variables as defined in the TCG Spec -sets MOR bit 0 and validate if the platform clears the MOR bit 0 upon reset. Cc: G Edhaya Chandran Cc: Barton Gao Cc: Carolyn Gjertsen Signed-off-by: Abhi Singh Change-Id: I774d5893e5aff47690dadf90c36c7b9e7e7ee584 --- uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc | 1 + uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf | 53 +++ uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h | 46 +++ uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h | 95 + uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c | 37 ++ uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c | 410 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.c | 115 ++ uefi-sct/SctPkg/CommonGenFramework.sh | 1 + uefi-sct/SctPkg/Config/Data/Category.ini | 7 + 9 files changed, 765 insertions(+) diff --git a/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc b/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc index 155490fa39d3..536d5f2ed37a 100644 --- a/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc +++ b/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc @@ -235,6 +235,7 @@ [Components] SctPkg/TestCase/UEFI/EFI/RuntimeServices/MiscRuntimeServices/BlackBoxTest/MiscRuntimeServicesBBTest.inf SctPkg/TestCase/UEFI/EFI/RuntimeServices/TimeServices/BlackBoxTest/TimeServicesBBTest.inf SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices/BlackBoxTest/VariableServicesBBTest.inf +SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf SctPkg/TestCase/UEFI/EFI/Protocol/GraphicsOutput/BlackBoxTest/GraphicsOutputBBTest.inf SctPkg/TestCase/UEFI/EFI/Protocol/Bis/BlackBoxTest/BisBBTest.inf diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf new file mode 100644 index ..35d82043e2e7 --- /dev/null +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf @@ -0,0 +1,53 @@ +## @file +# +# Copyright 2006 - 2015 Unified EFI, Inc. +# Copyright (c) 2013, Intel Corporation. All rights reserved. +# Copyright (c) 2023, Arm Inc. All rights reserved. +# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +## +#/*++ +# +# Module Name: +# +# TCGMemoryOverwriteRequestBBTest.inf +# +# Abstract: +# +# Component description file for TCG MemoryOverwriteRequest UEFI variables Test. +# +#--*/ + +[defines] + INF_VERSION = 0x00010005 + BASE_NAME= TCGMemoryOverwriteRequestBBTest + FILE_GUID= ACA989CD-4AEE-45A3-B80F-E9A523BB7164 + MODULE_TYPE = UEFI_DRIVER + VERSION_STRING = 1.0 + ENTRY_POINT = InitializeTestTCGMemoryOverwriteRequest + +[sources.common] + TCGMemoryOverwriteRequestBBTestMain.c + TCGMemoryOverwriteRequestBBTestMain.h + TCGMemoryOverwriteRequestBBTestFunction.c + Guid.c + +[Packages] + MdePkg/MdePkg.dec + SctPkg/SctPkg.dec + SctPkg/UEFI/UEFI.dec + +[LibraryClasses] + UefiDriverEntryPoint + SctLib + EfiTestLib + +[Protocols] + gEfiTestRecoveryLibraryGuid diff --git
[edk2-devel] [PATCH v2 5/6] uefi-sct/SctPkg: TCG MORLOCK Locked No Key State Test
SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419 -Implement MemoryOverwriteRequestControlLock Locked No Key State test cases -Add Assertions 23 - 32 from SCT spec -Add Test Case to MemoryOverwriteRequestFunctionTest Cc: G Edhaya Chandran Cc: Barton Gao Cc: Carolyn Gjertsen Signed-off-by: Abhi Singh Change-Id: I298f8a0f55376b00233c9ee9c6b0262dc8869ccb --- uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h | 50 +++ uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h | 11 + uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c | 20 + uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c | 425 4 files changed, 506 insertions(+) diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h index daf17793c094..023e7a37322c 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h @@ -91,6 +91,36 @@ Abstract: #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_022_GUID \ { 0x490d7b39, 0xcad4, 0x4e8c, {0xb1, 0x5d, 0x63, 0xd2, 0x0c, 0xb3, 0xe9, 0x45 }} +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_023_GUID \ +{ 0x397394ae, 0xce01, 0x4350, {0xa2, 0x0c, 0xe1, 0xb3, 0xe8, 0x74, 0xdc, 0x01 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_024_GUID \ +{ 0x9cf27a60, 0x94b5, 0x4e2e, {0xb3, 0x2b, 0x51, 0x0f, 0x24, 0x7a, 0x80, 0xd7 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_025_GUID \ +{ 0x766dc008, 0x2a88, 0x4eed, {0x91, 0x95, 0x46, 0x92, 0xdc, 0xcc, 0x1d, 0xf6 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_026_GUID \ +{ 0x5f66c8e5, 0x1bf8, 0x4af4, {0x86, 0x45, 0xf4, 0x93, 0xa0, 0xee, 0x26, 0x88 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_027_GUID \ +{ 0x1064f6ce, 0xb307, 0x4981, {0xac, 0x8f, 0xe5, 0xca, 0x20, 0x6c, 0x1b, 0x8b }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_028_GUID \ +{ 0x40f2c4e9, 0xe937, 0x426e, {0x98, 0xc5, 0x62, 0xca, 0x23, 0x68, 0x52, 0xd0 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_029_GUID \ +{ 0x6d5dcb4d, 0xe008, 0x41cc, {0x98, 0x32, 0xdf, 0xa8, 0x38, 0xb1, 0xb6, 0x02 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_030_GUID \ +{ 0x29b81ee0, 0x368d, 0x447c, {0x9e, 0xd0, 0xa5, 0xfe, 0xd7, 0x02, 0x65, 0x7b }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_031_GUID \ +{ 0xe88b22ce, 0x3de6, 0x49b0, {0xb2, 0x46, 0x9e, 0x35, 0x98, 0x2b, 0x9b, 0x1c }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_032_GUID \ +{ 0xc8894201, 0x7a3a, 0x47d4, {0xa8, 0x8d, 0xdf, 0x4b, 0x03, 0xff, 0xde, 0x4f }} + extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid001; extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002; @@ -134,3 +164,23 @@ extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid020; extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid021; extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid022; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid023; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid024; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid025; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid026; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid027; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid028; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid029; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid030; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid031; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid032; diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h index 15eedc60f19d..94ed476f86ad 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h @@ -51,6 +51,10 @@ typedef struct _RESET_DATA { #define MOR_LOCK_DATA_UNLOCKED0x0 #define MOR_LOCK_DATA_LOCKED_WITHOUT_KEY 0x1 +#define
[edk2-devel] [PATCH v2 3/6] uefi-sct/SctPkg: TCG MORLOCK SetVariable Test
SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419 -Implement MemoryOverwriteRequestControlLockSetVariable test cases -Add Assertions 9 through 18 from SCT spec -Add Test Case to MemoryOverwriteRequestFunctionTest Cc: G Edhaya Chandran Cc: Barton Gao Cc: Carolyn Gjertsen Signed-off-by: Abhi Singh Change-Id: I23ba7256441354f497ecdc96a394df5ba5cae8df --- uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h | 50 +++ uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h | 8 + uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c | 20 + uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c | 405 4 files changed, 483 insertions(+) diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h index 84175504579c..29be47393385 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h @@ -49,6 +49,36 @@ Abstract: #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_008_GUID \ { 0x5f0b42ef, 0x3cec, 0x46ad, {0xbc, 0x5b, 0xc3, 0x7a, 0x1d, 0x45, 0x41, 0x29 }} +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_009_GUID \ +{ 0x9665c8d9, 0x267c, 0x4393, {0xa4, 0x72, 0x10, 0x54, 0x43, 0x56, 0x20, 0x21 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_010_GUID \ +{ 0xce655812, 0xcc40, 0x42b0, {0x80, 0xd1, 0xa7, 0x26, 0xdb, 0x14, 0x9e, 0xa8 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_011_GUID \ +{ 0xd34348ad, 0x5d46, 0x4961, {0x91, 0x3e, 0xb1, 0xf2, 0xc5, 0xe7, 0x0f, 0x7d }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_012_GUID \ +{ 0x838311e0, 0x419a, 0x4c92, {0x90, 0x60, 0xbf, 0x94, 0x59, 0xd3, 0xc3, 0x59 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_013_GUID \ +{ 0x12998a9c, 0xc863, 0x4572, {0x80, 0x6c, 0xb6, 0x40, 0x97, 0x91, 0x89, 0x7f }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_014_GUID \ +{ 0xebd4ba26, 0x44c3, 0x464a, {0x88, 0xe3, 0x3b, 0x44, 0x94, 0x88, 0xbb, 0xb8 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_015_GUID \ +{ 0x00920c8e, 0x241d, 0x4da0, {0x8b, 0x59, 0xc3, 0xad, 0xe0, 0xd6, 0x4e, 0xc9 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_016_GUID \ +{ 0x169a43cc, 0x23fa, 0x4887, {0x8b, 0x4f, 0x11, 0xb2, 0xa0, 0x88, 0x4f, 0x63 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_017_GUID \ +{ 0x7c11d0ab, 0x7a84, 0x482b, {0xb7, 0x5a, 0xd7, 0x72, 0x6c, 0x3e, 0xae, 0x0e }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_018_GUID \ +{ 0xbbaa52b6, 0x5576, 0x4acd, {0xb9, 0x5f, 0x86, 0x22, 0x5e, 0xfc, 0xb0, 0x31 }} + extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid001; extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002; @@ -64,3 +94,23 @@ extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid006; extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid007; extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid008; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid009; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid010; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid011; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid012; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid013; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid014; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid015; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid016; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid017; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid018; diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h index 46c2c2faa388..553959762be8 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h @@ -49,6 +49,7 @@ typedef struct _RESET_DATA { #define MOR_BIT_HIGH 0x1 #define MOR_LOCK_DATA_UNLOCKED0x0 +#define
[edk2-devel] [PATCH v2 4/6] uefi-sct/SctPkg: TCG MORLOCK Unlocked State Test
SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419 -Implement MemoryOverwriteRequestControlLock Unlocked State test cases -Add Assertions 19, 20, 21, and 22 from SCT spec -Add Test Case to MemoryOverwriteRequestFunctionTest Cc: G Edhaya Chandran Cc: Barton Gao Cc: Carolyn Gjertsen Signed-off-by: Abhi Singh Change-Id: If9cbea790d6c0f5aaceb6834fb91f5e1f3752244 --- uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h | 20 ++ uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h | 7 + uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c | 8 + uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c | 224 4 files changed, 259 insertions(+) diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h index 29be47393385..daf17793c094 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h @@ -79,6 +79,18 @@ Abstract: #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_018_GUID \ { 0xbbaa52b6, 0x5576, 0x4acd, {0xb9, 0x5f, 0x86, 0x22, 0x5e, 0xfc, 0xb0, 0x31 }} +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_019_GUID \ +{ 0x60b227e0, 0x9f5c, 0x412c, {0x88, 0x79, 0xd3, 0x59, 0xfc, 0xd0, 0xdd, 0x3f }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_020_GUID \ +{ 0x2eba284a, 0xf701, 0x4c19, {0xbe, 0x5c, 0x39, 0x27, 0xb0, 0x68, 0x4f, 0xd7 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_021_GUID \ +{ 0x9a1b44ae, 0x08ce, 0x474c, {0xa5, 0x8e, 0xa6, 0xe2, 0xcf, 0xaf, 0x91, 0x2c }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_022_GUID \ +{ 0x490d7b39, 0xcad4, 0x4e8c, {0xb1, 0x5d, 0x63, 0xd2, 0x0c, 0xb3, 0xe9, 0x45 }} + extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid001; extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002; @@ -114,3 +126,11 @@ extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid016; extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid017; extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid018; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid019; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid020; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid021; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid022; diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h index 553959762be8..15eedc60f19d 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h @@ -100,6 +100,13 @@ TCGMemoryOverwriteRequestControlLockSetVariable ( IN RESET_DATA *ResetData ); +EFI_STATUS +TCGMemoryOverwriteRequestControlLockUnlockedState ( + IN EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib, + IN EFI_TEST_RECOVERY_LIBRARY_PROTOCOL *RecoveryLib, + IN RESET_DATA *ResetData +); + // // Entry GUIDs for Test // diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c index 8574b51af6e4..c41a611d3a4e 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c @@ -63,3 +63,11 @@ EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid016 = EFI_TEST_TCGMO EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid017 = EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_017_GUID; EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid018 = EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_018_GUID; + +EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid019 =
[edk2-devel] [PATCH v2 0/6] TCG MemoryOverwriteRequest Tests
These tests support platform firmware that implement MemoryOverwriteRequestControl & MemoryOverwriteRequestControlLock UEFI variables in accordance with TCG PC Platform Reset Attack Mitigation Specification. The 6 patches are split up according to the six sections documented in the SCT spec linked below. SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419 PR: https://github.com/tianocore/edk2-test/pull/78 Cc: G Edhaya Chandran Cc: Barton Gao Cc: Carolyn Gjertsen Abhi Singh (6): uefi-sct/SctPkg: TCG Platform Reset Check Test uefi-sct/SctPkg: TCG MOR SetVariable Test uefi-sct/SctPkg: TCG MORLOCK SetVariable Test uefi-sct/SctPkg: TCG MORLOCK Unlocked State Test uefi-sct/SctPkg: TCG MORLOCK Locked No Key State Test uefi-sct/SctPkg: TCG MORLOCK Locked with Key State Test uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc |1 + uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf | 53 + uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h | 271 +++ uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h | 137 ++ uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c | 127 ++ uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c | 2289 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.c | 115 + uefi-sct/SctPkg/CommonGenFramework.sh |1 + uefi-sct/SctPkg/Config/Data/Category.ini |7 + 9 files changed, 3001 insertions(+) create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c create mode 100644 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.c -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107962): https://edk2.groups.io/g/devel/message/107962 Mute This Topic: https://groups.io/mt/100907770/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v2 2/6] uefi-sct/SctPkg: TCG MOR SetVariable Test
SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419 -Implement MemoryOverwriteRequestControlSetVariable test cases -Add Assertions 5, 6, 7, and 8 from SCT spec -Add Test Case to MemoryOverwriteRequestFunctionTest Cc: G Edhaya Chandran Cc: Barton Gao Cc: Carolyn Gjertsen Signed-off-by: Abhi Singh Change-Id: I21ed8d6613c7b9d20560b8fa4a45632008d756f9 --- uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h | 20 ++ uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h | 7 + uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c | 8 + uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c | 202 4 files changed, 237 insertions(+) diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h index a3d87a3eb764..84175504579c 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h @@ -37,6 +37,18 @@ Abstract: #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_004_GUID \ { 0x002519c6, 0x859f, 0x4d25, {0xb1, 0x36, 0xb2, 0xef, 0x61, 0xe5, 0xd9, 0x6f }} +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_005_GUID \ +{ 0x13e97668, 0xe905, 0x452d, {0xa0, 0x72, 0x03, 0xde, 0xbf, 0x53, 0xdf, 0xa2 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_006_GUID \ +{ 0x94811e97, 0x7513, 0x4099, {0xae, 0xb8, 0x5a, 0x7e, 0x7d, 0x50, 0xb4, 0x99 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_007_GUID \ +{ 0x15378290, 0x17dd, 0x4cbf, {0x8e, 0x8f, 0xc2, 0x4b, 0xc9, 0x09, 0xb4, 0x14 }} + +#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_008_GUID \ +{ 0x5f0b42ef, 0x3cec, 0x46ad, {0xbc, 0x5b, 0xc3, 0x7a, 0x1d, 0x45, 0x41, 0x29 }} + extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid001; extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002; @@ -44,3 +56,11 @@ extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002; extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid003; extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid004; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid005; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid006; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid007; + +extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid008; diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h index 45bd921ecca4..46c2c2faa388 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h @@ -85,6 +85,13 @@ TCGMemoryOverwriteRequestPlatformResetCheck ( IN RESET_DATA *ResetData ); +EFI_STATUS +TCGMemoryOverwriteRequestControlSetVariable ( + IN EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib, + IN EFI_TEST_RECOVERY_LIBRARY_PROTOCOL *RecoveryLib, + IN RESET_DATA *ResetData + ); + // // Entry GUIDs for Test // diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c index 59c798a710f1..07bc98b8d764 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c @@ -35,3 +35,11 @@ EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002 = EFI_TEST_TCGMO EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid003 = EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_003_GUID; EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid004 = EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_004_GUID; + +EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid005 = EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_005_GUID;
Re: [edk2-devel] [PATCH v1 1/1] uefi-sct/SctPkg: TCG MemoryOverwriteRequest
Hi Abhi, See inline comments... On 8/17/23 11:10 AM, Abhimanyu Singh via groups.io wrote: From: "Abhi.Singh" SCT Platform Reset Check Test SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374 Test: https://bugzilla.tianocore.org/show_bug.cgi?id=4419 -Implement initial test infrastructure for all test cases including updates to: CommonGenFramework.sh, UEFI_SCT.dsc, and Category.ini. -Add Guid.c and Guid.h files to cover the assertions defined in the SCT spec -Add TCGMemoryOverwriteRequestBBTestMain.h to enable any required macros that define states for MOR/MORLOCK -Add Platform Reset Check Test -check if the platform creates the MOR & MORLOCK EFI variables as defined in the TCG Spec -sets MOR bit 0 and validate if the platform clears the MOR bit 0 upon reset. Signed-off-by: Abhi Singh Change-Id: I774d5893e5aff47690dadf90c36c7b9e7e7ee584 --- uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc | 1 + uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf | 53 +++ uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h | 276 + uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h | 138 +++ uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c | 129 ++ uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c | 418 uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.c | 115 ++ uefi-sct/SctPkg/CommonGenFramework.sh | 1 + uefi-sct/SctPkg/Config/Data/Category.ini | 7 + 9 files changed, 1138 insertions(+) diff --git a/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc b/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc index 155490fa39d3..536d5f2ed37a 100644 --- a/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc +++ b/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc @@ -235,6 +235,7 @@ [Components] SctPkg/TestCase/UEFI/EFI/RuntimeServices/MiscRuntimeServices/BlackBoxTest/MiscRuntimeServicesBBTest.inf SctPkg/TestCase/UEFI/EFI/RuntimeServices/TimeServices/BlackBoxTest/TimeServicesBBTest.inf SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices/BlackBoxTest/VariableServicesBBTest.inf +SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf SctPkg/TestCase/UEFI/EFI/Protocol/GraphicsOutput/BlackBoxTest/GraphicsOutputBBTest.inf SctPkg/TestCase/UEFI/EFI/Protocol/Bis/BlackBoxTest/BisBBTest.inf diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf new file mode 100644 index ..35d82043e2e7 --- /dev/null +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf @@ -0,0 +1,53 @@ +## @file +# +# Copyright 2006 - 2015 Unified EFI, Inc. +# Copyright (c) 2013, Intel Corporation. All rights reserved. +# Copyright (c) 2023, Arm Inc. All rights reserved. +# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +## +#/*++ +# +# Module Name: +# +# TCGMemoryOverwriteRequestBBTest.inf +# +# Abstract: +# +# Component description file for TCG MemoryOverwriteRequest UEFI variables Test. +# +#--*/ + +[defines] + INF_VERSION = 0x00010005 + BASE_NAME= TCGMemoryOverwriteRequestBBTest + FILE_GUID= ACA989CD-4AEE-45A3-B80F-E9A523BB7164 + MODULE_TYPE = UEFI_DRIVER + VERSION_STRING = 1.0 + ENTRY_POINT = InitializeTestTCGMemoryOverwriteRequest + +[sources.common] + TCGMemoryOverwriteRequestBBTestMain.c + TCGMemoryOverwriteRequestBBTestMain.h + TCGMemoryOverwriteRequestBBTestFunction.c + Guid.c + +[Packages] + MdePkg/MdePkg.dec + SctPkg/SctPkg.dec + SctPkg/UEFI/UEFI.dec + +[LibraryClasses] + UefiDriverEntryPoint + SctLib + EfiTestLib + +[Protocols] +
Re: [edk2-devel] [PATCH edk2-platforms v5 1/1] Platform/SbsaQemu: add GIC ITS support
On Tue, Aug 22, 2023 at 18:53:43 +0200, Marcin Juszkiewicz wrote: > From: Shashi Mallela > > SBSA Reference Platform has GIC ITS support. Let make use of it to have > complex PCI Express setups. > > Base address is read from TF-A via SMC call. > > If firmware is used with QEMU 8.0 or older then there will be no GIC ITS > support. In such case we would not add information about it into MCFG > and there will be no IORT table. > > Co-authored-by: Marcin Juszkiewicz > Signed-off-by: Shashi Mallela > Signed-off-by: Marcin Juszkiewicz Reviewed-by: Leif Lindholm Pushed as e509ac5a729e. Thanks! > --- > Silicon/Qemu/SbsaQemu/SbsaQemu.dec| 4 + > Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 4 + > .../Qemu/SbsaQemu/AcpiTables/AcpiTables.inf | 1 + > .../SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf | 2 + > .../SbsaQemuPlatformDxe.inf | 1 + > .../Include/IndustryStandard/SbsaQemuAcpi.h | 11 + > .../Include/IndustryStandard/SbsaQemuSmc.h| 1 + > .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 206 ++ > .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 10 + > 9 files changed, 240 insertions(+) > > diff --git a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec > b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec > index 5182978cf56d..aab2894e6455 100644 > --- a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec > +++ b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec > @@ -70,3 +70,7 @@ [PcdsDynamic.common] > > > gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMajor|0x0|UINT32|0x011E > > gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMinor|0x0|UINT32|0x011F > + > + # ARM Generic Interrupt Controller ITS > + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdGicItsBase|0|UINT64|0x0120 > + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdSmmuBase|0|UINT64|0x0121 > diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc > b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc > index b88729ad8ad6..be406144c242 100644 > --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc > +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc > @@ -523,6 +523,10 @@ [PcdsDynamicDefault.common] >gArmTokenSpaceGuid.PcdGicDistributorBase|0x4006 >gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x4008 > > + # GIC ITS > + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdGicItsBase|0 > + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdSmmuBase|0x6005 > + ># ># Set video resolution for boot options ># PlatformDxe can set the former at runtime. > diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf > b/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf > index 0501c670d565..97021f7971c7 100644 > --- a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf > +++ b/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf > @@ -75,3 +75,4 @@ [FixedPcd] > [Pcd] >gArmTokenSpaceGuid.PcdGicDistributorBase >gArmTokenSpaceGuid.PcdGicRedistributorsBase > + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdGicItsBase > diff --git > a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf > b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf > index c1c33788567d..14d760b36400 100644 > --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf > +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf > @@ -48,6 +48,8 @@ [Pcd] > >gArmTokenSpaceGuid.PcdGicDistributorBase >gArmTokenSpaceGuid.PcdGicRedistributorsBase > + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdGicItsBase > + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdSmmuBase > > [Depex] >gEfiAcpiTableProtocolGuid ## CONSUMES > diff --git > a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf > b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf > index 545794a8c7ff..0e3b11d60426 100644 > --- > a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf > +++ > b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf > @@ -43,6 +43,7 @@ [Pcd] > >gArmTokenSpaceGuid.PcdGicDistributorBase >gArmTokenSpaceGuid.PcdGicRedistributorsBase > + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdGicItsBase > > > [Depex] > diff --git a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h > b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h > index 853b81b34df5..983d17f6fa50 100644 > --- a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h > +++ b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h > @@ -27,6 +27,7 @@ > #define SBSAQEMU_MADT_GIC_HBASE 0x2c01 > #define SBSAQEMU_MADT_GIC_PMU_IRQ23 > #define SBSAQEMU_MADT_GICR_SIZE 0x400 > +#define SBSAQEMU_MADT_GITS_SIZE 0x2 > > // Macro for MADT GIC Redistributor Structure > #define SBSAQEMU_MADT_GICR_INIT() { > \ > @@ -37,6 +38,16 @@ > SBSAQEMU_MADT_GICR_SIZE /* DiscoveryRangeLength */ > \ > } >
Re: [edk2-devel] [PATCH V1 1/1] uefi-sct/SctPkg: RouteConfig() returns EFI_ACCESS_DENIED passes with warning
Working BZ link: 3759 – SCT test fails when RouteConfig returns EFI_ACCESS_DENIED (tianocore.org) ( https://bugzilla.tianocore.org/show_bug.cgi?id=3759 ) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107959): https://edk2.groups.io/g/devel/message/107959 Mute This Topic: https://groups.io/mt/100899969/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V1 1/1] uefi-sct/SctPkg: RouteConfig() returns EFI_ACCESS_DENIED passes with warning
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3759 HIIConfigAccess and HIIConfigRouting Protocol RouteConfig tests assertions store a failure when RouteConfig returns EFI_ACCESS_DENIED. In the UEFI SPEC RouteConfig in both protocols can return EFI_ACCESS_DENIED when the action violates a system policy. The tests now record a pass with warning. Cc: G Edhaya Chandran Cc: Barton Gao Cc: Carolyn Gjertsen Cc: Samer El-Haj-Mahmoud Cc: Sunny Wang Signed-off-by: Abhi Singh Change-Id: I8591c3d7b0855133141779d3c53a159129400815 --- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/HIIConfigAccess/BlackBoxTest/HIIConfigAccessBBTestFunction.c | 2 +- uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/HIIConfigRouting/BlackBoxTest/HIIConfigRoutingBBTestFunction.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/HIIConfigAccess/BlackBoxTest/HIIConfigAccessBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/HIIConfigAccess/BlackBoxTest/HIIConfigAccessBBTestFunction.c index b3276487bb3c..8e46b547bdfe 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/HIIConfigAccess/BlackBoxTest/HIIConfigAccessBBTestFunction.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/HIIConfigAccess/BlackBoxTest/HIIConfigAccessBBTestFunction.c @@ -521,7 +521,7 @@ BBTestRouteConfigFunctionTestCheckpoint1 ( ); if ( (EFI_SUCCESS == Status) && (Progress == Resp + SctStrLen (Resp)) ) { AssertionType = EFI_TEST_ASSERTION_PASSED; - } else if ( EFI_OUT_OF_RESOURCES == Status ) { + } else if ( (EFI_OUT_OF_RESOURCES == Status) || (EFI_ACCESS_DENIED == Status) ) { AssertionType = EFI_TEST_ASSERTION_WARNING; } else { AssertionType = EFI_TEST_ASSERTION_FAILED; diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/HIIConfigRouting/BlackBoxTest/HIIConfigRoutingBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/HIIConfigRouting/BlackBoxTest/HIIConfigRoutingBBTestFunction.c index d4bd23d1fd82..9d7a7dcf42e2 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/HIIConfigRouting/BlackBoxTest/HIIConfigRoutingBBTestFunction.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/HIIConfigRouting/BlackBoxTest/HIIConfigRoutingBBTestFunction.c @@ -546,7 +546,7 @@ BBTestRouteConfigFunctionTestCheckpoint1 ( if ( (EFI_SUCCESS == Status) && (Progress == Resp2 + SctStrLen (Resp2)) ) { AssertionType = EFI_TEST_ASSERTION_PASSED; - } else if ( EFI_OUT_OF_RESOURCES == Status ){ + } else if ( (EFI_OUT_OF_RESOURCES == Status) || (EFI_ACCESS_DENIED == Status) ) { AssertionType = EFI_TEST_ASSERTION_WARNING; } else { AssertionType = EFI_TEST_ASSERTION_FAILED; -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107958): https://edk2.groups.io/g/devel/message/107958 Mute This Topic: https://groups.io/mt/100899969/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [edk2-discuss] PLDM messages via MCTP over KCS
Thanks for the answer! I was a little bit confused about the part, that in the same package I actually need to provide different library implementations for the same 'ManageabilityTransportLib', thanks for the clarification! I think your DSC example should go into the package documentation. As for me, I'm working with the OpenBMC distribution (https://github.com/openbmc/openbmc) and my goal is to transfer data from the BIOS to the BMC via MCTP/PLDM. Currently there is no solution for the MCTP over KCS binding in Linux, so I need to add this support: - either to the MCTP userspace library (https://github.com/openbmc/libmctp) [old OpenBMC way, but probably easier] - or to the MCTP kernel binding (https://github.com/torvalds/linux/tree/master/drivers/net/mctp) [modern mctp Linux driver approach] Both don't sound like an easy task, so can I ask, what MC (i.e. management controller) device and firmware do you use on the other side of the MCTP KCS transmissions? You've also mentioned PLDM SMBIOS, isn't it covered by the https://github.com/tianocore/edk2-platforms/blob/master/Features/ManageabilityPkg/Universal/PldmSmbiosTransferDxe/PldmSmbiosTransferDxe.c ? Best regards, Konstantin Aladyshev On Tue, Aug 22, 2023 at 7:26 PM Chang, Abner wrote: > > [AMD Official Use Only - General] > > Hi Aladyshev, > We use library class to specify the desire transport interface for the > management protocol, such as MCTP, PLDM and IPMI. This way we can flexibly > support any transport interface for the management protocol. > > Here is the example of using ManageabilityPkg, which is PLDM over MCTP over > KCS. > ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocolDxe.inf { > > > ManageabilityTransportLib|ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/DxeManageabilityTransportKcs.inf > } > ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocolDxe.inf { > > > ManageabilityTransportLib|ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/DxeManageabilityTransportKcs.inf > } > ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocolDxe.inf { > > > ManageabilityTransportLib|ManageabilityPkg/Library/ManageabilityTransportMctpLib/Dxe/DxeManageabilityTransportMctp.inf > } > > So you can implement ManageabilityTransport library for either industry > standard or proprietary implementation for the specific management protocol. > > BTW, We do have PLDM SMBIOS over MCTP implementation but not upstream yet. > > Hope this information helps. > Thanks > Abner > > > > -Original Message- > > From: disc...@edk2.groups.io On Behalf Of > > Konstantin Aladyshev via groups.io > > Sent: Tuesday, August 22, 2023 7:00 PM > > To: discuss ; devel@edk2.groups.io > > Subject: [edk2-discuss] PLDM messages via MCTP over KCS > > > > Caution: This message originated from an External Source. Use proper caution > > when opening attachments, clicking links, or responding. > > > > > > Hi! > > > > I'm trying to build `ManageabilityPkg` from the edk2-platforms > > repo to issue PLDM messages via MCTP over KCS. Is it possible with > > the current code? I see all the building blocks, but have trouble > > putting it all together. > > > > The main question that bothers me is what implementation should I set > > for the `ManageabilityTransportLib`? > > By default it is set to dummy `BaseManageabilityTransportNull.inf` > > (https://github.com/tianocore/edk2- > > platforms/blob/master/Features/ManageabilityPkg/ManageabilityPkg.dsc). > > > > On one case to get PLDM via MCTP it looks that I need to set it to > > `DxeManageabilityTransportMctp.inf` > > ManageabilityTransportLib| <...>/DxeManageabilityTransportMctp.inf > > (https://github.com/tianocore/edk2- > > platforms/blob/master/Features/ManageabilityPkg/Library/ManageabilityTra > > nsportMctpLib/Dxe/DxeManageabilityTransportMctp.inf) > > > > But on the other case if I want MCTP over KCS I need to set it to > > `DxeManageabilityTransportKcs.inf` > > ManageabilityTransportLib| <...>/DxeManageabilityTransportKcs.inf > > (https://github.com/tianocore/edk2- > > platforms/blob/master/Features/ManageabilityPkg/Library/ManageabilityTra > > nsportKcsLib/Dxe/DxeManageabilityTransportKcs.inf) > > > > What is the right way to resolve this? > > > > There are no platforms in the repo that actually implement PLDM/MCTP > > functionality, so there is no example that I can use as a reference. > > > > > > Best regards, > > Konstantin Aladyshev > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107957): https://edk2.groups.io/g/devel/message/107957 Mute This Topic: https://groups.io/mt/100897530/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v3 1/1] MdePkg: Add Cxl20.h into IndustryStandard
Yes. Mike > -Original Message- > From: Chris Li OS > Sent: Tuesday, August 22, 2023 2:42 AM > To: Nong, Foster ; Kinney, Michael D > ; devel@edk2.groups.io; Gao, Liming > > Cc: Yao, Jiewen ; Ni, Ray ; Open > Source Submission > Subject: Re: [edk2-devel] [PATCH v3 1/1] MdePkg: Add Cxl20.h into > IndustryStandard > > Hi Mike and Foster, > So the preferred definition is as below? > > RegisterBlock[]; // offset 0x0C > > > From: Nong, Foster > Sent: Monday, August 21, 2023 9:59 AM > To: Kinney, Michael D; Chris Li OS; devel@edk2.groups.io; Gao, Liming > Cc: Yao, Jiewen; Ni, Ray; Open Source Submission > Subject: RE: [edk2-devel] [PATCH v3 1/1] MdePkg: Add Cxl20.h into > IndustryStandard > > Hi Mike, > > Yes. In CXL SPEC chapter 8.1.9, the number of register blocks need > calculate from DVSEC length value of DVSEC header1 register. > > -Original Message- > From: Kinney, Michael D > Sent: Friday, August 18, 2023 11:30 PM > To: Chris Li OS ; devel@edk2.groups.io; > Nong, Foster ; Gao, Liming > > Cc: Yao, Jiewen ; Ni, Ray ; Open > Source Submission ; Kinney, Michael D > > Subject: RE: [edk2-devel] [PATCH v3 1/1] MdePkg: Add Cxl20.h into > IndustryStandard > > Is RegisterBlock a flexible array member? > > If so, then [] is the compatible syntax. > > Mike > > > -Original Message- > > From: Chris Li OS > > Sent: Friday, August 18, 2023 2:29 AM > > To: devel@edk2.groups.io; Nong, Foster ; Gao, > > Liming > > Cc: Yao, Jiewen ; Ni, Ray ; > > Kinney, Michael D ; Open Source Submission > > > > Subject: [edk2-devel] [PATCH v3 1/1] MdePkg: Add Cxl20.h into > > IndustryStandard > > > > Absorbed Foster's input with minor delta. > > @Nong, Foster @Liming and all kindly help review/vote again. > > > > One change compared with Intel's proposal is the below line, we prefer > > [1] style to be safer to work across all compilers. > > Let us know if you folks have different suggestions here. > > > > > > - CXL_DVSEC_REGISTER_LOCATOR_REGISTER_BLOCK > > RegisterBlock[0]; // offset 0x0C > > + CXL_DVSEC_REGISTER_LOCATOR_REGISTER_BLOCK > > RegisterBlock[1]; // offset 0x0C > > > > > > Thanks all! > > > > - > > 1) Add CXL 2.0 header file to comply with CXL 2.0 specification > > 2) CXL 2.0 header will embed Cxl11.h > > 3) Updated Cxl.h to point to 2.0 header file > > > > Signed-off-by: Chris Li > > --- > > MdePkg/Include/IndustryStandard/Cxl.h | 2 +- > > MdePkg/Include/IndustryStandard/Cxl20.h | 465 > > > > 2 files changed, 466 insertions(+), 1 deletion(-) create mode 100644 > > MdePkg/Include/IndustryStandard/Cxl20.h > > > > diff --git a/MdePkg/Include/IndustryStandard/Cxl.h > > b/MdePkg/Include/IndustryStandard/Cxl.h > > index 06c1230e3e..9ad3242e25 100644 > > --- a/MdePkg/Include/IndustryStandard/Cxl.h > > +++ b/MdePkg/Include/IndustryStandard/Cxl.h > > @@ -12,7 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > > #ifndef _CXL_MAIN_H_ #define _CXL_MAIN_H_ > > > > -#include > > +#include > > // > > // CXL assigned new Vendor ID > > // > > diff --git a/MdePkg/Include/IndustryStandard/Cxl20.h > > b/MdePkg/Include/IndustryStandard/Cxl20.h > > new file mode 100644 > > index 00..a5fe22b4a2 > > --- /dev/null > > +++ b/MdePkg/Include/IndustryStandard/Cxl20.h > > @@ -0,0 +1,465 @@ > > +/** @file > > + CXL 2.0 Register definitions > > + > > + This file contains the register definitions based on the Compute > > Express Link > > + (CXL) Specification Revision 2.0. > > + > > + Copyright (c) 2023, Ampere Computing LLC. All rights reserved. > > + > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > + > > +**/ > > +#ifndef CXL20_H_ > > +#define CXL20_H_ > > + > > +#include > > + > > +// > > +// CXL DVSEC IDs > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.1.1 // > > +#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_CXL_DEVICE0x0 > > +#define CXL_DVSEC_ID_NON_CXL_FUNCTION_MAP 0x2 > > +#define CXL_DVSEC_ID_CXL20_EXTENSIONS_DVSEC_FOR_PORTS 0x3 > > +#define CXL_DVSEC_ID_GPF_DVSEC_FOR_CXL_PORTS 0x4 > > +#define CXL_DVSEC_ID_GPF_DVSEC_FOR_CXL_DEVICES0x5 > > +#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_FLEX_BUS_PORT 0x7 > > +#define CXL_DVSEC_ID_REGISTER_LOCATOR 0x8 > > +#define CXL_DVSEC_ID_MLD 0x9 > > +#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_TEST_CAPABILITY 0xA > > + > > +// > > +// Register Block ID > > +// Compute Express Link Specification Revision 2.0 - Chapter 8.1.9.1 > > +// > > +#define CXL_REGISTER_BLOCK_ID_EMPTY 0x0 > > +#define CXL_REGISTER_BLOCK_ID_COMPONENT 0x1 > > +#define CXL_REGISTER_BLOCK_ID_BAR_VIRTUALIZATION_ACL 0x2 > > +#define CXL_REGISTER_BLOCK_ID_DEVICE 0x3 > > + > > +// > > +// CXL component register layout > > +// Compute Express Link
Re: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc/StdLib: file descriptor leak in rename()
Reviewed-by: Michael D Kinney > -Original Message- > From: Jayaprakash, N > Sent: Monday, August 21, 2023 8:22 PM > To: devel@edk2.groups.io > Cc: Jayaprakash, N ; Rebecca Cran > ; Kinney, Michael D ; > Kloper, Dimitry > Subject: [edk2-libc Patch 1/1] edk2-libc/StdLib: file descriptor leak in > rename() > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4529 > > rename() call leads to a function that makes open() for source file > to be renamed. The resulting file descriptor is never closed. > If you have to rename a couple of files this will quickly exhaust > the descriptor table. > The fix is trivial - just close the fd before returning from the > function. > > Cc: Rebecca Cran > Cc: Michael D Kinney > Cc: Jayaprakash N > Signed-off-by: Kloper Dimitry > --- > StdLib/LibC/Uefi/Devices/UefiShell/daShell.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/StdLib/LibC/Uefi/Devices/UefiShell/daShell.c > b/StdLib/LibC/Uefi/Devices/UefiShell/daShell.c > index 861765e..06fcc3b 100644 > --- a/StdLib/LibC/Uefi/Devices/UefiShell/daShell.c > +++ b/StdLib/LibC/Uefi/Devices/UefiShell/daShell.c > @@ -670,6 +670,7 @@ da_ShellRename( > free(NewFileInfo); > if(Status == EFI_SUCCESS) { >// File has been successfully renamed. We are DONE! > + close(OldFd); >return 0; > } > errno = EFI2errno( Status ); > @@ -688,6 +689,7 @@ da_ShellRename( > else { >errno = ENOMEM; > } > +close(OldFd); >} >return -1; > } > -- > 2.40.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107955): https://edk2.groups.io/g/devel/message/107955 Mute This Topic: https://groups.io/mt/100888179/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH edk2-platforms v5 0/1] Platform/QemuSbsa: add GIC ITS
SBSA Reference Platform can have GIC ITS present. And when it has then we can have complex PCI Express setup (and some other things). On systems with GIC ITS support it's address is read from TF-A via SMC call. IORT is generated, MADT has ITS information. Linux boots and sees GIC ITS as expected. SMMU information is also provided in IORT and used. On system where GIC ITS is not present (like QEMU 8.0) it's address is not set and then there is no mention of ITS in MADT and there is no IORT, Linux boots. Changes since v4: - All changes in one patch as requested. Changes since v3: - use proper amount of nodes (3) in IORT Changes since v2: - no ITS == no IORT Changes since v1: - IORT is generated in C - no ITS == no ITS node in IORT - introduced PcdSmmuBase Shashi Mallela (1): Platform/SbsaQemu: add GIC ITS support Silicon/Qemu/SbsaQemu/SbsaQemu.dec| 4 + Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 4 + .../Qemu/SbsaQemu/AcpiTables/AcpiTables.inf | 1 + .../SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf | 2 + .../SbsaQemuPlatformDxe.inf | 1 + .../Include/IndustryStandard/SbsaQemuAcpi.h | 11 + .../Include/IndustryStandard/SbsaQemuSmc.h| 1 + .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 206 ++ .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 10 + 9 files changed, 240 insertions(+) -- 2.41.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107954): https://edk2.groups.io/g/devel/message/107954 Mute This Topic: https://groups.io/mt/100898113/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH edk2-platforms v5 1/1] Platform/SbsaQemu: add GIC ITS support
From: Shashi Mallela SBSA Reference Platform has GIC ITS support. Let make use of it to have complex PCI Express setups. Base address is read from TF-A via SMC call. If firmware is used with QEMU 8.0 or older then there will be no GIC ITS support. In such case we would not add information about it into MCFG and there will be no IORT table. Co-authored-by: Marcin Juszkiewicz Signed-off-by: Shashi Mallela Signed-off-by: Marcin Juszkiewicz --- Silicon/Qemu/SbsaQemu/SbsaQemu.dec| 4 + Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 4 + .../Qemu/SbsaQemu/AcpiTables/AcpiTables.inf | 1 + .../SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf | 2 + .../SbsaQemuPlatformDxe.inf | 1 + .../Include/IndustryStandard/SbsaQemuAcpi.h | 11 + .../Include/IndustryStandard/SbsaQemuSmc.h| 1 + .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c | 206 ++ .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c | 10 + 9 files changed, 240 insertions(+) diff --git a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec index 5182978cf56d..aab2894e6455 100644 --- a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec +++ b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec @@ -70,3 +70,7 @@ [PcdsDynamic.common] gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMajor|0x0|UINT32|0x011E gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformVersionMinor|0x0|UINT32|0x011F + + # ARM Generic Interrupt Controller ITS + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdGicItsBase|0|UINT64|0x0120 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdSmmuBase|0|UINT64|0x0121 diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc index b88729ad8ad6..be406144c242 100644 --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc @@ -523,6 +523,10 @@ [PcdsDynamicDefault.common] gArmTokenSpaceGuid.PcdGicDistributorBase|0x4006 gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x4008 + # GIC ITS + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdGicItsBase|0 + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdSmmuBase|0x6005 + # # Set video resolution for boot options # PlatformDxe can set the former at runtime. diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf b/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf index 0501c670d565..97021f7971c7 100644 --- a/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf +++ b/Silicon/Qemu/SbsaQemu/AcpiTables/AcpiTables.inf @@ -75,3 +75,4 @@ [FixedPcd] [Pcd] gArmTokenSpaceGuid.PcdGicDistributorBase gArmTokenSpaceGuid.PcdGicRedistributorsBase + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdGicItsBase diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf index c1c33788567d..14d760b36400 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf @@ -48,6 +48,8 @@ [Pcd] gArmTokenSpaceGuid.PcdGicDistributorBase gArmTokenSpaceGuid.PcdGicRedistributorsBase + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdGicItsBase + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdSmmuBase [Depex] gEfiAcpiTableProtocolGuid ## CONSUMES diff --git a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf index 545794a8c7ff..0e3b11d60426 100644 --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.inf @@ -43,6 +43,7 @@ [Pcd] gArmTokenSpaceGuid.PcdGicDistributorBase gArmTokenSpaceGuid.PcdGicRedistributorsBase + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdGicItsBase [Depex] diff --git a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h index 853b81b34df5..983d17f6fa50 100644 --- a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h +++ b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h @@ -27,6 +27,7 @@ #define SBSAQEMU_MADT_GIC_HBASE 0x2c01 #define SBSAQEMU_MADT_GIC_PMU_IRQ23 #define SBSAQEMU_MADT_GICR_SIZE 0x400 +#define SBSAQEMU_MADT_GITS_SIZE 0x2 // Macro for MADT GIC Redistributor Structure #define SBSAQEMU_MADT_GICR_INIT() { \ @@ -37,6 +38,16 @@ SBSAQEMU_MADT_GICR_SIZE /* DiscoveryRangeLength */ \ } +// Macro for MADT GIC ITS Structure +#define SBSAQEMU_MADT_GIC_ITS_INIT(GicItsId) { \ + EFI_ACPI_6_5_GIC_ITS, /* Type */ \ + sizeof (EFI_ACPI_6_5_GIC_ITS_STRUCTURE), /* Length */ \ + EFI_ACPI_RESERVED_WORD, /* Reserved */
Re: [edk2-devel] [edk2-discuss] PLDM messages via MCTP over KCS
[AMD Official Use Only - General] Hi Aladyshev, We use library class to specify the desire transport interface for the management protocol, such as MCTP, PLDM and IPMI. This way we can flexibly support any transport interface for the management protocol. Here is the example of using ManageabilityPkg, which is PLDM over MCTP over KCS. ManageabilityPkg/Universal/IpmiProtocol/Dxe/IpmiProtocolDxe.inf { ManageabilityTransportLib|ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/DxeManageabilityTransportKcs.inf } ManageabilityPkg/Universal/MctpProtocol/Dxe/MctpProtocolDxe.inf { ManageabilityTransportLib|ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/DxeManageabilityTransportKcs.inf } ManageabilityPkg/Universal/PldmProtocol/Dxe/PldmProtocolDxe.inf { ManageabilityTransportLib|ManageabilityPkg/Library/ManageabilityTransportMctpLib/Dxe/DxeManageabilityTransportMctp.inf } So you can implement ManageabilityTransport library for either industry standard or proprietary implementation for the specific management protocol. BTW, We do have PLDM SMBIOS over MCTP implementation but not upstream yet. Hope this information helps. Thanks Abner > -Original Message- > From: disc...@edk2.groups.io On Behalf Of > Konstantin Aladyshev via groups.io > Sent: Tuesday, August 22, 2023 7:00 PM > To: discuss ; devel@edk2.groups.io > Subject: [edk2-discuss] PLDM messages via MCTP over KCS > > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > Hi! > > I'm trying to build `ManageabilityPkg` from the edk2-platforms > repo to issue PLDM messages via MCTP over KCS. Is it possible with > the current code? I see all the building blocks, but have trouble > putting it all together. > > The main question that bothers me is what implementation should I set > for the `ManageabilityTransportLib`? > By default it is set to dummy `BaseManageabilityTransportNull.inf` > (https://github.com/tianocore/edk2- > platforms/blob/master/Features/ManageabilityPkg/ManageabilityPkg.dsc). > > On one case to get PLDM via MCTP it looks that I need to set it to > `DxeManageabilityTransportMctp.inf` > ManageabilityTransportLib| <...>/DxeManageabilityTransportMctp.inf > (https://github.com/tianocore/edk2- > platforms/blob/master/Features/ManageabilityPkg/Library/ManageabilityTra > nsportMctpLib/Dxe/DxeManageabilityTransportMctp.inf) > > But on the other case if I want MCTP over KCS I need to set it to > `DxeManageabilityTransportKcs.inf` > ManageabilityTransportLib| <...>/DxeManageabilityTransportKcs.inf > (https://github.com/tianocore/edk2- > platforms/blob/master/Features/ManageabilityPkg/Library/ManageabilityTra > nsportKcsLib/Dxe/DxeManageabilityTransportKcs.inf) > > What is the right way to resolve this? > > There are no platforms in the repo that actually implement PLDM/MCTP > functionality, so there is no example that I can use as a reference. > > > Best regards, > Konstantin Aladyshev > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107952): https://edk2.groups.io/g/devel/message/107952 Mute This Topic: https://groups.io/mt/100897530/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] Use C99 flexible arrays
My understanding is zero length arrays have not been legal C code since C89. They may still function as a compiler extension. struct foo { size_t len; char. Str[]0]; }; I seem to remember the reason we did not use the C99 flexible array members is back in the day as Visual Studio 2003 did not have proper C99 support, and did not support it. struct foo { size_t len; char. Str[]]; }; I think the recommended C89 method for doing this is: struct foo { size_t len; char. Str[]1]; }; But that is not backwards compatible as the sizes are different. So it is probably good long term to move to valid C99, but we should verify we did not break anything. Thanks, Andrew Fish > On Aug 21, 2023, at 9:56 AM, ehaouas wrote: > > > Hi, > > No, I didn't. > > De : "Yao, Jiewen" > A : "devel@edk2.groups.io" ,"ehao...@noos.fr" ,"Yao, Jiewen" > Envoyé: lundi 21 Août 2023 16:35 > Objet : RE: [edk2-devel] [PATCH] Use C99 flexible arrays > > Hi > This fix breaks the compatibility. > > Have you tested all features that depends on this data structure? > > Thank you > Yao, Jiewen > > > -Original Message- > > From: devel@edk2.groups.io On Behalf Of Elyes Haouas > > Sent: Sunday, August 20, 2023 8:07 PM > > To: devel@edk2.groups.io > > Cc: Elyes Haouas > > Subject: [edk2-devel] [PATCH] Use C99 flexible arrays > > > > Use C99 flexible arrays instead of older style of one-element or > > zero-length arrays. > > It allows the compiler to generate errors when the flexible array does > > not occur at the end in the structure. > > > > Signed-off-by: Elyes Haouas > > --- > > EmbeddedPkg/Include/fdt.h | 4 ++-- > > .../Library/FrameBufferBltLib/FrameBufferBltLib.c | 2 +- > > MdePkg/Include/IndustryStandard/IpmiNetFnApp.h | 8 > > MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h | 4 ++-- > > MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h | 6 +++--- > > MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h | 8 > > MdePkg/Include/IndustryStandard/PldmSmbiosTransfer.h | 8 > > MdePkg/Include/IndustryStandard/TcgStorageCore.h | 6 +++--- > > MdePkg/Include/Protocol/NetworkInterfaceIdentifier.h | 2 +- > > MdePkg/Include/Protocol/NvdimmLabel.h | 2 +- > > UefiPayloadPkg/Include/Coreboot.h | 10 +- > > 11 files changed, 30 insertions(+), 30 deletions(-) > > > > diff --git a/EmbeddedPkg/Include/fdt.h b/EmbeddedPkg/Include/fdt.h > > index 120dbc8bc6..f64695da5c 100644 > > --- a/EmbeddedPkg/Include/fdt.h > > +++ b/EmbeddedPkg/Include/fdt.h > > @@ -81,14 +81,14 @@ struct fdt_reserve_entry { > > > > > > struct fdt_node_header { > > > > fdt32_t tag; > > > > - char name[0]; > > > > + char name[]; > > > > }; > > > > > > > > struct fdt_property { > > > > fdt32_t tag; > > > > fdt32_t len; > > > > fdt32_t nameoff; > > > > - char data[0]; > > > > + char data[]; > > > > }; > > > > > > > > #endif /* !__ASSEMBLY */ > > > > diff --git a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c > > b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c > > index 432577bcfd..5fc5779e16 100644 > > --- a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c > > +++ b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c > > @@ -24,7 +24,7 @@ struct FRAME_BUFFER_CONFIGURE { > > EFI_PIXEL_BITMASK PixelMasks; > > > > INT8 PixelShl[4]; // R-G-B-Rsvd > > > > INT8 PixelShr[4]; // R-G-B-Rsvd > > > > - UINT8 LineBuffer[0]; > > > > + UINT8 LineBuffer[]; > > > > }; > > > > > > > > CONST EFI_PIXEL_BITMASK mRgbPixelMasks = { > > > > diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h > > b/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h > > index b6bc91f46c..b5174a5042 100644 > > --- a/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h > > +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h > > @@ -433,7 +433,7 @@ typedef union { > > typedef struct { > > > > UINT8 CompletionCode; > > > > IPMI_GET_MESSAGE_CHANNEL_NUMBER ChannelNumber; > > > > - UINT8 MessageData[0]; > > > > + UINT8 MessageData[]; > > > > } IPMI_GET_MESSAGE_RESPONSE; > > > > > > > > // > > > > @@ -457,12 +457,12 @@ typedef union { > > typedef struct { > > > > UINT8 CompletionCode; > > > > IPMI_SEND_MESSAGE_CHANNEL_NUMBER ChannelNumber; > > > > - UINT8 MessageData[0]; > > > > + UINT8 MessageData[]; > > > > } IPMI_SEND_MESSAGE_REQUEST; > > > > > > > > typedef struct { > > > > UINT8 CompletionCode; > > > > - UINT8 ResponseData[0]; > > > > + UINT8 ResponseData[]; > > > > } IPMI_SEND_MESSAGE_RESPONSE; > > > > > > > > // > > > > @@ -906,7 +906,7 @@ typedef union { > > typedef struct { > > > > IPMI_SET_USER_PASSWORD_USER_ID UserId; > > > > IPMI_SET_USER_PASSWORD_OPERATION Operation; > > > > - UINT8 PasswordData[0]; // 16 or 20 bytes, depending on the > > 'PasswordSize' field > > > > + UINT8 PasswordData[]; // 16 or 20 bytes, depending on the > > 'PasswordSize' field > > > > } IPMI_SET_USER_PASSWORD_REQUEST; > > > > > > > > // > > > > diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h > >
[edk2-devel] PLDM messages via MCTP over KCS
Hi! I'm trying to build `ManageabilityPkg` from the edk2-platforms repo to issue PLDM messages via MCTP over KCS. Is it possible with the current code? I see all the building blocks, but have trouble putting it all together. The main question that bothers me is what implementation should I set for the `ManageabilityTransportLib`? By default it is set to dummy `BaseManageabilityTransportNull.inf` (https://github.com/tianocore/edk2-platforms/blob/master/Features/ManageabilityPkg/ManageabilityPkg.dsc). On one case to get PLDM via MCTP it looks that I need to set it to `DxeManageabilityTransportMctp.inf` ManageabilityTransportLib| <...>/DxeManageabilityTransportMctp.inf (https://github.com/tianocore/edk2-platforms/blob/master/Features/ManageabilityPkg/Library/ManageabilityTransportMctpLib/Dxe/DxeManageabilityTransportMctp.inf) But on the other case if I want MCTP over KCS I need to set it to `DxeManageabilityTransportKcs.inf` ManageabilityTransportLib| <...>/DxeManageabilityTransportKcs.inf (https://github.com/tianocore/edk2-platforms/blob/master/Features/ManageabilityPkg/Library/ManageabilityTransportKcsLib/Dxe/DxeManageabilityTransportKcs.inf) What is the right way to resolve this? There are no platforms in the repo that actually implement PLDM/MCTP functionality, so there is no example that I can use as a reference. Best regards, Konstantin Aladyshev -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107950): https://edk2.groups.io/g/devel/message/107950 Mute This Topic: https://groups.io/mt/100891597/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v3 1/1] MdePkg: Add Cxl20.h into IndustryStandard
Hi Mike and Foster, So the preferred definition is as below? RegisterBlock[]; // offset 0x0C From: Nong, Foster Sent: Monday, August 21, 2023 9:59 AM To: Kinney, Michael D; Chris Li OS; devel@edk2.groups.io; Gao, Liming Cc: Yao, Jiewen; Ni, Ray; Open Source Submission Subject: RE: [edk2-devel] [PATCH v3 1/1] MdePkg: Add Cxl20.h into IndustryStandard Hi Mike, Yes. In CXL SPEC chapter 8.1.9, the number of register blocks need calculate from DVSEC length value of DVSEC header1 register. -Original Message- From: Kinney, Michael D Sent: Friday, August 18, 2023 11:30 PM To: Chris Li OS ; devel@edk2.groups.io; Nong, Foster ; Gao, Liming Cc: Yao, Jiewen ; Ni, Ray ; Open Source Submission ; Kinney, Michael D Subject: RE: [edk2-devel] [PATCH v3 1/1] MdePkg: Add Cxl20.h into IndustryStandard Is RegisterBlock a flexible array member? If so, then [] is the compatible syntax. Mike > -Original Message- > From: Chris Li OS > Sent: Friday, August 18, 2023 2:29 AM > To: devel@edk2.groups.io; Nong, Foster ; Gao, > Liming > Cc: Yao, Jiewen ; Ni, Ray ; > Kinney, Michael D ; Open Source Submission > > Subject: [edk2-devel] [PATCH v3 1/1] MdePkg: Add Cxl20.h into > IndustryStandard > > Absorbed Foster's input with minor delta. > @Nong, Foster @Liming and all kindly help review/vote again. > > One change compared with Intel's proposal is the below line, we prefer > [1] style to be safer to work across all compilers. > Let us know if you folks have different suggestions here. > > > - CXL_DVSEC_REGISTER_LOCATOR_REGISTER_BLOCK > RegisterBlock[0]; // offset 0x0C > + CXL_DVSEC_REGISTER_LOCATOR_REGISTER_BLOCK > RegisterBlock[1]; // offset 0x0C > > > Thanks all! > > - > 1) Add CXL 2.0 header file to comply with CXL 2.0 specification > 2) CXL 2.0 header will embed Cxl11.h > 3) Updated Cxl.h to point to 2.0 header file > > Signed-off-by: Chris Li > --- > MdePkg/Include/IndustryStandard/Cxl.h | 2 +- > MdePkg/Include/IndustryStandard/Cxl20.h | 465 > > 2 files changed, 466 insertions(+), 1 deletion(-) create mode 100644 > MdePkg/Include/IndustryStandard/Cxl20.h > > diff --git a/MdePkg/Include/IndustryStandard/Cxl.h > b/MdePkg/Include/IndustryStandard/Cxl.h > index 06c1230e3e..9ad3242e25 100644 > --- a/MdePkg/Include/IndustryStandard/Cxl.h > +++ b/MdePkg/Include/IndustryStandard/Cxl.h > @@ -12,7 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #ifndef _CXL_MAIN_H_ #define _CXL_MAIN_H_ > > -#include > +#include > // > // CXL assigned new Vendor ID > // > diff --git a/MdePkg/Include/IndustryStandard/Cxl20.h > b/MdePkg/Include/IndustryStandard/Cxl20.h > new file mode 100644 > index 00..a5fe22b4a2 > --- /dev/null > +++ b/MdePkg/Include/IndustryStandard/Cxl20.h > @@ -0,0 +1,465 @@ > +/** @file > + CXL 2.0 Register definitions > + > + This file contains the register definitions based on the Compute > Express Link > + (CXL) Specification Revision 2.0. > + > + Copyright (c) 2023, Ampere Computing LLC. All rights reserved. > + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > +#ifndef CXL20_H_ > +#define CXL20_H_ > + > +#include > + > +// > +// CXL DVSEC IDs > +// Compute Express Link Specification Revision 2.0 - Chapter 8.1.1 // > +#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_CXL_DEVICE0x0 > +#define CXL_DVSEC_ID_NON_CXL_FUNCTION_MAP 0x2 > +#define CXL_DVSEC_ID_CXL20_EXTENSIONS_DVSEC_FOR_PORTS 0x3 > +#define CXL_DVSEC_ID_GPF_DVSEC_FOR_CXL_PORTS 0x4 > +#define CXL_DVSEC_ID_GPF_DVSEC_FOR_CXL_DEVICES0x5 > +#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_FLEX_BUS_PORT 0x7 > +#define CXL_DVSEC_ID_REGISTER_LOCATOR 0x8 > +#define CXL_DVSEC_ID_MLD 0x9 > +#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_TEST_CAPABILITY 0xA > + > +// > +// Register Block ID > +// Compute Express Link Specification Revision 2.0 - Chapter 8.1.9.1 > +// > +#define CXL_REGISTER_BLOCK_ID_EMPTY 0x0 > +#define CXL_REGISTER_BLOCK_ID_COMPONENT 0x1 > +#define CXL_REGISTER_BLOCK_ID_BAR_VIRTUALIZATION_ACL 0x2 > +#define CXL_REGISTER_BLOCK_ID_DEVICE 0x3 > + > +// > +// CXL component register layout > +// Compute Express Link Specification Revision 2.0 - Chapter 8.2.4 // > +//|| > +//|- Range & Type -| > +//|| IO Base - 0KB > +//| (0KB - 4KB)IO Regs | > +//|| Cache and Mem Base - 4KB > +//| {4KB - 8KB)Cache & Mem Regs| > +//|| Implementation Spec Regs > +Base - > 8KB > +//| (8KB - 56KB)Implement Spec Regs| > +//|| ARB/Mux Regs Base - 56KB > +//| (56KB - 57KB)ARBMUX Regs | >
Re: [edk2-devel] [RFC/RFT PATCH] OvmfPkg/IoMmuDxe: don't rely on TPLs for re-entrancy
On Tue, 22 Aug 2023 at 08:25, Gerd Hoffmann wrote: > > On Thu, Jul 20, 2023 at 03:45:57PM +0200, Ard Biesheuvel wrote: > > Instead of relying on raising the TPL to protect the critical sections > > that manipulate the global bitmask that keeps track of bounce buffer > > allocations, use compare-and-exchange to manage the global variable, and > > tweak the logic to line up with that. > > > > Given that IoMmuDxe implements a singleton protocol that is shared > > between multiple drivers, and considering the elaborate and confusing > > requirements in the UEFP spec regarding TPL levels at which protocol > > methods may be invoked, not relying on TPL levels at all is a more > > robust approach in this case. > > > > Cc: Gerd Hoffmann > > Cc: Jiewen Yao > > Cc: Michael Brown > > Link: https://bugzilla.redhat.com/show_bug.cgi?id=2211060 > > Signed-off-by: Ard Biesheuvel > > Looks good to me. > > What is the status? Merged? Or waiting for testing still? If so I can > create a test build with the patch and ask our QE department to check > it. > Still waiting for testing, so yes, please test. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107948): https://edk2.groups.io/g/devel/message/107948 Mute This Topic: https://groups.io/mt/100256049/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] OvmfPkg/RiscVVirt: Fix issues in VarStore Blockmap config
Hi Liming, This is a bug fix and can cause data loss if the variable size > 4k. Can it be included for the edk2-stable202308? Let me know if it requires a BZ id. I tried running the CI tests for this patch. But 2 of tests failed and I don't think it has anything to do with this patch. If you are ok to take this patch for the stable release, could you please let me know what needs to be done? PR : https://github.com/tianocore/edk2/pull/4754 Thanks! Sunil On Wed, Aug 16, 2023 at 02:33:00PM +0530, Sunil V L via groups.io wrote: > On Wed, Aug 16, 2023 at 07:08:58AM +, Li, Yong wrote: > > Hi Sunil, > > > > Qingyu is from Penglai team, when we were working together in enabling > > StandaloneMm variable service, > > we found an issue in OvmfPkg/RiscVVirt/VarStore.fdf.inc, in which the > > blockmap config is not aligned with the value in > > OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashStaticLib.c, > > which is SIZE_256KB > > > > That mis-alignment won't cause any issue if the variable size is small and > > less than 0x1000, but if store more data in the flash device then it will > > cause data loss issue during reboot. > > Once reboot if any FV header data is corrupted it will result the whole > > variable system be re-initialized. > > > > Please help review the patch and give the comments, thanks > > > Hi Yong Li, > > Thank you very much for providing the context. Sorry, I actually had > missed this. > > Hi Quingyu Shang, > > The patch LGTM. Thanks a lot for finding the issue and fixing it. In > future, could you please run BaseTools/Scripts/GetMaintainer.py on the > patches and CC all the people it lists using "Cc:" tag? > > Reviewed-by: Sunil V L > > Thanks! > Sunil > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107947): https://edk2.groups.io/g/devel/message/107947 Mute This Topic: https://groups.io/mt/100684601/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [RFC/RFT PATCH] OvmfPkg/IoMmuDxe: don't rely on TPLs for re-entrancy
On Thu, Jul 20, 2023 at 03:45:57PM +0200, Ard Biesheuvel wrote: > Instead of relying on raising the TPL to protect the critical sections > that manipulate the global bitmask that keeps track of bounce buffer > allocations, use compare-and-exchange to manage the global variable, and > tweak the logic to line up with that. > > Given that IoMmuDxe implements a singleton protocol that is shared > between multiple drivers, and considering the elaborate and confusing > requirements in the UEFP spec regarding TPL levels at which protocol > methods may be invoked, not relying on TPL levels at all is a more > robust approach in this case. > > Cc: Gerd Hoffmann > Cc: Jiewen Yao > Cc: Michael Brown > Link: https://bugzilla.redhat.com/show_bug.cgi?id=2211060 > Signed-off-by: Ard Biesheuvel Looks good to me. What is the status? Merged? Or waiting for testing still? If so I can create a test build with the patch and ask our QE department to check it. take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107946): https://edk2.groups.io/g/devel/message/107946 Mute This Topic: https://groups.io/mt/100256049/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] OvmfPkg: Disable PcdFirstTimeWakeUpAPsBySipi.
On Tue, Aug 22, 2023 at 09:57:14AM +0800, YuanhaoXie wrote: > Disable PcdFirstTimeWakeUpAPsBySipi for IntelTdx, Microvm, and Xen to > preserve the original execution of INIT-SIPI-SIPI. > > Cc: Eric Dong > Cc: Ray Ni > Cc: Rahul Kumar > Cc: Gerd Hoffmann > Cc: Ard Biesheuvel > Cc: Jiewen Yao > Cc: Jordan Justen > Signed-off-by: Yuanhao Xie Acked-by: Gerd Hoffmann -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107945): https://edk2.groups.io/g/devel/message/107945 Mute This Topic: https://groups.io/mt/100887108/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 2/2] OvmfPkg/AmdSev: Disable PcdFirstTimeWakeUpAPsBySipti
On Wed, Aug 16, 2023 at 03:11:46PM -0500, Michael Roth wrote: > PcdFirstTimeWakeUpAPsBySipi was recently introduced to indicate when > the full INIT-SIPI-SIPI sequence can be skipped for AP bringup. It is > true by default, but needs to be disabled for QEMU/OVMF where early INIT > is not simulated. Commit 1d76560146 ("OvmfPkg: Disable > PcdFirstTimeWakeUpAPsBySipi.") added changes to disable it > by default for OvmfPkg, but a similar change was not made for the > AmdSev package. This breaks booting of SEV and SNP guests. > > Fix this defaulting PcdFirstTimeWakeUpAPsBySipi to false for AmdSev > package, as was previously done for OvmfPkg variants. Yuanhao Xie has sent a patch for IntelTdx, Microvm and Xen, so we can take this as-is. Acked-by: Gerd Hoffmann take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107944): https://edk2.groups.io/g/devel/message/107944 Mute This Topic: https://groups.io/mt/100787520/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-