From: "Rebecca Cran" <quic_rcran@quicinc.com>
To: Ard Biesheuvel <ardb@kernel.org>, <devel@edk2.groups.io>,
<quic_rcran@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
Jiewen Yao <jiewen.yao@intel.com>,
Jordan Justen <jordan.l.justen@intel.com>,
"Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: [edk2-devel] OvmfPkgX64: PlatformInitLib.lib(IntelTdx.obj): in function `ValidateHobList': undefined reference to `memcpy' (CLANG38 NOOPT)
Date: Thu, 22 Sep 2022 16:52:39 -0600 [thread overview]
Message-ID: <91bed9e3-c9e9-74f0-8bdc-4e69ed791676@quicinc.com> (raw)
In-Reply-To: <CAMj1kXG3ha-1WVO43aRzRBEiDKXkfwqX0Lns4Ve=DAxOv5osEQ@mail.gmail.com>
On 9/22/22 15:32, Ard Biesheuvel wrote:
> This appears to be due to the use of initializers for the arrays.
> Could you please check if the patch below makes the issue go away?
>
> diff --git a/OvmfPkg/Library/PlatformInitLib/IntelTdx.c
> b/OvmfPkg/Library/PlatformInitLib/IntelTdx.c
> index c6d7c8bb6e0e..0e0e13343b16 100644
> --- a/OvmfPkg/Library/PlatformInitLib/IntelTdx.c
> +++ b/OvmfPkg/Library/PlatformInitLib/IntelTdx.c
> @@ -153,7 +153,7 @@ BOOLEAN
> EFIAPI
> IsInValidList (
> IN UINT32 Value,
> - IN UINT32 *ValidList,
> + IN CONST UINT32 *ValidList,
> IN UINT32 ValidListLength
> )
> {
> @@ -188,7 +188,7 @@ ValidateHobList (
> )
> {
> EFI_PEI_HOB_POINTERS Hob;
> - UINT32 EFI_BOOT_MODE_LIST[] = {
> + STATIC CONST UINT32 EFI_BOOT_MODE_LIST[] = {
> BOOT_WITH_FULL_CONFIGURATION,
> BOOT_WITH_MINIMAL_CONFIGURATION,
> BOOT_ASSUMING_NO_CONFIGURATION_CHANGES,
> @@ -203,7 +203,7 @@ ValidateHobList (
> BOOT_IN_RECOVERY_MODE
> };
>
> - UINT32 EFI_RESOURCE_TYPE_LIST[] = {
> + STATIC CONST UINT32 EFI_RESOURCE_TYPE_LIST[] = {
> EFI_RESOURCE_SYSTEM_MEMORY,
> EFI_RESOURCE_MEMORY_MAPPED_IO,
> EFI_RESOURCE_IO,
Yes, that fixes it.
--
Rebecca Cran
prev parent reply other threads:[~2022-09-22 22:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 21:07 OvmfPkgX64: PlatformInitLib.lib(IntelTdx.obj): in function `ValidateHobList': undefined reference to `memcpy' (CLANG38 NOOPT) Rebecca Cran
2022-09-22 21:32 ` [edk2-devel] " Ard Biesheuvel
2022-09-22 22:52 ` Rebecca Cran [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=91bed9e3-c9e9-74f0-8bdc-4e69ed791676@quicinc.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox