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



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


Reply via email to