[edk2-devel] [PATCH v10 1/4] OvmfPkg: Add memory acceptance event in AmdSevDxe

Gupta, Pankaj via groups.io pankaj.gupta=amd.com at groups.io
Tue Feb 14 14:00:03 UTC 2023


On 2/14/2023 1:55 PM, Gupta, Pankaj via groups.io wrote:
> On 2/14/2023 1:51 PM, Gupta, Pankaj wrote:
>>
>>>> ConvertPages: range 1000000 - 41AEFFF covers multiple entries
>>>> ConvertPages: range 1000000 - 41AEFFF covers multiple entries
>>>> Accepting all memory
>>>> Accepting all memory
>>>> Accepting all memory
>>>> Accepting all memory
>>>> EFI stub: ERROR: exit_boot() failed!
>>>> EFI stub: ERROR: efi_main() failed!
>>>> StartImage failed: Invalid Parameter
>>>> Thanks,
>>>> Pankaj
>>>
>>> 4 calls is telling me that "Accepting all memory" is somehow modifying
>>> the memory map each call, but that shouldn't be happening. You've
>>> confirmed that the body of the loop is getting skipped after the first
>>> call?
>>
>> yes. This also changes the memory key every time. Below change solves 
>> the issue
>> and don't even get even the second invocation of "Accepting all 
>> memory" message. It seems "gBS->FreePool" changes the memory map every 
>> time?

See like there is a typo s/gBS/gDS :) Now also getting two printfs for
"Accepting all memory", which seems right thing. Thank you, for the 
pointers!

--- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c
+++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c
@@ -123,7 +123,7 @@ AcceptAllMemory (
      }
    }

-  gBS->FreePool (AllDescMap);
+  gDS->FreePool (AllDescMap);^M
    return Status;
  }



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100179): https://edk2.groups.io/g/devel/message/100179
Mute This Topic: https://groups.io/mt/96534752/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list