]> git.proxmox.com Git - mirror_edk2.git/commitdiff
EmbeddedPkg/GdbDebugAgent: fix VOID* cast of incorrect size
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 24 Oct 2016 17:32:12 +0000 (18:32 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 28 Oct 2016 12:51:41 +0000 (13:51 +0100)
The result of PcdGet64() can only be cast to VOID* on 64-bit platforms,
so add an intermediate UINTN cast to make this code build again on 32 bit.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c

index 8226c80ab4667d1dce953cbdf0440d297d59e4b1..a43ff95d03a30403cbbad52fc0c5ce4545f239db 100644 (file)
@@ -657,7 +657,7 @@ InitializeDebugAgent (
   *(UINTN *) (((UINT8 *)VectorBase) + Offset) = (UINTN)AsmCommonExceptionEntry;\r
 \r
   // Flush Caches since we updated executable stuff\r
-  InvalidateInstructionCacheRange ((VOID *)PcdGet64(PcdCpuVectorBaseAddress), Length);\r
+  InvalidateInstructionCacheRange ((VOID *)(UINTN)PcdGet64(PcdCpuVectorBaseAddress), Length);\r
 \r
   // setup a timer so gdb can break in via ctrl-c\r
   DebugAgentTimerIntialize ();\r