Re: [PATCH 1/3] UsbNetworkPkg/UsbRndis: Add USB RNDIS devices support
Michael Brown
On 03/10/2022 10:26, RichardHo [何明忠] via groups.io wrote:
diff --git a/UsbNetworkPkg/NetworkCommon/DriverBinding.h b/UsbNetworkPkg/NetworkCommon/DriverBinding.h +VOIDNeeds an EFIAPI modifier, i.e. VOID EFIAPI UndiApiEntry ( IN UINT64 Cdb ); to avoid runtime failures when using a non-Microsoft compiler. diff --git a/UsbNetworkPkg/NetworkCommon/PxeFunction.c b/UsbNetworkPkg/NetworkCommon/PxeFunction.cAs above: VOID EFIAPI UndiApiEntry ( IN UINT64 Cdb ) Thanks, Michael |
|
回复: [edk2-devel] [PATCH] MdePkg/UnitTestHostBaseLib: Remove HOST_APPLICATION limitation
gaoliming
Zhiguang:
Can you explain more about the emulator usage model for this library? Thanks Liming -----邮件原件-----reserved.<BR> # Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR> |
|
Re: [PATCH 1/4] MdeModulePkg/XhciDxe/XhciReg: Handle incorrect PSIV indices
Wu, Hao A
Hello,
toggle quoted message
Show quoted text
I saw there are several CI check failures for this 4 patches: https://github.com/tianocore/edk2/pull/3702 Could you help to resolve them? Thanks. Best Regards, Hao Wu -----Original Message----- |
|
[PATCH] MdePkg/UnitTestHostBaseLib: Remove HOST_APPLICATION limitation
Zhiguang Liu
Remove HOST_APPLICATION limitation for UnitTestHostBaseLib, so that
this library can be used as BaseLib by Emulator. Also, add some missing files Cc: Michael D Kinney <michael.d.kinney@...> Cc: Liming Gao <gaoliming@...> Signed-off-by: Ray Ni <ray.ni@...> --- MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf b/MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf index 09a610c31c..fefa2e79f6 100644 --- a/MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf +++ b/MdePkg/Library/BaseLib/UnitTestHostBaseLib.inf @@ -1,7 +1,7 @@ ## @file # Base Library implementation for use with host based unit tests. # -# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2007 - 2022, Intel Corporation. All rights reserved.<BR> # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> # Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR> # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> @@ -18,7 +18,7 @@ FILE_GUID = 9555A0D3-09BA-46C4-A51A-45198E3C765E MODULE_TYPE = BASE VERSION_STRING = 1.1 - LIBRARY_CLASS = BaseLib|HOST_APPLICATION + LIBRARY_CLASS = BaseLib LIBRARY_CLASS = UnitTestHostBaseLib|HOST_APPLICATION # @@ -128,6 +128,7 @@ X86RdRand.c X86SpeculationBarrier.c X86UnitTestHost.c + IntelTdxNull.c [Sources.X64] X64/LongJump.nasm @@ -168,6 +169,7 @@ X64/RdRand.nasm ChkStkGcc.c | GCC X86UnitTestHost.c + IntelTdxNull.c [Sources.EBC] Ebc/CpuBreakpoint.c -- 2.31.1.windows.1 |
|
[PATCH] MdePkg/BaseCpuLib: Remove assembly for CpuFlushTlb
Zhiguang Liu
For different compilers, both IA32 and X64 can use
Ia32/CpuFlushTlbGcc.c, which is C code (no inline assembly code). To simplify, remove other assemly file for CpuFlushTlb, and rename Ia32/CpuFlushTlbGcc.c to Ia32/CpuFlushTlb.c. Cc: Michael D Kinney <michael.d.kinney@...> Cc: Liming Gao <gaoliming@...> Signed-off-by: Ray Ni <ray.ni@...> Signed-off-by: Zhiguang Liu <zhiguang.liu@...> --- MdePkg/Library/BaseCpuLib/BaseCpuLib.inf | 10 ++---- MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.c | 12 +++---- .../Library/BaseCpuLib/Ia32/CpuFlushTlb.nasm | 31 ------------------ .../Library/BaseCpuLib/Ia32/CpuFlushTlbGcc.c | 25 --------------- .../Library/BaseCpuLib/X64/CpuFlushTlb.nasm | 32 ------------------- 5 files changed, 9 insertions(+), 101 deletions(-) delete mode 100644 MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.nasm delete mode 100644 MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlbGcc.c delete mode 100644 MdePkg/Library/BaseCpuLib/X64/CpuFlushTlb.nasm diff --git a/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf b/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf index 6b230f6e6d..0feb592638 100644 --- a/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf +++ b/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf @@ -4,7 +4,7 @@ # CPU Library implemented using ASM functions for IA32, X64, ARM, AARCH64, # PAL CALLs for IPF, and empty functions for EBC. # -# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2007 - 2022, Intel Corporation. All rights reserved.<BR> # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> # Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR> # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> @@ -31,16 +31,12 @@ [Sources.IA32] Ia32/CpuSleep.c | MSFT - Ia32/CpuFlushTlb.c | MSFT - Ia32/CpuSleep.nasm| INTEL - Ia32/CpuFlushTlb.nasm| INTEL - Ia32/CpuSleepGcc.c | GCC - Ia32/CpuFlushTlbGcc.c | GCC + Ia32/CpuFlushTlb.c [Sources.X64] - X64/CpuFlushTlb.nasm + Ia32/CpuFlushTlb.c X64/CpuSleep.nasm diff --git a/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.c b/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.c index 549f4eb8a0..17a351d054 100644 --- a/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.c +++ b/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.c @@ -1,11 +1,14 @@ /** @file - CpuFlushTlb function. + CpuFlushTlb function for Ia32/X64. - Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.<BR> + Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ +#include <Library/BaseLib.h> + /** Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU. @@ -18,8 +21,5 @@ CpuFlushTlb ( VOID ) { - _asm { - mov eax, cr3 - mov cr3, eax - } + AsmWriteCr3 (AsmReadCr3 ()); } diff --git a/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.nasm b/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.nasm deleted file mode 100644 index bc3b68e3f2..0000000000 --- a/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.nasm +++ /dev/null @@ -1,31 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; SPDX-License-Identifier: BSD-2-Clause-Patent -; -; Module Name: -; -; CpuFlushTlb.Asm -; -; Abstract: -; -; CpuFlushTlb function -; -; Notes: -; -;------------------------------------------------------------------------------ - - SECTION .text - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuFlushTlb ( -; VOID -; ); -;------------------------------------------------------------------------------ -global ASM_PFX(CpuFlushTlb) -ASM_PFX(CpuFlushTlb): - mov eax, cr3 - mov cr3, eax ; moving to CR3 flushes TLB - ret - diff --git a/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlbGcc.c b/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlbGcc.c deleted file mode 100644 index ee44f2ea6e..0000000000 --- a/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlbGcc.c +++ /dev/null @@ -1,25 +0,0 @@ -/** @file - CpuFlushTlb function for Ia32/X64 GCC. - - Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> - Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> - SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#include <Library/BaseLib.h> - -/** - Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU. - - Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU. - -**/ -VOID -EFIAPI -CpuFlushTlb ( - VOID - ) -{ - AsmWriteCr3 (AsmReadCr3 ()); -} diff --git a/MdePkg/Library/BaseCpuLib/X64/CpuFlushTlb.nasm b/MdePkg/Library/BaseCpuLib/X64/CpuFlushTlb.nasm deleted file mode 100644 index 8ddf7a2864..0000000000 --- a/MdePkg/Library/BaseCpuLib/X64/CpuFlushTlb.nasm +++ /dev/null @@ -1,32 +0,0 @@ -;------------------------------------------------------------------------------ ; -; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> -; SPDX-License-Identifier: BSD-2-Clause-Patent -; -; Module Name: -; -; CpuFlushTlb.Asm -; -; Abstract: -; -; CpuFlushTlb function -; -; Notes: -; -;------------------------------------------------------------------------------ - - DEFAULT REL - SECTION .text - -;------------------------------------------------------------------------------ -; VOID -; EFIAPI -; CpuFlushTlb ( -; VOID -; ); -;------------------------------------------------------------------------------ -global ASM_PFX(CpuFlushTlb) -ASM_PFX(CpuFlushTlb): - mov rax, cr3 - mov cr3, rax - ret - -- 2.31.1.windows.1 |
|
[PATCH EDK2 v2 1/1] CryptoPkg/BaseCryptLib:time overflow
wenyi,xie
From: Zihong Yi <yizihong@...>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4167 In CrtLibSupport.h, time_t is defined as INT32, and its maximum value is 2147483647. That is, the corresponding maximum timestamp is 2038-01-19 11:14:07. Therefore, overflow occurs when the test time exceeds 2038-01-19 11:14:07. So change the type of time_t to INT64 and also change the type of variables in function gmtime which calculated with time_t. Cc: Jiewen Yao <jiewen.yao@...> Cc: Jian J Wang <jian.j.wang@...> Cc: Xiaoyu Lu <xiaoyu1.lu@...> Cc: Guomin Jiang <guomin.jiang@...> Signed-off-by: Zihong Yi <yizihong@...> --- CryptoPkg/Library/Include/CrtLibSupport.h | 2 +- CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c | 51 ++++++++++++++------ 2 files changed, 38 insertions(+), 15 deletions(-) diff --git a/CryptoPkg/Library/Include/CrtLibSupport.h b/CryptoPkg/Library/Include/CrtLibSupport.h index 5072c343da57..94b0e6b6014f 100644 --- a/CryptoPkg/Library/Include/CrtLibSupport.h +++ b/CryptoPkg/Library/Include/CrtLibSupport.h @@ -109,7 +109,7 @@ typedef UINTN off_t; typedef UINTN u_int; typedef INTN ptrdiff_t; typedef INTN ssize_t; -typedef INT32 time_t; +typedef INT64 time_t; typedef UINT8 __uint8_t; typedef UINT8 sa_family_t; typedef UINT8 u_char; diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c b/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c index bf8a5325817f..2dfc6fe6c593 100644 --- a/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c +++ b/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c @@ -15,7 +15,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // -- Time Management Routines -- // -#define IsLeap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) #define SECSPERMIN (60) #define SECSPERHOUR (60 * 60) #define SECSPERDAY (24 * SECSPERHOUR) @@ -60,6 +59,26 @@ UINTN CumulativeDays[2][14] = { } }; +/* Check the year is leap or not. */ +// BOOLEAN IsLeap( +// INTN timer +// ) +BOOLEAN +IsLeap ( + time_t timer + ) +{ + INT64 Remainder1; + INT64 Remainder2; + INT64 Remainder3; + + DivS64x64Remainder (timer, 4, &Remainder1); + DivS64x64Remainder (timer, 100, &Remainder2); + DivS64x64Remainder (timer, 400, &Remainder3); + + return (Remainder1 == 0 && (Remainder2 != 0 || Remainder3 == 0)); +} + /* Get the system time as seconds elapsed since midnight, January 1, 1970. */ // INTN time( // INTN *timer @@ -117,12 +136,13 @@ gmtime ( ) { struct tm *GmTime; - UINT16 DayNo; - UINT32 DayRemainder; + UINT64 DayNo; + UINT64 DayRemainder; time_t Year; time_t YearNo; - UINT16 TotalDays; - UINT16 MonthNo; + UINT32 TotalDays; + UINT32 MonthNo; + INT64 Remainder; if (timer == NULL) { return NULL; @@ -135,18 +155,21 @@ gmtime ( ZeroMem ((VOID *)GmTime, (UINTN)sizeof (struct tm)); - DayNo = (UINT16)(*timer / SECSPERDAY); - DayRemainder = (UINT32)(*timer % SECSPERDAY); + DayNo = (UINT64)DivS64x64Remainder (*timer, SECSPERDAY, &Remainder); + DayRemainder = (UINT64)Remainder; - GmTime->tm_sec = (int)(DayRemainder % SECSPERMIN); - GmTime->tm_min = (int)((DayRemainder % SECSPERHOUR) / SECSPERMIN); - GmTime->tm_hour = (int)(DayRemainder / SECSPERHOUR); - GmTime->tm_wday = (int)((DayNo + 4) % 7); + DivS64x64Remainder (DayRemainder, SECSPERMIN, &Remainder); + GmTime->tm_sec = (int)Remainder; + DivS64x64Remainder (DayRemainder, SECSPERHOUR, &Remainder); + GmTime->tm_min = (int)DivS64x64Remainder (Remainder, SECSPERMIN, NULL); + GmTime->tm_hour = (int)DivS64x64Remainder (DayRemainder, SECSPERHOUR, NULL); + DivS64x64Remainder ((DayNo + 4), 7, &Remainder); + GmTime->tm_wday = (int)Remainder; for (Year = 1970, YearNo = 0; DayNo > 0; Year++) { - TotalDays = (UINT16)(IsLeap (Year) ? 366 : 365); + TotalDays = (UINT32)(IsLeap (Year) ? 366 : 365); if (DayNo >= TotalDays) { - DayNo = (UINT16)(DayNo - TotalDays); + DayNo = (UINT64)(DayNo - TotalDays); YearNo++; } else { break; @@ -158,7 +181,7 @@ gmtime ( for (MonthNo = 12; MonthNo > 1; MonthNo--) { if (DayNo >= CumulativeDays[IsLeap (Year)][MonthNo]) { - DayNo = (UINT16)(DayNo - (UINT16)(CumulativeDays[IsLeap (Year)][MonthNo])); + DayNo = (UINT64)(DayNo - (UINT32)(CumulativeDays[IsLeap (Year)][MonthNo])); break; } } -- 2.20.1.windows.1 |
|
[PATCH EDK2 v2 0/1] CryptoPkg/BaseCryptLib:time overflow
wenyi,xie
Main Changes since v1 :
1.fix code format Zihong Yi (1): CryptoPkg/BaseCryptLib:time overflow CryptoPkg/Library/Include/CrtLibSupport.h | 2 +- CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c | 51 ++++++++++++++------ 2 files changed, 38 insertions(+), 15 deletions(-) -- 2.20.1.windows.1 |
|
Re: [PATCH 1/1] RedfishPkg: Fix typos of the .inc filenames
Nickle Wang
Reviewed-by: Nickle Wang <nicklew@...>
toggle quoted message
Show quoted text
Regards, Nickle -----Original Message-----
From: Chang, Abner <Abner.Chang@...> Sent: Friday, December 2, 2022 7:36 AM To: Rebecca Cran <rebecca@...>; devel@edk2.groups.io; Nickle Wang <nicklew@...> Cc: Igor Kulchytskyy <igork@...> Subject: RE: [PATCH 1/1] RedfishPkg: Fix typos of the .inc filenames External email: Use caution opening links or attachments [AMD Official Use Only - General] Reviewed-by: Abner Chang <abner.chang@...> -----Original Message----- |
|
[PATCH] SecurityPkg: check return value of GetEfiGlobalVariable2() in DxeImageVerificationHandler()
Jon Maloy
Fixes: CVE-2019-14560
GetEfiGlobalVariable2() is used in some instances when looking up the SecureBoot UEFI variable. The API can fail in certain circumstances, for example, if AllocatePool() fails or if gRT->GetVariable() fails. In the case of secure boot checks, it is critical that this return value is checked. if an attacker can cause the API to fail, it would currently constitute a secure boot bypass. This return value check is missing in the function DxeImageVerificationHandler(), so we add it here. This commit is almost identical to one suggested by Jian J Wang <jian.j.wang@...> on 2019-09-09, but that one was for some reason never posted to the edk2-devel list. We now make a new attempt to get it reviewed and applied. Cc: Jiewen Yao <jiewen.yao@...> Cc: Jian J Wang <jian.j.wang@...> Cc: Min Xu <min.m.xu@...> Cc: devel@edk2.groups.io Signed-off-by: Jon Maloy <jmaloy@...> --- .../DxeImageVerificationLib.c | 39 +++++++++++-------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c index 66e2f5eaa3c0..4ae0bd8b20db 100644 --- a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c +++ b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c @@ -1686,6 +1686,7 @@ DxeImageVerificationHandler ( RETURN_STATUS PeCoffStatus; EFI_STATUS HashStatus; EFI_STATUS DbStatus; + EFI_STATUS SecBootStatus; BOOLEAN IsFound; SignatureList = NULL; @@ -1742,23 +1743,29 @@ DxeImageVerificationHandler ( CpuDeadLoop (); } - GetEfiGlobalVariable2 (EFI_SECURE_BOOT_MODE_NAME, (VOID **)&SecureBoot, NULL); - // - // Skip verification if SecureBoot variable doesn't exist. - // - if (SecureBoot == NULL) { - return EFI_SUCCESS; - } + SecBootStatus = GetEfiGlobalVariable2 (EFI_SECURE_BOOT_MODE_NAME, (VOID **)&SecureBoot, NULL); + if (!EFI_ERROR (SecBootStatus)) { + if (SecureBoot == NULL) { + // + // Skip verification if SecureBoot variable doesn't exist. + // + return EFI_SUCCESS; + } else { + // + // Skip verification if SecureBoot is disabled but not AuditMode + // + if (*SecureBoot == SECURE_BOOT_MODE_DISABLE) { + FreePool (SecureBoot); + return EFI_SUCCESS; + } + FreePool (SecureBoot); + } + } else { + // + // Assume SecureBoot enabled in the case of error. + // + } - // - // Skip verification if SecureBoot is disabled but not AuditMode - // - if (*SecureBoot == SECURE_BOOT_MODE_DISABLE) { - FreePool (SecureBoot); - return EFI_SUCCESS; - } - - FreePool (SecureBoot); // // Read the Dos header. -- 2.35.3 |
|
Re: [PATCH V1 1/1] OvmfPkg/PlatformInitLib: Add check to NvVarStoreFV HeaderLength
Yao, Jiewen
toggle quoted message
Show quoted text
-----Original Message----- |
|
Re: [PATCH 1/1] MdeModulePkg: Put USB DEBUGs that occur for bulk timeouts under VERBOSE
Wu, Hao A
Sorry for a question.
toggle quoted message
Show quoted text
For the changes in EhcBulkTransfer() and XhcBulkTransfer(), is it feasible to distinguish timeout cases with other error cases and only adjust timeout related messages to VERBOSE level? Best Regards, Hao Wu -----Original Message----- |
|
[PATCH 2/2] ArmPkg: Improve formatting of docs in ArmExceptionLib/ArmExceptionLib.c
Rebecca Cran <quic_rcran@...>
Improve the formatting of the documentation for functions in
ArmExceptionLib/ArmExceptionLib.c. Signed-off-by: Rebecca Cran <rebecca@...> --- ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c | 115 +++++++++++--------- 1 file changed, 64 insertions(+), 51 deletions(-) diff --git a/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c b/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c index b20472008b3f..057ab3a9f201 100644 --- a/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c +++ b/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c @@ -69,19 +69,24 @@ STATIC CONST BOOLEAN gArmRelocateVectorTable = FALSE; #endif /** -Initializes all CPU exceptions entries and provides the default exception handlers. + Initializes all CPU exceptions entries and provides the default exception + handlers. -Caller should try to get an array of interrupt and/or exception vectors that are in use and need to -persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification. -If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. -If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly. + Caller should try to get an array of interrupt and/or exception vectors that + are in use and need to persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 + specification. + If caller cannot get reserved vector list or it does not exists, set + VectorInfo to NULL. + If VectorInfo is not NULL, the exception vectors will be initialized per + vector attribute accordingly. -@param[in] VectorInfo Pointer to reserved vector list. + @param[in] VectorInfo Pointer to reserved vector list. -@retval EFI_SUCCESS CPU Exception Entries have been successfully initialized -with default exception handlers. -@retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL. -@retval EFI_UNSUPPORTED This function is not supported. + @retval EFI_SUCCESS CPU Exception Entries have been successfully + initialized with default exception handlers. + @retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if + VectorInfo is not NULL. + @retval EFI_UNSUPPORTED This function is not supported. **/ EFI_STATUS @@ -130,19 +135,23 @@ InitializeCpuExceptionHandlers ( } /** -Copies exception handlers to the specified address. + Copies exception handlers to the specified address. -Caller should try to get an array of interrupt and/or exception vectors that are in use and need to -persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification. -If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. -If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly. + Caller should try to get an array of interrupt and/or exception vectors that + are in use and need to persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 + specification. + If caller cannot get reserved vector list or it does not exists, set + VectorInfo to NULL. + If VectorInfo is not NULL, the exception vectors will be initialized per + vector attribute accordingly. -@param[in] BaseAddress Address to copy exception handlers to. + @param[in] BaseAddress Address to copy exception handlers to. -@retval EFI_SUCCESS CPU Exception Entries have been successfully initialized -with default exception handlers. -@retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL. -@retval EFI_UNSUPPORTED This function is not supported. + @retval EFI_SUCCESS CPU Exception Entries have been successfully + initialized with default exception handlers. + @retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if + VectorInfo is not NULL. + @retval EFI_UNSUPPORTED This function is not supported. **/ STATIC @@ -196,29 +205,33 @@ CopyExceptionHandlers ( } /** -Registers a function to be called from the processor exception handler. (On ARM/AArch64 this only -provides exception handlers, not interrupt handling which is provided through the Hardware Interrupt -Protocol.) + Registers a function to be called from the processor exception handler. + (On ARM/AArch64 this only provides exception handlers, not interrupt handling + which is provided through the Hardware Interrupt Protocol.) -This function registers and enables the handler specified by ExceptionHandler for a processor -interrupt or exception type specified by ExceptionType. If ExceptionHandler is NULL, then the -handler for the processor interrupt or exception type specified by ExceptionType is uninstalled. -The installed handler is called once for each processor interrupt or exception. -NOTE: This function should be invoked after InitializeCpuExceptionHandlers() is invoked, -otherwise EFI_UNSUPPORTED returned. + This function registers and enables the handler specified by ExceptionHandler + for a processor interrupt or exception type specified by ExceptionType. If + ExceptionHandler is NULL, then the handler for the processor interrupt or + exception type specified by ExceptionType is uninstalled. + The installed handler is called once for each processor interrupt or + exception. + NOTE: This function should be invoked after InitializeCpuExceptionHandlers() + is invoked, otherwise EFI_UNSUPPORTED returned. -@param[in] ExceptionType Defines which interrupt or exception to hook. -@param[in] ExceptionHandler A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called -when a processor interrupt occurs. If this parameter is NULL, then the handler -will be uninstalled. + @param[in] ExceptionType Defines which interrupt or exception to hook. + @param[in] ExceptionHandler A pointer to a function of type + EFI_CPU_INTERRUPT_HANDLER that is called when a + processor interrupt occurs. If this parameter is + NULL, then the handler will be uninstalled. -@retval EFI_SUCCESS The handler for the processor interrupt was successfully installed or uninstalled. -@retval EFI_ALREADY_STARTED ExceptionHandler is not NULL, and a handler for ExceptionType was -previously installed. -@retval EFI_INVALID_PARAMETER ExceptionHandler is NULL, and a handler for ExceptionType was not -previously installed. -@retval EFI_UNSUPPORTED The interrupt specified by ExceptionType is not supported, -or this function is not supported. + @retval EFI_SUCCESS The handler for the processor interrupt was + successfully installed or uninstalled. + @retval EFI_ALREADY_STARTED ExceptionHandler is not NULL, and a handler + for ExceptionType was previously installed. + @retval EFI_INVALID_PARAMETER ExceptionHandler is NULL, and a handler for + ExceptionType was not previously installed. + @retval EFI_UNSUPPORTED The interrupt specified by ExceptionType is not + supported, or this function is not supported. **/ RETURN_STATUS RegisterCpuInterruptHandler ( @@ -240,19 +253,19 @@ RegisterCpuInterruptHandler ( } /** -Register exception handler. + Register exception handler. -@param ExceptionType Defines which interrupt or exception to hook. Type EFI_EXCEPTION_TYPE and -the valid values for this parameter are defined in EFI_DEBUG_SUPPORT_PROTOCOL -of the UEFI 2.0 specification. -@param InterruptHandler A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER -that is called when a processor interrupt occurs. -If this parameter is NULL, then the handler will be uninstalled. + @param ExceptionType Defines which interrupt or exception to hook. Type EFI_EXCEPTION_TYPE and + the valid values for this parameter are defined in EFI_DEBUG_SUPPORT_PROTOCOL + of the UEFI 2.0 specification. + @param InterruptHandler A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER + that is called when a processor interrupt occurs. + If this parameter is NULL, then the handler will be uninstalled. -@retval EFI_SUCCESS The handler for the processor interrupt was successfully installed or uninstalled. -@retval EFI_ALREADY_STARTED InterruptHandler is not NULL, and a handler for InterruptType was previously installed. -@retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not previously installed. -@retval EFI_UNSUPPORTED The interrupt specified by InterruptType is not supported. + @retval EFI_SUCCESS The handler for the processor interrupt was successfully installed or uninstalled. + @retval EFI_ALREADY_STARTED InterruptHandler is not NULL, and a handler for InterruptType was previously installed. + @retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not previously installed. + @retval EFI_UNSUPPORTED The interrupt specified by InterruptType is not supported. **/ EFI_STATUS -- 2.30.2 |
|
[PATCH 1/2] ArmPkg: Fix incorrect parameter list in doxygen comments
Rebecca Cran <quic_rcran@...>
Fix the doxygen comments for CopyExceptionHandlers by removing the
nonexistant "VectorInfo" parameter and replacing it with "BaseAddress". Fix the doxygen comments for RegisterCpuInterruptHandler by removing the nonexistant parameter "This". Signed-off-by: Rebecca Cran <rebecca@...> --- ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c b/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c index a521c33f3281..b20472008b3f 100644 --- a/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c +++ b/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c @@ -137,7 +137,7 @@ persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification. If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly. -@param[in] VectorInfo Pointer to reserved vector list. +@param[in] BaseAddress Address to copy exception handlers to. @retval EFI_SUCCESS CPU Exception Entries have been successfully initialized with default exception handlers. @@ -242,7 +242,6 @@ RegisterCpuInterruptHandler ( /** Register exception handler. -@param This A pointer to the SMM_CPU_SERVICE_PROTOCOL instance. @param ExceptionType Defines which interrupt or exception to hook. Type EFI_EXCEPTION_TYPE and the valid values for this parameter are defined in EFI_DEBUG_SUPPORT_PROTOCOL of the UEFI 2.0 specification. -- 2.30.2 |
|
[PATCH 0/2] ArmPkg: Improve doxygen comments in ArmExceptionLib
Rebecca Cran <quic_rcran@...>
Fix incorrect parameters and improve formatting of doxygen comments in
ArmExceptionLib. Rebecca Cran (2): ArmPkg: Fix incorrect parameter list in doxygen comments ArmPkg: Improve formatting of docs in ArmExceptionLib/ArmExceptionLib.c ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c | 116 +++++++++++--------- 1 file changed, 64 insertions(+), 52 deletions(-) -- 2.30.2 |
|
Re: [PATCH 1/1] RedfishPkg: Fix typos of the .inc filenames
Chang, Abner
[AMD Official Use Only - General]
toggle quoted message
Show quoted text
Reviewed-by: Abner Chang <abner.chang@...> -----Original Message----- |
|
[PATCH 1/1] NetworkPkg: Improve grammar in comment about MediaPresent in PxeReceive
Rebecca Cran <quic_rcran@...>
Improve the grammar of the comment in PxeReceive about ensuring that
MediaPresent is set to the correct value. Signed-off-by: Rebecca Cran <rebecca@...> --- NetworkPkg/SnpDxe/Receive.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NetworkPkg/SnpDxe/Receive.c b/NetworkPkg/SnpDxe/Receive.c index 41601980f25f..6a1914b84ba5 100644 --- a/NetworkPkg/SnpDxe/Receive.c +++ b/NetworkPkg/SnpDxe/Receive.c @@ -126,10 +126,10 @@ PxeReceive ( } // - // We have received a packet from network interface, which implies that the - // network cable should be present. While, some UNDI driver may not report - // correct media status during Snp->Initialize(). So, we need ensure - // MediaPresent in SNP mode data is set to correct value. + // We have received a packet from the network interface, which implies + // that the network cable should be present. Some UNDI drivers may not + // report correct media status during Snp->Initialize(), so we need to + // ensure MediaPresent in SNP mode data is set to the correct value. // if (Snp->Mode.MediaPresentSupported && !Snp->Mode.MediaPresent) { Snp->Mode.MediaPresent = TRUE; -- 2.30.2 |
|
[PATCH 1/1] ShellPkg: Improve "ping" output by adding equals sign after time
Rebecca Cran <quic_rcran@...>
The output of the "ping" command shows the time without a space between
the label and the value. e.g.: 20 bytes from 192.168.0.1 : icmp_seq=1 ttl=1 time1~2ms Improve the readability and consistency by adding an equals sign for the time value: 20 bytes from 192.168.0.1 : icmp_seq=1 ttl=1 time=1~2ms Signed-off-by: Rebecca Cran <rebecca@...> --- ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.uni | 2 +- ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.uni | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.uni b/ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.uni index 73cf96d9e614..37fd4a11929c 100644 --- a/ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.uni +++ b/ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.uni @@ -52,7 +52,7 @@ #string STR_PING_NOROUTE_FOUND #language en-US "There is no route to the destination '%B%s%N' from the source '%B%s%N' was found.\r\n" #string STR_PING_START #language en-US "Ping %s %d data bytes.\r\n" #string STR_PING_TIMEOUT #language en-US "Echo request sequence %d timeout.\r\n" -#string STR_PING_REPLY_INFO #language en-US "%d bytes from %s : icmp_seq=%d ttl=%d time%d~%dms\r\n" +#string STR_PING_REPLY_INFO #language en-US "%d bytes from %s : icmp_seq=%d ttl=%d time=%d~%dms\r\n" #string STR_PING_STAT #language en-US "\n%d packets transmitted, %d received, %d%% packet loss, time %dms\r\n" #string STR_PING_RTT #language en-US "\nRtt(round trip time) min=%d~%dms max=%d~%dms avg=%d~%dms\r\n" diff --git a/ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.uni b/ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.uni index 30913ae5b583..cb9d39a33fbe 100644 --- a/ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.uni +++ b/ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.uni @@ -33,7 +33,7 @@ #string STR_PING6_NOSOURCE_INDOMAIN #language en-US "No sources in %s's multicast domain.\r\n" #string STR_PING6_START #language en-US "Ping %s %d data bytes\r\n" #string STR_PING6_TIMEOUT #language en-US "Echo request sequence %d timeout.\r\n" -#string STR_PING6_REPLY_INFO #language en-US "%d bytes from %s : icmp_seq=%d ttl=%d time%d~%dms\r\n" +#string STR_PING6_REPLY_INFO #language en-US "%d bytes from %s : icmp_seq=%d ttl=%d time=%d~%dms\r\n" #string STR_PING6_STAT #language en-US "\n%d packets transmitted, %d received, %d%% packet loss, time %dms\r\n" #string STR_PING6_RTT #language en-US "\nRtt(round trip time) min=%d~%dms max=%d~%dms avg=%d~%dms\r\n" -- 2.30.2 |
|
[PATCH 1/1] MdeModulePkg: Put USB DEBUGs that occur for bulk timeouts under VERBOSE
Rebecca Cran <quic_rcran@...>
With the pending commit of UsbNetworkPkg, it will become common for
UsbBulkTransfer calls to timeout, given that the drivers are called from MnpSystemPoll every MNP_SYS_POLL_INTERVAL milliseconds: the drivers check for network packets by calling UsbBulkTransfer with a timeout of 1ms. Avoid console spam by moving DEBUG messages that occur each time a bulk transfer request times out from DEBUG_ERROR to DEBUG_VERBOSE, for both EHCI and XHCI drivers. Signed-off-by: Rebecca Cran <rebecca@...> --- MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c | 2 +- MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c | 2 +- MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c | 2 +- MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c index 0b7270f4e930..4f1d990c8bf1 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c @@ -932,7 +932,7 @@ EhcBulkTransfer ( gBS->RestoreTPL (OldTpl); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "EhcBulkTransfer: error - %r, transfer - %x\n", Status, *TransferResult)); + DEBUG ((DEBUG_VERBOSE, "EhcBulkTransfer: error - %r, transfer - %x\n", Status, *TransferResult)); } return Status; diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c b/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c index 5da26afbe120..6967aabceb78 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c @@ -702,7 +702,7 @@ EhcExecTransfer ( } if (!Finished) { - DEBUG ((DEBUG_ERROR, "EhcExecTransfer: transfer not finished in %dms\n", (UINT32)TimeOut)); + DEBUG ((DEBUG_VERBOSE, "EhcExecTransfer: transfer not finished in %dms\n", (UINT32)TimeOut)); EhcDumpQh (Urb->Qh, NULL, FALSE); Status = EFI_TIMEOUT; diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c index c05431ff30ec..e0347970c9ad 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c @@ -1304,7 +1304,7 @@ XhcBulkTransfer ( ON_EXIT: if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "XhcBulkTransfer: error - %r, transfer - %x\n", Status, *TransferResult)); + DEBUG ((DEBUG_VERBOSE, "XhcBulkTransfer: error - %r, transfer - %x\n", Status, *TransferResult)); } gBS->RestoreTPL (OldTpl); diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c index 13b0400e83d7..13247f7b0dfc 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c @@ -734,7 +734,7 @@ XhcDequeueTrbFromEndpoint ( Dci = XhcEndpointToDci (Urb->Ep.EpAddr, (UINT8)(Urb->Ep.Direction)); ASSERT (Dci < 32); - DEBUG ((DEBUG_INFO, "Stop Slot = %x,Dci = %x\n", SlotId, Dci)); + DEBUG ((DEBUG_VERBOSE, "Stop Slot = %x,Dci = %x\n", SlotId, Dci)); // // 1) Send Stop endpoint command to stop xHC from executing of the TDs on the endpoint @@ -3376,7 +3376,7 @@ XhcStopEndpoint ( EVT_TRB_COMMAND_COMPLETION *EvtTrb; CMD_TRB_STOP_ENDPOINT CmdTrbStopED; - DEBUG ((DEBUG_INFO, "XhcStopEndpoint: Slot = 0x%x, Dci = 0x%x\n", SlotId, Dci)); + DEBUG ((DEBUG_VERBOSE, "XhcStopEndpoint: Slot = 0x%x, Dci = 0x%x\n", SlotId, Dci)); // // When XhcCheckUrbResult waits for the Stop_Endpoint completion, it also checks @@ -3497,7 +3497,7 @@ XhcSetTrDequeuePointer ( CMD_SET_TR_DEQ_POINTER CmdSetTRDeq; EFI_PHYSICAL_ADDRESS PhyAddr; - DEBUG ((DEBUG_INFO, "XhcSetTrDequeuePointer: Slot = 0x%x, Dci = 0x%x, Urb = 0x%x\n", SlotId, Dci, Urb)); + DEBUG ((DEBUG_VERBOSE, "XhcSetTrDequeuePointer: Slot = 0x%x, Dci = 0x%x, Urb = 0x%x\n", SlotId, Dci, Urb)); // // Send stop endpoint command to transit Endpoint from running to stop state -- 2.30.2 |
|
Re: [PATCH v10 16/17] CI: use ubuntu-22.04 image (Linux only)
Michael Kubacki
Reviewed-by: Michael Kubacki <michael.kubacki@...>
toggle quoted message
Show quoted text
On 12/1/2022 3:28 PM, Oliver Steffen wrote:
Use the same vm_image as the other Linux CIs in |
|
Re: [PATCH v10 12/17] BaseTools: remove ext_dep files for gcc
Michael Kubacki
Reviewed-by: Michael Kubacki <michael.kubacki@...>
toggle quoted message
Show quoted text
On 12/1/2022 3:28 PM, Oliver Steffen wrote:
Remove BaseTools/Bin/gcc_*_ext_dep.yaml to stop |
|