Re: [edk2-devel] [PATCH v4 4/4] BaseTools: Remove ext. gcc dependencies (Linux only)

2022-08-14 Thread Daniel Schaefer
Thanks!
ghcr.io/tianocore/containers/fedora-35-test:cea91ec is the container it uses, 
right?
I used this to build the RISC-V U540 platform in edk2-platforms and can confirm 
it can still build and boot to shell fine.

Tested-by: Daniel Schaefer 

On 8/11/22 18:49, Oliver Steffen wrote:
> Hi Daniel,
> 
> The CI still runs through all jobs successfully.
> This includes builds for RiscV64. See the PR:
> https://github.com/tianocore/edk2/pull/2935 
> 
> 
> Thanks,
>  Oliver
> 
> On Thu, Aug 11, 2022 at 5:34 AM Daniel Schaefer  > wrote:
> 
> Hi Oliver,
> 
> I assume you made sure that the build still works on at least one 
> platform per arch?
> For example did you build a RISCV64 platform?
> 
> Thanks,
> Daniel
> 
> On 8/10/22 20:03, Oliver Steffen wrote:
> > Remove BaseTools/Bin/gcc*_linux_ext_dep.yaml to stop
> > downloading gcc from external locations; use the
> > toolchains provided by the container image instead.
> >
> > The image needs to set the GCC5_*_PREFIX accordingly.
> >
> > Signed-off-by: Oliver Steffen  >
> > ---
> >  BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml  | 21 --
> >  BaseTools/Bin/gcc_arm_linux_ext_dep.yaml      | 21 --
> >  .../Bin/gcc_riscv64_unknown_ext_dep.yaml      | 22 ---
> >  3 files changed, 64 deletions(-)
> >  delete mode 100644 BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml
> >  delete mode 100644 BaseTools/Bin/gcc_arm_linux_ext_dep.yaml
> >  delete mode 100644 BaseTools/Bin/gcc_riscv64_unknown_ext_dep.yaml
> >
> > diff --git a/BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml 
> b/BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml
> > deleted file mode 100644
> > index ff8a9e868100..
> > --- a/BaseTools/Bin/gcc_aarch64_linux_ext_dep.yaml
> > +++ /dev/null
> > @@ -1,21 +0,0 @@
> > -## @file
> > -# Download GCC AARCH64 compiler from Arm's release site
> > -# Set shell variable GCC5_AARCH64_INSTALL to this folder
> > -#
> > -# This is only downloaded when a build activates scope 
> gcc_aarch64_linux
> > -#
> > -# Copyright (c) Microsoft Corporation.
> > -# SPDX-License-Identifier: BSD-2-Clause-Patent
> > -##
> > -{
> > -  "scope": "gcc_aarch64_linux",
> > -  "type": "web",
> > -  "name": "gcc_aarch64_linux",
> > -  "source": 
> "https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu.tar.xz
>  
> ",
> > -  "version": "11.2-2022.02",
> > -  "sha256": 
> "52dbac3eb71dbe0916f60a8c5ab9b7dc9b66b3ce513047baa09fae56234e53f3",
> > -  "compression_type": "tar",
> > -  "internal_path": 
> "/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/",
> > -  "flags": ["set_shell_var", ],
> > -  "var_name": "GCC5_AARCH64_INSTALL"
> > -}
> > diff --git a/BaseTools/Bin/gcc_arm_linux_ext_dep.yaml 
> b/BaseTools/Bin/gcc_arm_linux_ext_dep.yaml
> > deleted file mode 100644
> > index 151cbfa4b532..
> > --- a/BaseTools/Bin/gcc_arm_linux_ext_dep.yaml
> > +++ /dev/null
> > @@ -1,21 +0,0 @@
> > -## @file
> > -# Download GCC ARM compiler from Arm's release site
> > -# Set shell variable GCC5_ARM_INSTALL to this folder
> > -#
> > -# This is only downloaded when a build activates scope gcc_arm_linux
> > -#
> > -# Copyright (c) Microsoft Corporation.
> > -# SPDX-License-Identifier: BSD-2-Clause-Patent
> > -##
> > -{
> > -  "scope": "gcc_arm_linux",
> > -  "type": "web",
> > -  "name": "gcc_arm_linux",
> > -  "source": 
> "https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf.tar.xz
>  
> ",
> > -  "version": "11.2-2022.02",
> > -  "sha256": 
> "c254f7199261fe76c32ef42187502839bda7efad0a66646cf739d074eff45fad",
> > -  "compression_type": "tar",
> > -  "internal_path": 
> "/gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf/",
> > -  "flags": ["set_shell_var", ],
> > -  "var_name": "GCC5_ARM_INSTALL"
> > -}
> > diff --git a/BaseTools/Bin/gcc_riscv64_unknown_ext_dep.yaml 
> b/BaseTools/Bin/gcc_riscv64_unknown_ext_dep.yaml
> > deleted file mode 100644
> > index 8abbcd7ba040..
> > --- a/BaseTools/Bin/gcc_riscv64_unknown_ext_dep.yaml
> > +++ /dev/null
> > @@ -1,22 +0,0 @@
> > -## @file
> > -# Download GCC RISCV64 compiler from RISC-V Organization release site
> > -# Set shell variable GCC5_RISCV64_INSTALL 

Re: [edk2-devel] [PATCH] ShellPkg/SmbiosView: Smbiosview tool is not show Extended Speed and Extended Configured Memory Speed in type 17.

2022-08-14 Thread Xue, ShengfengX
Hi Zhichao,

It's OK for me, thank you very much for this suggestion and merger code.


Best Regards,
Roy
Phone/WeChat: 13584008328

-Original Message-
From: Gao, Zhichao  
Sent: Monday, August 15, 2022 9:47 AM
To: devel@edk2.groups.io; Gao, Zhichao ; Xue, Shengfeng 
; Ni, Ray 
Cc: Gao, Liming ; Xue, ShengfengX 

Subject: RE: [edk2-devel] [PATCH] ShellPkg/SmbiosView: Smbiosview tool is not 
show Extended Speed and Extended Configured Memory Speed in type 17.

The commit message should be limited within 72 characters.
Suggest the new titile "ShellPkg/SmbiosView: Display extended memory info in 
smbiosview -t 17"

Thanks,
Zhichao

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Gao, 
> Zhichao
> Sent: Tuesday, August 9, 2022 5:57 PM
> To: Xue, Shengfeng ; 
> devel@edk2.groups.io; Ni, Ray 
> Cc: Gao, Liming ; Xue, ShengfengX 
> 
> Subject: Re: [edk2-devel] [PATCH] ShellPkg/SmbiosView: Smbiosview tool 
> is not show Extended Speed and Extended Configured Memory Speed in 
> type 17.
> 
> Reviewed-by: Zhichao Gao 
> 
> Thanks,
> Zhichao
> 
> > -Original Message-
> > From: xueshengfeng 
> > Sent: Saturday, August 6, 2022 10:02 AM
> > To: devel@edk2.groups.io; Ni, Ray ; Gao, Zhichao 
> > 
> > Cc: Gao, Liming ; Xue, ShengfengX 
> > 
> > Subject: [PATCH] ShellPkg/SmbiosView: Smbiosview tool is not show 
> > Extended Speed and Extended Configured Memory Speed in type 17.
> >
> > From: Shengfengx Xue 
> >
> > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4014
> >
> > if Configured Memory Speed is 65,535 MT/s or greater, and the actual 
> > speed is stored in the Extended Configured Memory Speed field. but 
> > current Smbiosview have no this logic.
> >
> > Signed-off-by: Shengfengx Xue 
> > ---
> >  .../UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c| 5 +
> >  1 file changed, 5 insertions(+)
> >
> > diff --git
> > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
> > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
> > index a0ee286c9a..0ab9f5063a 100644
> > ---
> > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
> > +++
> > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
> > @@ -878,6 +878,11 @@ SmbiosPrintStructure (
> >  }
> >}
> >
> > +  if (AE_SMBIOS_VERSION (0x3, 0x3) && (Struct->Hdr->Length > 0x54)) {
> > +PRINT_STRUCT_VALUE_H (Struct, Type17, ExtendedSpeed);
> > +PRINT_STRUCT_VALUE_H (Struct, Type17,
> > ExtendedConfiguredMemorySpeed);
> > +  }
> > +
> >break;
> >
> >  //
> > --
> > 2.26.2.windows.1
> >
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92409): https://edk2.groups.io/g/devel/message/92409
Mute This Topic: https://groups.io/mt/92898444/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH] ShellPkg/SmbiosView: Smbiosview tool is not show Extended Speed and Extended Configured Memory Speed in type 17.

2022-08-14 Thread Gao, Zhichao
The commit message should be limited within 72 characters.
Suggest the new titile "ShellPkg/SmbiosView: Display extended memory info in 
smbiosview -t 17"

Thanks,
Zhichao

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Gao,
> Zhichao
> Sent: Tuesday, August 9, 2022 5:57 PM
> To: Xue, Shengfeng ;
> devel@edk2.groups.io; Ni, Ray 
> Cc: Gao, Liming ; Xue, ShengfengX
> 
> Subject: Re: [edk2-devel] [PATCH] ShellPkg/SmbiosView: Smbiosview tool is
> not show Extended Speed and Extended Configured Memory Speed in type
> 17.
> 
> Reviewed-by: Zhichao Gao 
> 
> Thanks,
> Zhichao
> 
> > -Original Message-
> > From: xueshengfeng 
> > Sent: Saturday, August 6, 2022 10:02 AM
> > To: devel@edk2.groups.io; Ni, Ray ; Gao, Zhichao
> > 
> > Cc: Gao, Liming ; Xue, ShengfengX
> > 
> > Subject: [PATCH] ShellPkg/SmbiosView: Smbiosview tool is not show
> > Extended Speed and Extended Configured Memory Speed in type 17.
> >
> > From: Shengfengx Xue 
> >
> > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4014
> >
> > if Configured Memory Speed is 65,535 MT/s or greater, and the actual
> > speed is stored in the Extended Configured Memory Speed field. but
> > current Smbiosview have no this logic.
> >
> > Signed-off-by: Shengfengx Xue 
> > ---
> >  .../UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c| 5 +
> >  1 file changed, 5 insertions(+)
> >
> > diff --git
> > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
> > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
> > index a0ee286c9a..0ab9f5063a 100644
> > ---
> > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
> > +++
> > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
> > @@ -878,6 +878,11 @@ SmbiosPrintStructure (
> >  }
> >}
> >
> > +  if (AE_SMBIOS_VERSION (0x3, 0x3) && (Struct->Hdr->Length > 0x54)) {
> > +PRINT_STRUCT_VALUE_H (Struct, Type17, ExtendedSpeed);
> > +PRINT_STRUCT_VALUE_H (Struct, Type17,
> > ExtendedConfiguredMemorySpeed);
> > +  }
> > +
> >break;
> >
> >  //
> > --
> > 2.26.2.windows.1
> >
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92408): https://edk2.groups.io/g/devel/message/92408
Mute This Topic: https://groups.io/mt/92898444/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 1/1] MdeModulePkg/PiSmmCore:Avoid overflow risk

2022-08-14 Thread wenyi,xie via groups.io



On 2022/8/15 9:12, gaoliming wrote:
> Wenyi:
>   I add my comments below. 

Thank you for your comments. I agree with you that overflow can be treated as 
overlap. I will update the patch and send it later.

Thanks
Wenyi
> 
>> -邮件原件-
>> 发件人: devel@edk2.groups.io  代表 wenyi,xie via
>> groups.io
>> 发送时间: 2022年8月5日 15:21
>> 收件人: devel@edk2.groups.io; jian.j.w...@intel.com;
>> gaolim...@byosoft.com.cn; eric.d...@intel.com; ray...@intel.com
>> 抄送: songdongku...@huawei.com; xiewen...@huawei.com
>> 主题: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg/PiSmmCore:Avoid
>> overflow risk
>>
>> As the CommunicationBuffer plus BufferSize may overflow, check the
>> value first before using.
>>
>> Cc: Jian J Wang 
>> Cc: Liming Gao 
>> Cc: Eric Dong 
>> Cc: Ray Ni 
>> Signed-off-by: Wenyi Xie 
>> ---
>>  MdeModulePkg/Core/PiSmmCore/PiSmmCore.c | 22 +---
>>  MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c  |  5 +
>>  2 files changed, 19 insertions(+), 8 deletions(-)
>>
>> diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
>> b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
>> index 9e5c6cbe33dd..fcf8c61d7f1b 100644
>> --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
>> +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
>> @@ -613,23 +613,28 @@ SmmEndOfS3ResumeHandler (
>>@retval FALSE Buffer doesn't overlap.
>>
>>  **/
>> -BOOLEAN
>> +EFI_STATUS
>>  InternalIsBufferOverlapped (
>>IN UINT8  *Buff1,
>>IN UINTN  Size1,
>>IN UINT8  *Buff2,
>> -  IN UINTN  Size2
>> +  IN UINTN  Size2,
>> +  IN BOOLEAN *IsOverlapped
>>)
>>  {
>> +  *IsOverlapped = TRUE;
>> +  if (((UINTN)Buff1 > MAX_UINTN - Size1) || ((UINTN)Buff2 > MAX_UINTN -
>> Size2)) {
>> +return EFI_INVALID_PARAMETER;
>> +  }
>>//
>>// If buff1's end is less than the start of buff2, then it's ok.
>>// Also, if buff1's start is beyond buff2's end, then it's ok.
>>//
>>if (((Buff1 + Size1) <= Buff2) || (Buff1 >= (Buff2 + Size2))) {
>> -return FALSE;
>> +*IsOverlapped = FALSE;
>>}
>>
>> -  return TRUE;
>> +  return EFI_SUCCESS;
>>  }
>>
> If Buff1 + Size1 overflows MAX_UINTN, it can be also regarded as overlap,
> return TRUE. 
> 
> If you think overflow is not overlap, please also update function
> InternalIsBufferOverlapped name and description to avoid confuse. 
> 
> Thanks
> Liming
> 
>>  /**
>> @@ -693,17 +698,18 @@ SmmEntryPoint (
>>//
>>// Synchronous SMI for SMM Core or request from Communicate
>> protocol
>>//
>> -  IsOverlapped = InternalIsBufferOverlapped (
>> +  Status = InternalIsBufferOverlapped (
>> (UINT8 *)CommunicationBuffer,
>> BufferSize,
>> (UINT8 *)gSmmCorePrivate,
>> -   sizeof (*gSmmCorePrivate)
>> +   sizeof (*gSmmCorePrivate),
>> +   
>> );
>> -  if (!SmmIsBufferOutsideSmmValid ((UINTN)CommunicationBuffer,
>> BufferSize) || IsOverlapped) {
>> +  if (!SmmIsBufferOutsideSmmValid ((UINTN)CommunicationBuffer,
>> BufferSize) || EFI_ERROR(Status) || IsOverlapped) {
>>  //
>>  // If CommunicationBuffer is not in valid address scope,
>>  // or there is overlap between gSmmCorePrivate and
>> CommunicationBuffer,
>> -// return EFI_INVALID_PARAMETER
>> +// return EFI_ACCESS_DENIED
>>  //
>>  gSmmCorePrivate->CommunicationBuffer = NULL;
>>  gSmmCorePrivate->ReturnStatus= EFI_ACCESS_DENIED;
>> diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
>> b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
>> index 4f00cebaf5ed..bd13cf97ec93 100644
>> --- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
>> +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
>> @@ -525,6 +525,11 @@ SmmCommunicationCommunicate (
>>
>>CommunicateHeader = (EFI_SMM_COMMUNICATE_HEADER
>> *)CommBuffer;
>>
>> +  if (CommunicateHeader->MessageLength > MAX_UINTN - OFFSET_OF
>> (EFI_SMM_COMMUNICATE_HEADER, Data)) {
>> +DEBUG ((DEBUG_ERROR, "MessageLength is invalid!\n"));
>> +return EFI_INVALID_PARAMETER;
>> +  }
>> +
>>if (CommSize == NULL) {
>>  TempCommSize = OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER,
>> Data) + CommunicateHeader->MessageLength;
>>} else {
>> --
>> 2.20.1.windows.1
>>
>>
>>
>> 
>>
> 
> 
> 
> .
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92407): https://edk2.groups.io/g/devel/message/92407
Mute This Topic: https://groups.io/mt/93027797/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] MdeModulePkg/PiSmmCore:Avoid overflow risk

2022-08-14 Thread gaoliming via groups.io
Wenyi:
  I add my comments below. 

> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 wenyi,xie via
> groups.io
> 发送时间: 2022年8月5日 15:21
> 收件人: devel@edk2.groups.io; jian.j.w...@intel.com;
> gaolim...@byosoft.com.cn; eric.d...@intel.com; ray...@intel.com
> 抄送: songdongku...@huawei.com; xiewen...@huawei.com
> 主题: [edk2-devel] [PATCH EDK2 v1 1/1] MdeModulePkg/PiSmmCore:Avoid
> overflow risk
> 
> As the CommunicationBuffer plus BufferSize may overflow, check the
> value first before using.
> 
> Cc: Jian J Wang 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Cc: Ray Ni 
> Signed-off-by: Wenyi Xie 
> ---
>  MdeModulePkg/Core/PiSmmCore/PiSmmCore.c | 22 +---
>  MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c  |  5 +
>  2 files changed, 19 insertions(+), 8 deletions(-)
> 
> diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
> b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
> index 9e5c6cbe33dd..fcf8c61d7f1b 100644
> --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
> +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
> @@ -613,23 +613,28 @@ SmmEndOfS3ResumeHandler (
>@retval FALSE Buffer doesn't overlap.
> 
>  **/
> -BOOLEAN
> +EFI_STATUS
>  InternalIsBufferOverlapped (
>IN UINT8  *Buff1,
>IN UINTN  Size1,
>IN UINT8  *Buff2,
> -  IN UINTN  Size2
> +  IN UINTN  Size2,
> +  IN BOOLEAN *IsOverlapped
>)
>  {
> +  *IsOverlapped = TRUE;
> +  if (((UINTN)Buff1 > MAX_UINTN - Size1) || ((UINTN)Buff2 > MAX_UINTN -
> Size2)) {
> +return EFI_INVALID_PARAMETER;
> +  }
>//
>// If buff1's end is less than the start of buff2, then it's ok.
>// Also, if buff1's start is beyond buff2's end, then it's ok.
>//
>if (((Buff1 + Size1) <= Buff2) || (Buff1 >= (Buff2 + Size2))) {
> -return FALSE;
> +*IsOverlapped = FALSE;
>}
> 
> -  return TRUE;
> +  return EFI_SUCCESS;
>  }
> 
If Buff1 + Size1 overflows MAX_UINTN, it can be also regarded as overlap,
return TRUE. 

If you think overflow is not overlap, please also update function
InternalIsBufferOverlapped name and description to avoid confuse. 

Thanks
Liming

>  /**
> @@ -693,17 +698,18 @@ SmmEntryPoint (
>//
>// Synchronous SMI for SMM Core or request from Communicate
> protocol
>//
> -  IsOverlapped = InternalIsBufferOverlapped (
> +  Status = InternalIsBufferOverlapped (
> (UINT8 *)CommunicationBuffer,
> BufferSize,
> (UINT8 *)gSmmCorePrivate,
> -   sizeof (*gSmmCorePrivate)
> +   sizeof (*gSmmCorePrivate),
> +   
> );
> -  if (!SmmIsBufferOutsideSmmValid ((UINTN)CommunicationBuffer,
> BufferSize) || IsOverlapped) {
> +  if (!SmmIsBufferOutsideSmmValid ((UINTN)CommunicationBuffer,
> BufferSize) || EFI_ERROR(Status) || IsOverlapped) {
>  //
>  // If CommunicationBuffer is not in valid address scope,
>  // or there is overlap between gSmmCorePrivate and
> CommunicationBuffer,
> -// return EFI_INVALID_PARAMETER
> +// return EFI_ACCESS_DENIED
>  //
>  gSmmCorePrivate->CommunicationBuffer = NULL;
>  gSmmCorePrivate->ReturnStatus= EFI_ACCESS_DENIED;
> diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
> b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
> index 4f00cebaf5ed..bd13cf97ec93 100644
> --- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
> +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
> @@ -525,6 +525,11 @@ SmmCommunicationCommunicate (
> 
>CommunicateHeader = (EFI_SMM_COMMUNICATE_HEADER
> *)CommBuffer;
> 
> +  if (CommunicateHeader->MessageLength > MAX_UINTN - OFFSET_OF
> (EFI_SMM_COMMUNICATE_HEADER, Data)) {
> +DEBUG ((DEBUG_ERROR, "MessageLength is invalid!\n"));
> +return EFI_INVALID_PARAMETER;
> +  }
> +
>if (CommSize == NULL) {
>  TempCommSize = OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER,
> Data) + CommunicateHeader->MessageLength;
>} else {
> --
> 2.20.1.windows.1
> 
> 
> 
> 
> 





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92406): https://edk2.groups.io/g/devel/message/92406
Mute This Topic: https://groups.io/mt/93027797/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] Event: Tools, CI, Code base construction meeting series - 08/15/2022 #cal-reminder

2022-08-14 Thread Group Notification
*Reminder: Tools, CI, Code base construction meeting series*

*When:*
08/15/2022
4:30pm to 5:30pm
(UTC-07:00) America/Los Angeles

*Where:*
https://github.com/tianocore/edk2/discussions/2614

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=1608786 )

*Description:*

TianoCore community,

Microsoft and Intel will be hosting a series of open meetings to discuss build, 
CI, tools, and other related topics. If you are interested, have ideas/opinions 
please join us. These meetings will be Monday 4:30pm Pacific Time on Microsoft 
Teams.

MS Teams Link in following discussion: * 
https://github.com/tianocore/edk2/discussions/2614

Anyone is welcome to join.

* tianocore/edk2: EDK II (github.com)
* tianocore/edk2-basetools: EDK II BaseTools Python tools as a PIP module 
(github.com) https://github.com/tianocore/edk2-basetools
* tianocore/edk2-pytool-extensions: Extensions to the edk2 build system 
allowing for a more robust and plugin based build system and tool execution 
environment (github.com) https://github.com/tianocore/edk2-pytool-extensions
* tianocore/edk2-pytool-library: Python library package that supports UEFI 
development (github.com) https://github.com/tianocore/edk2-pytool-library

MS Teams Browser Clients * 
https://docs.microsoft.com/en-us/microsoftteams/get-clients?tabs=Windows#browser-client


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92405): https://edk2.groups.io/g/devel/message/92405
Mute This Topic: https://groups.io/mt/93026208/21656
Mute #cal-reminder:https://edk2.groups.io/g/devel/mutehashtag/cal-reminder
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH V3] RedfishPkg: RedfishDiscoverDxe: USB Redfish host interface is not supported

2022-08-14 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

Reviewed-by: Abner Chang 

> -Original Message-
> From: Igor Kulchytskyy 
> Sent: Saturday, August 13, 2022 1:25 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner ; nickle.w...@hpe.com; Igor
> Kulchytskyy ; Chang, Abner 
> Subject: [PATCH V3] RedfishPkg: RedfishDiscoverDxe: USB Redfish host
> interface is not supported
> 
> [CAUTION: External Email]
> 
> Host Interface details are described by the SMBIOS Type 42 table.
> The table is published by the RedfishHostInterfaceDxe driver.
> That driver supports PCI-E and USB host interface types.
> The table is consumed by the RedfishGetHostInterfaceProtocolData
> function in the RedfishDiscoverDxe driver.
> The function only supports PCI-E host interface type.
> 
> Cc: Abner Chang 
> Cc: Nickle Wang 
> Signed-off-by: Igor Kulchytskyy 
> ---
>  RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c | 10
> +++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> index d79750b..0090525 100644
> --- a/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishSmbiosHostInterface.c
> @@ -65,10 +65,14 @@ RedfishGetHostInterfaceProtocolData (
>  RecordTmp   = (UINT8 *)Record + Offset;
> 
>  //
> -// Check Device Type, only PCI/PCIe Network Interface v2 is supported
> now.
> +// Check Device Type, PCI/PCIe and USB Network Interface v2 is
> supported.
>  //
> -if (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) {
> -  ASSERT (SpecificDataLen == sizeof
> (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);
> +if ((*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) || (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2)) {
> +  if (*RecordTmp ==
> REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) {
> +  ASSERT (SpecificDataLen == sizeof
> (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);
> +  } else {
> +  ASSERT (SpecificDataLen > sizeof
> (REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2) + 1);
> +  }
>*DeviceDescriptor = (REDFISH_INTERFACE_DATA *)RecordTmp;
>Offset= Offset + SpecificDataLen;
>RecordTmp = (UINT8 *)Record + Offset;
> --
> 2.6.1.windows.1
> -The information contained in this message may be confidential and
> proprietary to American Megatrends (AMI). This communication is intended
> to be read only by the individual or entity to whom it is addressed or by 
> their
> designee. If the reader of this message is not the intended recipient, you are
> on notice that any distribution of this message, in any form, is strictly
> prohibited. Please promptly notify the sender by reply e-mail or by
> telephone at 770-246-8600, and then delete or destroy all copies of the
> transmission.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92404): https://edk2.groups.io/g/devel/message/92404
Mute This Topic: https://groups.io/mt/92984581/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-