回复: [edk2-devel] [PATCH 1/1] MdeModulePkg/RegularExpressionDxe: Fix Arm build error
gaoliming via groups.io
gaoliming=byosoft.com.cn at groups.io
Fri Apr 21 06:13:25 UTC 2023
Nickle:
I check memset implementation in CryptoPkg\Library\IntrinsicLib and ArmPkg\Library\CompilerIntrinsicsLib. They both use int type for the second parameter. So, I suggest to update RegularExpressionDxe implementation to match them. Can you help to verify this solution?
Thanks
Liming
发件人: devel at edk2.groups.io <devel at edk2.groups.io> 代表 Nickle Wang via groups.io
发送时间: 2023年4月21日 11:13
收件人: devel at edk2.groups.io; gaoliming at byosoft.com.cn; 'Jian J Wang' <jian.j.wang at intel.com>
抄送: 'Michael D Kinney' <michael.d.kinney at intel.com>; Nick Ramirez <nramirez at nvidia.com>
主题: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/RegularExpressionDxe: Fix Arm build error
Hi Liming,
I noticed the build error from this CI test: Build and Test NetworkPkg,RedfishPkg IA32,X64,ARM,AARCH64,RISCV64,LOONGARCH64. And after applying my patch, CI reports build pass. Since this CI test also cover AARCH64, RISCV64 and LOONGARCH64, I think that the failure only happens to MDE_CPU_ARM.
Thanks,
Nickle
From: devel at edk2.groups.io <mailto:devel at edk2.groups.io> <devel at edk2.groups.io <mailto:devel at edk2.groups.io> > On Behalf Of gaoliming via groups.io
Sent: Friday, April 21, 2023 10:52 AM
To: devel at edk2.groups.io <mailto:devel at edk2.groups.io> ; Nickle Wang <nicklew at nvidia.com <mailto:nicklew at nvidia.com> >; 'Jian J Wang' <jian.j.wang at intel.com <mailto:jian.j.wang at intel.com> >
Cc: 'Michael D Kinney' <michael.d.kinney at intel.com <mailto:michael.d.kinney at intel.com> >; Nick Ramirez <nramirez at nvidia.com <mailto:nramirez at nvidia.com> >
Subject: 回复: [edk2-devel] [PATCH 1/1] MdeModulePkg/RegularExpressionDxe: Fix Arm build error
External email: Use caution opening links or attachments
Nickle:
Is this only for MDE_CPU_ARM? I may propose to add the judgement of MDE_CPU_IA32 and MDE_CPU_X64 for memcpy & memset. memcpy & memset are for X86 only.
Thanks
Liming
发件人: devel at edk2.groups.io <devel at edk2.groups.io <mailto:devel at edk2.groups.io> > 代表 Nickle Wang via groups.io
发送时间: 2023年4月21日 8:26
收件人: devel at edk2.groups.io <mailto:devel at edk2.groups.io> ; Nickle Wang <nicklew at nvidia.com <mailto:nicklew at nvidia.com> >; Jian J Wang <jian.j.wang at intel.com <mailto:jian.j.wang at intel.com> >; Liming Gao <gaoliming at byosoft.com.cn <mailto:gaoliming at byosoft.com.cn> >
抄送: Michael D Kinney <michael.d.kinney at intel.com <mailto:michael.d.kinney at intel.com> >; Nick Ramirez <nramirez at nvidia.com <mailto:nramirez at nvidia.com> >
主题: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/RegularExpressionDxe: Fix Arm build error
Hi <mailto:jian.j.wang at intel.com> @Jian J Wang, <mailto:gaoliming at byosoft.com.cn> @Liming Gao,
Could you please help me to review this patch? There is CI build error, and it blocks my pull request here: https://github.com/tianocore/edk2/pull/4285
Thanks,
Nickle
> -----Original Message-----
> From: devel at edk2.groups.io <mailto:devel at edk2.groups.io> <devel at edk2.groups.io <mailto:devel at edk2.groups.io> > On Behalf Of Nickle
> Wang via groups.io
> Sent: Wednesday, April 19, 2023 4:30 PM
> To: devel at edk2.groups.io <mailto:devel at edk2.groups.io>
> Cc: Jian J Wang <jian.j.wang at intel.com <mailto:jian.j.wang at intel.com> >; Liming Gao
> <gaoliming at byosoft.com.cn <mailto:gaoliming at byosoft.com.cn> >; Michael D Kinney <michael.d.kinney at intel.com <mailto:michael.d.kinney at intel.com> >;
> Nick Ramirez <nramirez at nvidia.com <mailto:nramirez at nvidia.com> >
> Subject: [edk2-devel] [PATCH 1/1] MdeModulePkg/RegularExpressionDxe: Fix
> Arm build error
>
> External email: Use caution opening links or attachments
>
>
> Fix Arm CI build error:
> - ArmPkg/Library/CompilerIntrinsicsLib/memset.c:39:1: warning: type of
> ‘memset’ does not match original declaration [-Wlto-type-mismatch]
> MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.c:123:1:
> note: type ‘char’ should match type ‘int’
> - multiple definition of `memcpy'; OnigurumaUefiPort.obj (symbol from
> plugin):(.text+0x0): first defined here
>
> There is intrinsics library for Arm so we don't need memset and memcpy
> function in OnigurumaUefiPort.c.
>
> Signed-off-by: Nickle Wang < <mailto:nicklew at nvidia.com> nicklew at nvidia.com>
> Cc: Jian J Wang < <mailto:jian.j.wang at intel.com> jian.j.wang at intel.com>
> Cc: Liming Gao < <mailto:gaoliming at byosoft.com.cn> gaoliming at byosoft.com.cn>
> Cc: Michael D Kinney < <mailto:michael.d.kinney at intel.com> michael.d.kinney at intel.com>
> Cc: Nick Ramirez < <mailto:nramirez at nvidia.com> nramirez at nvidia.com>
> ---
> .../Universal/RegularExpressionDxe/OnigurumaUefiPort.h | 5 ++++-
> .../Universal/RegularExpressionDxe/OnigurumaUefiPort.c | 4 ++++
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git
> a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h
> b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h
> index 248109b0c96e..8f8581df6783 100644
> --- a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h
> +++ b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h
> @@ -4,7 +4,7 @@
>
> (C) Copyright 2014-2021 Hewlett Packard Enterprise Development LP<BR>
> Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> - Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
> + Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights
> reserved.
>
> SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -107,6 +107,7 @@
> realloc (
> size_t size
> );
>
> +#if !defined (MDE_CPU_ARM)
> void *
> memcpy (
> void *dest,
> @@ -121,6 +122,8 @@ memset (
> unsigned int count
> );
>
> +#endif
> +
> void
> free (
> void *ptr
> diff --git
> a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.c
> b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.c
> index 6661c67f976e..8af57f3a93c7 100644
> --- a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.c
> +++ b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.c
> @@ -4,6 +4,7 @@
>
> (C) Copyright 2014-2021 Hewlett Packard Enterprise Development LP<BR>
> Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> + Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
>
> SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -109,6 +110,7 @@
> realloc (
> return NULL;
> }
>
> +#if !defined (MDE_CPU_ARM)
> void *
> memcpy (
> void *dest,
> @@ -129,6 +131,8 @@ memset (
> return SetMem (dest, count, ch);
> }
>
> +#endif
> +
> void
> free (
> void *ptr
> --
> 2.17.1
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103372): https://edk2.groups.io/g/devel/message/103372
Mute This Topic: https://groups.io/mt/98405369/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20230421/c131dddc/attachment-0001.htm>
More information about the edk2-devel-archive
mailing list