[edk2-devel] [PATCH v2 1/6] OvmfPkg/Library: fix definition of GetAcpiRsdpFromMemory

Corvin Köhne posted 6 patches 2 years, 7 months ago
[edk2-devel] [PATCH v2 1/6] OvmfPkg/Library: fix definition of GetAcpiRsdpFromMemory
Posted by Corvin Köhne 2 years, 7 months ago
The definition and declaration of GetAcpiRsdpFromMemory doesn't match.
We don't get a compile error yet because UINTN is the same as UINT64 on
64bit machines. As the function works on memory addresses, UINTN is the
correct type of the input parameters.

Signed-off-by: Corvin Köhne <corvink@FreeBSD.org>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Peter Grehan <grehan@freebsd.org>
Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
---
 OvmfPkg/Include/Library/AcpiPlatformLib.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/OvmfPkg/Include/Library/AcpiPlatformLib.h b/OvmfPkg/Include/Library/AcpiPlatformLib.h
index 73a170636032..78d5010e91d5 100644
--- a/OvmfPkg/Include/Library/AcpiPlatformLib.h
+++ b/OvmfPkg/Include/Library/AcpiPlatformLib.h
@@ -20,8 +20,8 @@
 EFI_STATUS
 EFIAPI
 GetAcpiRsdpFromMemory (
-  IN UINT64                                         StartAddress,
-  IN UINT64                                         EndAddress,
+  IN UINTN                                          StartAddress,
+  IN UINTN                                          EndAddress,
   OUT EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER  **RsdpPtr
   );
 
-- 
2.41.0



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#106174): https://edk2.groups.io/g/devel/message/106174
Mute This Topic: https://groups.io/mt/99622790/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v2 1/6] OvmfPkg/Library: fix definition of GetAcpiRsdpFromMemory
Posted by Gerd Hoffmann 2 years, 7 months ago
On Mon, Jun 19, 2023 at 03:12:23PM +0200, Corvin Köhne wrote:
> The definition and declaration of GetAcpiRsdpFromMemory doesn't match.
> We don't get a compile error yet because UINTN is the same as UINT64 on
> 64bit machines. As the function works on memory addresses, UINTN is the
> correct type of the input parameters.

Tested-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#106196): https://edk2.groups.io/g/devel/message/106196
Mute This Topic: https://groups.io/mt/99622790/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-