Hi,

> +  while (RetryCount < MAX_RETRIES_PER_PAGE) {
> +    TdStatus = TdVmCallMapGPA (PhysicalAddress, Length, &MapGpaRetryaddr);
> +    if (TdStatus != TDVMCALL_STATUS_RETRY) {
> +      break;
> +    }
> +
> +    DEBUG ((DEBUG_VERBOSE, "%a: TdVmcall(MAPGPA) Retry PhysicalAddress is 
> %llx, MapGpaRetryaddr is %llx\n", __func__, PhysicalAddress, 
> MapGpaRetryaddr));
> +
> +    EndAddress = PhysicalAddress + Length;

The end address doesn't change, you can move that out of the loop.

> +    if ((MapGpaRetryaddr < PhysicalAddress) || (MapGpaRetryaddr > 
> EndAddress)) {
> +      DEBUG ((DEBUG_ERROR, "%a: TdVmcall(MAPGPA) failed Retry 
> PhysicalAddress is %llx, MapGpaRetryaddr is %llx\n", __func__, 
> PhysicalAddress, MapGpaRetryaddr));
> +      break;
> +    }

The error message is misleading.  The actual problem is that the
'PhysicalAddress <= MapGpaRetryaddr <= EndAddress' sanity check failed.

take care,
  Gerd



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


Reply via email to