Re: [edk2-devel] [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check
On 2022/1/19 15:29, Chang, Abner (HPS SW/FW Technologist) wrote: > Hi Wenyi, > May I know what is the problem you encountered and what environment causes > the issue? Is that under edk2 emulation or the real Redfish service? > Hi Abner, I didn't encounter any issue and there's no functional change in this patch, just try to simplify the code. Please review whether it's OK or not. Thanks Wenyi > Thanks > Abner > -- > *From:* Wenyi Xie > *Sent:* Wednesday, January 19, 2022 2:12 PM > *To:* devel@edk2.groups.io ; Chang, Abner (HPS SW/FW > Technologist) ; Wang, Nickle (Server BIOS) > > *Cc:* songdongku...@huawei.com ; > xiewen...@huawei.com > *Subject:* [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status > check > > Main Changes : > 1.Remove redundant if statement. > > Wenyi Xie (1): > RedfishPkg/RedfishRestExDxe:Simplify status check > > RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c | 38 +--- > 1 file changed, 17 insertions(+), 21 deletions(-) > > -- > 2.20.1.windows.1 > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85807): https://edk2.groups.io/g/devel/message/85807 Mute This Topic: https://groups.io/mt/88529321/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 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check
Hi Wenyi, May I know what is the problem you encountered and what environment causes the issue? Is that under edk2 emulation or the real Redfish service? Thanks Abner From: Wenyi Xie Sent: Wednesday, January 19, 2022 2:12 PM To: devel@edk2.groups.io ; Chang, Abner (HPS SW/FW Technologist) ; Wang, Nickle (Server BIOS) Cc: songdongku...@huawei.com ; xiewen...@huawei.com Subject: [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check Main Changes : 1.Remove redundant if statement. Wenyi Xie (1): RedfishPkg/RedfishRestExDxe:Simplify status check RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c | 38 +--- 1 file changed, 17 insertions(+), 21 deletions(-) -- 2.20.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85806): https://edk2.groups.io/g/devel/message/85806 Mute This Topic: https://groups.io/mt/88529321/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
回复: [edk2-devel] [PATCH v3 0/2] MdePkg,SecurityPkg: Add support to RngDxe and BaseRngLib for AARCH64 RNDR
Pierre: MdePkg can provide the arch specific implementation. BaseRngLib places the arch specific code into its Arch directory. If the arch logic is generic enough, new API can be defined in BaseLib. Thanks Liming > -邮件原件- > 发件人: devel@edk2.groups.io 代表 > PierreGondois > 发送时间: 2022年1月18日 17:24 > 收件人: devel@edk2.groups.io; Jiewen Yao ; Jian J > Wang ; Michael D Kinney > ; Liming Gao ; > Zhiguang Liu ; Ard Biesheuvel > ; Sami Mujawar ; > Rebecca Cran > 主题: Re: [edk2-devel] [PATCH v3 0/2] MdePkg,SecurityPkg: Add support to > RngDxe and BaseRngLib for AARCH64 RNDR > > Hello all, > I have a question about the this patch, and more generically the organization > of the MdePkg. The current organization, for the BaseRngLib, is as: > - the BaseRngLib implements the library functions of >MdePkg/Include/Library/RngLib.h > - the BaseRngLib contains Ia32, X64 and AARCH64 implementations > > This means the BaseRngLib contains arch specific functions. It comes that I > would like to re-use one of these arch specific functions. My question is > then, shouldn't the BaseRngLib contains an arch agnostic implementation, > and the arch specific implementation be placed in arch specific folders > (ArmPkg for arm, I am not sure for other architectures) ? > > Another possibility for me is to me is to move the function that I want > to use to the ArmPkg, but this means the MdePkg would be dependent > on the ArmPkg. Would this be a viable option ? > > Regards, > Pierre > > On 5/10/21 11:53 PM, Rebecca Cran via groups.io wrote: > > Update MdePkg BaseRngLib and SecurityPkg RngDxe to add support for > > the AARCH64 RNDR instruction. > > > > Changes from v2 to v3: > > > > o Fixed the default value of > gEfiSecurityPkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm > > to be an empty GUID. > > o Removed RNDRRS since it wasn't being used. > > o Fixed the commit message to remove mention of BaseLib. > > > > Rebecca Cran (2): > > MdePkg/BaseRngLib: Add support for ARMv8.5 RNG instructions > > SecurityPkg: Add support for RngDxe on AARCH64 > > > > MdePkg/MdePkg.dec > | 9 +- > > SecurityPkg/SecurityPkg.dec | > 2 + > > MdePkg/MdePkg.dsc > | 4 +- > > SecurityPkg/SecurityPkg.dsc | > 11 +- > > MdePkg/Library/BaseRngLib/BaseRngLib.inf | > 23 ++- > > SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf > | 24 ++- > > MdePkg/Library/BaseRngLib/AArch64/ArmRng.h > | 43 + > > MdePkg/Library/BaseRngLib/BaseRngLibInternals.h | > 78 + > > SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/AesCore.h | > 0 > > SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/RdRand.h | > 17 -- > > SecurityPkg/RandomNumberGenerator/RngDxe/RngDxeInternals.h| > 117 ++ > > MdePkg/Library/BaseRngLib/AArch64/Rndr.c | > 139 > > MdePkg/Library/BaseRngLib/BaseRng.c > | 87 +- > > MdePkg/Library/BaseRngLib/Rand/RdRand.c > | 131 +++ > > SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/RngDxe.c > | 127 +++ > > SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/AesCore.c | > 0 > > SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/RdRand.c | > 45 +- > > SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c > | 146 + > > SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.c > | 170 > > MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.S| > 31 > > MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.asm | > 30 > > MdePkg/Library/BaseRngLib/AArch64/ArmRng.S > | 37 + > > MdePkg/Library/BaseRngLib/AArch64/ArmRng.asm > | 39 + > > MdePkg/Library/BaseRngLib/BaseRngLib.uni | > 6 +- > > 24 files changed, 1086 insertions(+), 230 deletions(-) > > create mode 100644 MdePkg/Library/BaseRngLib/AArch64/ArmRng.h > > create mode 100644 MdePkg/Library/BaseRngLib/BaseRngLibInternals.h > > rename SecurityPkg/RandomNumberGenerator/RngDxe/{ => > Rand}/AesCore.h (100%) > > rename SecurityPkg/RandomNumberGenerator/RngDxe/{ => > Rand}/RdRand.h (72%) > > create mode 100644 > SecurityPkg/RandomNumberGenerator/RngDxe/RngDxeInternals.h > > create mode 100644 MdePkg/Library/BaseRngLib/AArch64/Rndr.c > > create mode 100644 MdePkg/Library/BaseRngLib/Rand/RdRand.c > > create mode 100644 > SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/RngDxe.c > > rename SecurityPkg/RandomNumberGenerator/RngDxe/{ => > Rand}/AesCore.c (100%) > > rename SecurityPkg/RandomNumberGenerator/RngDxe/{ => > Rand}/RdRand.c (71%) > > create mode 100644 > SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c > > create mode 100644 > MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.S > > create mode 100644 > MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.asm > > create mode 100644 MdePkg/Library/BaseRngLib/AArch64/ArmRng.S > > create mode 100644 MdePkg/Library/BaseRngLib/AArch
回复: [edk2-devel] 回复: [PATCH v2 1/1] MdeModulePkg/BdsDxe: Update BdsEntry to use Variable Policy
Rebecca: It has been merged @ d9a7612f8d1da197883bd1cb9f91f229522d39b1 Thanks Liming > -邮件原件- > 发件人: Rebecca Cran > 发送时间: 2022年1月19日 8:18 > 收件人: devel@edk2.groups.io; gaolim...@byosoft.com.cn; > kenlautn...@gmail.com > 抄送: 'Jian J Wang' ; 'Hao A Wu' > ; 'Zhichao Gao' ; 'Ray Ni' > > 主题: Re: [edk2-devel] 回复: [PATCH v2 1/1] MdeModulePkg/BdsDxe: > Update BdsEntry to use Variable Policy > > It looks like the BZ associated with this change is > https://bugzilla.tianocore.org/show_bug.cgi?id=3421 . > > It would be nice to get this fix committed, to stop the loud deprecated > interface messages. > > > -- > Rebecca Cran > > > On 6/16/21 18:58, gaoliming wrote: > > Ken: > >Thanks for your update. Please also update > > MdeModulePkg\Universal\BdsDxe\Bds.h to remove #include > > , because EDKII_VARIABLE_LOCK_PROTOCOL is > not used > > any more. > > > > Thanks > > Liming > >> -邮件原件- > >> 发件人: kenlautn...@gmail.com > >> 发送时间: 2021年6月17日 6:45 > >> 收件人: devel@edk2.groups.io > >> 抄送: Jian J Wang ; Hao A Wu > >> ; Zhichao Gao ; Ray Ni > >> ; Liming Gao > >> 主题: [PATCH v2 1/1] MdeModulePkg/BdsDxe: Update BdsEntry to use > >> Variable Policy > >> > >> From: Ken Lautner > >> > >> Changed BdsEntry.c to use Variable Policy instead of Variable Lock > >> as Variable Lock will be Deprecated eventually > >> > >> Cc: Jian J Wang > >> Cc: Hao A Wu > >> Cc: Zhichao Gao > >> Cc: Ray Ni > >> Cc: Liming Gao > >> Signed-off-by: Kenneth Lautner > >> > >> Reviewed-by Liming Gao > >> --- > >> MdeModulePkg/Universal/BdsDxe/BdsDxe.inf | 4 +++- > >> MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 20 > +++- > >> 2 files changed, 18 insertions(+), 6 deletions(-) > >> > >> diff --git a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf > >> b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf > >> index 9310b4dccb18..76ff6a0f5fc3 100644 > >> --- a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf > >> +++ b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf > >> @@ -50,6 +50,8 @@ > >> BaseMemoryLib > >> > >> DebugLib > >> > >> UefiBootManagerLib > >> > >> + VariablePolicyLib > >> > >> + VariablePolicyHelperLib > >> > >> PlatformBootManagerLib > >> > >> PcdLib > >> > >> PrintLib > >> > >> @@ -77,7 +79,7 @@ > >> [Protocols] > >> > >> gEfiBdsArchProtocolGuid ## PRODUCES > >> > >> gEfiSimpleTextInputExProtocolGuid ## CONSUMES > >> > >> - gEdkiiVariableLockProtocolGuid## > >> SOMETIMES_CONSUMES > >> > >> + gEdkiiVariablePolicyProtocolGuid ## > >> SOMETIMES_CONSUMES > >> > >> gEfiDeferredImageLoadProtocolGuid ## CONSUMES > >> > >> > >> > >> [FeaturePcd] > >> > >> diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c > >> b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c > >> index 83b773a2fa5f..13c10bdc5bf8 100644 > >> --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c > >> +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c > >> @@ -15,6 +15,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > >> #include "Bds.h" > >> > >> #include "Language.h" > >> > >> #include "HwErrRecSupport.h" > >> > >> +#include > >> > >> > >> > >> #define SET_BOOT_OPTION_SUPPORT_KEY_COUNT(a, c) { \ > >> > >> (a) = ((a) & ~EFI_BOOT_OPTION_SUPPORT_COUNT) | (((c) << > >> LowBitSet32 (EFI_BOOT_OPTION_SUPPORT_COUNT)) & > >> EFI_BOOT_OPTION_SUPPORT_COUNT); \ > >> > >> @@ -670,7 +671,7 @@ BdsEntry ( > >> EFI_STATUS Status; > >> > >> UINT32 BootOptionSupport; > >> > >> UINT16 BootTimeOut; > >> > >> - EDKII_VARIABLE_LOCK_PROTOCOL*VariableLock; > >> > >> + EDKII_VARIABLE_POLICY_PROTOCOL *VariablePolicy; > >> > >> UINTN Index; > >> > >> EFI_BOOT_MANAGER_LOAD_OPTIONLoadOption; > >> > >> UINT16 *BootNext; > >> > >> @@ -716,12 +717,21 @@ BdsEntry ( > >> // > >> > >> // Mark the read-only variables if the Variable Lock protocol exists > >> > >> // > >> > >> - Status = gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, > >> (VOID **) &VariableLock); > >> > >> - DEBUG ((EFI_D_INFO, "[BdsDxe] Locate Variable Lock protocol - %r\n", > >> Status)); > >> > >> + Status = gBS->LocateProtocol(&gEdkiiVariablePolicyProtocolGuid, NULL, > >> (VOID**)&VariablePolicy); > >> > >> + DEBUG((DEBUG_INFO, "[BdsDxe] Locate Variable Policy protocol > - %r\n", > >> Status)); > >> > >> if (!EFI_ERROR (Status)) { > >> > >> for (Index = 0; Index < ARRAY_SIZE (mReadOnlyVariables); Index++) > { > >> > >> - Status = VariableLock->RequestToLock (VariableLock, > >> mReadOnlyVariables[Index], &gEfiGlobalVariableGuid); > >> > >> - ASSERT_EFI_ERROR (Status); > >> > >> + Status = RegisterBasicVariablePolicy( > >> > >> + VariablePolicy, > >> > >> + &gEfiGlobalVariableGuid, > >> > >> + mReadOnlyVariables[Index], > >> > >> + VARI
[edk2-devel] [PATCH EDK2 v1 0/1] RedfishPkg/RedfishRestExDxe:Simplify status check
Main Changes : 1.Remove redundant if statement. Wenyi Xie (1): RedfishPkg/RedfishRestExDxe:Simplify status check RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c | 38 +--- 1 file changed, 17 insertions(+), 21 deletions(-) -- 2.20.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85803): https://edk2.groups.io/g/devel/message/85803 Mute This Topic: https://groups.io/mt/88529321/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH EDK2 v1 1/1] RedfishPkg/RedfishRestExDxe:Simplify status check
Remove redundant determine statements. No functional change. Cc: Abner Chang Cc: Nickle Wang Signed-off-by: Wenyi Xie --- RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c | 38 +--- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c b/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c index eb1d8b8fa236..ba0a42097b92 100644 --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c @@ -44,7 +44,7 @@ ResetHttpTslSession ( } /** - This function check + This function check Http receive status @param[in] Instance Pointer to EFI_REST_EX_PROTOCOL instance for a particular REST service. @@ -67,37 +67,33 @@ RedfishCheckHttpReceiveStatus ( if (!EFI_ERROR (HttpIoReceiveStatus)) { ReturnStatus = EFI_SUCCESS; - } else if (EFI_ERROR (HttpIoReceiveStatus) && (HttpIoReceiveStatus != EFI_CONNECTION_FIN)) { + } else if (HttpIoReceiveStatus != EFI_CONNECTION_FIN) { if ((Instance->Flags & RESTEX_INSTANCE_FLAGS_TCP_ERROR_RETRY) == 0) { DEBUG ((DEBUG_ERROR, "%a: TCP error, reset HTTP session.\n", __FUNCTION__)); Instance->Flags |= RESTEX_INSTANCE_FLAGS_TCP_ERROR_RETRY; gBS->Stall (500); Status = ResetHttpTslSession (Instance); - if (EFI_ERROR (Status)) { -DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __FUNCTION__)); -ReturnStatus = EFI_DEVICE_ERROR; - } else { + if (!EFI_ERROR (Status)) { return EFI_NOT_READY; } -} else { - ReturnStatus = EFI_DEVICE_ERROR; + DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __FUNCTION__)); } + +ReturnStatus = EFI_DEVICE_ERROR; } else { -if (HttpIoReceiveStatus == EFI_CONNECTION_FIN) { - if ((Instance->Flags & RESTEX_INSTANCE_FLAGS_TLS_RETRY) != 0) { -DEBUG ((DEBUG_ERROR, "%a: REST_EX Send and receive fail even with a new TLS session.\n", __FUNCTION__)); -ReturnStatus = EFI_DEVICE_ERROR; - } - - Instance->Flags |= RESTEX_INSTANCE_FLAGS_TLS_RETRY; - Status = ResetHttpTslSession (Instance); - if (EFI_ERROR (Status)) { -DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __FUNCTION__)); -ReturnStatus = EFI_DEVICE_ERROR; - } +if ((Instance->Flags & RESTEX_INSTANCE_FLAGS_TLS_RETRY) != 0) { + DEBUG ((DEBUG_ERROR, "%a: REST_EX Send and receive fail even with a new TLS session.\n", __FUNCTION__)); + ReturnStatus = EFI_DEVICE_ERROR; +} - return EFI_NOT_READY; +Instance->Flags |= RESTEX_INSTANCE_FLAGS_TLS_RETRY; +Status = ResetHttpTslSession (Instance); +if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __FUNCTION__)); + ReturnStatus = EFI_DEVICE_ERROR; } + +return EFI_NOT_READY; } // -- 2.20.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85802): https://edk2.groups.io/g/devel/message/85802 Mute This Topic: https://groups.io/mt/88529319/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 1/2] ShellPkg/AcpiView: Adds ACPI_PARSER bitfield parser
[AMD Official Use Only] Hi Zhichao Gao, Ray Ni, Could you please review the below patches and merge the changes? Thanks AbduL -Original Message- From: Attar, AbdulLateef (Abdul Lateef) Sent: 07 January 2022 08:29 To: devel@edk2.groups.io; Attar, AbdulLateef (Abdul Lateef) Cc: Ray Ni ; Zhichao Gao ; Sami Mujawar Subject: RE: [edk2-devel] [PATCH v4 1/2] ShellPkg/AcpiView: Adds ACPI_PARSER bitfield parser Gentle reminder...please review and merge the changeset. -Original Message- From: devel@edk2.groups.io On Behalf Of Abdul Lateef Attar via groups.io Sent: 19 December 2021 20:15 To: devel@edk2.groups.io Cc: Ray Ni ; Zhichao Gao ; Sami Mujawar Subject: [edk2-devel] [PATCH v4 1/2] ShellPkg/AcpiView: Adds ACPI_PARSER bitfield parser [CAUTION: External Email] Adds ParseAcpiBitFields() which is based on ParseAcpi() and capable of parsing the bit fields. Supports parsing of UINT8, UINT16, UINT32 and UINT64 byte data. Cc: Ray Ni Cc: Zhichao Gao Cc: Sami Mujawar Signed-off-by: Abdul Lateef Attar --- ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h | 45 + ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 185 2 files changed, 230 insertions(+) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h index 5c916a4720b8..83266e8ec2d3 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h @@ -2,6 +2,7 @@ Header file for ACPI parser Copyright (c) 2016 - 2020, Arm Limited. All rights reserved. + Copyright (c) 2021, AMD Incorporated. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -251,6 +252,11 @@ typedef VOID (EFIAPI *FNPTR_FIELD_VALIDATOR)(UINT8 *Ptr, VOID *Context); the field data. If the field is more complex and requires additional processing for formatting and representation a print formatter function can be specified in 'PrintFormatter'. + + ParseAcpiBitFields() uses AcpiParser structure to parse the bit fields. + It considers Length as a number of bits that need to be parsed. + Also, the Offset field will be considered as starting offset of the bitfield. + The PrintFormatter function may choose to use the format string specified by 'Format' or use its own internal format string. @@ -264,10 +270,12 @@ typedef struct AcpiParser { /// The length of the field. /// (Byte Length column from ACPI table spec) + /// Length(in bits) of the bitfield if used with ParseAcpiBitFields(). UINT32 Length; /// The offset of the field from the start of the table. /// (Byte Offset column from ACPI table spec) + /// The Bit offset of the field if used with ParseAcpiBitFields(). UINT32 Offset; /// Optional Print() style format string for tracing the data. If not @@ -364,6 +372,43 @@ ParseAcpi ( IN UINT32 ParserItems ); +/** + This function is used to parse an ACPI table bitfield buffer. + + The ACPI table buffer is parsed using the ACPI table parser + information + specified by a pointer to an array of ACPI_PARSER elements. This + parser + function iterates through each item on the ACPI_PARSER array and logs the ACPI table bitfields. + + This function can optionally be used to parse ACPI tables and fetch + specific + field values. The ItemPtr member of the ACPI_PARSER structure (where + used) + is updated by this parser function to point to the selected field + data + (e.g. useful for variable length nested fields). + + @param [in] TraceTrace the ACPI fields TRUE else only parse the + table. + @param [in] Indent Number of spaces to indent the output. + @param [in] AsciiNameOptional pointer to an ASCII string that describes + the table being parsed. + @param [in] Ptr Pointer to the start of the buffer. + @param [in] Length Length of the buffer pointed by Ptr. + @param [in] Parser Pointer to an array of ACPI_PARSER structure that + describes the table being parsed. + @param [in] ParserItems Number of items in the ACPI_PARSER array. + + @retval Number of bits parsed. +**/ +UINT32 +EFIAPI +ParseAcpiBitFields ( + IN BOOLEANTrace, + IN UINT32 Indent, + IN CONST CHAR8*AsciiName OPTIONAL, + IN UINT8 *Ptr, + IN UINT32 Length, + IN CONST ACPI_PARSER *Parser, + IN UINT32 ParserItems + ); + /** This is a helper macro to pass parameters to the Parser functions. diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c index cb193a5ea449..94ee26f42ab9 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/A
回复: [edk2-devel] [PATCH] MdeModulePkg/HiiDatabaseDxe: Add Support for authenticated variable
Lin: > -邮件原件- > 发件人: Chen, Lin Z > 发送时间: 2022年1月18日 8:42 > 收件人: Gao, Liming ; devel@edk2.groups.io; > Huang, Long1 > 抄送: Bi, Dandan ; Feng, Bob C > ; Zhang, Di ; Li, Zhuangzhi > > 主题: RE: [edk2-devel] [PATCH] MdeModulePkg/HiiDatabaseDxe: Add > Support for authenticated variable > > Hi Liming, > >Pls see my comments below. > > 1. > PcdNvStoreDefaultValueBuffer type is DynamicEx. Its PcdGetPtr is same to > PcdGetExPtr. This change is not required. > > [Lin] It'll get alignment with PEI phase reference If using PcdGetExPtr > version. > Edk2/MdeModulePkg/Universal/PCD/Pei/Pcd.c#166 > DataBuffer = (UINT8 *)PeiPcdGetPtrEx (&gEfiMdeModulePkgTokenSpaceGuid, > PcdToken (PcdNvStoreDefaultValueBuffer)); > PcdPei is different. It is Pcd driver. It can't consume the real PcdLib. So, it doesn't use PcdLib PcdGetPtr() API. It uses the internal function PeiPcdGetPtrEx() to get PCD value and size. HiiDataBase is normal DXE driver. It can depend on the real PcdLib. So, it uses PcdLib PcdGetPtr() API. Seemly, current code brings confuse. If so, I am OK to make this change. And, please also update PcdGetSize (PcdNvStoreDefaultValueBuffer) with LibPcdGetExSize() > 2. > VariableStorage data buffer is from PcdNvStoreDefaultValueBuffer. > PcdNvStoreDefaultValueBuffer is auto generated by BaseTools. > By design, its data format is always normal variable storage format. > So, its value can't be auth variable format. > > [Lin] BaseTools can generate authenticated variable storage format now (see > https://edk2.groups.io/g/devel/message/83329), > since previous FCE tool generates authenticated format, we want to keep > variable storage format no changes after switching to StructurePcd. > Sorry, I miss the previous change in BaseTools. Normal variable storage is enough for Tools and Code. The default setting format can be always normal variable storage. The consumer code logic can be simple. I don't know what purpose to keep the alignment with FCE tool behavior. Is there other tool or code to use the generated PcdNvStoreDefaultValueBuffer? Thanks Liming > Thanks, > Lin > > -Original Message- > From: gaoliming > Sent: Monday, January 17, 2022 6:56 PM > To: devel@edk2.groups.io; Huang, Long1 > Cc: Chen, Lin Z ; Bi, Dandan ; > Feng, Bob C > Subject: 回复: [edk2-devel] [PATCH] MdeModulePkg/HiiDatabaseDxe: Add > Support for authenticated variable > > Long: > I add my comments below. > > > -邮件原件- > > 发件人: devel@edk2.groups.io 代表 Long1 > Huang > > 发送时间: 2022年1月11日 1:03 > > 收件人: devel@edk2.groups.io > > 抄送: Huang Long ; Liming Gao > > ; Chen Lin Z ; Dandan > > Bi > > 主题: [edk2-devel] [PATCH] MdeModulePkg/HiiDatabaseDxe: Add Support > for > > authenticated variable > > > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3796 > > > > Database.c: > > 1. Replace PcdGetExPtr with PcdGetExPtr. > > 2. Add FindAuthVariableData function to parse authenticated variable > > type for getting a correct default value in PcdNvStoreDefaultValueBuffer. > > > > Cc: Liming Gao > > Cc: Chen Lin Z > > Cc: Dandan Bi > > > > Signed-off-by: Huang Long > > --- > > .../Universal/HiiDatabaseDxe/Database.c | 147 > +- > > .../HiiDatabaseDxe/HiiDatabaseDxe.inf | 3 + > > 2 files changed, 114 insertions(+), 36 deletions(-) > > > > diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c > > b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c > > index 0b09c24d52..c055fa0f29 100644 > > --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c > > +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c > > @@ -603,6 +603,45 @@ FindVariableData ( > >return NULL; > > > > } > > > > > > > > +/** > > > > + Find the matched authenticated variable from the input variable > storage. > > > > + > > > > + @param[in] VariableStorage Point to the variable storage header. > > > > + @param[in] VarGuid A unique identifier for the variable. > > > > + @param[in] VarAttributeThe attributes bitmask for the variable. > > > > + @param[in] VarName A Null-terminated ascii string that is > the > > name of the variable. > > > > + > > > > + @return Pointer to the matched variable header or NULL if not found. > > > > +**/ > > > > +AUTHENTICATED_VARIABLE_HEADER * > > > > +FindAuthVariableData ( > > > > + IN VARIABLE_STORE_HEADER *VariableStorage, > > > > + IN EFI_GUID *VarGuid, > > > > + IN UINT32 VarAttribute, > > > > + IN CHAR16 *VarName > > > > + ) > > > > +{ > > > > + AUTHENTICATED_VARIABLE_HEADER *AuthVariableHeader; > > > > + AUTHENTICATED_VARIABLE_HEADER *AuthVariableEnd; > > > > + > > > > + AuthVariableEnd= (AUTHENTICATED_VARIABLE_HEADER > *)((UINT8 > > *)VariableStorage + VariableStorage->Size); > > > > + AuthVariableHeader = (AUTHENTICATED_VARIABLE_HEADER > > *)(VariableStorage + 1); > > > > + AuthVariableHeader = (AUTHENTICATED_VARIABLE_HEADER > > *)HEADER_ALIGN (AuthVariableHeader); >
Re: [edk2-devel][edk2-platforms][PATCH V1 15/27] NetworkFeaturePkg: Use MinPlatformPkg build include files
Pushed as e69e69bdf8..d0919cab63 -Original Message- From: Chaganty, Rangasai V Sent: Thursday, January 13, 2022 9:58 PM To: Oram, Isaac W ; devel@edk2.groups.io Cc: Gao, Liming Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 15/27] NetworkFeaturePkg: Use MinPlatformPkg build include files Reviewed-by: Sai Chaganty -Original Message- From: Oram, Isaac W Sent: Tuesday, January 11, 2022 6:20 PM To: devel@edk2.groups.io Cc: Oram, Isaac W ; Chaganty, Rangasai V ; Gao, Liming Subject: [edk2-devel][edk2-platforms][PATCH V1 15/27] NetworkFeaturePkg: Use MinPlatformPkg build include files Standalong build was not working due to missing libraries. Leverage MinPlatformPkg common includes for core libraries. Cc: Sai Chaganty Cc: Liming Gao Signed-off-by: Isaac Oram --- Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc | 89 ++-- Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc | 18 2 files changed, 24 insertions(+), 83 deletions(-) diff --git a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc index bbc91ecbb1..ca151b4e33 100644 --- a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc +++ b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc @@ -18,12 +18,12 @@ # [Defines] -!ifndef $(PEI_ARCH) - !error "PEI_ARCH must be specified to build this feature!" -!endif -!ifndef $(DXE_ARCH) - !error "DXE_ARCH must be specified to build this feature!" -!endif + !ifndef $(PEI_ARCH) +!error "PEI_ARCH must be specified to build this feature!" + !endif + !ifndef $(DXE_ARCH) +!error "DXE_ARCH must be specified to build this feature!" + !endif !include NetworkPkg/NetworkDefines.dsc.inc @@ -41,56 +41,9 @@ # -!include MdePkg/MdeLibs.dsc.inc - [LibraryClasses] !include NetworkPkg/NetworkLibs.dsc.inc - - ### - # Edk2 Packages - ### - BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf - BaseLib|MdePkg/Library/BaseLib/BaseLib.inf - BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf - DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf - DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf - FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf - HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf - IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf - OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf - PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf - PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf - PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf - PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf - ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf - SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf - SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf - TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf - UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf - UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf - UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf - UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf - UefiLib|MdePkg/Library/UefiLib/UefiLib.inf - UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf - -[LibraryClasses.common.SEC,LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM] - ### - # Edk2 Packages - ### - HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf - MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf - PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf - -[LibraryClasses.common.DXE_CORE,LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.SMM_CORE,LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER,LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION] - ### - # Edk2 Packages - ### - DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf - DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf - HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf - MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf - PcdLib|Md
Re: [edk2-devel] [PATCH] MdeModulePkg/HiiDatabaseDxe: Add Support for authenticated variable
-Original Message- From: devel@edk2.groups.io On Behalf Of Long1 Huang Sent: Thursday, January 13, 2022 1:06 AM To: devel@edk2.groups.io Cc: Huang, Long1 ; Feng, Bob C ; Gao, Liming ; Bi, Dandan ; Chen, Lin Z ; Li, Zhuangzhi Subject: [edk2-devel] [PATCH] MdeModulePkg/HiiDatabaseDxe: Add Support for authenticated variable REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3796 Database.c: 1. Replace PcdGetExPtr with PcdGetExPtr. What does above mean? Replace with ? -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85797): https://edk2.groups.io/g/devel/message/85797 Mute This Topic: https://groups.io/mt/88369479/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel][edk2-platforms][PATCH V1 08/27] SmbiosFeaturePkg: Fix all relative package paths
Pushed as d1864efa5b..e69e69bdf8 -Original Message- From: Chaganty, Rangasai V Sent: Thursday, January 13, 2022 9:31 PM To: Oram, Isaac W ; devel@edk2.groups.io Cc: Gao, Liming Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 08/27] SmbiosFeaturePkg: Fix all relative package paths Reviewed-by: Sai Chaganty -Original Message- From: Oram, Isaac W Sent: Tuesday, January 11, 2022 6:20 PM To: devel@edk2.groups.io Cc: Oram, Isaac W ; Chaganty, Rangasai V ; Gao, Liming Subject: [edk2-devel][edk2-platforms][PATCH V1 08/27] SmbiosFeaturePkg: Fix all relative package paths Packages should be at the root of a PACKAGES_PATH entry. At some point, paths were relative to edk2-platforms/Features/Intel which was functional, but interferes with the proper functioning of packaging tools. Cc: Sai Chaganty Cc: Liming Gao Signed-off-by: Isaac Oram --- Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemory.fdf | 2 +- Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc | 2 +- Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf | 2 +- Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec | 10 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemory.fdf b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemory.fdf index 3ed23bd937..c3a3e81503 100644 --- a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemory.fdf +++ b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemo +++ ry.fdf @@ -7,4 +7,4 @@ # ## - INF SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf + INF SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf diff --git a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc index 31d44b68b3..094dd957b8 100644 --- a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc +++ b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFe +++ ature.dsc @@ -100,7 +100,7 @@ # in the package build. # Add components here that should be included in the package build. - SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf + SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf ### # diff --git a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf index bd8736b621..8e530c4945 100644 --- a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf +++ b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/S +++ mbiosBasicDxe.inf @@ -33,7 +33,7 @@ [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec - SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec + SmbiosFeaturePkg/SmbiosFeaturePkg.dec [LibraryClasses] BaseLib diff --git a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec index 6170f37969..db3cdbb0d0 100644 --- a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec +++ b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg +++ .dec @@ -38,7 +38,7 @@ IndustryStandard/SmBios.h MdePkg/MdePkg.dec - SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec + SmbiosFeaturePkg/SmbiosFeaturePkg.dec } gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.Vendor|0x1 gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosVersion|0x2 @@ -71,7 +71,7 @@ IndustryStandard/SmBios.h MdePkg/MdePkg.dec - SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec + SmbiosFeaturePkg/SmbiosFeaturePkg.dec } gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.Manufacturer|0x1 gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.ProductName|0x2 @@ -87,7 +87,7 @@ IndustryStandard/SmBios.h MdePkg/MdePkg.dec - SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec + SmbiosFeaturePkg/SmbiosFeaturePkg.dec } # @@ -111,7 +111,7 @@ IndustryStandard/SmBios.h MdePkg/MdePkg.dec - SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec + SmbiosFeaturePkg/SmbiosFeaturePkg.dec } gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis.Manufacturer|0x1 gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis.Type|MiscChassisTypeRackMountChassis @@ -131,7 +131,7 @@ IndustryStandard/SmBios.h MdePkg/MdePkg.dec - SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg
Re: [edk2-devel][edk2-platforms][PATCH V1 07/27] S3FeaturePkg: Use MinPlatformPkg build include files
Pushed as a16d6344dc..d1864efa5b -Original Message- From: Chaganty, Rangasai V Sent: Thursday, January 13, 2022 9:30 PM To: Oram, Isaac W ; devel@edk2.groups.io Cc: Gao, Liming Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 07/27] S3FeaturePkg: Use MinPlatformPkg build include files Reviewed-by: Sai Chaganty -Original Message- From: Oram, Isaac W Sent: Tuesday, January 11, 2022 6:20 PM To: devel@edk2.groups.io Cc: Oram, Isaac W ; Chaganty, Rangasai V ; Gao, Liming Subject: [edk2-devel][edk2-platforms][PATCH V1 07/27] S3FeaturePkg: Use MinPlatformPkg build include files Use the MinPlatformPkg common core build files to build libraries needed by this feature. Cc: Sai Chaganty Cc: Liming Gao Signed-off-by: Isaac Oram --- Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf | 2 +- Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc | 72 ++-- Features/Intel/PowerManagement/S3FeaturePkg/S3FeaturePkg.dsc | 18 + 3 files changed, 26 insertions(+), 66 deletions(-) diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf b/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf index 34caf3dacc..fdd16a4e03 100644 --- a/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf +++ b/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf @@ -7,4 +7,4 @@ # ## - INF S3FeaturePkg/S3Pei/S3Pei.inf +INF S3FeaturePkg/S3Pei/S3Pei.inf diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc b/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc index f94bd2b431..cc34e78507 100644 --- a/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc +++ b/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc @@ -18,12 +18,12 @@ # [Defines] -!ifndef $(PEI_ARCH) - !error "PEI_ARCH must be specified to build this feature!" -!endif -!ifndef $(DXE_ARCH) - !error "DXE_ARCH must be specified to build this feature!" -!endif + !ifndef $(PEI_ARCH) +!error "PEI_ARCH must be specified to build this feature!" + !endif + !ifndef $(DXE_ARCH) +!error "DXE_ARCH must be specified to build this feature!" + !endif # @@ -31,34 +31,7 @@ # -!include MdePkg/MdeLibs.dsc.inc - -[LibraryClasses] - ### - # Edk2 Packages - ### - BaseLib|MdePkg/Library/BaseLib/BaseLib.inf - BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf - DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf - IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf - PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf - PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf - PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf - -[LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM] - ### - # Edk2 Packages - ### - HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf - MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf - PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf - PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf - PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf - PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf - - ### - # Silicon Initialization Package - ### +[LibraryClasses.common.PEIM] SmmAccessLib|IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.inf @@ -92,34 +65,3 @@ # Add components here that should be included in the package build. S3FeaturePkg/S3Pei/S3Pei.inf - -# -# Feature DXE Components -# - -# @todo: Change below line to [Components.$(DXE_ARCH)] after https://bugzilla.tianocore.org/show_bug.cgi?id=2308 -#is completed. -[Components.X64] - # - # S3 Feature Package - # - - # Add library instances here that are not included in package components and should be tested - # in the package build. - - # Add components here that should be included in the package build. - -### -# -# BuildOptions Section - Define the module specific tool chain flags that should be used as -#the default flags for a module. These flags are appended to any -#standard fla
Re: [edk2-devel][edk2-platforms][PATCH V1 06/27] S3FeaturePkg: Fix all relative package paths
Pushed as af5a7863ff..a16d6344dc -Original Message- From: Chaganty, Rangasai V Sent: Thursday, January 13, 2022 9:20 PM To: Oram, Isaac W ; devel@edk2.groups.io Cc: Gao, Liming Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 06/27] S3FeaturePkg: Fix all relative package paths Reviewed-by: Sai Chaganty -Original Message- From: Oram, Isaac W Sent: Tuesday, January 11, 2022 6:20 PM To: devel@edk2.groups.io Cc: Oram, Isaac W ; Chaganty, Rangasai V ; Gao, Liming Subject: [edk2-devel][edk2-platforms][PATCH V1 06/27] S3FeaturePkg: Fix all relative package paths Packages should be at the root of a PACKAGES_PATH entry. At some point, paths were relative to edk2-platforms/Features/Intel which was functional, but interferes with the proper functioning of packaging tools. Cc: Sai Chaganty Cc: Liming Gao Signed-off-by: Isaac Oram --- Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf | 2 +- Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc | 2 +- Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf b/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf index 3cd5cd9628..34caf3dacc 100644 --- a/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf +++ b/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf @@ -7,4 +7,4 @@ # ## - INF PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf + INF S3FeaturePkg/S3Pei/S3Pei.inf diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc b/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc index 312870981e..f94bd2b431 100644 --- a/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc +++ b/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc @@ -91,7 +91,7 @@ # in the package build. # Add components here that should be included in the package build. - PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf + S3FeaturePkg/S3Pei/S3Pei.inf # # Feature DXE Components diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf b/Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf index 46fbb62a46..e485eac952 100644 --- a/Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf +++ b/Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf @@ -23,7 +23,7 @@ [Packages] MdePkg/MdePkg.dec IntelSiliconPkg/IntelSiliconPkg.dec - PowerManagement/S3FeaturePkg/S3FeaturePkg.dec + S3FeaturePkg/S3FeaturePkg.dec [Sources] S3Pei.c -- 2.27.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85794): https://edk2.groups.io/g/devel/message/85794 Mute This Topic: https://groups.io/mt/88365334/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] MdeModulePkg: Enabling OS boot from SD card through UEFI payload
Hello Aiman Rosli, I have provided my feedbacks by replying your patch mail. Please help to check if you received the mail. Or you can check the feedbacks at: https://edk2.groups.io/g/devel/message/85764 Best Regards, Hao Wu > -Original Message- > From: Rosli, Muhammad Aiman > Sent: Wednesday, January 19, 2022 12:26 AM > To: devel@edk2.groups.io; Wu, Hao A ; Gao, Zhichao > ; Ni, Ray ; Wang, Jian J > > Subject: RE: [edk2-devel] [PATCH v2] MdeModulePkg: Enabling OS boot from > SD card through UEFI payload > > Hi all, > > Please review my patch, if there is no issue, can help to add push label. > > Thank you. > > Regards, > Aiman Rosli > > -Original Message- > From: devel@edk2.groups.io On Behalf Of Aiman > Rosli > Sent: Monday, 17 January, 2022 8:56 PM > To: devel@edk2.groups.io > Cc: Rosli, Muhammad Aiman > Subject: [edk2-devel] [PATCH v2] MdeModulePkg: Enabling OS boot from SD > card through UEFI payload > > This changes is by adding 50ms delay during voltage switching from 3.3V to > 1.8V, plus adding a goto Voltage33Retry for 3.3V checking and retrying. > > Signed-off-by: Aiman Rosli > --- > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c | 23 > --- > 1 file changed, 20 insertions(+), 3 deletions(-) > > diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c > b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c > index 662f9f483c..527fe7dc20 100644 > --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c > +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c > @@ -1213,9 +1213,14 @@ SdCardIdentification ( >UINT32 PresentState; >UINT8 HostCtrl2; >UINTN Retry; > + BOOLEANForceVoltage33; > + > + ForceVoltage33 = FALSE; > >PciIo= Private->PciIo; >PassThru = &Private->PassThru; > + > +Voltage33Retry: >// >// 1. Send Cmd0 to the device >// > @@ -1294,6 +1299,14 @@ SdCardIdentification ( > return EFI_UNSUPPORTED; >} > > + // > + // 1.8V had failed in the previous run, forcing a retry with 3.3V > + instead // if (ForceVoltage33 == TRUE) { > +S18r = FALSE; > +ForceVoltage33 = FALSE; > + } > + >// >// 5. Repeatly send Acmd41 with supply voltage window to the device. >//Note here we only support the cards complied with SD physical > @@ -1362,13 +1375,17 @@ SdCardIdentification ( > goto Error; >} > > - gBS->Stall (1000); > + // Workaround to add a delay of 50 ms in order for clock to stabilize > before turning on the SD card again. > + gBS->Stall (5); > >SdMmcHcRwMmio (PciIo, Slot, SD_MMC_HC_PRESENT_STATE, TRUE, > sizeof (PresentState), &PresentState); >if (((PresentState >> 20) & 0xF) != 0xF) { > DEBUG ((DEBUG_ERROR, "SdCardIdentification: SwitchVoltage fails with > PresentState = 0x%x, It should be 0xF\n", PresentState)); > -Status = EFI_DEVICE_ERROR; > -goto Error; > +Status = SdMmcHcReset (Private, Slot); > +Status = SdMmcHcInitHost (Private, Slot); > +ForceVoltage33 = TRUE; > +DEBUG ((DEBUG_ERROR, "SdCardIdentification: Switching to 1.8V had > failed in the previous run, forcing a retry with 3.3V instead\n")); > +goto Voltage33Retry; >} > } > > -- > 2.34.1.windows.1 > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85793): https://edk2.groups.io/g/devel/message/85793 Mute This Topic: https://groups.io/mt/88482891/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] MdeModulePkg/BdsDxe: Update BdsEntry to use Variable Policy
It looks like the BZ associated with this change is https://bugzilla.tianocore.org/show_bug.cgi?id=3421 . It would be nice to get this fix committed, to stop the loud deprecated interface messages. -- Rebecca Cran On 6/16/21 18:58, gaoliming wrote: Ken: Thanks for your update. Please also update MdeModulePkg\Universal\BdsDxe\Bds.h to remove #include , because EDKII_VARIABLE_LOCK_PROTOCOL is not used any more. Thanks Liming -邮件原件- 发件人: kenlautn...@gmail.com 发送时间: 2021年6月17日 6:45 收件人: devel@edk2.groups.io 抄送: Jian J Wang ; Hao A Wu ; Zhichao Gao ; Ray Ni ; Liming Gao 主题: [PATCH v2 1/1] MdeModulePkg/BdsDxe: Update BdsEntry to use Variable Policy From: Ken Lautner Changed BdsEntry.c to use Variable Policy instead of Variable Lock as Variable Lock will be Deprecated eventually Cc: Jian J Wang Cc: Hao A Wu Cc: Zhichao Gao Cc: Ray Ni Cc: Liming Gao Signed-off-by: Kenneth Lautner Reviewed-by Liming Gao --- MdeModulePkg/Universal/BdsDxe/BdsDxe.inf | 4 +++- MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 20 +++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf index 9310b4dccb18..76ff6a0f5fc3 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf +++ b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf @@ -50,6 +50,8 @@ BaseMemoryLib DebugLib UefiBootManagerLib + VariablePolicyLib + VariablePolicyHelperLib PlatformBootManagerLib PcdLib PrintLib @@ -77,7 +79,7 @@ [Protocols] gEfiBdsArchProtocolGuid ## PRODUCES gEfiSimpleTextInputExProtocolGuid ## CONSUMES - gEdkiiVariableLockProtocolGuid## SOMETIMES_CONSUMES + gEdkiiVariablePolicyProtocolGuid ## SOMETIMES_CONSUMES gEfiDeferredImageLoadProtocolGuid ## CONSUMES [FeaturePcd] diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c index 83b773a2fa5f..13c10bdc5bf8 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c @@ -15,6 +15,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include "Bds.h" #include "Language.h" #include "HwErrRecSupport.h" +#include #define SET_BOOT_OPTION_SUPPORT_KEY_COUNT(a, c) { \ (a) = ((a) & ~EFI_BOOT_OPTION_SUPPORT_COUNT) | (((c) << LowBitSet32 (EFI_BOOT_OPTION_SUPPORT_COUNT)) & EFI_BOOT_OPTION_SUPPORT_COUNT); \ @@ -670,7 +671,7 @@ BdsEntry ( EFI_STATUS Status; UINT32 BootOptionSupport; UINT16 BootTimeOut; - EDKII_VARIABLE_LOCK_PROTOCOL*VariableLock; + EDKII_VARIABLE_POLICY_PROTOCOL *VariablePolicy; UINTN Index; EFI_BOOT_MANAGER_LOAD_OPTIONLoadOption; UINT16 *BootNext; @@ -716,12 +717,21 @@ BdsEntry ( // // Mark the read-only variables if the Variable Lock protocol exists // - Status = gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, (VOID **) &VariableLock); - DEBUG ((EFI_D_INFO, "[BdsDxe] Locate Variable Lock protocol - %r\n", Status)); + Status = gBS->LocateProtocol(&gEdkiiVariablePolicyProtocolGuid, NULL, (VOID**)&VariablePolicy); + DEBUG((DEBUG_INFO, "[BdsDxe] Locate Variable Policy protocol - %r\n", Status)); if (!EFI_ERROR (Status)) { for (Index = 0; Index < ARRAY_SIZE (mReadOnlyVariables); Index++) { - Status = VariableLock->RequestToLock (VariableLock, mReadOnlyVariables[Index], &gEfiGlobalVariableGuid); - ASSERT_EFI_ERROR (Status); + Status = RegisterBasicVariablePolicy( + VariablePolicy, + &gEfiGlobalVariableGuid, + mReadOnlyVariables[Index], + VARIABLE_POLICY_NO_MIN_SIZE, + VARIABLE_POLICY_NO_MAX_SIZE, + VARIABLE_POLICY_NO_MUST_ATTR, + VARIABLE_POLICY_NO_CANT_ATTR, + VARIABLE_POLICY_TYPE_LOCK_NOW + ); + ASSERT_EFI_ERROR(Status); } } -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85792): https://edk2.groups.io/g/devel/message/85792 Mute This Topic: https://groups.io/mt/83595039/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel][edk2-platforms][PATCH V1 04/27] IpmiFeaturePkg: Fix all relative package paths
Pushed as 025d67dccc..af5a7863ff -Original Message- From: Desimone, Nathaniel L Sent: Wednesday, January 12, 2022 6:49 PM To: Oram, Isaac W ; devel@edk2.groups.io Cc: Gao, Liming Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 04/27] IpmiFeaturePkg: Fix all relative package paths Reviewed-by: Nate DeSimone > -Original Message- > From: Oram, Isaac W > Sent: Tuesday, January 11, 2022 6:20 PM > To: devel@edk2.groups.io > Cc: Oram, Isaac W ; Gao, Liming > ; Desimone, Nathaniel L > > Subject: [edk2-devel][edk2-platforms][PATCH V1 04/27] IpmiFeaturePkg: > Fix all relative package paths > > Packages should be at the root of a PACKAGES_PATH entry. > At some point, paths were relative to edk2-platforms/Features/Intel > which was functional, but interferes with the proper functioning of packaging > tools. > > Cc: Liming Gao > Cc: Nate DeSimone > > Signed-off-by: Isaac Oram > --- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi. > inf | 2 +- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcElog/BmcElog.i > nf | 2 +- > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Frb/FrbDxe.inf > | 2 +- > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Frb/FrbPei.inf > | 2 +- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Dxe/ > GenericIpmi.inf | 2 +- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/P > eiGenericIpmi.inf | 2 +- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Smm > /SmmGenericIpmi.inf | 2 +- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeatu > re.dsc | 36 ++-- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/PostMem > ory.fdf | 16 - > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/PreMemo > ry.fdf | 6 ++-- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiFru/IpmiFru.in > f | 2 +- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiInit/DxeIpmiI > nit.inf| 2 +- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiInit/PeiIpmiIni > t.inf| 2 +- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiBaseLi > b/IpmiBaseLib.inf | 2 +- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiBaseLi > bNull/IpmiBaseLibNull.inf | 2 +- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiComm > andLib/IpmiCommandLib.inf | 2 +- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/IpmiPlatfor > mHookLibNull/IpmiPlatformHookLibNull.inf | 2 +- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/PeiIpmiBas > eLib/PeiIpmiBaseLib.inf | 2 +- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/SmmIpmiB > aseLib/SmmIpmiBaseLib.inf | 2 +- > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/OsWdt/OsWdt.inf > | 2 +- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/SolStatus/SolStatu > s.inf | 2 +- > 21 files changed, 47 insertions(+), 47 deletions(-) > > diff --git > a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAc > pi.inf > b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAc > pi.inf > index a84813f55c..7cd60e417b 100644 > --- > a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAc > pi.inf > +++ > b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAc > pi. > +++ inf > @@ -22,7 +22,7 @@ > [Packages] >MdePkg/MdePkg.dec >MdeModulePkg/MdeModulePkg.dec > - OutOfBandManagement/IpmiFeaturePkg/IpmiFeaturePkg.dec > + IpmiFeaturePkg/IpmiFeaturePkg.dec > > [LibraryClasses] >UefiBootServicesTableLib > diff --git > a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcElog/BmcElo > g.inf > b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcElog/BmcElo > g.inf > index 665b3d9bda..388dd2740c 100644 > --- > a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcElog/BmcElo > g.inf > +++ > b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcElog/BmcElo > g. > +++ inf > @@ -21,7 +21,7 @@ > > [Packages] >MdePkg/MdePkg.dec > - OutOfBandManagement/IpmiFeaturePkg/IpmiFeaturePkg.dec > + IpmiFeaturePkg/IpmiFeaturePkg.dec > > [LibraryClasses] >UefiDriverEntryPoint > diff --git > a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Frb/FrbDxe.inf > b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Frb/FrbDxe.inf > index 85836cd8ee..61222e0c00 100644 > --- > a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Frb/FrbDxe.inf > +++ > b/Features/
Re: [edk2-devel][edk2-platforms][PATCH V1 05/27] IpmiFeaturePkg: Fix build errors
Pushed as d8232e8816..025d67dccc -Original Message- From: Desimone, Nathaniel L Sent: Wednesday, January 12, 2022 6:49 PM To: Oram, Isaac W ; devel@edk2.groups.io Cc: Gao, Liming Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 05/27] IpmiFeaturePkg: Fix build errors Reviewed-by: Nate DeSimone > -Original Message- > From: Oram, Isaac W > Sent: Tuesday, January 11, 2022 6:20 PM > To: devel@edk2.groups.io > Cc: Oram, Isaac W ; Desimone, Nathaniel L > ; Gao, Liming > > Subject: [edk2-devel][edk2-platforms][PATCH V1 05/27] IpmiFeaturePkg: > Fix build errors > > Fix build issues with standalone build. > Switch to using MinPlatformPkg common core include for common modules. > > Cc: Nate DeSimone > Cc: Liming Gao > > Signed-off-by: Isaac Oram > --- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeatu > re.dsc | 54 > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/PostMem > ory.fdf | 16 +++--- > > Features/Intel/OutOfBandManagement/IpmiFeaturePkg/IpmiFeaturePkg.ds > c | 18 +++ > 3 files changed, 26 insertions(+), 62 deletions(-) > > diff --git > a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFea > ture.dsc > b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFea > ture.dsc > index c1ce340da2..237a4fc006 100644 > --- > a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFea > ture.dsc > +++ > b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFea > t > +++ ure.dsc > @@ -34,54 +34,15 @@ > !include MdePkg/MdeLibs.dsc.inc > > [LibraryClasses] > - ### > - # Edk2 Packages > - ### > - BaseLib|MdePkg/Library/BaseLib/BaseLib.inf > - > BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibR > epStr.inf > - DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf >IpmiLib|MdeModulePkg/Library/BaseIpmiLibNull/BaseIpmiLibNull.inf > - PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf > - > TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTem > plate.inf > > - # > - # IPMI Feature Package > - # > > IpmiCommandLib|IpmiFeaturePkg/Library/IpmiCommandLib/IpmiCommand > Lib.inf > > IpmiPlatformHookLib|IpmiFeaturePkg/Library/IpmiPlatformHookLibNull/Ipm > iPlatformHookLibNull.inf > > [LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM] > - ### > - # Edk2 Packages > - ### > - HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf > - > MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemory > AllocationLib.inf > - PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf > - PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf > - PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf > - > PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibId > PeiServicesTablePointerLib|t/P > eiServicesTablePointerLibIdt.inf > - > ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiR > eportStatusCodeLib.inf > - > - # > - # IPMI Feature Package > - # > > IpmiBaseLib|IpmiFeaturePkg/Library/PeiIpmiBaseLib/PeiIpmiBaseLib.inf > > [LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.UEFI_DRIVER] > - ### > - # Edk2 Packages > - ### > - > DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf > - > MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo > ryAllocationLib.inf > - PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf > - > UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiB > UefiBootServicesTableLib|o > otServicesTableLib.inf > - > UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEnt > UefiDriverEntryPoint|ry > Point.inf > - UefiLib|MdePkg/Library/UefiLib/UefiLib.inf > - > UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib > /UefiRuntimeServicesTableLib.inf > - > - # > - # IPMI Feature Package > - # >IpmiBaseLib|IpmiFeaturePkg/Library/IpmiBaseLib/IpmiBaseLib.inf > > > ## > ## > @@ -149,18 +110,3 @@ >IpmiFeaturePkg/IpmiInit/DxeIpmiInit.inf >IpmiFeaturePkg/OsWdt/OsWdt.inf >IpmiFeaturePkg/SolStatus/SolStatus.inf > - > - > ## > # > -# > -# BuildOptions Section - Define the module specific tool chain flags > that should be used as > -#the default flags for a module. These flags are > appended to any > -#standard flags that are defin
Re: [edk2-devel][edk2-platforms][PATCH V1 03/27] AcpiDebugFeaturePkg: Fix all relative package paths
Pushed as 73d1067db3..d8232e8816 -Original Message- From: Chaganty, Rangasai V Sent: Thursday, January 13, 2022 9:18 PM To: Oram, Isaac W ; devel@edk2.groups.io Cc: Gao, Liming ; Dong, Eric Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 03/27] AcpiDebugFeaturePkg: Fix all relative package paths Reviewed-by: Sai Chaganty -Original Message- From: Oram, Isaac W Sent: Tuesday, January 11, 2022 6:20 PM To: devel@edk2.groups.io Cc: Oram, Isaac W ; Chaganty, Rangasai V ; Gao, Liming ; Dong, Eric Subject: [edk2-devel][edk2-platforms][PATCH V1 03/27] AcpiDebugFeaturePkg: Fix all relative package paths Packages should be at the root of a PACKAGES_PATH entry. At some point, paths were relative to edk2-platforms/Features/Intel which was functional, but interferes with the proper functioning of packaging tools. Cc: Sai Chaganty Cc: Liming Gao Cc: Eric Dong Signed-off-by: Isaac Oram --- Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf | 2 +- Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf | 2 +- Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec | 2 +- Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc | 4 ++-- Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf index b293d83cd9..04b5953bf6 100644 --- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf +++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiD +++ ebugDxe.inf @@ -32,7 +32,7 @@ [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec - Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec + AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec [Pcd] gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureActive ## CONSUMES diff --git a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf index dbb33e4ae2..a0058b51ab 100644 --- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf +++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiD +++ ebugSmm.inf @@ -33,7 +33,7 @@ [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec - Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec + AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec [Pcd] gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureActive ## CONSUMES diff --git a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec index c3bd89fe2b..9159231007 100644 --- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec +++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.d +++ ec @@ -29,7 +29,7 @@ [PcdsFeatureFlag] gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable|FALSE|BOOLEAN|0xA001 -[PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic,PcdsDynamicEx] +[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] ## This PCD specifies the ACPI debug message buffer size. gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugBufferSize|0x1|UINT32|0xF001 diff --git a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc index 856222a53d..b142978be1 100644 --- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc +++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeat +++ ure.dsc @@ -109,8 +109,8 @@ # in the package build. # Add components here that should be included in the package build. - Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf - Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf + AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf + AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf ### # diff --git a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf index bbd6eca87b..84560dae50 100644 --- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf +++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fd +++ f @@ -7,5 +7,5 @@ # ## - INF RuleOverride = DRIVER_ACPITABLE Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf - INF RuleOverride = DRIVER_ACPITABLE Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf + INF RuleOverride = DRIVER_ACPITABLE + AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDx
Re: [edk2-devel] [PATCH v2 1/2] EDK2 Code First: PI Specification: New error codes of Host Software class
The spec and code changes need to be put together in the edk2-staging repository following the process here: https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Code-First-Process Once we have Reviewed-by from community for the spec and code changes and everything is checked into the edk2-staging repository, platforms can test the changes and provide feedback. The amount of testing required depends on the complexity of the change. Once testing requirements have been met, it is ready for UEFI Forum review of the content in edk2-staging. Mike > -Original Message- > From: devel@edk2.groups.io On Behalf Of Kun Qin > Sent: Tuesday, January 18, 2022 11:00 AM > To: devel@edk2.groups.io; Kinney, Michael D > Cc: Andrew Fish ; Leif Lindholm ; Gao, > Liming ; Liu, Zhiguang > > Subject: Re: [edk2-devel] [PATCH v2 1/2] EDK2 Code First: PI Specification: > New error codes of Host Software class > > Hi Mike, > > Do you have further feedback regarding this updated change? If not, > could you please shed some light on how to proceed on this code first PI > spec change request? > > Any help is appreciated. > > Regards, > Kun > > On 01/07/2022 17:32, Kun Qin via groups.io wrote: > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3794 > > > > This change includes specification update markdown file that describes > > the proposed PI Specification v1.7 Errata A in detail and potential > > impact to the existing codebase. > > > > Cc: Andrew Fish > > Cc: Leif Lindholm > > Cc: Michael D Kinney > > Cc: Liming Gao > > Cc: Zhiguang Liu > > > > Signed-off-by: Kun Qin > > --- > > > > Notes: > > v2: > > - Removed "RELEASE_ASSERT" definition > > - Removed reference to EDK2 based memory type info [Mike] > > > > CodeFirst/BZ3794-SpecChange.md | 55 > > 1 file changed, 55 insertions(+) > > > > diff --git a/CodeFirst/BZ3794-SpecChange.md b/CodeFirst/BZ3794-SpecChange.md > > new file mode 100644 > > index ..61a0be798d7f > > --- /dev/null > > +++ b/CodeFirst/BZ3794-SpecChange.md > > @@ -0,0 +1,55 @@ > > +# Title: Introduction of `EFI_SW_EC_FRAGMENTED_MEMORY_MAP` Status Code > > + > > +## Status: Draft > > + > > +## Document: UEFI Platform Initialization Specification Version 1.7 Errata > > A > > + > > +## License > > + > > +SPDX-License-Identifier: CC-BY-4.0 > > + > > +## Submitter: [TianoCore Community](https://www.tianocore.org) > > + > > +## Summary of the change > > + > > +Add `EFI_SW_EC_FRAGMENTED_MEMORY_MAP` into Status Codes definition. > > + > > +## Benefits of the change > > + > > +Current Status Codes covered various [software class error code > definitions](https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Pi/PiStatusCode.h). > > + > > +However, fragmented memory map from boot to boot would fail to meet > > certain OS ACPI requirements (i.e. S4 resume boot requires > consistent memory maps) and trigger system reboots. Yet the corresponding > case was not covered by the already defined status > codes. > > + > > +The unexpected system reboots above could indicate decay of system health > > and reporting of such generic events would provide > helpful information to OEMs to investigate/prevent system failures in general. > > + > > +The request of this change intends to expand definitions of `EFI_SW_EC_**` > > under Status Codes to cover more unexpected system > reboot events, which could improve Status Code futility and readability. > > + > > +## Impact of the change > > + > > +Occupy a new macro definitions of Error Codes under Software class Status > > Codes. > > + > > +## Detailed description of the change [normative updates] > > + > > +### Specification Changes > > + > > +1. In PI Specification v1.7 Errata A: Vol. 3, Table 3-61: Error Code > > Operations: Host Software Class, add one new rows below > `EFI_SW_EC_FV_CORRUPTED` definition: > > + > > +| Operation | Description | Extended Data | > > +| --- | --- | --- | > > +| EFI_SW_EC_FRAGMENTED_MEMORY_MAP | System will reboot due to > > fragmented memory maps | None | > > + > > +1. In PI Specification v1.7 Errata A: Vol. 3, Table 3-61: Error Code > > Operations: Host Software Class, replace the row of > `0x0014-0x00FF` to: > > + > > +| Operation | Description | Extended Data | > > +| --- | --- | --- | > > +| 0x0015-0x00FF | Reserved for future use by this specification for > > Host Software class error codes. | None | > > + > > +1. In PI Specification v1.7 Errata A: Vol. 3, Section 6.7.4.3 Error Code > > Definitions: Prototype, add one new definitions below > `EFI_SW_EC_FV_CORRUPTED` definition: > > + > > +```c > > +#define EFI_SW_EC_FRAGMENTED_MEMORY_MAP 0x0014 > > +``` > > + > > +### Code Changes > > + > > +1. Add macro definitions in `MdePkg/Include/Pi/PiStatusCode.h` to match > > new specification. > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply On
Re: [edk2-devel] [PATCH v2 0/6] MM communicate functionality in variable policy
I thought the reply on website will retain the original CC list. But I was wrong about that. Thanks for the reminder, Rebecca. Regards, Kun On 01/18/2022 14:04, Rebecca Cran wrote: [+Leif, Ard] Kun, There's often so much mailing list traffic that you need to CC the maintainers for them to see your emails. -- Rebecca Cran On 1/18/22 11:40, Kun Qin wrote: Hi ArmPkg maintainers, It has been almost a month since this v2 patch series has been sent out for review. Could you please take a look and provide feedback? Thanks in advance. Regards, Kun -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85787): https://edk2.groups.io/g/devel/message/85787 Mute This Topic: https://groups.io/mt/87869771/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 0/6] MM communicate functionality in variable policy
[+Leif, Ard] Kun, There's often so much mailing list traffic that you need to CC the maintainers for them to see your emails. -- Rebecca Cran On 1/18/22 11:40, Kun Qin wrote: Hi ArmPkg maintainers, It has been almost a month since this v2 patch series has been sent out for review. Could you please take a look and provide feedback? Thanks in advance. Regards, Kun -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85786): https://edk2.groups.io/g/devel/message/85786 Mute This Topic: https://groups.io/mt/87869771/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/2] EDK2 Code First: PI Specification: New error codes of Host Software class
Hi Mike, Do you have further feedback regarding this updated change? If not, could you please shed some light on how to proceed on this code first PI spec change request? Any help is appreciated. Regards, Kun On 01/07/2022 17:32, Kun Qin via groups.io wrote: REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3794 This change includes specification update markdown file that describes the proposed PI Specification v1.7 Errata A in detail and potential impact to the existing codebase. Cc: Andrew Fish Cc: Leif Lindholm Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Kun Qin --- Notes: v2: - Removed "RELEASE_ASSERT" definition - Removed reference to EDK2 based memory type info [Mike] CodeFirst/BZ3794-SpecChange.md | 55 1 file changed, 55 insertions(+) diff --git a/CodeFirst/BZ3794-SpecChange.md b/CodeFirst/BZ3794-SpecChange.md new file mode 100644 index ..61a0be798d7f --- /dev/null +++ b/CodeFirst/BZ3794-SpecChange.md @@ -0,0 +1,55 @@ +# Title: Introduction of `EFI_SW_EC_FRAGMENTED_MEMORY_MAP` Status Code + +## Status: Draft + +## Document: UEFI Platform Initialization Specification Version 1.7 Errata A + +## License + +SPDX-License-Identifier: CC-BY-4.0 + +## Submitter: [TianoCore Community](https://www.tianocore.org) + +## Summary of the change + +Add `EFI_SW_EC_FRAGMENTED_MEMORY_MAP` into Status Codes definition. + +## Benefits of the change + +Current Status Codes covered various [software class error code definitions](https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Pi/PiStatusCode.h). + +However, fragmented memory map from boot to boot would fail to meet certain OS ACPI requirements (i.e. S4 resume boot requires consistent memory maps) and trigger system reboots. Yet the corresponding case was not covered by the already defined status codes. + +The unexpected system reboots above could indicate decay of system health and reporting of such generic events would provide helpful information to OEMs to investigate/prevent system failures in general. + +The request of this change intends to expand definitions of `EFI_SW_EC_**` under Status Codes to cover more unexpected system reboot events, which could improve Status Code futility and readability. + +## Impact of the change + +Occupy a new macro definitions of Error Codes under Software class Status Codes. + +## Detailed description of the change [normative updates] + +### Specification Changes + +1. In PI Specification v1.7 Errata A: Vol. 3, Table 3-61: Error Code Operations: Host Software Class, add one new rows below `EFI_SW_EC_FV_CORRUPTED` definition: + +| Operation | Description | Extended Data | +| --- | --- | --- | +| EFI_SW_EC_FRAGMENTED_MEMORY_MAP | System will reboot due to fragmented memory maps | None | + +1. In PI Specification v1.7 Errata A: Vol. 3, Table 3-61: Error Code Operations: Host Software Class, replace the row of `0x0014-0x00FF` to: + +| Operation | Description | Extended Data | +| --- | --- | --- | +| 0x0015-0x00FF | Reserved for future use by this specification for Host Software class error codes. | None | + +1. In PI Specification v1.7 Errata A: Vol. 3, Section 6.7.4.3 Error Code Definitions: Prototype, add one new definitions below `EFI_SW_EC_FV_CORRUPTED` definition: + +```c +#define EFI_SW_EC_FRAGMENTED_MEMORY_MAP 0x0014 +``` + +### Code Changes + +1. Add macro definitions in `MdePkg/Include/Pi/PiStatusCode.h` to match new specification. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85785): https://edk2.groups.io/g/devel/message/85785 Mute This Topic: https://groups.io/mt/88516885/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 0/6] MM communicate functionality in variable policy
Hi ArmPkg maintainers, It has been almost a month since this v2 patch series has been sent out for review. Could you please take a look and provide feedback? Thanks in advance. Regards, Kun -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85784): https://edk2.groups.io/g/devel/message/85784 Mute This Topic: https://groups.io/mt/87869771/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] MdeModulePkg: Enabling OS boot from SD card through UEFI payload
Hi all, Please review my patch, if there is no issue, can help to add push label. Thank you. Regards, Aiman Rosli -Original Message- From: devel@edk2.groups.io On Behalf Of Aiman Rosli Sent: Monday, 17 January, 2022 8:56 PM To: devel@edk2.groups.io Cc: Rosli, Muhammad Aiman Subject: [edk2-devel] [PATCH v2] MdeModulePkg: Enabling OS boot from SD card through UEFI payload This changes is by adding 50ms delay during voltage switching from 3.3V to 1.8V, plus adding a goto Voltage33Retry for 3.3V checking and retrying. Signed-off-by: Aiman Rosli --- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c index 662f9f483c..527fe7dc20 100644 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c @@ -1213,9 +1213,14 @@ SdCardIdentification ( UINT32 PresentState; UINT8 HostCtrl2; UINTN Retry; + BOOLEANForceVoltage33; + + ForceVoltage33 = FALSE; PciIo= Private->PciIo; PassThru = &Private->PassThru; + +Voltage33Retry: // // 1. Send Cmd0 to the device // @@ -1294,6 +1299,14 @@ SdCardIdentification ( return EFI_UNSUPPORTED; } + // + // 1.8V had failed in the previous run, forcing a retry with 3.3V + instead // if (ForceVoltage33 == TRUE) { +S18r = FALSE; +ForceVoltage33 = FALSE; + } + // // 5. Repeatly send Acmd41 with supply voltage window to the device. //Note here we only support the cards complied with SD physical @@ -1362,13 +1375,17 @@ SdCardIdentification ( goto Error; } - gBS->Stall (1000); + // Workaround to add a delay of 50 ms in order for clock to stabilize before turning on the SD card again. + gBS->Stall (5); SdMmcHcRwMmio (PciIo, Slot, SD_MMC_HC_PRESENT_STATE, TRUE, sizeof (PresentState), &PresentState); if (((PresentState >> 20) & 0xF) != 0xF) { DEBUG ((DEBUG_ERROR, "SdCardIdentification: SwitchVoltage fails with PresentState = 0x%x, It should be 0xF\n", PresentState)); -Status = EFI_DEVICE_ERROR; -goto Error; +Status = SdMmcHcReset (Private, Slot); +Status = SdMmcHcInitHost (Private, Slot); +ForceVoltage33 = TRUE; +DEBUG ((DEBUG_ERROR, "SdCardIdentification: Switching to 1.8V had failed in the previous run, forcing a retry with 3.3V instead\n")); +goto Voltage33Retry; } } -- 2.34.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85783): https://edk2.groups.io/g/devel/message/85783 Mute This Topic: https://groups.io/mt/88482891/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 00/24] CryptoPkg/openssl: update openssl submodule to v3.0
Gerd, Thank you for the continued work on v3.0 support. Comments below. Mike > -Original Message- > From: Yao, Jiewen > Sent: Tuesday, January 18, 2022 3:12 AM > To: kra...@redhat.com; devel@edk2.groups.io > Cc: Kinney, Michael D ; Wang, Jian J > ; Jiang, Guomin ; > Pawel Polawski ; Lu, XiaoyuX > Subject: RE: [edk2-devel] [PATCH 00/24] CryptoPkg/openssl: update openssl > submodule to v3.0 > > Thank you! > Good result. Comment below: > > > -Original Message- > > From: kra...@redhat.com > > Sent: Monday, January 17, 2022 7:46 PM > > To: devel@edk2.groups.io; Yao, Jiewen > > Cc: Kinney, Michael D ; Wang, Jian J > > ; Jiang, Guomin ; Pawel > > Polawski ; Lu, XiaoyuX > > Subject: Re: [edk2-devel] [PATCH 00/24] CryptoPkg/openssl: update openssl > > submodule to v3.0 > > > > Hi, > > > > I've continued working on this over the last weeks. Time for a status > > update. All applies to the latest tree, sneak preview is here: > > https://github.com/kraxel/edk2/commits/openssl3 > > > > > Also, assuming you have done enough test, would you please provide: > > > 1) size difference, Including PEI, SMM, DXE. > > > > No changes in SEC and PEI. > [Jiewen] Do you mean the Crypto consumer in PEI has no size difference? Such > as > https://github.com/tianocore/edk2/tree/master/SecurityPkg/Tcg/Tcg2Pei , > https://github.com/tianocore/edk2/tree/master/SecurityPkg/FvReportPei , > https://github.com/tianocore/edk2/tree/master/SignedCapsulePkg/Universal/RecoveryModuleLoadPei > linking > https://github.com/tianocore/edk2/tree/master/SecurityPkg/Library/FmpAuthenticationLibRsa2048Sha256. > > DXE: > > > > openssl 1.1 > > - 399582 SecureBootConfigDxe > > - 472182 SecurityStubDxe > > - 532626 VariableSmm > > - 656382 TlsDxe > > > > openssl 3.0 > > + 809886 SecureBootConfigDxe > > + 912310 SecurityStubDxe > > + 970898 VariableSmm > > + 1125758 TlsDxe > > > > Most of that seems to come from some openssl core changes (the new > > 'provider' concept) and I don't see an easy way to cut that down. > > > > That is with the same feature set we have right now (i.e. no elliptic > > curves and thus no TLS 1.3 support). > [Jiewen] It almost doubles the size, which will becomes a big challenge for > openssl3.0 adoption. > > > > > > > 2) performance difference, Including PEI, SMM, DXE. > > > > Suggestions how to measure that? > [Jiewen] Please just write an app to call the crypto API, multiple times. > https://github.com/tianocore/edk2/tree/master/CryptoPkg/Test/UnitTest/Library/BaseCryptLib > I think we can focus on SHA256/RSA2048 + AES, which is used in secure boot, > and HTTPS boot. > > > > > > 3) what unit test you have done (such as each crypto API) > > > > CryptoPkg/UnitTest passes. > [Jiewen] Good enough. > > > > > > 4) what system test you have done (such as secure boot, trusted boot) > > > > Secure boot works. > > TlsDxe (boot from https server) works. > > TPM not tested yet. > [Jiewen] Good enough. TPM only includes HASH. I am not too worry about that. > > > > > > > > I still have a bunch of failures in CI, for some of them I'm not sure > > how to handle them best: > > > > (1) 32-bit builds on windows fail: > > > > INFO - OpensslLibCrypto.lib(rsa_lib.obj) : error LNK2001: unresolved > > external > > symbol __allmul > > INFO - OpensslLibCrypto.lib(rsa_lib.obj) : error LNK2001: unresolved > > external > > symbol __aulldiv > > INFO - OpensslLibCrypto.lib(bio_print.obj) : error LNK2001: unresolved > > external > > symbol __aulldvrm > > INFO - OpensslLibCrypto.lib(bio_print.obj) : error LNK2001: unresolved > > external > > symbol __ftol2_sse We need to see if there are any OpenSSL config settings to completely remove use of float/double types. UEFI envs do not support float/double. It is possible to use them in a UEFI App or other UEFI FW components, but the use of those need to do extra work to disable interrupts and save/restore state. > > > > Those symbols look like they reference helper functions to do 64bit math > > on 32bit architecture. Any hints how to fix that? > [Jiewen] Please add them to > https://github.com/tianocore/edk2/tree/master/CryptoPkg/Library/IntrinsicLib > > > > > > > (2) va_arg is not working with floats due to SEE being disabled: > > > > INFO - > > /home/vsts/work/1/s/CryptoPkg/Library/OpensslLib/openssl/crypto/bio/bio_pri > > nt.c:265:28: error: SSE register argument with SSE disabled > > INFO - fvalue = va_arg(args, LDOUBLE); > > > > I can't see a way to fix that given that va_arg typically refers to a > > compiler builtin so I don't think there is a way to declare that a > > EFIAPI function to change the calling convention. Not all builds fail > > though, possibly because the compiler inlines with optimization turned > > on. > > > > Suggestions anyone? > [Jiewen] This seems infrastructure issue. > Any suggestion, Mike ? As mentioned above, it would be better if OpenSSL had a config setting to not use any float/double types. >
Re: [edk2-devel] [PATCH 00/24] CryptoPkg/openssl: update openssl submodule to v3.0
Thank you! Good result. Comment below: > -Original Message- > From: kra...@redhat.com > Sent: Monday, January 17, 2022 7:46 PM > To: devel@edk2.groups.io; Yao, Jiewen > Cc: Kinney, Michael D ; Wang, Jian J > ; Jiang, Guomin ; Pawel > Polawski ; Lu, XiaoyuX > Subject: Re: [edk2-devel] [PATCH 00/24] CryptoPkg/openssl: update openssl > submodule to v3.0 > > Hi, > > I've continued working on this over the last weeks. Time for a status > update. All applies to the latest tree, sneak preview is here: > https://github.com/kraxel/edk2/commits/openssl3 > > > Also, assuming you have done enough test, would you please provide: > > 1) size difference, Including PEI, SMM, DXE. > > No changes in SEC and PEI. [Jiewen] Do you mean the Crypto consumer in PEI has no size difference? Such as https://github.com/tianocore/edk2/tree/master/SecurityPkg/Tcg/Tcg2Pei , https://github.com/tianocore/edk2/tree/master/SecurityPkg/FvReportPei , https://github.com/tianocore/edk2/tree/master/SignedCapsulePkg/Universal/RecoveryModuleLoadPei linking https://github.com/tianocore/edk2/tree/master/SecurityPkg/Library/FmpAuthenticationLibRsa2048Sha256. DXE: > > openssl 1.1 > - 399582 SecureBootConfigDxe > - 472182 SecurityStubDxe > - 532626 VariableSmm > - 656382 TlsDxe > > openssl 3.0 > + 809886 SecureBootConfigDxe > + 912310 SecurityStubDxe > + 970898 VariableSmm > + 1125758 TlsDxe > > Most of that seems to come from some openssl core changes (the new > 'provider' concept) and I don't see an easy way to cut that down. > > That is with the same feature set we have right now (i.e. no elliptic > curves and thus no TLS 1.3 support). [Jiewen] It almost doubles the size, which will becomes a big challenge for openssl3.0 adoption. > > > 2) performance difference, Including PEI, SMM, DXE. > > Suggestions how to measure that? [Jiewen] Please just write an app to call the crypto API, multiple times. https://github.com/tianocore/edk2/tree/master/CryptoPkg/Test/UnitTest/Library/BaseCryptLib I think we can focus on SHA256/RSA2048 + AES, which is used in secure boot, and HTTPS boot. > > > 3) what unit test you have done (such as each crypto API) > > CryptoPkg/UnitTest passes. [Jiewen] Good enough. > > > 4) what system test you have done (such as secure boot, trusted boot) > > Secure boot works. > TlsDxe (boot from https server) works. > TPM not tested yet. [Jiewen] Good enough. TPM only includes HASH. I am not too worry about that. > > > I still have a bunch of failures in CI, for some of them I'm not sure > how to handle them best: > > (1) 32-bit builds on windows fail: > > INFO - OpensslLibCrypto.lib(rsa_lib.obj) : error LNK2001: unresolved external > symbol __allmul > INFO - OpensslLibCrypto.lib(rsa_lib.obj) : error LNK2001: unresolved external > symbol __aulldiv > INFO - OpensslLibCrypto.lib(bio_print.obj) : error LNK2001: unresolved > external > symbol __aulldvrm > INFO - OpensslLibCrypto.lib(bio_print.obj) : error LNK2001: unresolved > external > symbol __ftol2_sse > > Those symbols look like they reference helper functions to do 64bit math > on 32bit architecture. Any hints how to fix that? [Jiewen] Please add them to https://github.com/tianocore/edk2/tree/master/CryptoPkg/Library/IntrinsicLib > > > (2) va_arg is not working with floats due to SEE being disabled: > > INFO - > /home/vsts/work/1/s/CryptoPkg/Library/OpensslLib/openssl/crypto/bio/bio_pri > nt.c:265:28: error: SSE register argument with SSE disabled > INFO - fvalue = va_arg(args, LDOUBLE); > > I can't see a way to fix that given that va_arg typically refers to a > compiler builtin so I don't think there is a way to declare that a > EFIAPI function to change the calling convention. Not all builds fail > though, possibly because the compiler inlines with optimization turned > on. > > Suggestions anyone? [Jiewen] This seems infrastructure issue. Any suggestion, Mike ? > > > (3) Some NOOPT builds are failing due to the size growing ... [Jiewen] Size becomes big challenge... Have you tried to use https://github.com/tianocore/edk2/tree/master/CryptoPkg/Driver solution? > > > take care, > Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85781): https://edk2.groups.io/g/devel/message/85781 Mute This Topic: https://groups.io/mt/87479913/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 0/2] MdePkg,SecurityPkg: Add support to RngDxe and BaseRngLib for AARCH64 RNDR
Hello all, I have a question about the this patch, and more generically the organization of the MdePkg. The current organization, for the BaseRngLib, is as: - the BaseRngLib implements the library functions of MdePkg/Include/Library/RngLib.h - the BaseRngLib contains Ia32, X64 and AARCH64 implementations This means the BaseRngLib contains arch specific functions. It comes that I would like to re-use one of these arch specific functions. My question is then, shouldn't the BaseRngLib contains an arch agnostic implementation, and the arch specific implementation be placed in arch specific folders (ArmPkg for arm, I am not sure for other architectures) ? Another possibility for me is to me is to move the function that I want to use to the ArmPkg, but this means the MdePkg would be dependent on the ArmPkg. Would this be a viable option ? Regards, Pierre On 5/10/21 11:53 PM, Rebecca Cran via groups.io wrote: > Update MdePkg BaseRngLib and SecurityPkg RngDxe to add support for > the AARCH64 RNDR instruction. > > Changes from v2 to v3: > > o Fixed the default value of > gEfiSecurityPkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm > to be an empty GUID. > o Removed RNDRRS since it wasn't being used. > o Fixed the commit message to remove mention of BaseLib. > > Rebecca Cran (2): > MdePkg/BaseRngLib: Add support for ARMv8.5 RNG instructions > SecurityPkg: Add support for RngDxe on AARCH64 > > MdePkg/MdePkg.dec | 9 +- > SecurityPkg/SecurityPkg.dec | 2 + > MdePkg/MdePkg.dsc | 4 +- > SecurityPkg/SecurityPkg.dsc | 11 +- > MdePkg/Library/BaseRngLib/BaseRngLib.inf | 23 ++- > SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf | 24 ++- > MdePkg/Library/BaseRngLib/AArch64/ArmRng.h| 43 + > MdePkg/Library/BaseRngLib/BaseRngLibInternals.h | 78 + > SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/AesCore.h | 0 > SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/RdRand.h | 17 -- > SecurityPkg/RandomNumberGenerator/RngDxe/RngDxeInternals.h| 117 > ++ > MdePkg/Library/BaseRngLib/AArch64/Rndr.c | 139 > > MdePkg/Library/BaseRngLib/BaseRng.c | 87 > +- > MdePkg/Library/BaseRngLib/Rand/RdRand.c | 131 > +++ > SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/RngDxe.c | 127 > +++ > SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/AesCore.c | 0 > SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/RdRand.c | 45 +- > SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c| 146 > + > SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.c | 170 > > MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.S| 31 > MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.asm | 30 > MdePkg/Library/BaseRngLib/AArch64/ArmRng.S| 37 + > MdePkg/Library/BaseRngLib/AArch64/ArmRng.asm | 39 + > MdePkg/Library/BaseRngLib/BaseRngLib.uni | 6 +- > 24 files changed, 1086 insertions(+), 230 deletions(-) > create mode 100644 MdePkg/Library/BaseRngLib/AArch64/ArmRng.h > create mode 100644 MdePkg/Library/BaseRngLib/BaseRngLibInternals.h > rename SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/AesCore.h (100%) > rename SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/RdRand.h (72%) > create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/RngDxeInternals.h > create mode 100644 MdePkg/Library/BaseRngLib/AArch64/Rndr.c > create mode 100644 MdePkg/Library/BaseRngLib/Rand/RdRand.c > create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/RngDxe.c > rename SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/AesCore.c (100%) > rename SecurityPkg/RandomNumberGenerator/RngDxe/{ => Rand}/RdRand.c (71%) > create mode 100644 SecurityPkg/RandomNumberGenerator/RngDxe/Rand/RngDxe.c > create mode 100644 MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.S > create mode 100644 MdePkg/Library/BaseRngLib/AArch64/ArmReadIdIsar0.asm > create mode 100644 MdePkg/Library/BaseRngLib/AArch64/ArmRng.S > create mode 100644 MdePkg/Library/BaseRngLib/AArch64/ArmRng.asm > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85780): https://edk2.groups.io/g/devel/message/85780 Mute This Topic: https://groups.io/mt/82732210/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v5 1/4] IntelSiliconPkg/VTd: Fix typos
Reviewed-by: Jenny Huang -Original Message- From: Sheng, W Sent: Tuesday, January 18, 2022 4:15 PM To: devel@edk2.groups.io Cc: Ni, Ray ; Chaganty, Rangasai V ; Huang, Jenny ; Kowalewski, Robert Subject: [PATCH v5 1/4] IntelSiliconPkg/VTd: Fix typos It is DRHD(DMA Remapping Hardware Unit Definition). REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3622 Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Jenny Huang Cc: Robert Kowalewski Reviewed-by: Jenny Huang Signed-off-by: Sheng Wei --- .../IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/DmarTable.c | 12 ++-- .../IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c | 12 ++-- .../IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/DmarTable.c | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/DmarTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/DmarTable.c index 2154690d..e9c99d0a 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/DmarTable.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/DmarTabl +++ e.c @@ -539,14 +539,14 @@ RegisterPciDevice ( } /** - Process DMAR DHRD table. + Process DMAR DRHD table. @param[in] VTdUnitInfo The VTd engine unit information. @param[in] DmarDrhd The DRHD table. **/ VOID -ProcessDhrd ( +ProcessDrhd ( IN VTD_UNIT_INFO *VTdUnitInfo, IN EFI_ACPI_DMAR_DRHD_HEADER *DmarDrhd ) @@ -581,10 +581,10 @@ ProcessDhrd ( if ((DmarDrhd->Flags & EFI_ACPI_DMAR_DRHD_FLAGS_INCLUDE_PCI_ALL) != 0) { VTdUnitInfo->PciDeviceInfo.IncludeAllFlag = TRUE; -DEBUG ((DEBUG_INFO," ProcessDhrd: with INCLUDE ALL\n")); +DEBUG ((DEBUG_INFO," ProcessDrhd: with INCLUDE ALL\n")); } else { VTdUnitInfo->PciDeviceInfo.IncludeAllFlag = FALSE; -DEBUG ((DEBUG_INFO," ProcessDhrd: without INCLUDE ALL\n")); +DEBUG ((DEBUG_INFO," ProcessDrhd: without INCLUDE ALL\n")); } VTdUnitInfo->PciDeviceInfo.PciDeviceDataNumber = 0; @@ -600,7 +600,7 @@ ProcessDhrd ( return; } -DEBUG ((DEBUG_INFO," ProcessDhrd: ")); +DEBUG ((DEBUG_INFO," ProcessDrhd: ")); switch (DmarDevScopeEntry->Type) { case EFI_ACPI_DEVICE_SCOPE_ENTRY_TYPE_PCI_ENDPOINT: DEBUG ((DEBUG_INFO,"PCI Endpoint")); @@ -708,7 +708,7 @@ ParseDmarAcpiTableDrhd ( switch (DmarHeader->Type) { case EFI_ACPI_DMAR_TYPE_DRHD: ASSERT (VtdIndex < VtdUnitNumber); - ProcessDhrd (&VTdInfo->VtdUnitInfo[VtdIndex], (EFI_ACPI_DMAR_DRHD_HEADER *) DmarHeader); + ProcessDrhd (&VTdInfo->VtdUnitInfo[VtdIndex], + (EFI_ACPI_DMAR_DRHD_HEADER *) DmarHeader); VtdIndex++; break; diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c index 1ee290b7..75fbd53e 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTabl +++ e.c @@ -662,7 +662,7 @@ GetPciBusDeviceFunction ( } /** - Process DMAR DHRD table. + Process DMAR DRHD table. @param[in] VtdIndex The index of VTd engine. @param[in] DmarDrhd The DRHD table. @@ -670,7 +670,7 @@ GetPciBusDeviceFunction ( @retval EFI_SUCCESS The DRHD table is processed. **/ EFI_STATUS -ProcessDhrd ( +ProcessDrhd ( IN UINTN VtdIndex, IN EFI_ACPI_DMAR_DRHD_HEADER *DmarDrhd ) @@ -690,7 +690,7 @@ ProcessDhrd ( if ((DmarDrhd->Flags & EFI_ACPI_DMAR_DRHD_FLAGS_INCLUDE_PCI_ALL) != 0) { mVtdUnitInformation[VtdIndex].PciDeviceInfo.IncludeAllFlag = TRUE; -DEBUG ((DEBUG_INFO," ProcessDhrd: with INCLUDE ALL\n")); +DEBUG ((DEBUG_INFO," ProcessDrhd: with INCLUDE ALL\n")); Status = ScanAllPciBus((VOID *)VtdIndex, DmarDrhd->SegmentNumber, ScanBusCallbackRegisterPciDevice); if (EFI_ERROR (Status)) { @@ -698,7 +698,7 @@ ProcessDhrd ( } } else { mVtdUnitInformation[VtdIndex].PciDeviceInfo.IncludeAllFlag = FALSE; -DEBUG ((DEBUG_INFO," ProcessDhrd: without INCLUDE ALL\n")); +DEBUG ((DEBUG_INFO," ProcessDrhd: without INCLUDE ALL\n")); } DmarDevScopeEntry = (EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER *)((UINTN)(DmarDrhd + 1)); @@ -709,7 +709,7 @@ ProcessDhrd ( return Status; } -DEBUG ((DEBUG_INFO," ProcessDhrd: ")); +DEBUG ((DEBUG_INFO," ProcessDrhd: ")); switch (DmarDevScopeEntry->Type) { case EFI_ACPI_DEVICE_SCOPE_ENTRY_TYPE_PCI_ENDPOINT: DEBUG ((DEBUG_INFO,"PCI Endpoint")); @@ -877,7 +877,7 @@ ParseDmarAcpiTableDrhd ( switch (DmarHeader->Type) { case EFI_ACPI_DMAR_TYPE_DRHD: ASSERT (VtdIndex < mVtdUnitNumber); - Status = ProcessDhrd (VtdIndex, (EFI_ACPI_DMAR_DRHD_HEADER *)DmarHeader); + Status = ProcessDrhd (VtdIndex, (EFI_ACPI_DMAR_DRHD_HEADER + *)DmarHeader); if (EFI_ERROR (Status)) {
Re: [edk2-devel] [PATCH v5 0/4] There are 4 patches for VTd drivers
Reviewed-by: Jenny Huang -Original Message- From: Sheng, W Sent: Tuesday, January 18, 2022 4:14 PM To: devel@edk2.groups.io Cc: Ni, Ray ; Chaganty, Rangasai V ; Huang, Jenny ; Kowalewski, Robert Subject: [PATCH v5 0/4] There are 4 patches for VTd drivers [PATCH 1/4] IntelSiliconPkg/VTd: Fix typos [PATCH 2/4] IntelSiliconPkg/VTd: Update VTd register structs [PATCH 3/4] IntelSiliconPkg/VTd: Support VTd Abort DMA Mode [PATCH 4/4] IntelSiliconPkg/VTd: Only generate PEI DMA buffer once. Patch v2 update: Fix build error in [PATCH 2/4] and [PATCH 4/4] Patch v3 update: Refine code for PEI 64 bit build compatible. Change the condition for using Register-based Invalidation. Patch v4 update: [PATCH 4/4] Remove unused code. [PATCH 4/4] Refine comments and vriable name. [PATCH 4/4] Add empty pointer check. Patch v5 update: [PATCH 2/4] Add debug log Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Jenny Huang Cc: Robert Kowalewski Signed-off-by: Sheng Wei Sheng Wei (4): IntelSiliconPkg/VTd: Fix typos IntelSiliconPkg/VTd: Update VTd register structs IntelSiliconPkg/VTd: Support VTd Abort DMA Mode IntelSiliconPkg/VTd: Only generate PEI DMA buffer once. .../Feature/VTd/IntelVTdDmarPei/DmarTable.c| 545 + .../Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c | 429 +++- .../Feature/VTd/IntelVTdDmarPei/IntelVTdDmarPei.c | 474 ++ .../Feature/VTd/IntelVTdDmarPei/IntelVTdDmarPei.h | 119 ++--- .../Feature/VTd/IntelVTdDmarPei/TranslationTable.c | 215 ++-- .../Feature/VTd/IntelVTdDxe/DmarAcpiTable.c| 12 +- .../Feature/VTd/IntelVTdDxe/TranslationTable.c | 22 +- .../Feature/VTd/IntelVTdDxe/VtdReg.c | 7 +- .../Feature/VTd/IntelVTdPmrPei/DmarTable.c | 6 +- .../IntelSiliconPkg/Include/IndustryStandard/Vtd.h | 34 +- 10 files changed, 609 insertions(+), 1254 deletions(-) -- 2.16.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85778): https://edk2.groups.io/g/devel/message/85778 Mute This Topic: https://groups.io/mt/88505111/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v5 4/4] IntelSiliconPkg/VTd: Only generate PEI DMA buffer once.
VTdInfoNotify may be called manay times, PEI DMA buffer should be generated only once. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3667 Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Jenny Huang Cc: Robert Kowalewski Reviewed-by: Jenny Huang Signed-off-by: Sheng Wei --- .../Feature/VTd/IntelVTdDmarPei/DmarTable.c| 545 + .../Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c | 433 +++- .../Feature/VTd/IntelVTdDmarPei/IntelVTdDmarPei.c | 474 ++ .../Feature/VTd/IntelVTdDmarPei/IntelVTdDmarPei.h | 119 ++--- .../Feature/VTd/IntelVTdDmarPei/TranslationTable.c | 196 ++-- 5 files changed, 533 insertions(+), 1234 deletions(-) diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/DmarTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/DmarTable.c index e9c99d0a..acfbc4a8 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/DmarTable.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/DmarTable.c @@ -1,6 +1,7 @@ /** @file - Copyright (c) 2020, Intel Corporation. All rights reserved. + Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -104,74 +105,6 @@ DumpDmarDeviceScopeEntry ( return; } -/** - Dump DMAR RMRR table. - - @param[in] Rmrr DMAR RMRR table -**/ -VOID -DumpDmarRmrr ( - IN EFI_ACPI_DMAR_RMRR_HEADER *Rmrr - ) -{ - EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER *DmarDeviceScopeEntry; - INTNRmrrLen; - - if (Rmrr == NULL) { -return; - } - - DEBUG ((DEBUG_INFO, -" ***\n" -)); - DEBUG ((DEBUG_INFO, -" * Reserved Memory Region Reporting Structure *\n" -)); - DEBUG ((DEBUG_INFO, -" ***\n" -)); - DEBUG ((DEBUG_INFO, -(sizeof (UINTN) == sizeof (UINT64)) ? -" RMRR address ... 0x%016lx\n" : -" RMRR address ... 0x%08x\n", -Rmrr -)); - DEBUG ((DEBUG_INFO, -"Type . 0x%04x\n", -Rmrr->Header.Type -)); - DEBUG ((DEBUG_INFO, -"Length ... 0x%04x\n", -Rmrr->Header.Length -)); - DEBUG ((DEBUG_INFO, -"Segment Number ... 0x%04x\n", -Rmrr->SegmentNumber -)); - DEBUG ((DEBUG_INFO, -"Reserved Memory Region Base Address .. 0x%016lx\n", -Rmrr->ReservedMemoryRegionBaseAddress -)); - DEBUG ((DEBUG_INFO, -"Reserved Memory Region Limit Address . 0x%016lx\n", -Rmrr->ReservedMemoryRegionLimitAddress -)); - - RmrrLen = Rmrr->Header.Length - sizeof(EFI_ACPI_DMAR_RMRR_HEADER); - DmarDeviceScopeEntry = (EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER *) (Rmrr + 1); - while (RmrrLen > 0) { -DumpDmarDeviceScopeEntry (DmarDeviceScopeEntry); -RmrrLen -= DmarDeviceScopeEntry->Length; -DmarDeviceScopeEntry = (EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER *) ((UINTN) DmarDeviceScopeEntry + DmarDeviceScopeEntry->Length); - } - - DEBUG ((DEBUG_INFO, -" ***\n\n" -)); - - return; -} - /** Dump DMAR DRHD table. @@ -312,9 +245,6 @@ DumpAcpiDMAR ( case EFI_ACPI_DMAR_TYPE_DRHD: DumpDmarDrhd ((EFI_ACPI_DMAR_DRHD_HEADER *) DmarHeader); break; -case EFI_ACPI_DMAR_TYPE_RMRR: - DumpDmarRmrr ((EFI_ACPI_DMAR_RMRR_HEADER *) DmarHeader); - break; default: break; } @@ -329,492 +259,43 @@ DumpAcpiDMAR ( return; } -/** - Get VTd engine number. - - @param[in] AcpiDmarTable DMAR ACPI table - - @return the VTd engine number. -**/ -UINTN -GetVtdEngineNumber ( - IN EFI_ACPI_DMAR_HEADER *AcpiDmarTable - ) -{ - EFI_ACPI_DMAR_STRUCTURE_HEADER*DmarHeader; - UINTN VtdIndex; - - VtdIndex = 0; - DmarHeader = (EFI_ACPI_DMAR_STRUCTURE_HEADER *) ((UINTN) (AcpiDmarTable + 1)); - while ((UINTN) DmarHeader < (UINTN) AcpiDmarTable + AcpiDmarTable->Header.Length) { -switch (DmarHeader->Type) { -case EFI_ACPI_DMAR_TYPE_DRHD: - VtdIndex++; - break; -default: - break; -} -DmarHeader = (EFI_ACPI_DMAR_STRUCTURE_HEADER *) ((UINTN) DmarHeader + DmarHeader->Length); - } - return VtdIndex ; -} - -/** - Get PCI device information from DMAR DevScopeEntry. - - @param[in] Segment The segment number. - @param[in] DmarDevScopeEntry DMAR DevScopeEntry - @param[out] Bus The bus number. - @param[out] DeviceThe device number. - @param[out] Function The function num
[edk2-devel] [PATCH v5 3/4] IntelSiliconPkg/VTd: Support VTd Abort DMA Mode
If VTd ECAP_REG.ADMS bit is set, abort DMA mode is supported. When VTd Abort DMA Mode is enabled, hardware will abort all DMA operations without the need to set up a root-table with each entry marked as not-present. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3766 Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Jenny Huang Cc: Robert Kowalewski Reviewed-by: Jenny Huang Signed-off-by: Sheng Wei --- .../Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c | 43 +- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c index 87ce9716..63397a1a 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c @@ -384,7 +384,7 @@ InvalidateIOTLB ( Enable DMAR translation inpre-mem phase. @param[in] VtdUnitBaseAddress The base address of the VTd engine. - @param[in] RootEntryTable The address of the VTd RootEntryTable. + @param[in] RtaddrRegValue The value of RTADDR_REG. @retval EFI_SUCCESS DMAR translation is enabled. @retval EFI_DEVICE_ERRORDMAR translation is not enabled. @@ -392,15 +392,15 @@ InvalidateIOTLB ( EFI_STATUS EnableDmarPreMem ( IN UINTNVtdUnitBaseAddress, - IN UINTNRootEntryTable + IN UINTNRtaddrRegValue ) { UINT32 Reg32; DEBUG ((DEBUG_INFO, ">>EnableDmarPreMem() for engine [%x] \n", VtdUnitBaseAddress)); - DEBUG ((DEBUG_INFO, "RootEntryTable 0x%x \n", RootEntryTable)); - MmioWrite64 (VtdUnitBaseAddress + R_RTADDR_REG, (UINT64) (UINTN) RootEntryTable); + DEBUG ((DEBUG_INFO, "RTADDR_REG : 0x%x \n", RtaddrRegValue)); + MmioWrite64 (VtdUnitBaseAddress + R_RTADDR_REG, (UINT64) RtaddrRegValue); Reg32 = MmioRead32 (VtdUnitBaseAddress + R_GSTS_REG); MmioWrite32 (VtdUnitBaseAddress + R_GCMD_REG, Reg32 | B_GMCD_REG_SRTP); @@ -662,18 +662,6 @@ EnableVTdTranslationProtectionAll ( DEBUG ((DEBUG_INFO, "EnableVTdTranslationProtectionAll - 0x%lx\n", EngineMask)); - Status = PeiServicesLocatePpi ( - &gEdkiiVTdNullRootEntryTableGuid, - 0, - NULL, - (VOID **)&RootEntryTable - ); - if (EFI_ERROR(Status)) { -DEBUG ((DEBUG_ERROR, "Locate Null Root Entry Table Ppi Failed : %r\n", Status)); -ASSERT (FALSE); -return; - } - for (Index = 0; Index < VTdInfo->VTdEngineCount; Index++) { if ((EngineMask & LShiftU64(1, Index)) == 0) { continue; @@ -686,7 +674,28 @@ EnableVTdTranslationProtectionAll ( VTdInfo->VtdUnitInfo[Index].ECapReg.Uint64 = MmioRead64 (VTdInfo->VtdUnitInfo[Index].VtdUnitBaseAddress + R_ECAP_REG); DumpVtdECapRegs (&VTdInfo->VtdUnitInfo[Index].ECapReg); -EnableDmarPreMem (VTdInfo->VtdUnitInfo[Index].VtdUnitBaseAddress, (UINTN) *RootEntryTable); +if (VTdInfo->VtdUnitInfo[Index].ECapReg.Bits.ADMS == 1) { + // + // Use Abort DMA Mode + // + Status = EnableDmarPreMem (VTdInfo->VtdUnitInfo[Index].VtdUnitBaseAddress, V_RTADDR_REG_TTM_ADM); +} else { + // + // Use Null Root Entry Table + // + Status = PeiServicesLocatePpi ( + &gEdkiiVTdNullRootEntryTableGuid, + 0, + NULL, + (VOID **)&RootEntryTable + ); + if (EFI_ERROR(Status)) { +DEBUG ((DEBUG_ERROR, "Locate Null Root Entry Table Ppi Failed : %r\n", Status)); +ASSERT (FALSE); +return; + } + EnableDmarPreMem (VTdInfo->VtdUnitInfo[Index].VtdUnitBaseAddress, (UINTN) *RootEntryTable); +} } return; -- 2.16.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85776): https://edk2.groups.io/g/devel/message/85776 Mute This Topic: https://groups.io/mt/88505120/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v5 2/4] IntelSiliconPkg/VTd: Update VTd register structs
Update VTd register structs accroding to VTd spec ver 3.3 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3765 Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Jenny Huang Cc: Robert Kowalewski Reviewed-by: Jenny Huang Signed-off-by: Sheng Wei --- .../Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c | 3 +- .../Feature/VTd/IntelVTdDmarPei/TranslationTable.c | 23 +++ .../Feature/VTd/IntelVTdDxe/TranslationTable.c | 22 -- .../Feature/VTd/IntelVTdDxe/VtdReg.c | 7 +++-- .../IntelSiliconPkg/Include/IndustryStandard/Vtd.h | 34 +- 5 files changed, 68 insertions(+), 21 deletions(-) diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c index c3a939c9..87ce9716 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c @@ -631,10 +631,8 @@ DumpVtdECapRegs ( DEBUG ((DEBUG_INFO, "SC - 0x%x\n", ECapReg->Bits.SC)); DEBUG ((DEBUG_INFO, "IRO- 0x%x\n", ECapReg->Bits.IRO)); DEBUG ((DEBUG_INFO, "MHMV - 0x%x\n", ECapReg->Bits.MHMV)); - DEBUG ((DEBUG_INFO, "ECS- 0x%x\n", ECapReg->Bits.ECS)); DEBUG ((DEBUG_INFO, "MTS- 0x%x\n", ECapReg->Bits.MTS)); DEBUG ((DEBUG_INFO, "NEST - 0x%x\n", ECapReg->Bits.NEST)); - DEBUG ((DEBUG_INFO, "DIS- 0x%x\n", ECapReg->Bits.DIS)); DEBUG ((DEBUG_INFO, "PASID - 0x%x\n", ECapReg->Bits.PASID)); DEBUG ((DEBUG_INFO, "PRS- 0x%x\n", ECapReg->Bits.PRS)); DEBUG ((DEBUG_INFO, "ERS- 0x%x\n", ECapReg->Bits.ERS)); @@ -642,6 +640,7 @@ DumpVtdECapRegs ( DEBUG ((DEBUG_INFO, "NWFS - 0x%x\n", ECapReg->Bits.NWFS)); DEBUG ((DEBUG_INFO, "EAFS - 0x%x\n", ECapReg->Bits.EAFS)); DEBUG ((DEBUG_INFO, "PSS- 0x%x\n", ECapReg->Bits.PSS)); + DEBUG ((DEBUG_INFO, "ADMS - 0x%x\n", ECapReg->Bits.ADMS)); } diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/TranslationTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/TranslationTable.c index 6676b2a9..a309d566 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/TranslationTable.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/TranslationTable.c @@ -884,13 +884,26 @@ SetupTranslationTable ( return Status; } -if (VtdUnitInfo->ECapReg.Bits.ECS) { - DEBUG ((DEBUG_INFO, "CreateExtContextEntry - %d\n", Index)); - Status = CreateExtContextEntry (VtdUnitInfo); +if (VtdUnitInfo->ECapReg.Bits.SMTS) { + if (VtdUnitInfo->ECapReg.Bits.DEP_24) { +DEBUG ((DEBUG_ERROR,"ECapReg.bit24 is not zero\n")); +ASSERT(FALSE); +Status = EFI_UNSUPPORTED; + } else { +Status = CreateExtContextEntry (VtdUnitInfo); + } } else { - DEBUG ((DEBUG_INFO, "CreateContextEntry - %d\n", Index)); - Status = CreateContextEntry (VtdUnitInfo); + if (VtdUnitInfo->ECapReg.Bits.DEP_24) { +// +// To compatible with pervious VTd engine +// It was ECS(Extended Context Support) bit. +// +Status = CreateExtContextEntry (VtdUnitInfo); + } else { +Status = CreateContextEntry (VtdUnitInfo); + } } + if (EFI_ERROR (Status)) { return Status; } diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c index ca5f65a8..48e38d56 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c @@ -382,11 +382,27 @@ SetupTranslationTable ( for (Index = 0; Index < mVtdUnitNumber; Index++) { DEBUG((DEBUG_INFO, "CreateContextEntry - %d\n", Index)); -if (mVtdUnitInformation[Index].ECapReg.Bits.ECS) { - Status = CreateExtContextEntry (Index); + +if (mVtdUnitInformation[Index].ECapReg.Bits.SMTS) { + if (mVtdUnitInformation[Index].ECapReg.Bits.DEP_24) { +DEBUG ((DEBUG_ERROR,"ECapReg.bit24 is not zero\n")); +ASSERT(FALSE); +Status = EFI_UNSUPPORTED; + } else { +Status = CreateExtContextEntry (Index); + } } else { - Status = CreateContextEntry (Index); + if (mVtdUnitInformation[Index].ECapReg.Bits.DEP_24) { +// +// To compatible with pervious VTd engine +// It was ECS(Extended Context Support) bit. +// +Status = CreateExtContextEntry (Index); + } else { +Status = CreateContextEntry (Index); + } } + if (EFI_ERROR (Status)) { return Status; } diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/VtdReg.c index 1ce9c1c0..1aacd39a 100644 --- a/Silicon
[edk2-devel] [PATCH v5 0/4] There are 4 patches for VTd drivers
[PATCH 1/4] IntelSiliconPkg/VTd: Fix typos [PATCH 2/4] IntelSiliconPkg/VTd: Update VTd register structs [PATCH 3/4] IntelSiliconPkg/VTd: Support VTd Abort DMA Mode [PATCH 4/4] IntelSiliconPkg/VTd: Only generate PEI DMA buffer once. Patch v2 update: Fix build error in [PATCH 2/4] and [PATCH 4/4] Patch v3 update: Refine code for PEI 64 bit build compatible. Change the condition for using Register-based Invalidation. Patch v4 update: [PATCH 4/4] Remove unused code. [PATCH 4/4] Refine comments and vriable name. [PATCH 4/4] Add empty pointer check. Patch v5 update: [PATCH 2/4] Add debug log Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Jenny Huang Cc: Robert Kowalewski Signed-off-by: Sheng Wei Sheng Wei (4): IntelSiliconPkg/VTd: Fix typos IntelSiliconPkg/VTd: Update VTd register structs IntelSiliconPkg/VTd: Support VTd Abort DMA Mode IntelSiliconPkg/VTd: Only generate PEI DMA buffer once. .../Feature/VTd/IntelVTdDmarPei/DmarTable.c| 545 + .../Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c | 429 +++- .../Feature/VTd/IntelVTdDmarPei/IntelVTdDmarPei.c | 474 ++ .../Feature/VTd/IntelVTdDmarPei/IntelVTdDmarPei.h | 119 ++--- .../Feature/VTd/IntelVTdDmarPei/TranslationTable.c | 215 ++-- .../Feature/VTd/IntelVTdDxe/DmarAcpiTable.c| 12 +- .../Feature/VTd/IntelVTdDxe/TranslationTable.c | 22 +- .../Feature/VTd/IntelVTdDxe/VtdReg.c | 7 +- .../Feature/VTd/IntelVTdPmrPei/DmarTable.c | 6 +- .../IntelSiliconPkg/Include/IndustryStandard/Vtd.h | 34 +- 10 files changed, 609 insertions(+), 1254 deletions(-) -- 2.16.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#85773): https://edk2.groups.io/g/devel/message/85773 Mute This Topic: https://groups.io/mt/88505111/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v5 1/4] IntelSiliconPkg/VTd: Fix typos
It is DRHD(DMA Remapping Hardware Unit Definition). REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3622 Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Jenny Huang Cc: Robert Kowalewski Reviewed-by: Jenny Huang Signed-off-by: Sheng Wei --- .../IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/DmarTable.c | 12 ++-- .../IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c | 12 ++-- .../IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/DmarTable.c | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/DmarTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/DmarTable.c index 2154690d..e9c99d0a 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/DmarTable.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/DmarTable.c @@ -539,14 +539,14 @@ RegisterPciDevice ( } /** - Process DMAR DHRD table. + Process DMAR DRHD table. @param[in] VTdUnitInfo The VTd engine unit information. @param[in] DmarDrhd The DRHD table. **/ VOID -ProcessDhrd ( +ProcessDrhd ( IN VTD_UNIT_INFO *VTdUnitInfo, IN EFI_ACPI_DMAR_DRHD_HEADER *DmarDrhd ) @@ -581,10 +581,10 @@ ProcessDhrd ( if ((DmarDrhd->Flags & EFI_ACPI_DMAR_DRHD_FLAGS_INCLUDE_PCI_ALL) != 0) { VTdUnitInfo->PciDeviceInfo.IncludeAllFlag = TRUE; -DEBUG ((DEBUG_INFO," ProcessDhrd: with INCLUDE ALL\n")); +DEBUG ((DEBUG_INFO," ProcessDrhd: with INCLUDE ALL\n")); } else { VTdUnitInfo->PciDeviceInfo.IncludeAllFlag = FALSE; -DEBUG ((DEBUG_INFO," ProcessDhrd: without INCLUDE ALL\n")); +DEBUG ((DEBUG_INFO," ProcessDrhd: without INCLUDE ALL\n")); } VTdUnitInfo->PciDeviceInfo.PciDeviceDataNumber = 0; @@ -600,7 +600,7 @@ ProcessDhrd ( return; } -DEBUG ((DEBUG_INFO," ProcessDhrd: ")); +DEBUG ((DEBUG_INFO," ProcessDrhd: ")); switch (DmarDevScopeEntry->Type) { case EFI_ACPI_DEVICE_SCOPE_ENTRY_TYPE_PCI_ENDPOINT: DEBUG ((DEBUG_INFO,"PCI Endpoint")); @@ -708,7 +708,7 @@ ParseDmarAcpiTableDrhd ( switch (DmarHeader->Type) { case EFI_ACPI_DMAR_TYPE_DRHD: ASSERT (VtdIndex < VtdUnitNumber); - ProcessDhrd (&VTdInfo->VtdUnitInfo[VtdIndex], (EFI_ACPI_DMAR_DRHD_HEADER *) DmarHeader); + ProcessDrhd (&VTdInfo->VtdUnitInfo[VtdIndex], (EFI_ACPI_DMAR_DRHD_HEADER *) DmarHeader); VtdIndex++; break; diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c index 1ee290b7..75fbd53e 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c @@ -662,7 +662,7 @@ GetPciBusDeviceFunction ( } /** - Process DMAR DHRD table. + Process DMAR DRHD table. @param[in] VtdIndex The index of VTd engine. @param[in] DmarDrhd The DRHD table. @@ -670,7 +670,7 @@ GetPciBusDeviceFunction ( @retval EFI_SUCCESS The DRHD table is processed. **/ EFI_STATUS -ProcessDhrd ( +ProcessDrhd ( IN UINTN VtdIndex, IN EFI_ACPI_DMAR_DRHD_HEADER *DmarDrhd ) @@ -690,7 +690,7 @@ ProcessDhrd ( if ((DmarDrhd->Flags & EFI_ACPI_DMAR_DRHD_FLAGS_INCLUDE_PCI_ALL) != 0) { mVtdUnitInformation[VtdIndex].PciDeviceInfo.IncludeAllFlag = TRUE; -DEBUG ((DEBUG_INFO," ProcessDhrd: with INCLUDE ALL\n")); +DEBUG ((DEBUG_INFO," ProcessDrhd: with INCLUDE ALL\n")); Status = ScanAllPciBus((VOID *)VtdIndex, DmarDrhd->SegmentNumber, ScanBusCallbackRegisterPciDevice); if (EFI_ERROR (Status)) { @@ -698,7 +698,7 @@ ProcessDhrd ( } } else { mVtdUnitInformation[VtdIndex].PciDeviceInfo.IncludeAllFlag = FALSE; -DEBUG ((DEBUG_INFO," ProcessDhrd: without INCLUDE ALL\n")); +DEBUG ((DEBUG_INFO," ProcessDrhd: without INCLUDE ALL\n")); } DmarDevScopeEntry = (EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER *)((UINTN)(DmarDrhd + 1)); @@ -709,7 +709,7 @@ ProcessDhrd ( return Status; } -DEBUG ((DEBUG_INFO," ProcessDhrd: ")); +DEBUG ((DEBUG_INFO," ProcessDrhd: ")); switch (DmarDevScopeEntry->Type) { case EFI_ACPI_DEVICE_SCOPE_ENTRY_TYPE_PCI_ENDPOINT: DEBUG ((DEBUG_INFO,"PCI Endpoint")); @@ -877,7 +877,7 @@ ParseDmarAcpiTableDrhd ( switch (DmarHeader->Type) { case EFI_ACPI_DMAR_TYPE_DRHD: ASSERT (VtdIndex < mVtdUnitNumber); - Status = ProcessDhrd (VtdIndex, (EFI_ACPI_DMAR_DRHD_HEADER *)DmarHeader); + Status = ProcessDrhd (VtdIndex, (EFI_ACPI_DMAR_DRHD_HEADER *)DmarHeader); if (EFI_ERROR (Status)) { return Status; } diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/DmarTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/DmarTable.c index d920d136..1bb74f40 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/DmarTable