Re: [edk2-devel] [edk2 PATCH] MdePkg: Use same ProcessorBind symbol define for RISCV64
Hi Pedro, There are 3 different include guard names for ProcessorBind.h file. AArch64/Arm/Ebc/Ia32/X64 use __PROCESSOR_BIND_H__ (start/end with 2 underscore characters). RISCV64 uses PROCESSOR_BIND_H__ (end with 2 underscore) LoongArch64 uses PROCESSOR_BIND_H_ (end with 1 underscore) From the code rule of uniform style, I think it is also a necessary change to same include guard name. If you still think we shouldn't have the change, I am okay to close this patch. Thanks. Best regards, Gavin -Original Message- From: Pedro Falcato Sent: Tuesday, July 4, 2023 1:02 AM To: devel@edk2.groups.io; Kinney, Michael D Cc: Xue, Gavin ; suni...@ventanamicro.com; Warkentin, Andrei ; Wang, Yimin ; Sheng, Alan Subject: Re: [edk2-devel] [edk2 PATCH] MdePkg: Use same ProcessorBind symbol define for RISCV64 On Fri, Jun 30, 2023 at 5:59 PM Michael D Kinney wrote: > > Using the same include guard define name is preferred. > > Why was anything other than that considered? I don't see the point of making the include guard an actual part of the "API". Consumers should not depend on it being named $WHATEVER. That is a hack. Include guards are an implementation detail and making that stable actively stops you from doing things like using #pragma once or fixing the __DOUBLE_UNDERSCORE_H__ stuff. So I would vote for not changing this, downstream consumers that rely on __PROCESSOR_BIND_H__ should be fixed, downstream. -- Pedro -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106655): https://edk2.groups.io/g/devel/message/106655 Mute This Topic: https://groups.io/mt/99567569/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] Updated Event: TianoCore Community Meeting - APAC/NAMO - Thursday, July 13, 2023 #cal-invite
BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Groups.io Inc//Groups.io Calendar//EN METHOD:PUBLISH REFRESH-INTERVAL;VALUE=DURATION:PT1H X-PUBLISHED-TTL:PT1H CALSCALE:GREGORIAN BEGIN:VTIMEZONE TZID:America/Los_Angeles LAST-MODIFIED:20230407T050750Z TZURL:https://www.tzurl.org/zoneinfo-outlook/America/Los_Angeles X-LIC-LOCATION:America/Los_Angeles BEGIN:DAYLIGHT TZNAME:PDT TZOFFSETFROM:-0800 TZOFFSETTO:-0700 DTSTART:19700308T02 RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU END:DAYLIGHT BEGIN:STANDARD TZNAME:PST TZOFFSETFROM:-0700 TZOFFSETTO:-0800 DTSTART:19701101T02 RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU END:STANDARD END:VTIMEZONE BEGIN:VEVENT X-GIOIDS:Event:1940328 UID:ybft.1625609771060160028.z...@groups.io DTSTAMP:20230705T045855Z ORGANIZER;CN=Miki Demeter:mailto:devel@edk2.groups.io DTSTART:20230714T023000Z DTEND:20230714T033000Z SUMMARY:TianoCore Community Meeting - APAC/NAMO DESCRIPTION:_ ___\n\nMicrosoft Teams meeting\n\n*Join on your computer or mobile app*\n\nClick here to join the meeting ( https://teams.microsof t.com/l/meetup-join/19%3ameeting_Y2M1NDE3ODYtN2M3Yy00MDMxLTk3OWYtMTlkNjhl NWFlMjA2%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496- 4ed7712e255d%22%2c%22Oid%22%3a%226e4ce4c4-1242-431b-9a51-92cd01a5df3c%22% 7d )\n\nMeeting ID: 283 318 374 436\nPasscode: 633zLo\n\nDownload Teams ( https://www.microsoft.com/en-us/microsoft-teams/download-app ) | Join on the web ( https://www.microsoft.com/microsoft-teams/join-a-meeting )\n\n *Join with a video conferencing device*\n\nte...@conf.intel.com\n\nVideo Conference ID: 119 493 012 8\n\nAlternate VTC instructions ( https://conf .intel.com/teams/?conf=1194930128=teams=conf.intel.com=test_ca ll )\n\nLearn More ( https://aka.ms/JoinTeamsMeeting ) | Meeting options ( https://teams.microsoft.com/meetingOptions/?organizerId=6e4ce4c4-1242-4 31b-9a51-92cd01a5df3c=46c98d88-e344-4ed4-8496-4ed7712e255d dId=19_meeting_Y2M1NDE3ODYtN2M3Yy00MDMxLTk3OWYtMTlkNjhlNWFlMjA2@thread.v2 =0=en-US )\n\n LOCATION:https://teams.microsoft.com/l/meetup-join/19%3ameeting_Y2M1NDE3O DYtN2M3Yy00MDMxLTk3OWYtMTlkNjhlNWFlMjA2%40thread.v2/0?context=%7b%22Tid%2 2%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%226e4ce4c4- 1242-431b-9a51-92cd01a5df3c%22%7d RECURRENCE-ID:20230707T023000Z SEQUENCE:2 END:VEVENT END:VCALENDAR invite.ics Description: application/ics
[edk2-devel] Updated Event: TianoCore Community Meeting EMEA/NAMO - Thursday, July 13, 2023 #cal-invite
BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Groups.io Inc//Groups.io Calendar//EN METHOD:PUBLISH REFRESH-INTERVAL;VALUE=DURATION:PT1H X-PUBLISHED-TTL:PT1H CALSCALE:GREGORIAN BEGIN:VTIMEZONE TZID:America/Los_Angeles LAST-MODIFIED:20230407T050750Z TZURL:https://www.tzurl.org/zoneinfo-outlook/America/Los_Angeles X-LIC-LOCATION:America/Los_Angeles BEGIN:DAYLIGHT TZNAME:PDT TZOFFSETFROM:-0800 TZOFFSETTO:-0700 DTSTART:19700308T02 RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU END:DAYLIGHT BEGIN:STANDARD TZNAME:PST TZOFFSETFROM:-0700 TZOFFSETTO:-0800 DTSTART:19701101T02 RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU END:STANDARD END:VTIMEZONE BEGIN:VEVENT X-GIOIDS:Event:1940331 UID:u7v8.1660766102568797982.u...@groups.io DTSTAMP:20230705T045835Z ORGANIZER;CN=Miki Demeter:mailto:devel@edk2.groups.io DTSTART:20230713T15Z DTEND:20230713T16Z SUMMARY:TianoCore Community Meeting EMEA/NAMO DESCRIPTION:_ ___\n\nMicrosoft Teams meeting\n\n*Join on your computer or mobile app*\n\nClick here to join the meeting ( https://teams.microsof t.com/l/meetup-join/19%3ameeting_MTAyZGJhNjMtYzQ4Mi00MTUxLWFlMWMtOGU0MWNl ZDk4NjY5%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496- 4ed7712e255d%22%2c%22Oid%22%3a%226e4ce4c4-1242-431b-9a51-92cd01a5df3c%22% 7d )\n\nMeeting ID: 226 323 011 029\nPasscode: hMRCj6\n\nDownload Teams ( https://www.microsoft.com/en-us/microsoft-teams/download-app ) | Join on the web ( https://www.microsoft.com/microsoft-teams/join-a-meeting )\n\n *Join with a video conferencing device*\n\nte...@conf.intel.com\n\nVideo Conference ID: 112 716 814 3\n\nAlternate VTC instructions ( https://conf .intel.com/teams/?conf=1127168143=teams=conf.intel.com=test_ca ll )\n\nLearn More ( https://aka.ms/JoinTeamsMeeting ) | Meeting options ( https://teams.microsoft.com/meetingOptions/?organizerId=6e4ce4c4-1242-4 31b-9a51-92cd01a5df3c=46c98d88-e344-4ed4-8496-4ed7712e255d dId=19_meeting_MTAyZGJhNjMtYzQ4Mi00MTUxLWFlMWMtOGU0MWNlZDk4NjY5@thread.v2 =0=en-US )\n\n LOCATION:Microsoft Teams meeting Join on your computer or mobile app Cl ick here to join the meeting Meeting ID: 226 323 011 029 Passcode: hMRC j6 Download Teams | Join on the web Join with a video conferencing devic e te...@conf.intel.com Video Conference ID: 112 716 814 3 Alternate VT C instructions Learn More | Meeting options RECURRENCE-ID:20230706T15Z SEQUENCE:2 END:VEVENT END:VCALENDAR invite.ics Description: application/ics
[edk2-devel] [PATCH] RedfishPkg/RedfishDebugLib: add new interfaces
Introduce DumpHiiStatementValue() and DumpRedfishValue() to RedfishDebugLib. Application uses these functions to debug print the value of HII_STATEMENT_VALUE and EDKII_REDFISH_VALUE. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- RedfishPkg/Include/Library/RedfishDebugLib.h | 33 + .../Library/RedfishDebugLib/RedfishDebugLib.c | 113 ++ 2 files changed, 146 insertions(+) diff --git a/RedfishPkg/Include/Library/RedfishDebugLib.h b/RedfishPkg/Include/Library/RedfishDebugLib.h index 73f1469ac62b..da7e0d0bc9fc 100644 --- a/RedfishPkg/Include/Library/RedfishDebugLib.h +++ b/RedfishPkg/Include/Library/RedfishDebugLib.h @@ -11,12 +11,45 @@ #define REDFISH_DEBUG_LIB_H_ #include +#include #include #include +#include + #define DEBUG_REDFISH_NETWORK DEBUG_MANAGEABILITY ///< Debug error level for Redfish networking function #define DEBUG_REDFISH_HOST_INTERFACE DEBUG_MANAGEABILITY ///< Debug error level for Redfish networking function +/** + Debug print the value of StatementValue. + + @param[in] ErrorLevel DEBUG macro error level. + @param[in] StatementValue The statement value to print. + + @retval EFI_SUCCESSStatementValue is printed. + @retval EFI_INVALID_PARAMETER StatementValue is NULL. +**/ +EFI_STATUS +DumpHiiStatementValue ( + IN UINTNErrorLevel, + IN HII_STATEMENT_VALUE *StatementValue + ); + +/** + Debug print the value of RedfishValue. + + @param[in] ErrorLevel DEBUG macro error level. + @param[in] RedfishValue The statement value to print. + + @retval EFI_SUCCESSRedfishValue is printed. + @retval EFI_INVALID_PARAMETER RedfishValue is NULL. +**/ +EFI_STATUS +DumpRedfishValue ( + IN UINTNErrorLevel, + IN EDKII_REDFISH_VALUE *RedfishValue + ); + /** This function dump the Json string in given error level. diff --git a/RedfishPkg/Library/RedfishDebugLib/RedfishDebugLib.c b/RedfishPkg/Library/RedfishDebugLib/RedfishDebugLib.c index 6f1d9de25e0a..0b2a9a5c4ec8 100644 --- a/RedfishPkg/Library/RedfishDebugLib/RedfishDebugLib.c +++ b/RedfishPkg/Library/RedfishDebugLib/RedfishDebugLib.c @@ -22,6 +22,119 @@ #define REDFISH_JSON_STRING_LENGTH 200 #define REDFISH_JSON_OUTPUT_FORMAT (EDKII_JSON_COMPACT | EDKII_JSON_INDENT(2)) +/** + Debug print the value of StatementValue. + + @param[in] ErrorLevel DEBUG macro error level. + @param[in] StatementValue The statement value to print. + + @retval EFI_SUCCESSStatementValue is printed. + @retval EFI_INVALID_PARAMETER StatementValue is NULL. +**/ +EFI_STATUS +DumpHiiStatementValue ( + IN UINTNErrorLevel, + IN HII_STATEMENT_VALUE *StatementValue + ) +{ + if (StatementValue == NULL) { +return EFI_INVALID_PARAMETER; + } + + DEBUG ((ErrorLevel, "BufferValueType: 0x%x\n", StatementValue->BufferValueType)); + DEBUG ((ErrorLevel, "BufferLen: 0x%x\n", StatementValue->BufferLen)); + DEBUG ((ErrorLevel, "Buffer:0x%p\n", StatementValue->Buffer)); + DEBUG ((ErrorLevel, "Type: 0x%p\n", StatementValue->Type)); + + switch (StatementValue->Type) { +case EFI_IFR_TYPE_NUM_SIZE_8: + DEBUG ((ErrorLevel, "Value: 0x%x\n", StatementValue->Value.u8)); + break; +case EFI_IFR_TYPE_NUM_SIZE_16: + DEBUG ((ErrorLevel, "Value: 0x%x\n", StatementValue->Value.u16)); + break; +case EFI_IFR_TYPE_NUM_SIZE_32: + DEBUG ((ErrorLevel, "Value: 0x%x\n", StatementValue->Value.u32)); + break; +case EFI_IFR_TYPE_NUM_SIZE_64: + DEBUG ((ErrorLevel, "Value: 0x%lx\n", StatementValue->Value.u64)); + break; +case EFI_IFR_TYPE_BOOLEAN: + DEBUG ((ErrorLevel, "Value: %a\n", (StatementValue->Value.b ? "true" : "false"))); + break; +case EFI_IFR_TYPE_STRING: + DEBUG ((ErrorLevel, "Value: 0x%x\n", StatementValue->Value.string)); + break; +case EFI_IFR_TYPE_TIME: +case EFI_IFR_TYPE_DATE: +default: + break; + } + + return EFI_SUCCESS; +} + +/** + Debug print the value of RedfishValue. + + @param[in] ErrorLevel DEBUG macro error level. + @param[in] RedfishValue The statement value to print. + + @retval EFI_SUCCESSRedfishValue is printed. + @retval EFI_INVALID_PARAMETER RedfishValue is NULL. +**/ +EFI_STATUS +DumpRedfishValue ( + IN UINTNErrorLevel, + IN EDKII_REDFISH_VALUE *RedfishValue + ) +{ + UINTN Index; + + if (RedfishValue == NULL) { +return EFI_INVALID_PARAMETER; + } + + DEBUG ((ErrorLevel, "Type: 0x%x\n", RedfishValue->Type)); + DEBUG ((ErrorLevel, "ArrayCount: 0x%x\n", RedfishValue->ArrayCount)); + + switch (RedfishValue->Type) { +case RedfishValueTypeInteger: + DEBUG ((ErrorLevel, "Value: 0x%x\n", RedfishValue->Value.Integer)); + break; +case RedfishValueTypeBoolean: + DEBUG ((ErrorLevel, "Value: %a\n",
Re: [edk2-devel] [Patch V4 0/5] Eliminate the second INIT-SIPI-SIPI sequence
Reviewed-by: Ray Ni > -Original Message- > From: devel@edk2.groups.io On Behalf Of Yuanhao Xie > Sent: Wednesday, June 28, 2023 4:47 PM > To: devel@edk2.groups.io > Subject: [edk2-devel] [Patch V4 0/5] Eliminate the second INIT-SIPI-SIPI > sequence > > To speed up MP initialization, this set of patches replaces the > time-consuming init-sipi-sipi process in the DXE phase. Instead, > a start-up signal is used to wake up the APs and switch context > from the PEI phase to the DXE phase. This optimization is > effective when both PEI and DXE operate in the same bit mode. > The current HOB characterized by mCpuInitMpLibHobGuid has > two purposes: > Acting as a global variable for the PEI phase. > Transferring information from the PEI phase to the DXE phase. > This series of patches creates a new HOB specifically designed > to transfer only the minimal necessary information > (MpHandoff structure) from the PEI phase to the DXE phase. > > YuanhaoXie (5): > UefiCpuPkg: Refactor the logic for placing APs in HltLoop. > UefiCpuPkg: Refactor the logic for placing APs in Mwait/Runloop. > UefiCpuPkg: Create MpHandOff. > UefiCpuPkg: ApWakeupFunction directly use CpuMpData. > UefiCpuPkg: Eliminate the second INIT-SIPI-SIPI sequence. > > UefiCpuPkg/Library/MpInitLib/AmdSev.c | 17 + > UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf | 1 + > UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm | 4 ++-- > UefiCpuPkg/Library/MpInitLib/MpHandOff.h | 47 > +++ > UefiCpuPkg/Library/MpInitLib/MpLib.c | 345 > + > + > + > + > - > UefiCpuPkg/Library/MpInitLib/MpLib.h | 28 > > UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf | 2 +- > UefiCpuPkg/Library/MpInitLib/PeiMpLib.c| 32 > +++- > UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 3 +-- > 9 files changed, 408 insertions(+), 71 deletions(-) > create mode 100644 UefiCpuPkg/Library/MpInitLib/MpHandOff.h > > -- > 2.36.1.windows.1 > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106651): https://edk2.groups.io/g/devel/message/106651 Mute This Topic: https://groups.io/mt/99826554/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [RFC][PATCH][edk2-redfish-client] RedfishClientPkg: rename RedfishResourceIdentifyLibComuterSystem
[AMD Official Use Only - General] Reviewed-by: Abner Chang Thanks for catching this, all good except the [RFC] tag in the subject. Abner > -Original Message- > From: Mike Maslenkin > Sent: Tuesday, July 4, 2023 6:36 AM > To: devel@edk2.groups.io > Cc: Chang, Abner ; nick...@nvidia.com; > ig...@ami.com; Mike Maslenkin > Subject: [RFC][PATCH][edk2-redfish-client] RedfishClientPkg: rename > RedfishResourceIdentifyLibComuterSystem > > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > This patch fixes misprint in name of a directory and its files. > The name of these files should be > RedfishResourceIdentifyLibComputerSystem > as well as implemented library instance. > > Signed-off-by: Mike Maslenkin > Cc: Abner Chang > Cc: Nickle Wang > Cc: Igor Kulchytskyy > --- > > There is no history for this library in the new repo, so this misprint can > be easily fixed. I found this issue during RedfishClientPkg investigation. > I missed this library while I was grepping sources. > Here is a PR https://github.com/tianocore/edk2-redfish-client/pull/44 > All checks have passed. > > --- > .../v1_5_0/RedfishResourceIdentifyLibComputerSystem.c} | 2 +- > .../v1_5_0/RedfishResourceIdentifyLibComputerSystem.inf}| 6 +++--- > RedfishClientPkg/RedfishClientComponents.dsc.inc| 2 +- > 3 files changed, 5 insertions(+), 5 deletions(-) > rename > RedfishClientPkg/Library/{RedfishResourceIdentifyLibComuterSystem/v1_5_ > 0/RedfishResourceIdentifyLibComuterSystem.c => > RedfishResourceIdentifyLibComputerSystem/v1_5_0/RedfishResourceIdentif > yLibComputerSystem.c} (95%) > rename > RedfishClientPkg/Library/{RedfishResourceIdentifyLibComuterSystem/v1_5_ > 0/RedfishResourceIdentifyLibComuterSystem.inf => > RedfishResourceIdentifyLibComputerSystem/v1_5_0/RedfishResourceIdentif > yLibComputerSystem.inf} (82%) > > diff --git > a/RedfishClientPkg/Library/RedfishResourceIdentifyLibComuterSystem/v1_5 > _0/RedfishResourceIdentifyLibComuterSystem.c > b/RedfishClientPkg/Library/RedfishResourceIdentifyLibComputerSystem/v1_ > 5_0/RedfishResourceIdentifyLibComputerSystem.c > similarity index 95% > rename from > RedfishClientPkg/Library/RedfishResourceIdentifyLibComuterSystem/v1_5_0 > /RedfishResourceIdentifyLibComuterSystem.c > rename to > RedfishClientPkg/Library/RedfishResourceIdentifyLibComputerSystem/v1_5_ > 0/RedfishResourceIdentifyLibComputerSystem.c > index 1e9c181aa61a..29b4f525d5ff 100644 > --- > a/RedfishClientPkg/Library/RedfishResourceIdentifyLibComuterSystem/v1_5 > _0/RedfishResourceIdentifyLibComuterSystem.c > +++ > b/RedfishClientPkg/Library/RedfishResourceIdentifyLibComputerSystem/v1_ > 5_0/RedfishResourceIdentifyLibComputerSystem.c > @@ -144,7 +144,7 @@ RestJasonStructureProtocolIsReady ( > **/ > > EFI_STATUS > > EFIAPI > > -RedfishResourceIdentifyComuterSystemConstructor ( > > +RedfishResourceIdentifyComputerSystemConstructor ( > >IN EFI_HANDLEImageHandle, > >IN EFI_SYSTEM_TABLE *SystemTable > >) > > diff --git > a/RedfishClientPkg/Library/RedfishResourceIdentifyLibComuterSystem/v1_5 > _0/RedfishResourceIdentifyLibComuterSystem.inf > b/RedfishClientPkg/Library/RedfishResourceIdentifyLibComputerSystem/v1_ > 5_0/RedfishResourceIdentifyLibComputerSystem.inf > similarity index 82% > rename from > RedfishClientPkg/Library/RedfishResourceIdentifyLibComuterSystem/v1_5_0 > /RedfishResourceIdentifyLibComuterSystem.inf > rename to > RedfishClientPkg/Library/RedfishResourceIdentifyLibComputerSystem/v1_5_ > 0/RedfishResourceIdentifyLibComputerSystem.inf > index ae269b58496e..2bbe20c3c51f 100644 > --- > a/RedfishClientPkg/Library/RedfishResourceIdentifyLibComuterSystem/v1_5 > _0/RedfishResourceIdentifyLibComuterSystem.inf > +++ > b/RedfishClientPkg/Library/RedfishResourceIdentifyLibComputerSystem/v1_ > 5_0/RedfishResourceIdentifyLibComputerSystem.inf > @@ -8,19 +8,19 @@ > > > [Defines] > >INF_VERSION= 0x00010006 > > - BASE_NAME = RedfishResourceIdentifyLibComuterSystem > > + BASE_NAME = RedfishResourceIdentifyLibComputerSystem > >FILE_GUID = 2AEE2C80-126A-44A6-877E-642F20510D13 > >MODULE_TYPE= DXE_DRIVER > >VERSION_STRING = 1.0 > >LIBRARY_CLASS = RedfishResourceIdentifyLib| DXE_DRIVER > > - CONSTRUCTOR= > RedfishResourceIdentifyComuterSystemConstructor > > + CONSTRUCTOR= > RedfishResourceIdentifyComputerSystemConstructor > > > > # > > # VALID_ARCHITECTURES = IA32 X64 EBC > > # > > > > [Sources] > > - RedfishResourceIdentifyLibComuterSystem.c > > + RedfishResourceIdentifyLibComputerSystem.c > > > > [Packages] > >MdePkg/MdePkg.dec > > diff --git a/RedfishClientPkg/RedfishClientComponents.dsc.inc > b/RedfishClientPkg/RedfishClientComponents.dsc.inc > index
Re: [edk2-devel] [PATCH 0/2][edk2-redfish-client] fix trivial misprint
[AMD Official Use Only - General] Thank you Mike, please just create a PR for this. Abner > -Original Message- > From: Mike Maslenkin > Sent: Tuesday, July 4, 2023 5:38 AM > To: devel@edk2.groups.io > Cc: Chang, Abner ; nick...@nvidia.com; > ig...@ami.com; Mike Maslenkin > Subject: [PATCH 0/2][edk2-redfish-client] fix trivial misprint > > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > Signed-off-by: Mike Maslenkin > Cc: Abner Chang > Cc: Nickle Wang > Cc: Igor Kulchytskyy -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106649): https://edk2.groups.io/g/devel/message/106649 Mute This Topic: https://groups.io/mt/99935941/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][edk2-redfish-client] Tools: fix script name in README
[AMD Official Use Only - General] Reviewed-by: Abner Chang > -Original Message- > From: Mike Maslenkin > Sent: Tuesday, July 4, 2023 5:38 AM > To: devel@edk2.groups.io > Cc: Chang, Abner ; nick...@nvidia.com; > ig...@ami.com; Mike Maslenkin > Subject: [PATCH 2/2][edk2-redfish-client] Tools: fix script name in README > > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > Signed-off-by: Mike Maslenkin > Cc: Abner Chang > Cc: Nickle Wang > Cc: Igor Kulchytskyy > --- > Tools/Redfish-Profile-Simulator/README.md | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Tools/Redfish-Profile-Simulator/README.md b/Tools/Redfish- > Profile-Simulator/README.md > index 660938f8805d..d71c1bb0bbe2 100644 > --- a/Tools/Redfish-Profile-Simulator/README.md > +++ b/Tools/Redfish-Profile-Simulator/README.md > @@ -32,7 +32,7 @@ Copyright 2016-2018 Distributed Management Task > Force, Inc. All rights reserved. > > > ## Usage > > > > -* ` python redfishProfileSimulatorMain.py [options]` > > +* ` python redfishProfileSimulator.py [options]` > > * `[Options]`: > > > > -V, --Version,--- the program version > > -- > 2.32.0 (Apple Git-132) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106648): https://edk2.groups.io/g/devel/message/106648 Mute This Topic: https://groups.io/mt/99935944/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 1/2][edk2-redfish-client] RedfishClientPkg: fix format used for output __func__
[AMD Official Use Only - General] Reviewed-by: Abner Chang > -Original Message- > From: Mike Maslenkin > Sent: Tuesday, July 4, 2023 5:38 AM > To: devel@edk2.groups.io > Cc: Chang, Abner ; nick...@nvidia.com; > ig...@ami.com; Mike Maslenkin > Subject: [PATCH 1/2][edk2-redfish-client] RedfishClientPkg: fix format used > for output __func__ > > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > Signed-off-by: Mike Maslenkin > Cc: Abner Chang > Cc: Nickle Wang > Cc: Igor Kulchytskyy > --- > .../ComputerSystemCollectionDxe/ComputerSystemCollectionDxe.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git > a/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSyste > mCollectionDxe.c > b/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSyste > mCollectionDxe.c > index 3ba2529c9cea..8f2054e1e161 100644 > --- > a/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSyste > mCollectionDxe.c > +++ > b/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSyste > mCollectionDxe.c > @@ -44,7 +44,7 @@ HandleResource ( >// Check and see if this is target resource that we want to handle. > >// Some resource is handled by other provider so we have to make sure this > first. > >// > > - DEBUG ((REDFISH_DEBUG_TRACE, "%s Identify for %s\n", __func__, Uri)); > > + DEBUG ((REDFISH_DEBUG_TRACE, "%a Identify for %s\n", __func__, Uri)); > >ConfigLang = RedfishGetConfigLanguage (Uri); > >if (ConfigLang == NULL) { > > Status = EdkIIRedfishResourceConfigIdentify (, Uri, Private- > >InformationExchange); > > -- > 2.32.0 (Apple Git-132) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106647): https://edk2.groups.io/g/devel/message/106647 Mute This Topic: https://groups.io/mt/99935943/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 3/3] RedfishPkg/JsonLib: add object clear interface
[AMD Official Use Only - General] Reviewed-by: Abner Chang > -Original Message- > From: Nickle Wang > Sent: Monday, July 3, 2023 9:21 PM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Igor Kulchytskyy > ; Nick Ramirez > Subject: [PATCH 3/3] RedfishPkg/JsonLib: add object clear interface > > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > -Add JsonObjectClear() interface for application to clear > all elements in JSON object. > -Fix typo. > > Signed-off-by: Nickle Wang > Cc: Abner Chang > Cc: Igor Kulchytskyy > Cc: Nick Ramirez > --- > RedfishPkg/Include/Library/JsonLib.h | 33 +-- > RedfishPkg/Library/JsonLib/JsonLib.c | 39 ++-- > 2 files changed, 56 insertions(+), 16 deletions(-) > > diff --git a/RedfishPkg/Include/Library/JsonLib.h > b/RedfishPkg/Include/Library/JsonLib.h > index f98f4e779ede..8f31d9341481 100644 > --- a/RedfishPkg/Include/Library/JsonLib.h > +++ b/RedfishPkg/Include/Library/JsonLib.h > @@ -3,6 +3,7 @@ > >Copyright (c) 2019, Intel Corporation. All rights reserved. > (C) Copyright 2021 Hewlett Packard Enterprise Development LP > + Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. > > SPDX-License-Identifier: BSD-2-Clause-Patent > > @@ -97,7 +98,7 @@ typedef enum { > >More details for reference count strategy can refer to the API description > for > JsonValueFree(). > > - @retval The created JSON value which contains a JSON array or NULL if > intial a JSON array > + @retval The created JSON value which contains a JSON array or NULL if > initial a JSON array > is failed. > > **/ > @@ -116,7 +117,7 @@ JsonValueInitArray ( > >More details for reference count strategy can refer to the API description > for > JsonValueFree(). > > - @retval The created JSON value which contains a JSON object or NULL if > intial a JSON object > + @retval The created JSON value which contains a JSON object or NULL if > initial a JSON object > is failed. > > **/ > @@ -571,6 +572,22 @@ JsonObjectSize ( >INEDKII_JSON_OBJECT JsonObject >); > > +/** > + The function removes all elements from object. Returns 0 on success and -1 > if object is not > + a JSON object. The reference count of all removed values are decremented. > + > + @param[in] JsonObject The provided JSON object. > + > + @retval EFI_ABORTEDSome error occur and operation aborted. > + @retval EFI_SUCCESSJSON value has been appended to the > end of > the JSON array. > + > +**/ > +EFI_STATUS > +EFIAPI > +JsonObjectClear ( > + INEDKII_JSON_OBJECT JsonObject > + ); > + > /** >The function is used to enumerate all keys in a JSON object. > > @@ -705,7 +722,7 @@ JsonArrayAppendValue ( >More details for reference count strategy can refer to the API description > for > JsonValueFree(). > >@param[in] JsonArray The provided JSON array. > - @param[in] Index The Index position before removement. > + @param[in] Index The Index position before removal. > >@retval EFI_ABORTEDSome error occur and operation aborted. >@retval EFI_SUCCESSThe JSON array has been removed at > position > index. > @@ -722,7 +739,7 @@ JsonArrayRemoveValue ( >Dump JSON to a buffer. > >@param[in] JsonValue The provided JSON value. > - @param[in] Flags The Index position before removement. The > value > + @param[in] Flags The Index position before removal. The value > could be the combination of below flags. > - EDKII_JSON_INDENT(n) > - EDKII_JSON_COMPACT > @@ -737,7 +754,7 @@ JsonArrayRemoveValue ( > > https://jansson.readthedocs.io/en/2.13/apiref.html#encoding > >@retval CHAR8 * Dump fail if NULL returned, otherwise the > buffer > - contain JSON paylaod in ASCII string. The > return > + contain JSON payload in ASCII string. The > return > value must be freed by the caller FreePool(). > **/ > CHAR8 * > @@ -753,7 +770,7 @@ JsonDumpString ( >value. Only object and array represented strings can be converted > successfully, >since they are the only valid root values of a JSON text for UEFI usage. > > - Real number and number with exponent part are not supportted by UEFI. > + Real number and number with exponent part are not supported by UEFI. > >Caller needs to cleanup the root value by calling JsonValueFree(). > > @@ -775,7 +792,7 @@ JsonLoadString ( > /** >Load JSON from a buffer. > > - @param[in] BufferBufffer to the JSON payload > + @param[in] BufferBuffier to the
Re: [edk2-devel] [PATCH 2/3] RedfishPkg/RedfishPlatformConfigDxe: hide debug message
[AMD Official Use Only - General] Hi Nickle, Besides using REDFISH_PLATFORM_CONFIG_DEBUG, can we update REDFISH_PLATFORM_CONFIG_DEBUG to DEBUG_MANAGEABILITY? Thanks Abner > -Original Message- > From: Nickle Wang > Sent: Monday, July 3, 2023 9:20 PM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Igor Kulchytskyy > ; Nick Ramirez > Subject: [PATCH 2/3] RedfishPkg/RedfishPlatformConfigDxe: hide debug > message > > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > Change debug message level of showing ordered list op-code > to REDFISH_PLATFORM_CONFIG_DEBUG. > > Signed-off-by: Nickle Wang > Cc: Abner Chang > Cc: Igor Kulchytskyy > Cc: Nick Ramirez > --- > .../RedfishPlatformConfigDxe.c| 24 +-- > 1 file changed, 12 insertions(+), 12 deletions(-) > > diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > index 462f269f6a3f..f2a8e77d9b00 100644 > --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > @@ -955,12 +955,12 @@ DumpOrderedListValue ( > return; >} > > - DEBUG ((DEBUG_ERROR, "Value.Type= 0x%x\n", OrderedListStatement- > >Value.Type)); > - DEBUG ((DEBUG_ERROR, "Value.BufferValueType= 0x%x\n", > OrderedListStatement->Value.BufferValueType)); > - DEBUG ((DEBUG_ERROR, "Value.BufferLen= 0x%x\n", > OrderedListStatement->Value.BufferLen)); > - DEBUG ((DEBUG_ERROR, "Value.Buffer= 0x%x\n", OrderedListStatement- > >Value.Buffer)); > - DEBUG ((DEBUG_ERROR, "Value.MaxContainers= 0x%x\n", > OrderedListStatement->ExtraData.OrderListData.MaxContainers)); > - DEBUG ((DEBUG_ERROR, "StorageWidth= 0x%x\n", OrderedListStatement- > >StorageWidth)); > + DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "Value.Type= 0x%x\n", > OrderedListStatement->Value.Type)); > + DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "Value.BufferValueType= > 0x%x\n", OrderedListStatement->Value.BufferValueType)); > + DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "Value.BufferLen= > 0x%x\n", OrderedListStatement->Value.BufferLen)); > + DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "Value.Buffer= 0x%x\n", > OrderedListStatement->Value.Buffer)); > + DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "Value.MaxContainers= > 0x%x\n", OrderedListStatement->ExtraData.OrderListData.MaxContainers)); > + DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "StorageWidth= 0x%x\n", > OrderedListStatement->StorageWidth)); > >if (OrderedListStatement->Value.Buffer == NULL) { > return; > @@ -977,7 +977,7 @@ DumpOrderedListValue ( >Value8 = (UINT8 *)OrderedListStatement->Value.Buffer; >Count = OrderedListStatement->StorageWidth / sizeof (UINT8); >for (Index = 0; Index < Count; Index++) { > -DEBUG ((DEBUG_ERROR, "%d ", Value8[Index])); > +DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%d ", Value8[Index])); >} > >break; > @@ -985,7 +985,7 @@ DumpOrderedListValue ( >Value16 = (UINT16 *)OrderedListStatement->Value.Buffer; >Count = OrderedListStatement->StorageWidth / sizeof (UINT16); >for (Index = 0; Index < Count; Index++) { > -DEBUG ((DEBUG_ERROR, "%d ", Value16[Index])); > +DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%d ", > Value16[Index])); >} > >break; > @@ -993,7 +993,7 @@ DumpOrderedListValue ( >Value32 = (UINT32 *)OrderedListStatement->Value.Buffer; >Count = OrderedListStatement->StorageWidth / sizeof (UINT32); >for (Index = 0; Index < Count; Index++) { > -DEBUG ((DEBUG_ERROR, "%d ", Value32[Index])); > +DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%d ", > Value32[Index])); >} > >break; > @@ -1001,7 +1001,7 @@ DumpOrderedListValue ( >Value64 = (UINT64 *)OrderedListStatement->Value.Buffer; >Count = OrderedListStatement->StorageWidth / sizeof (UINT64); >for (Index = 0; Index < Count; Index++) { > -DEBUG ((DEBUG_ERROR, "%d ", Value64[Index])); > +DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%d ", > Value64[Index])); >} > >break; > @@ -1009,13 +1009,13 @@ DumpOrderedListValue ( >Value8 = (UINT8 *)OrderedListStatement->Value.Buffer; >Count = OrderedListStatement->StorageWidth / sizeof (UINT8); >for (Index = 0; Index < Count; Index++) { > -DEBUG ((DEBUG_ERROR, "%d ", Value8[Index])); > +DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%d ", Value8[Index])); >} > >break; >} > > - DEBUG ((DEBUG_ERROR, "\n")); > + DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "\n")); > } > > /** > -- > 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106645): https://edk2.groups.io/g/devel/message/106645 Mute This Topic: https://groups.io/mt/99926324/21656 Group Owner:
Re: [edk2-devel] [PATCH 1/3] RedfishPkg/RedfishRestExDxe: fix CPU exception in RedfishRestExDxe
[AMD Official Use Only - General] Reviewed-by: Abner Chang > -Original Message- > From: Nickle Wang > Sent: Monday, July 3, 2023 9:20 PM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Igor Kulchytskyy ; > Nick Ramirez > Subject: [PATCH 1/3] RedfishPkg/RedfishRestExDxe: fix CPU exception in > RedfishRestExDxe > > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > RedfishRestExDxe driver failed to uninstall service binding protocol > when driver binding stop is called. Application drivers may still > use RedfishRestExDxe after it is disconnected in system. > > Signed-off-by: Nickle Wang > Cc: Abner Chang > Cc: Igor Kulchytskyy > Cc: Nick Ramirez > --- > RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c > b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c > index ad65ae213ae0..7036aed42683 100644 > --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c > +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c > @@ -3,6 +3,7 @@ > >Copyright (c) 2019, Intel Corporation. All rights reserved. >(C) Copyright 2020 Hewlett Packard Enterprise Development LP > + Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. > >SPDX-License-Identifier: BSD-2-Clause-Patent > > @@ -57,6 +58,7 @@ RestExDestroyChildEntryInHandleBuffer ( >ChildHandleBuffer = ((RESTEX_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT > *)Context)->ChildHandleBuffer; > >if (!NetIsInHandleBuffer (Instance->ChildHandle, NumberOfChildren, > ChildHandleBuffer)) { > +RemoveEntryList (>Link); > return EFI_SUCCESS; >} > > @@ -563,7 +565,7 @@ RedfishRestExDriverBindingStop ( >); >} > > - if ((NumberOfChildren == 0) && IsListEmpty > (>RestExChildrenList)) { > + if (IsListEmpty (>RestExChildrenList)) { > gBS->UninstallProtocolInterface ( > NicHandle, > , > -- > 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106644): https://edk2.groups.io/g/devel/message/106644 Mute This Topic: https://groups.io/mt/99926322/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] Event: TianoCore Bug Triage - APAC / NAMO - Tuesday, July 4, 2023 #cal-reminder
*Reminder: TianoCore Bug Triage - APAC / NAMO* *When:* Tuesday, July 4, 2023 6:30pm to 7:30pm (UTC-07:00) America/Los Angeles *Where:* https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTk1YzJhN2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%226e4ce4c4-1242-431b-9a51-92cd01a5df3c%22%7d *Organizer:* Liming Gao gaolim...@byosoft.com.cn ( gaolim...@byosoft.com.cn?subject=Re:%20Event:%20TianoCore%20Bug%20Triage%20-%20APAC%20%2F%20NAMO ) View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=1940327 ) *Description:* TianoCore Bug Triage - APAC / NAMO Hosted by Liming Gao Microsoft Teams meeting *Join on your computer or mobile app* Click here to join the meeting ( https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTk1YzJhN2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%226e4ce4c4-1242-431b-9a51-92cd01a5df3c%22%7d ) *Join with a video conferencing device* te...@conf.intel.com Video Conference ID: 116 062 094 0 Alternate VTC dialing instructions ( https://conf.intel.com/teams/?conf=1160620940=teams=conf.intel.com=test_call ) *Or call in (audio only)* +1 916-245-6934,,77463821# ( tel:+19162456934,,77463821# ) United States, Sacramento Phone Conference ID: 774 638 21# Find a local number ( https://dialin.teams.microsoft.com/d195d438-2daa-420e-b9ea-da26f9d1d6d5?id=77463821 ) | Reset PIN ( https://mysettings.lync.com/pstnconferencing ) Learn More ( https://aka.ms/JoinTeamsMeeting ) | Meeting options ( https://teams.microsoft.com/meetingOptions/?organizerId=b286b53a-1218-4db3-bfc9-3d4c5aa7669e=46c98d88-e344-4ed4-8496-4ed7712e255d=19_meeting_OTUyZTg2NjgtNDhlNS00ODVlLTllYTUtYzg1OTNjNjdiZjFh@thread.v2=0=en-US ) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106643): https://edk2.groups.io/g/devel/message/106643 Mute This Topic: https://groups.io/mt/99938925/21656 Mute #cal-reminder:https://edk2.groups.io/g/devel/mutehashtag/cal-reminder Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [edk2-staging][PATCH 1/1] BaseTools/Fmmt: Fix GCC warnings
GCC is throwing a warning during BaseTools compilation which leads to build errors when Wall is set. This commit removes all conditions which are always true/false(Waddress warning) and wraps one snprintf in compiler pragma to disable format-truncation warning. Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Signed-off-by: Mateusz Albecki --- BaseTools/Source/C/BfmLib/BfmLib.c| 36 +-- BaseTools/Source/C/FCE/BinaryParse.c | 3 ++ BaseTools/Source/C/FCE/IfrParse.c | 24 - .../Source/C/FMMT/FirmwareModuleManagement.c | 8 ++--- BaseTools/Source/C/FMMT/FmmtLib.c | 20 +-- 5 files changed, 31 insertions(+), 60 deletions(-) diff --git a/BaseTools/Source/C/BfmLib/BfmLib.c b/BaseTools/Source/C/BfmLib/BfmLib.c index c247cc8e1d..14d29077c8 100644 --- a/BaseTools/Source/C/BfmLib/BfmLib.c +++ b/BaseTools/Source/C/BfmLib/BfmLib.c @@ -3738,18 +3738,16 @@ LibLocateFvViaFvId ( FvIndex1 = (UINT8) atoi (FvId + 2); while (FvInFd != NULL) { -if (((*FvInFd)->FvName) != NULL) { - FvIndex2 = (UINT8) atoi ((*FvInFd)->FvName + 2); +FvIndex2 = (UINT8) atoi ((*FvInFd)->FvName + 2); - if ((FvIndex2 <= FvIndex1) && (((*FvInFd)->FvLevel + FvIndex2) -1 >= FvIndex1)) { -FvFoundFlag = TRUE; -break; - } - if ((*FvInFd)->FvNext == 0) { -break; - } - *FvInFd = (*FvInFd)->FvNext; +if ((FvIndex2 <= FvIndex1) && (((*FvInFd)->FvLevel + FvIndex2) -1 >= FvIndex1)) { + FvFoundFlag = TRUE; + break; +} +if ((*FvInFd)->FvNext == 0) { + break; } +*FvInFd = (*FvInFd)->FvNext; } // @@ -4292,18 +4290,16 @@ LibLocateBfv( *FvInFd = FdData->Fv; while (FvInFd != NULL) { -if (((*FvInFd)->FvName) != NULL) { - FvIndex2 = (UINT8) atoi ((*FvInFd)->FvName + 2); +FvIndex2 = (UINT8) atoi ((*FvInFd)->FvName + 2); - if ((FvIndex2 <= FvIndex1) && (((*FvInFd)->FvLevel + FvIndex2) -1 >= FvIndex1)) { -FvFoundFlag = TRUE; -break; - } - if ((*FvInFd)->FvNext == 0) { -break; - } - *FvInFd = (*FvInFd)->FvNext; +if ((FvIndex2 <= FvIndex1) && (((*FvInFd)->FvLevel + FvIndex2) -1 >= FvIndex1)) { + FvFoundFlag = TRUE; + break; +} +if ((*FvInFd)->FvNext == 0) { + break; } +*FvInFd = (*FvInFd)->FvNext; } // diff --git a/BaseTools/Source/C/FCE/BinaryParse.c b/BaseTools/Source/C/FCE/BinaryParse.c index 6854d546ac..def8089ae4 100644 --- a/BaseTools/Source/C/FCE/BinaryParse.c +++ b/BaseTools/Source/C/FCE/BinaryParse.c @@ -1244,7 +1244,10 @@ Done: Status = EFI_ABORTED; goto Done; } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-truncation" snprintf (FileNameArry, 300, "%s%c%s", FolderName, OS_SEP, pDirent->d_name); +#pragma GCC diagnostic pop FfsFile = fopen (FileNameArry, "rb"); Status = ReadFfsHeader (FfsFile, (UINT32 *)); if (EFI_ERROR (Status)) { diff --git a/BaseTools/Source/C/FCE/IfrParse.c b/BaseTools/Source/C/FCE/IfrParse.c index ba7320f14c..e47afaef66 100644 --- a/BaseTools/Source/C/FCE/IfrParse.c +++ b/BaseTools/Source/C/FCE/IfrParse.c @@ -3936,11 +3936,6 @@ StringPrintormSetTitle ( FormSet->Guid.Data4[5],FormSet->Guid.Data4[6], FormSet->Guid.Data4[7]); StringPrint("\n"); - - if (&(FormSet->EnUsStringList) == NULL && VarDefaultName != NULL && FormSet->FormSetTitle != 0) { -free (VarDefaultName); -VarDefaultName = NULL; - } } /** @@ -4019,10 +4014,6 @@ PrintOneOfOptions ( LogUnicodeString (VarDefaultName); StringPrint("\n"); -if (&(FormSet->EnUsStringList) == NULL && VarDefaultName != NULL && Option->Text != 0) { - free (VarDefaultName); - VarDefaultName = NULL; -} Link = GetNextNode (>OptionListHead, Link); } return Status; @@ -4061,12 +4052,6 @@ StringPrintormTitle ( LogUnicodeString (VarDefaultName); StringPrint("\n"); - - if (&(FormSet->EnUsStringList) == NULL && VarDefaultName != NULL && Form->FormTitle != 0) { -free (VarDefaultName); -VarDefaultName = NULL; - } - } /** @@ -4513,11 +4498,6 @@ PrintQuestion ( break; } - if (&(FormSet->EnUsStringList) == NULL & != NULL && Question->Prompt != 0) { -free (VarDefaultName); -VarDefaultName = NULL; - } - if (PrintOrNot && Question->Storage) { StringPrint("// size = 0x%x", Question->StorageWidth); StringPrint("\n// offset = 0x%x", Question->VarStoreInfo.VarOffset); @@ -4545,10 +4525,6 @@ PrintQuestion ( assert (!EFI_ERROR (Status)); LogUnicodeString (VarDefaultName); StringPrint("\n"); -if (&(FormSet->EnUsStringList) == NULL & != NULL && Question->Help != 0) { - free (VarDefaultName); - VarDefaultName = NULL; -} } } diff --git a/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c b/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c index 38056153fb..ff4e555881 100644 ---
Re: [edk2-devel] [PATCH 2/2][edk2-redfish-client] Tools: fix script name in README
Reviewed-by: Nickle Wang Regards, Nickle > -Original Message- > From: Mike Maslenkin > Sent: Tuesday, July 4, 2023 5:38 AM > To: devel@edk2.groups.io > Cc: abner.ch...@amd.com; Nickle Wang ; > ig...@ami.com; Mike Maslenkin > Subject: [PATCH 2/2][edk2-redfish-client] Tools: fix script name in README > > External email: Use caution opening links or attachments > > > Signed-off-by: Mike Maslenkin > Cc: Abner Chang > Cc: Nickle Wang > Cc: Igor Kulchytskyy > --- > Tools/Redfish-Profile-Simulator/README.md | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Tools/Redfish-Profile-Simulator/README.md > b/Tools/Redfish-Profile- > Simulator/README.md > index 660938f8805d..d71c1bb0bbe2 100644 > --- a/Tools/Redfish-Profile-Simulator/README.md > +++ b/Tools/Redfish-Profile-Simulator/README.md > @@ -32,7 +32,7 @@ Copyright 2016-2018 Distributed Management Task Force, > Inc. All rights reserved. > > > ## Usage > > > > -* ` python redfishProfileSimulatorMain.py [options]` > > +* ` python redfishProfileSimulator.py [options]` > > * `[Options]`: > > > > -V, --Version,--- the program version > > -- > 2.32.0 (Apple Git-132) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106641): https://edk2.groups.io/g/devel/message/106641 Mute This Topic: https://groups.io/mt/99935944/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 1/2][edk2-redfish-client] RedfishClientPkg: fix format used for output __func__
Reviewed-by: Nickle Wang Regards, Nickle > -Original Message- > From: Mike Maslenkin > Sent: Tuesday, July 4, 2023 5:38 AM > To: devel@edk2.groups.io > Cc: abner.ch...@amd.com; Nickle Wang ; > ig...@ami.com; Mike Maslenkin > Subject: [PATCH 1/2][edk2-redfish-client] RedfishClientPkg: fix format used > for > output __func__ > > External email: Use caution opening links or attachments > > > Signed-off-by: Mike Maslenkin > Cc: Abner Chang > Cc: Nickle Wang > Cc: Igor Kulchytskyy > --- > .../ComputerSystemCollectionDxe/ComputerSystemCollectionDxe.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git > a/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSystemCo > llectionDxe.c > b/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSystemCo > llectionDxe.c > index 3ba2529c9cea..8f2054e1e161 100644 > --- > a/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSystemCo > llectionDxe.c > +++ > b/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSystemCo > llectionDxe.c > @@ -44,7 +44,7 @@ HandleResource ( >// Check and see if this is target resource that we want to handle. > >// Some resource is handled by other provider so we have to make sure this > first. > >// > > - DEBUG ((REDFISH_DEBUG_TRACE, "%s Identify for %s\n", __func__, Uri)); > > + DEBUG ((REDFISH_DEBUG_TRACE, "%a Identify for %s\n", __func__, Uri)); > >ConfigLang = RedfishGetConfigLanguage (Uri); > >if (ConfigLang == NULL) { > > Status = EdkIIRedfishResourceConfigIdentify (, Uri, Private- > >InformationExchange); > > -- > 2.32.0 (Apple Git-132) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106640): https://edk2.groups.io/g/devel/message/106640 Mute This Topic: https://groups.io/mt/99935943/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH 1/1] OvmfPkg/Include: remove QemuSmramSaveStateMap.h
The qemu/kvm SMM emulation uses the AMD SaveState layout. So, now that we have AMD SaveState support merged we can just use Amd/SmramSaveStateMap.h, QemuSmramSaveStateMap.h is not needed any more. Signed-off-by: Gerd Hoffmann --- .../Include/Register/QemuSmramSaveStateMap.h | 178 -- .../PeiDxeMemEncryptSevLibInternal.c | 4 +- .../SmmCpuFeaturesLib/SmmCpuFeaturesLib.c | 21 +-- 3 files changed, 12 insertions(+), 191 deletions(-) delete mode 100644 OvmfPkg/Include/Register/QemuSmramSaveStateMap.h diff --git a/OvmfPkg/Include/Register/QemuSmramSaveStateMap.h b/OvmfPkg/Include/Register/QemuSmramSaveStateMap.h deleted file mode 100644 index 8ffde0548c4c.. --- a/OvmfPkg/Include/Register/QemuSmramSaveStateMap.h +++ /dev/null @@ -1,178 +0,0 @@ -/** @file -SMRAM Save State Map Definitions. - -SMRAM Save State Map definitions based on contents of the -Intel(R) 64 and IA-32 Architectures Software Developer's Manual - Volume 3C, Section 34.4 SMRAM - Volume 3C, Section 34.5 SMI Handler Execution Environment - Volume 3C, Section 34.7 Managing Synchronous and Asynchronous SMIs - -and the AMD64 Architecture Programmer's Manual - Volume 2, Section 10.2 SMM Resources - -Copyright (c) 2015, Intel Corporation. All rights reserved. -Copyright (c) 2015, Red Hat, Inc. -SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef __QEMU_SMRAM_SAVE_STATE_MAP_H__ -#define __QEMU_SMRAM_SAVE_STATE_MAP_H__ - -#pragma pack (1) - -/// -/// 32-bit SMRAM Save State Map -/// -typedef struct { - UINT8 Reserved0[0x200]; // 7c00h - UINT8 Reserved1[0xf8]; // 7e00h - UINT32SMBASE; // 7ef8h - UINT32SMMRevId; // 7efch - UINT16IORestart;// 7f00h - UINT16AutoHALTRestart; // 7f02h - UINT8 Reserved2[0x9C]; // 7f08h - UINT32IOMemAddr;// 7fa0h - UINT32IOMisc; // 7fa4h - UINT32_ES; // 7fa8h - UINT32_CS; // 7fach - UINT32_SS; // 7fb0h - UINT32_DS; // 7fb4h - UINT32_FS; // 7fb8h - UINT32_GS; // 7fbch - UINT32Reserved3;// 7fc0h - UINT32_TR; // 7fc4h - UINT32_DR7; // 7fc8h - UINT32_DR6; // 7fcch - UINT32_EAX; // 7fd0h - UINT32_ECX; // 7fd4h - UINT32_EDX; // 7fd8h - UINT32_EBX; // 7fdch - UINT32_ESP; // 7fe0h - UINT32_EBP; // 7fe4h - UINT32_ESI; // 7fe8h - UINT32_EDI; // 7fech - UINT32_EIP; // 7ff0h - UINT32_EFLAGS; // 7ff4h - UINT32_CR3; // 7ff8h - UINT32_CR0; // 7ffch -} QEMU_SMRAM_SAVE_STATE_MAP32; - -/// -/// 64-bit SMRAM Save State Map -/// -typedef struct { - UINT8 Reserved0[0x200]; // 7c00h - - UINT16_ES; // 7e00h - UINT16_ESAccessRights; // 7e02h - UINT32_ESLimit;// 7e04h - UINT64_ESBase; // 7e08h - - UINT16_CS; // 7e10h - UINT16_CSAccessRights; // 7e12h - UINT32_CSLimit;// 7e14h - UINT64_CSBase; // 7e18h - - UINT16_SS; // 7e20h - UINT16_SSAccessRights; // 7e22h - UINT32_SSLimit;// 7e24h - UINT64_SSBase; // 7e28h - - UINT16_DS; // 7e30h - UINT16_DSAccessRights; // 7e32h - UINT32_DSLimit;// 7e34h - UINT64_DSBase; // 7e38h - - UINT16_FS; // 7e40h - UINT16_FSAccessRights; // 7e42h - UINT32_FSLimit;// 7e44h - UINT64_FSBase; // 7e48h - - UINT16_GS; // 7e50h - UINT16_GSAccessRights; // 7e52h - UINT32_GSLimit;// 7e54h - UINT64_GSBase; // 7e58h - - UINT32_GDTRReserved1; // 7e60h - UINT16_GDTRLimit; // 7e64h - UINT16_GDTRReserved2; // 7e66h - UINT64_GDTRBase; // 7e68h - - UINT16_LDTR; // 7e70h - UINT16_LDTRAccessRights; // 7e72h - UINT32_LDTRLimit;// 7e74h - UINT64_LDTRBase; // 7e78h - - UINT32_IDTRReserved1; // 7e80h - UINT16_IDTRLimit; // 7e84h - UINT16_IDTRReserved2; // 7e86h - UINT64_IDTRBase; // 7e88h - - UINT16_TR; // 7e90h - UINT16_TRAccessRights; // 7e92h - UINT32_TRLimit;// 7e94h - UINT64_TRBase; // 7e98h - - UINT64IO_RIP; // 7ea0h - UINT64IO_RCX; // 7ea8h - UINT64IO_RSI; // 7eb0h - UINT64IO_RDI; // 7eb8h - UINT32IO_DWord;// 7ec0h - UINT8 Reserved1[0x04]; // 7ec4h - UINT8 IORestart; // 7ec8h - UINT8 AutoHALTRestart; // 7ec9h - UINT8 Reserved2[0x06]; // 7ecah - - UINT64IA32_EFER; // 7ed0h - UINT64SVM_Guest; // 7ed8h - UINT64SVM_GuestVMCB; // 7ee0h - UINT64
Re: [edk2-devel] [PATCH 1/1] UefiCpuPkg/MpInitLib: fix apic mode for cpu hotplug
On Wed, May 24, 2023 at 12:32:24PM +, Ni, Ray wrote: > Gerd, > I was busy on something else. The patch was ready and I am testing it before > sending them out. Ping. Any update? take care, Gerd > > Thanks, > Ray > > > > -Original Message- > > From: kra...@redhat.com > > Sent: Wednesday, May 3, 2023 3:24 PM > > To: Ni, Ray > > Cc: devel@edk2.groups.io; Pawel Polawski ; Kumar, > > Rahul R ; Oliver Steffen ; > > Dong, Eric > > Subject: Re: [edk2-devel] [PATCH 1/1] UefiCpuPkg/MpInitLib: fix apic mode > > for cpu hotplug > > > > On Tue, Mar 21, 2023 at 07:28:44AM +, Ni, Ray wrote: > > > > + } else if ((PcdGet32 (PcdCpuBootLogicalProcessorNumber) > 0) && > > > > + (PcdGet32 (PcdCpuMaxLogicalProcessorNumber) > 255)) > > > > + { > > > > +X2Apic = TRUE; > > > > > > Gerd, > > > I agree with your needs that want X2 APIC even the actual processor number > > in BIOS phase <= 255. > > > > > > Question: Is it possible that BIOS stays at XAPIC, and later OS switches > > > to X2 > > APIC when the maximum CPU count > 255? > > > > > > I am thinking about adding a new PCD to tell MP code switch to x2 apic in > > > the > > first time AP wakes up. Possible timeline for the code change is > > > about within 1 month. Do you think it can meet your needs? > > > > Ping. What is the status here? I'd like to see that fixed for OVMF > > for the next stable release, and freeze is coming closer ... > > > > take care, > > Gerd > -- -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106638): https://edk2.groups.io/g/devel/message/106638 Mute This Topic: https://groups.io/mt/97447597/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v2 6/6] SecurityPkg/RngDxe: Simplify Rng algorithm selection for Arm
From: Pierre Gondois The first element of mAvailableAlgoArray is defined as the default Rng algorithm to use. Don't go through the array at each RngGetRNG() call and just return the first element of the array. Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- .../RandomNumberGenerator/RngDxe/ArmRngDxe.c| 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/ArmRngDxe.c b/SecurityPkg/RandomNumberGenerator/RngDxe/ArmRngDxe.c index 78a18c5e1177..7a42e3cbe3d2 100644 --- a/SecurityPkg/RandomNumberGenerator/RngDxe/ArmRngDxe.c +++ b/SecurityPkg/RandomNumberGenerator/RngDxe/ArmRngDxe.c @@ -77,7 +77,6 @@ RngGetRNG ( ) { EFI_STATUS Status; - UINTN Index; GUIDRngGuid; if ((This == NULL) || (RNGValueLength == 0) || (RNGValue == NULL)) { @@ -88,21 +87,13 @@ RngGetRNG ( // // Use the default RNG algorithm if RNGAlgorithm is NULL. // -for (Index = 0; Index < mAvailableAlgoArrayCount; Index++) { - if (!IsZeroGuid ([Index])) { -RNGAlgorithm = [Index]; -goto FoundAlgo; - } -} - -if (Index == mAvailableAlgoArrayCount) { - // No algorithm available. - ASSERT (Index != mAvailableAlgoArrayCount); - return EFI_DEVICE_ERROR; +if (mAvailableAlgoArrayCount != 0) { + RNGAlgorithm = [0]; +} else { + return EFI_UNSUPPORTED; } } -FoundAlgo: Status = GetRngGuid (); if (!EFI_ERROR (Status) && CompareGuid (RNGAlgorithm, )) -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106637): https://edk2.groups.io/g/devel/message/106637 Mute This Topic: https://groups.io/mt/99943079/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v2 5/6] SecurityPkg/RngDxe: Use GetRngGuid() when probing RngLib
From: Pierre Gondois BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4151 The EFI_RNG_PROTOCOL can rely on the RngLib. The RngLib has multiple implementations, some of them are unsafe (e.g. BaseRngLibTimerLib). To allow the RngDxe to detect when such implementation is used, a GetRngGuid() function was added in a previous patch. The EFI_RNG_PROTOCOL can advertise multiple algorithms through Guids. The PcdCpuRngSupportedAlgorithm is currently used to advertise the RngLib in the Arm implementation. The issues of doing that are: - the RngLib implementation might not use CPU instructions, cf. the BaseRngLibTimerLib - most platforms don't set PcdCpuRngSupportedAlgorithm A GetRngGuid() was added to the RngLib in a previous patch, allowing to identify the algorithm implemented by the RngLib. Make use of this function and place the unsage algorithm at the last position in the mAvailableAlgoArray. Signed-off-by: Pierre Gondois --- .../RngDxe/AArch64/AArch64Algo.c | 54 +-- .../RandomNumberGenerator/RngDxe/ArmRngDxe.c | 6 ++- .../RandomNumberGenerator/RngDxe/RngDxe.inf | 5 +- 3 files changed, 44 insertions(+), 21 deletions(-) diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/AArch64Algo.c b/SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/AArch64Algo.c index e8be217f8a8c..60bc6c375419 100644 --- a/SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/AArch64Algo.c +++ b/SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/AArch64Algo.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "RngDxeInternals.h" @@ -28,9 +29,13 @@ GetAvailableAlgorithms ( VOID ) { - UINT64 DummyRand; - UINT16 MajorRevision; - UINT16 MinorRevision; + EFI_STATUS Status; + UINT16 MajorRevision; + UINT16 MinorRevision; + GUIDRngGuid; + BOOLEAN UnSafeAlgo; + + UnSafeAlgo = FALSE; // Rng algorithms 2 times, one for the allocation, one to populate. mAvailableAlgoArray = AllocateZeroPool (RNG_AVAILABLE_ALGO_MAX); @@ -38,24 +43,29 @@ GetAvailableAlgorithms ( return EFI_OUT_OF_RESOURCES; } - // Check RngGetBytes() before advertising PcdCpuRngSupportedAlgorithm. - if (!EFI_ERROR (RngGetBytes (sizeof (DummyRand), (UINT8 * { -CopyMem ( - [mAvailableAlgoArrayCount], - PcdGetPtr (PcdCpuRngSupportedAlgorithm), - sizeof (EFI_RNG_ALGORITHM) - ); -mAvailableAlgoArrayCount++; - -DEBUG_CODE_BEGIN (); -if (IsZeroGuid (PcdGetPtr (PcdCpuRngSupportedAlgorithm))) { + // Identify RngLib algorithm. + Status = GetRngGuid (); + if (!EFI_ERROR (Status)) { +if (IsZeroGuid () || +CompareGuid (, )) +{ + // Treat zero GUID as an unsafe algorithm DEBUG (( DEBUG_WARN, -"PcdCpuRngSupportedAlgorithm should be a non-zero GUID\n" +"RngLib uses an Unsafe algorithm and " +"must not be used for production builds.\n" )); + // Set the UnSafeAlgo flag to indicate an unsafe algorithm was found + // so that it can be added at the end of the algorithm list. + UnSafeAlgo = TRUE; +} else { + CopyMem ( +[mAvailableAlgoArrayCount], +, +sizeof (RngGuid) +); + mAvailableAlgoArrayCount++; } - -DEBUG_CODE_END (); } // Raw algorithm (Trng) @@ -68,5 +78,15 @@ GetAvailableAlgorithms ( mAvailableAlgoArrayCount++; } + // Add unsafe algorithm at the end of the list. + if (UnSafeAlgo) { +CopyMem ( + [mAvailableAlgoArrayCount], + , + sizeof (EFI_RNG_ALGORITHM) + ); +mAvailableAlgoArrayCount++; + } + return EFI_SUCCESS; } diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/ArmRngDxe.c b/SecurityPkg/RandomNumberGenerator/RngDxe/ArmRngDxe.c index ce49ff7ae661..78a18c5e1177 100644 --- a/SecurityPkg/RandomNumberGenerator/RngDxe/ArmRngDxe.c +++ b/SecurityPkg/RandomNumberGenerator/RngDxe/ArmRngDxe.c @@ -78,6 +78,7 @@ RngGetRNG ( { EFI_STATUS Status; UINTN Index; + GUIDRngGuid; if ((This == NULL) || (RNGValueLength == 0) || (RNGValue == NULL)) { return EFI_INVALID_PARAMETER; @@ -102,7 +103,10 @@ RngGetRNG ( } FoundAlgo: - if (CompareGuid (RNGAlgorithm, PcdGetPtr (PcdCpuRngSupportedAlgorithm))) { + Status = GetRngGuid (); + if (!EFI_ERROR (Status) && + CompareGuid (RNGAlgorithm, )) + { Status = RngGetBytes (RNGValueLength, RNGValue); return Status; } diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf b/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf index d6c2d30195bf..aa5743387ed9 100644 --- a/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf +++ b/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf @@ -75,13 +75,12 @@ [Guids] gEfiRngAlgorithmX9313DesGuid## SOMETIMES_PRODUCES## GUID # Unique ID of the algorithm for RNG gEfiRngAlgorithmX931AesGuid ## SOMETIMES_PRODUCES## GUID # Unique ID of the algorithm for RNG
[edk2-devel] [PATCH v2 4/6] MdePkg/Rng: Add GetRngGuid() to RngLib
From: Pierre Gondois The EFI_RNG_PROTOCOL can use the RngLib. The RngLib has multiple implementations, some of them are unsafe (e.g. BaseRngLibTimerLib). To allow the RngDxe to detect when such implementation is used, add a GetRngGuid() function to the RngLib. Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- MdePkg/Include/Library/RngLib.h | 17 MdePkg/Library/BaseRngLib/AArch64/Rndr.c | 42 +++ MdePkg/Library/BaseRngLib/BaseRngLib.inf | 10 + MdePkg/Library/BaseRngLib/Rand/RdRand.c | 26 .../Library/BaseRngLibNull/BaseRngLibNull.c | 22 ++ .../BaseRngLibTimerLib/BaseRngLibTimerLib.inf | 3 ++ .../Library/BaseRngLibTimerLib/RngLibTimer.c | 28 + MdePkg/Library/DxeRngLib/DxeRngLib.c | 28 + 8 files changed, 176 insertions(+) diff --git a/MdePkg/Include/Library/RngLib.h b/MdePkg/Include/Library/RngLib.h index 429ed19e287e..945482cd5e56 100644 --- a/MdePkg/Include/Library/RngLib.h +++ b/MdePkg/Include/Library/RngLib.h @@ -1,6 +1,7 @@ /** @file Provides random number generator services. +Copyright (c) 2023, Arm Limited. All rights reserved. Copyright (c) 2015, Intel Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @@ -77,4 +78,20 @@ GetRandomNumber128 ( OUT UINT64 *Rand ); +/** + Get a GUID identifying the RNG algorithm implementation. + + @param [out] RngGuid If success, contains the GUID identifying +the RNG algorithm implementation. + + @retval EFI_SUCCESS Success. + @retval EFI_UNSUPPORTED Not supported. + @retval EFI_INVALID_PARAMETER Invalid parameter. +**/ +EFI_STATUS +EFIAPI +GetRngGuid ( + GUID *RngGuid + ); + #endif // __RNG_LIB_H__ diff --git a/MdePkg/Library/BaseRngLib/AArch64/Rndr.c b/MdePkg/Library/BaseRngLib/AArch64/Rndr.c index 20811bf3ebf3..d39db62153ee 100644 --- a/MdePkg/Library/BaseRngLib/AArch64/Rndr.c +++ b/MdePkg/Library/BaseRngLib/AArch64/Rndr.c @@ -2,6 +2,7 @@ Random number generator service that uses the RNDR instruction to provide pseudorandom numbers. + Copyright (c) 2023, Arm Limited. All rights reserved. Copyright (c) 2021, NUVIA Inc. All rights reserved. Copyright (c) 2015, Intel Corporation. All rights reserved. @@ -11,6 +12,7 @@ #include #include +#include #include #include @@ -138,3 +140,43 @@ ArchIsRngSupported ( { return mRndrSupported; } + +/** + Get a GUID identifying the RNG algorithm implementation. + + @param [out] RngGuid If success, contains the GUID identifying +the RNG algorithm implementation. + + @retval EFI_SUCCESS Success. + @retval EFI_UNSUPPORTED Not supported. + @retval EFI_INVALID_PARAMETER Invalid parameter. +**/ +EFI_STATUS +EFIAPI +GetRngGuid ( + GUID *RngGuid + ) +{ + GUID *RngLibGuid; + + if (RngGuid == NULL) { +return EFI_INVALID_PARAMETER; + } + + if (!mRndrSupported) { +return EFI_UNSUPPORTED; + } + + // + // If the platform advertises the algorithm behind RNDR instruction, + // use it. Otherwise use gEfiRngAlgorithmArmRndr. + // + RngLibGuid = PcdGetPtr (PcdCpuRngSupportedAlgorithm); + if (!IsZeroGuid (RngLibGuid)) { +CopyMem (RngGuid, RngLibGuid, sizeof (*RngGuid)); + } else { +CopyMem (RngGuid, , sizeof (*RngGuid)); + } + + return EFI_SUCCESS; +} diff --git a/MdePkg/Library/BaseRngLib/BaseRngLib.inf b/MdePkg/Library/BaseRngLib/BaseRngLib.inf index 1fcceb941495..49503b139be9 100644 --- a/MdePkg/Library/BaseRngLib/BaseRngLib.inf +++ b/MdePkg/Library/BaseRngLib/BaseRngLib.inf @@ -4,6 +4,7 @@ # BaseRng Library that uses CPU RNG instructions (e.g. RdRand) to # provide random numbers. # +# Copyright (c) 2023, Arm Limited. All rights reserved. # Copyright (c) 2021, NUVIA Inc. All rights reserved. # Copyright (c) 2015, Intel Corporation. All rights reserved. # @@ -43,9 +44,18 @@ [Sources.AARCH64] AArch64/ArmReadIdIsar0.asm | MSFT AArch64/ArmRng.asm | MSFT +[Guids.AARCH64] + gEfiRngAlgorithmArmRndr + +[Guids.Ia32, Guids.X64] + gEfiRngAlgorithmSp80090Ctr256Guid + [Packages] MdePkg/MdePkg.dec +[Pcd.AARCH64] + gEfiMdePkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm + [LibraryClasses] BaseLib DebugLib diff --git a/MdePkg/Library/BaseRngLib/Rand/RdRand.c b/MdePkg/Library/BaseRngLib/Rand/RdRand.c index 070d41e2555f..9bd68352f9f7 100644 --- a/MdePkg/Library/BaseRngLib/Rand/RdRand.c +++ b/MdePkg/Library/BaseRngLib/Rand/RdRand.c @@ -2,6 +2,7 @@ Random number generator services that uses RdRand instruction access to provide high-quality random numbers. +Copyright (c) 2023, Arm Limited. All rights reserved. Copyright (c) 2021, NUVIA Inc. All rights reserved. Copyright (c) 2015, Intel Corporation. All rights reserved. @@ -11,6 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include +#include #include #include
[edk2-devel] [PATCH v2 3/6] MdePkg/Rng: Add GUIDs to describe Rng algorithms
From: Pierre Gondois BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4441 The EFI_RNG_PROTOCOL can rely on the RngLib. The RngLib has multiple implementations, some of them are unsafe (e.g. BaseRngLibTimerLib). To allow the RngDxe to detect when such implementation is used, a GetRngGuid() function is added in a following patch. Prepare GetRngGuid() return values and add GUIDs describing Rng algorithms: - gEfiRngAlgorithmArmRndr to describe a Rng algorithm accessed through Arm's RNDR instruction. [1] states that the implementation of this algorithm should be compliant to NIST SP900-80. The compliance is not guaranteed. - gEfiRngAlgorithmUnSafe to describe an unsafe implementation, cf. the BaseRngLibTimerLib. [1] Arm Architecture Reference Manual Armv8, for A-profile architecture sK12.1 'Properties of the generated random number' Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- MdePkg/Include/Protocol/Rng.h | 20 MdePkg/MdePkg.dec | 2 ++ 2 files changed, 22 insertions(+) diff --git a/MdePkg/Include/Protocol/Rng.h b/MdePkg/Include/Protocol/Rng.h index baf425587b3c..dfdaf36e41dc 100644 --- a/MdePkg/Include/Protocol/Rng.h +++ b/MdePkg/Include/Protocol/Rng.h @@ -67,6 +67,24 @@ typedef EFI_GUID EFI_RNG_ALGORITHM; { \ 0xe43176d7, 0xb6e8, 0x4827, {0xb7, 0x84, 0x7f, 0xfd, 0xc4, 0xb6, 0x85, 0x61 } \ } +/// +/// The Arm Architecture states the RNDR that the DRBG algorithm should be compliant +/// with NIST SP800-90A, while not mandating a particular algorithm, so as to be +/// inclusive of different geographies. +/// +#define EFI_RNG_ALGORITHM_ARM_RNDR \ + { \ +0x43d2fde3, 0x9d4e, 0x4d79, {0x02, 0x96, 0xa8, 0x9b, 0xca, 0x78, 0x08, 0x41} \ + } +/// +/// The implementation of a Random Number Generator might be unsafe, when using +/// a dummy implementation for instance. Allow identifying such implementation +/// with this GUID. +/// +#define EFI_RNG_ALGORITHM_UNSAFE \ + { \ +0x869f728c, 0x409d, 0x4ab4, {0xac, 0x03, 0x71, 0xd3, 0x09, 0xc1, 0xb3, 0xf4 } \ + } /** Returns information about the random number generation implementation. @@ -146,5 +164,7 @@ extern EFI_GUID gEfiRngAlgorithmSp80090Ctr256Guid; extern EFI_GUID gEfiRngAlgorithmX9313DesGuid; extern EFI_GUID gEfiRngAlgorithmX931AesGuid; extern EFI_GUID gEfiRngAlgorithmRaw; +extern EFI_GUID gEfiRngAlgorithmArmRndr; +extern EFI_GUID gEfiRngAlgorithmUnSafe; #endif diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 5b8477f4cb8f..959ca79d2664 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -643,6 +643,8 @@ [Guids] gEfiRngAlgorithmX9313DesGuid = { 0x63c4785a, 0xca34, 0x4012, {0xa3, 0xc8, 0x0b, 0x6a, 0x32, 0x4f, 0x55, 0x46 }} gEfiRngAlgorithmX931AesGuid= { 0xacd03321, 0x777e, 0x4d3d, {0xb1, 0xc8, 0x20, 0xcf, 0xd8, 0x88, 0x20, 0xc9 }} gEfiRngAlgorithmRaw= { 0xe43176d7, 0xb6e8, 0x4827, {0xb7, 0x84, 0x7f, 0xfd, 0xc4, 0xb6, 0x85, 0x61 }} + gEfiRngAlgorithmArmRndr= { 0x43d2fde3, 0x9d4e, 0x4d79, {0x02, 0x96, 0xa8, 0x9b, 0xca, 0x78, 0x08, 0x41 }} + gEfiRngAlgorithmUnSafe = { 0x869f728c, 0x409d, 0x4ab4, {0xac, 0x03, 0x71, 0xd3, 0x09, 0xc1, 0xb3, 0xf4 }} ## Include/Protocol/AdapterInformation.h gEfiAdapterInfoMediaStateGuid = { 0xD7C74207, 0xA831, 0x4A26, {0xB1, 0xF5, 0xD1, 0x93, 0x06, 0x5C, 0xE8, 0xB6 }} -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106634): https://edk2.groups.io/g/devel/message/106634 Mute This Topic: https://groups.io/mt/99943075/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] MdePkg/DxeRngLib: Request raw algorithm instead of default
From: Pierre Gondois The DxeRngLib tries to generate a random number using the 3 NIST SP 800-90 compliant DRBG algorithms, i.e. 256-bits CTR, HASH and HMAC. If none of the call is successful, the fallback option is the default RNG algorithm of the EFI_RNG_PROTOCOL. This default algorithm might be an unsafe implementation. Try requesting the Raw algorithm before requesting the default one. Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- MdePkg/Library/DxeRngLib/DxeRngLib.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/MdePkg/Library/DxeRngLib/DxeRngLib.c b/MdePkg/Library/DxeRngLib/DxeRngLib.c index 46aea515924f..a01b66ad7d20 100644 --- a/MdePkg/Library/DxeRngLib/DxeRngLib.c +++ b/MdePkg/Library/DxeRngLib/DxeRngLib.c @@ -65,9 +65,15 @@ GenerateRandomNumberViaNist800Algorithm ( return Status; } + Status = RngProtocol->GetRNG (RngProtocol, , BufferSize, Buffer); + DEBUG ((DEBUG_INFO, "%a: GetRNG algorithm Raw - Status = %r\n", __func__, Status)); + if (!EFI_ERROR (Status)) { +return Status; + } + // If all the other methods have failed, use the default method from the RngProtocol Status = RngProtocol->GetRNG (RngProtocol, NULL, BufferSize, Buffer); - DEBUG ((DEBUG_INFO, "%a: GetRNG algorithm Hash-256 - Status = %r\n", __func__, Status)); + DEBUG ((DEBUG_INFO, "%a: GetRNG algorithm default - Status = %r\n", __func__, Status)); if (!EFI_ERROR (Status)) { return Status; } -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106633): https://edk2.groups.io/g/devel/message/106633 Mute This Topic: https://groups.io/mt/99943074/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v2 1/6] SecurityPkg/SecurityPkg.dec: Move PcdCpuRngSupportedAlgorithm to MdePkg
From: Pierre Gondois In order to use PcdCpuRngSupportedAlgorithm in the MdePkg in a following patch and to avoid making the MdePkg dependent on another package, move PcdCpuRngSupportedAlgorithm to the MdePkg. As the Pcd is only used for AARCH64, place it in an AARCH64 specific sections. Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- Notes: v2: - Change gEfiMdePkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm token number - Rename to 'SecurityPkg/SecurityPkg.dec: Move PcdCpuRngSupportedAlgorithm to MdePkg' MdePkg/MdePkg.dec | 5 + SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf | 4 ++-- SecurityPkg/SecurityPkg.dec | 2 -- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index b85614992b94..5b8477f4cb8f 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -2393,6 +2393,11 @@ [PcdsFixedAtBuild,PcdsPatchableInModule] # @Prompt Time-out for a response, internal gEfiMdePkgTokenSpaceGuid.PcdIpmiSsifResponseRetryIntervalMicrosecond|6|UINT32|0x0036 +[PcdsFixedAtBuild.AARCH64, PcdsPatchableInModule.AARCH64] + ## GUID identifying the Rng algorithm implemented by CPU instruction. + # @Prompt CPU Rng algorithm's GUID. + gEfiMdePkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm|{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}|VOID*|0x0037 + [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] ## This value is used to set the base address of PCI express hierarchy. # @Prompt PCI Express Base Address. diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf b/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf index c8e0ee4ae5d9..d6c2d30195bf 100644 --- a/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf +++ b/SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf @@ -79,8 +79,8 @@ [Guids] [Protocols] gEfiRngProtocolGuid## PRODUCES -[Pcd] - gEfiSecurityPkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm ## CONSUMES +[Pcd.AARCH64] + gEfiMdePkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm ## CONSUMES [Depex] TRUE diff --git a/SecurityPkg/SecurityPkg.dec b/SecurityPkg/SecurityPkg.dec index 53aa7ec43557..00c4ebdbed59 100644 --- a/SecurityPkg/SecurityPkg.dec +++ b/SecurityPkg/SecurityPkg.dec @@ -325,8 +325,6 @@ [PcdsFixedAtBuild, PcdsPatchableInModule] gEfiSecurityPkgTokenSpaceGuid.PcdStatusCodeFvVerificationPass|0x0303100A|UINT32|0x00010030 gEfiSecurityPkgTokenSpaceGuid.PcdStatusCodeFvVerificationFail|0x0303100B|UINT32|0x00010031 - gEfiSecurityPkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm|{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}|VOID*|0x00010032 - [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] ## Image verification policy for OptionRom. Only following values are valid: # NOTE: Do NOT use 0x5 and 0x2 since it violates the UEFI specification and has been removed. -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106632): https://edk2.groups.io/g/devel/message/106632 Mute This Topic: https://groups.io/mt/99943073/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v2 0/6] SecurityPkg/MdePkg: Update RngLib GUID identification
From: Pierre Gondois v2: [1/8] MdePkg/ArmTrngLib: Remove ASSERTs in Null implementation - Dropped [2/8] MdePkg/MdePkg.dec: Move PcdCpuRngSupportedAlgorithm to MdePkg - Change gEfiMdePkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm token number - Rename to SecurityPkg/SecurityPkg.dec: Move PcdCpuRngSupportedAlgorithm to MdePkg [5/8] MdePkg/Rng: Add GetRngGuid() to RngLib - Remove gEfiRngAlgorithmUnSafe from inf file - Split Guids definitions in arch specific sections [6/8] SecurityPkg/RngDxe: Use GetRngGuid() when probing RngLib - Remove RngFindDefaultAlgo() and change logic accordingly. [7/8] SecurityPkg/RngDxe: Select safe default Rng algorithm - Dropped due to changes in [6/8] This patch also requires the following patch on top of the serie: - https://edk2.groups.io/g/devel/message/106546 This patchset follows the 'code first' approach and relates to [1]. This patchset follows the thread at [3] that aims to solve [2]. [1] and [2] are bound and this patchset aims to solve both. In this patchset: a- The RngDxe can rely on the RngLib. However the RngLib has no interface allowing to describe which Rng algorithm is implemented. The RngDxe must advertise the algorithm that are available through the RngGetInfo() callback. Add a GetRngGuid() for interface to the RngLib. b- The Arm Architecture states the RNDR that the DRBG algorithm should be compliant with NIST SP800-90A, while not mandating a particular algorithm, so as to be inclusive of different geographies. The RngLib can rely on this Arm RNDR instruction. In order to accurately describe the implementation using the RNDR instruction, add a EFI_RNG_ALGORITHM_ARM_RNDR GUID [1]. c- For the same reason as a/b, add a GUID describing unsafe RNG algorithms, allowing to accurately describe the BaseRngLibTimerLib. d- Use a/b/c mechanisms/GUIDs to select a safe Rng algorithm in the Arm implementation of the RngDxe. [1] BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4441 [2] BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4151 [3] https://edk2.groups.io/g/devel/message/100806 Pierre Gondois (6): SecurityPkg/SecurityPkg.dec: Move PcdCpuRngSupportedAlgorithm to MdePkg MdePkg/DxeRngLib: Request raw algorithm instead of default MdePkg/Rng: Add GUIDs to describe Rng algorithms MdePkg/Rng: Add GetRngGuid() to RngLib SecurityPkg/RngDxe: Use GetRngGuid() when probing RngLib SecurityPkg/RngDxe: Simplify Rng algorithm selection for Arm MdePkg/Include/Library/RngLib.h | 17 ++ MdePkg/Include/Protocol/Rng.h | 20 +++ MdePkg/Library/BaseRngLib/AArch64/Rndr.c | 42 +++ MdePkg/Library/BaseRngLib/BaseRngLib.inf | 10 MdePkg/Library/BaseRngLib/Rand/RdRand.c | 26 + .../Library/BaseRngLibNull/BaseRngLibNull.c | 22 .../BaseRngLibTimerLib/BaseRngLibTimerLib.inf | 3 ++ .../Library/BaseRngLibTimerLib/RngLibTimer.c | 28 ++ MdePkg/Library/DxeRngLib/DxeRngLib.c | 36 - MdePkg/MdePkg.dec | 7 +++ .../RngDxe/AArch64/AArch64Algo.c | 54 +-- .../RandomNumberGenerator/RngDxe/ArmRngDxe.c | 23 .../RandomNumberGenerator/RngDxe/RngDxe.inf | 5 +- SecurityPkg/SecurityPkg.dec | 2 - 14 files changed, 258 insertions(+), 37 deletions(-) -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106631): https://edk2.groups.io/g/devel/message/106631 Mute This Topic: https://groups.io/mt/99943072/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH edk2-platforms v2 3/3] Platform/SbsaQemu: handle systems without GIC ITS
Hi, Marcin On 2023-07-04 15:36, marcin.juszkiewicz wrote: The problem is with QEMU 8.0.0 (no GIC ITS) where I get some kernel complaints about interrupts. And this is what I am working on right now. https://github.com/hrw/fork-edk2-platforms/commits/submit/0628-its has my work-in-progress tree. Thanks for your patient explanation and sharing. Many thanks Yuquan -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106630): https://edk2.groups.io/g/devel/message/106630 Mute This Topic: https://groups.io/mt/99854681/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] [edk2-staging] BaseTools/FMMT: C FMMT match new version machine defines
Hi Liming and Cran, Can you help merge the code? It is urgent for us to use. Thanks a lot~ Thanks, Christine > -Original Message- > From: gaoliming > Sent: Tuesday, June 27, 2023 2:14 PM > To: Chen, Christine ; devel@edk2.groups.io > Cc: 'Rebecca Cran' ; Feng, Bob C > > Subject: 回复: [Patch V3] [edk2-staging] BaseTools/FMMT: C FMMT match > new version machine defines > > Reviewed-by: Liming Gao > > > -邮件原件- > > 发件人: Yuwei Chen > > 发送时间: 2023年6月27日 10:54 > > 收件人: devel@edk2.groups.io > > 抄送: Rebecca Cran ; Liming Gao > > ; Bob Feng > > 主题: [Patch V3] [edk2-staging] BaseTools/FMMT: C FMMT match new > version > > machine defines > > > > BaseTools have switch from EFI_IMAGE_MACHINE_* to > > IMAGE_FILE_MACHINE_*. Thus, match the FCE & FMMT tool in edk2- > staging > > repo with the new version define. > > > > Cc: Rebecca Cran > > Cc: Liming Gao > > Cc: Bob Feng > > Signed-off-by: Yuwei Chen > > --- > > > > V3 modify the patch with the correct define > > BaseTools/Source/C/FMMT/Rebase.c | 12 ++-- > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/BaseTools/Source/C/FMMT/Rebase.c > > b/BaseTools/Source/C/FMMT/Rebase.c > > index d32217d18c..20f8e5a3fc 100644 > > --- a/BaseTools/Source/C/FMMT/Rebase.c > > +++ b/BaseTools/Source/C/FMMT/Rebase.c > > @@ -159,8 +159,8 @@ EFI_NOT_FOUND No compressed > > sections could be found. > >return Status; > > > > } > > > > > > > > -//if ((ImageContext.Machine == EFI_IMAGE_MACHINE_ARMT) || > > > > -// (ImageContext.Machine == EFI_IMAGE_MACHINE_AARCH64)) { > > > > +//if ((ImageContext.Machine == > > IMAGE_FILE_MACHINE_ARMTHUMB_MIXED) || > > > > +// (ImageContext.Machine == IMAGE_FILE_MACHINE_ARM64)) { > > > > // mArm = TRUE; > > > > //} > > > > > > > > @@ -435,8 +435,8 @@ EFI_NOT_FOUND No compressed > > sections could be found. > >return Status; > > > > } > > > > > > > > -//if ((ImageContext.Machine == EFI_IMAGE_MACHINE_ARMT) || > > > > -// (ImageContext.Machine == EFI_IMAGE_MACHINE_AARCH64)) { > > > > +//if ((ImageContext.Machine == > > IMAGE_FILE_MACHINE_ARMTHUMB_MIXED) || > > > > +// (ImageContext.Machine == IMAGE_FILE_MACHINE_ARM64)) { > > > > // mArm = TRUE; > > > > //} > > > > > > > > @@ -835,8 +835,8 @@ Returns: > >// > > > >// Verify machine type is supported > > > >// > > > > - if ((*MachineType != EFI_IMAGE_MACHINE_IA32) && (*MachineType != > > EFI_IMAGE_MACHINE_X64) && (*MachineType != > > EFI_IMAGE_MACHINE_EBC) && > > > > - (*MachineType != EFI_IMAGE_MACHINE_ARMT) && > > (*MachineType != EFI_IMAGE_MACHINE_AARCH64)) { > > > > + if ((*MachineType != IMAGE_FILE_MACHINE_I386) && (*MachineType != > > IMAGE_FILE_MACHINE_X64) && (*MachineType != > > IMAGE_FILE_MACHINE_EBC) && > > > > + (*MachineType != IMAGE_FILE_MACHINE_ARMTHUMB_MIXED) && > > (*MachineType != IMAGE_FILE_MACHINE_ARM64)) { > > > > Error (NULL, 0, 3000, "Invalid", "Unrecognized machine type in > > the > PE32 > > file."); > > > > return EFI_UNSUPPORTED; > > > >} > > > > -- > > 2.27.0.windows.1 > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106629): https://edk2.groups.io/g/devel/message/106629 Mute This Topic: https://groups.io/mt/99942575/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH edk2-platforms v2 3/3] Platform/SbsaQemu: handle systems without GIC ITS
W dniu 4.07.2023 o 09:20, Yuquan Wang pisze: Sorry to disturb you but I would like to consult you a little question about this patch because of my lack of engineering experience: Q: It seems like that the third patch will delete Iort.aslc file and moving the creation of IORT into SbsaQemuAcpiDxe driver, so the firmware can dynamically create a suitable MADT & IORT ? Yes. By the way, dose this means part of Shashi's code in the first patch (add GIC ITS support) will be covered/removed? This series is work in progress. Shashi wrote GIC ITS code over year ago but it was waiting for versioning of the platform. His code works if QEMU has GIC ITS support built-in. But had address hardcoded. I added export of GIC ITS address into DeviceTree exported by QEMU. Then TF-A exports it. EDK2 uses SMC call to get address from TF-A and initialize GIC ITS properly. I added code for it to Shashi's patch so it can be tested how it is supposed to work on platform with GIC ITS present. Then I started working on getting EDK2 working on system where GIC ITS is not present (like QEMU 8.0.0 release). On such platform we cannot export ITS node in neither MADT nor IORT because there is no (virtual) hardware for it. I lack skills to handle .aslc files so moved creation of tables to C code and added some checks so ITS nodes are created only when there is ITS hardware present. QEMU HEAD (with GIC ITS) boots fine to Linux and complex PCI Express setups work (my test config has PCIe switch, PCIe-to-PCI bridge, PCIe root ports and extra PCIe root complex). The problem is with QEMU 8.0.0 (no GIC ITS) where I get some kernel complaints about interrupts. And this is what I am working on right now. https://github.com/hrw/fork-edk2-platforms/commits/submit/0628-its has my work-in-progress tree. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106628): https://edk2.groups.io/g/devel/message/106628 Mute This Topic: https://groups.io/mt/99854681/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v2 1/1] OvmfPkg/README: Document Secure Boot
On Fri, Jun 30, 2023 at 02:26:03AM +0400, Joursoir wrote: > Add the new section for Secure Boot. > > Signed-off-by: Alexander Goncharov Acked-by: Gerd Hoffmann take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106627): https://edk2.groups.io/g/devel/message/106627 Mute This Topic: https://groups.io/mt/99860809/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH edk2-platforms v2 3/3] Platform/SbsaQemu: handle systems without GIC ITS
Hi Marcin, Sorry to disturb you but I would like to consult you a little question about this patch because of my lack of engineering experience: Q: It seems like that the third patch will delete Iort.aslc file and moving the creation of IORT into SbsaQemuAcpiDxe driver, so the firmware can dynamically create a suitable MADT & IORT ? By the way, dose this means part of Shashi's code in the first patch (add GIC ITS support) will be covered/removed? Many thanks Yuquan -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106626): https://edk2.groups.io/g/devel/message/106626 Mute This Topic: https://groups.io/mt/99854681/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v4 5/7] OvmfPkg/RiscVVirt: Add VirtNorFlashDxe to APRIORI list
On Mon, Jul 03, 2023 at 11:45:45PM -0700, Tuan Phan wrote: > As i said, VirtNorFlashDxe needed to be loaded before VariableRuntimeDxe so > your suggestion will not work. > Okay, at least for me, by removing APRIORI patch and adding this depex, edk2 boots fine with your series. I am not sure what won't work. Hi Ard, any thoughts? If no better way, may be we have to use APRIORI. Thanks, Sunil > On Mon, Jul 3, 2023 at 10:07 PM Sunil V L wrote: > > > On Wed, Jun 28, 2023 at 02:27:10PM -0700, Tuan Phan wrote: > > > On Wed, Jun 28, 2023 at 9:47 AM Sunil V L > > wrote: > > > > > > > On Fri, Jun 23, 2023 at 11:39:32AM -0700, Tuan Phan wrote: > > > > > Make sure VirtNorFlashDxe loaded before VariableRuntimeDxe as it > > > > > is the backend flash driver. > > > > > > > > > > Signed-off-by: Tuan Phan > > > > > --- > > > > > OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf | 10 ++ > > > > > 1 file changed, 10 insertions(+) > > > > > > > > > > diff --git a/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf > > > > b/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf > > > > > index 21e4ba67379f..9ab8eb3ba7d8 100644 > > > > > --- a/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf > > > > > +++ b/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf > > > > > @@ -53,6 +53,16 @@ READ_STATUS= TRUE > > > > > READ_LOCK_CAP = TRUE > > > > > READ_LOCK_STATUS = TRUE > > > > > > > > > > +APRIORI DXE { > > > > > + INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf > > > > > + INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf > > > > > + INF > > > > > > MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf > > > > > + INF > > > > > > MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf > > > > > + INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf > > > > > + INF UefiCpuPkg/CpuDxeRiscV64/CpuDxeRiscV64.inf > > > > > + INF OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf > > > > > +} > > > > > + > > > > Hi Tuan, > > > > > > > > Actually, Ard had recommended not to use APRIORI and hence we avoided > > > > it when we upstreamed RiscVVirt. So, I am wondering whether this can be > > > > avoided by using depex in CpuDxe on gEfiVariableArchProtocolGuid? > > > > > > > > Hi Sunil, > > > Not sure what the reason behind avoiding APRIORI besides it is a > > workaround > > > for broken DEPEX. BTW, what we need is to put VirtNorFlashDxe loaded > > before > > > VariableRuntimeDxe which doesn't depend on any modules. I don't see any > > > other clearer way than modifying VirNorFlashDxe as shown in the first > > > version of this series. > > > > > > The CpuDxeRiscV64 in the aprioriy list as VirNorFlashDxe depends on it. > > > > > Hi Tuan, > > > > I couldn't locate old mail from Ard recommending to remove APRIORI in > > RISC-V. But here is the recent mail on different context but those > > reasons are still valid in any case. > > https://edk2.groups.io/g/devel/message/104543 > > > > IMO, there is no dependency between VirtNorFlashDxe and > > VariableRuntimeDxe. I think what we need is CpuDxeRiscV64 loaded after > > VariableRuntimeDxe and before VirtNorFlashDxe. A simple depex like I > > suggested in previous mail should work. I still prefer this than > > introducing APRIORI unless there are other issues I am now aware of. > > What do you think? > > > > Thanks! > > Sunil > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106625): https://edk2.groups.io/g/devel/message/106625 Mute This Topic: https://groups.io/mt/99724477/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v4 5/7] OvmfPkg/RiscVVirt: Add VirtNorFlashDxe to APRIORI list
As i said, VirtNorFlashDxe needed to be loaded before VariableRuntimeDxe so your suggestion will not work. On Mon, Jul 3, 2023 at 10:07 PM Sunil V L wrote: > On Wed, Jun 28, 2023 at 02:27:10PM -0700, Tuan Phan wrote: > > On Wed, Jun 28, 2023 at 9:47 AM Sunil V L > wrote: > > > > > On Fri, Jun 23, 2023 at 11:39:32AM -0700, Tuan Phan wrote: > > > > Make sure VirtNorFlashDxe loaded before VariableRuntimeDxe as it > > > > is the backend flash driver. > > > > > > > > Signed-off-by: Tuan Phan > > > > --- > > > > OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf | 10 ++ > > > > 1 file changed, 10 insertions(+) > > > > > > > > diff --git a/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf > > > b/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf > > > > index 21e4ba67379f..9ab8eb3ba7d8 100644 > > > > --- a/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf > > > > +++ b/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf > > > > @@ -53,6 +53,16 @@ READ_STATUS= TRUE > > > > READ_LOCK_CAP = TRUE > > > > READ_LOCK_STATUS = TRUE > > > > > > > > +APRIORI DXE { > > > > + INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf > > > > + INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf > > > > + INF > > > > MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf > > > > + INF > > > > MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf > > > > + INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf > > > > + INF UefiCpuPkg/CpuDxeRiscV64/CpuDxeRiscV64.inf > > > > + INF OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf > > > > +} > > > > + > > > Hi Tuan, > > > > > > Actually, Ard had recommended not to use APRIORI and hence we avoided > > > it when we upstreamed RiscVVirt. So, I am wondering whether this can be > > > avoided by using depex in CpuDxe on gEfiVariableArchProtocolGuid? > > > > > > Hi Sunil, > > Not sure what the reason behind avoiding APRIORI besides it is a > workaround > > for broken DEPEX. BTW, what we need is to put VirtNorFlashDxe loaded > before > > VariableRuntimeDxe which doesn't depend on any modules. I don't see any > > other clearer way than modifying VirNorFlashDxe as shown in the first > > version of this series. > > > > The CpuDxeRiscV64 in the aprioriy list as VirNorFlashDxe depends on it. > > > Hi Tuan, > > I couldn't locate old mail from Ard recommending to remove APRIORI in > RISC-V. But here is the recent mail on different context but those > reasons are still valid in any case. > https://edk2.groups.io/g/devel/message/104543 > > IMO, there is no dependency between VirtNorFlashDxe and > VariableRuntimeDxe. I think what we need is CpuDxeRiscV64 loaded after > VariableRuntimeDxe and before VirtNorFlashDxe. A simple depex like I > suggested in previous mail should work. I still prefer this than > introducing APRIORI unless there are other issues I am now aware of. > What do you think? > > Thanks! > Sunil > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106624): https://edk2.groups.io/g/devel/message/106624 Mute This Topic: https://groups.io/mt/99724477/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-