Use intermediate (UINTN) cast when casting int from/to pointer. This
is needed as UINT64 values cast from/to 32bit pointer for 32bit
architectures.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
\r
// Share the entry point of the CPU driver\r
DEBUG ((DEBUG_INFO, "Sharing Cpu Driver EP *0x%lx = 0x%lx\n",\r
\r
// Share the entry point of the CPU driver\r
DEBUG ((DEBUG_INFO, "Sharing Cpu Driver EP *0x%lx = 0x%lx\n",\r
- (UINT64) CpuDriverEntryPointDesc->ArmTfCpuDriverEpPtr,\r
- (UINT64) PiMmStandaloneArmTfCpuDriverEntry));\r
+ (UINTN) CpuDriverEntryPointDesc->ArmTfCpuDriverEpPtr,\r
+ (UINTN) PiMmStandaloneArmTfCpuDriverEntry));\r
*(CpuDriverEntryPointDesc->ArmTfCpuDriverEpPtr) = PiMmStandaloneArmTfCpuDriverEntry;\r
\r
// Find the descriptor that contains the whereabouts of the buffer for\r
*(CpuDriverEntryPointDesc->ArmTfCpuDriverEpPtr) = PiMmStandaloneArmTfCpuDriverEntry;\r
\r
// Find the descriptor that contains the whereabouts of the buffer for\r
- DEBUG ((DEBUG_INFO, "mNsCommBuffer.PhysicalStart - 0x%lx\n", (UINT64) NsCommBufMmramRange->PhysicalStart));\r
- DEBUG ((DEBUG_INFO, "mNsCommBuffer.PhysicalSize - 0x%lx\n", (UINT64) NsCommBufMmramRange->PhysicalSize));\r
+ DEBUG ((DEBUG_INFO, "mNsCommBuffer.PhysicalStart - 0x%lx\n", (UINTN) NsCommBufMmramRange->PhysicalStart));\r
+ DEBUG ((DEBUG_INFO, "mNsCommBuffer.PhysicalSize - 0x%lx\n", (UINTN) NsCommBufMmramRange->PhysicalSize));\r
\r
CopyMem (&mNsCommBuffer, NsCommBufMmramRange, sizeof(EFI_MMRAM_DESCRIPTOR));\r
DEBUG ((DEBUG_INFO, "mNsCommBuffer: 0x%016lx - 0x%lx\n", mNsCommBuffer.CpuStart, mNsCommBuffer.PhysicalSize));\r
\r
CopyMem (&mNsCommBuffer, NsCommBufMmramRange, sizeof(EFI_MMRAM_DESCRIPTOR));\r
DEBUG ((DEBUG_INFO, "mNsCommBuffer: 0x%016lx - 0x%lx\n", mNsCommBuffer.CpuStart, mNsCommBuffer.PhysicalSize));\r
\r
// Create a hoblist with a PHIT and EOH\r
HobStart = HobConstructor (\r
\r
// Create a hoblist with a PHIT and EOH\r
HobStart = HobConstructor (\r
- (VOID *) PayloadBootInfo->SpMemBase,\r
+ (VOID *) (UINTN) PayloadBootInfo->SpMemBase,\r
(UINTN) PayloadBootInfo->SpMemLimit - PayloadBootInfo->SpMemBase,\r
(UINTN) PayloadBootInfo->SpMemLimit - PayloadBootInfo->SpMemBase,\r
- (VOID *) PayloadBootInfo->SpHeapBase,\r
- (VOID *) (PayloadBootInfo->SpHeapBase + PayloadBootInfo->SpHeapSize)\r
+ (VOID *) (UINTN) PayloadBootInfo->SpHeapBase,\r
+ (VOID *) (UINTN) (PayloadBootInfo->SpHeapBase + PayloadBootInfo->SpHeapSize)\r
);\r
\r
// Check that the Hoblist starts at the bottom of the Heap\r
);\r
\r
// Check that the Hoblist starts at the bottom of the Heap\r
- ASSERT (HobStart == (VOID *) PayloadBootInfo->SpHeapBase);\r
+ ASSERT (HobStart == (VOID *) (UINTN) PayloadBootInfo->SpHeapBase);\r
\r
// Build a Boot Firmware Volume HOB\r
BuildFvHob (PayloadBootInfo->SpImageBase, PayloadBootInfo->SpImageSize);\r
\r
// Build a Boot Firmware Volume HOB\r
BuildFvHob (PayloadBootInfo->SpImageBase, PayloadBootInfo->SpImageSize);\r
MmramRanges[3].RegionState = EFI_CACHEABLE | EFI_ALLOCATED;\r
\r
// Base and size of heap memory shared by all cpus\r
MmramRanges[3].RegionState = EFI_CACHEABLE | EFI_ALLOCATED;\r
\r
// Base and size of heap memory shared by all cpus\r
- MmramRanges[4].PhysicalStart = (EFI_PHYSICAL_ADDRESS) HobStart;\r
- MmramRanges[4].CpuStart = (EFI_PHYSICAL_ADDRESS) HobStart;\r
- MmramRanges[4].PhysicalSize = HobStart->EfiFreeMemoryBottom - (EFI_PHYSICAL_ADDRESS) HobStart;\r
+ MmramRanges[4].PhysicalStart = (EFI_PHYSICAL_ADDRESS) (UINTN) HobStart;\r
+ MmramRanges[4].CpuStart = (EFI_PHYSICAL_ADDRESS) (UINTN) HobStart;\r
+ MmramRanges[4].PhysicalSize = HobStart->EfiFreeMemoryBottom - (EFI_PHYSICAL_ADDRESS) (UINTN) HobStart;\r
MmramRanges[4].RegionState = EFI_CACHEABLE | EFI_ALLOCATED;\r
\r
// Base and size of heap memory shared by all cpus\r
MmramRanges[4].RegionState = EFI_CACHEABLE | EFI_ALLOCATED;\r
\r
// Base and size of heap memory shared by all cpus\r
\r
// Locate PE/COFF File information for the Standalone MM core module\r
Status = LocateStandaloneMmCorePeCoffData (\r
\r
// Locate PE/COFF File information for the Standalone MM core module\r
Status = LocateStandaloneMmCorePeCoffData (\r
- (EFI_FIRMWARE_VOLUME_HEADER *) PayloadBootInfo->SpImageBase,\r
+ (EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PayloadBootInfo->SpImageBase,\r
&TeData,\r
&TeDataSize\r
);\r
&TeData,\r
&TeDataSize\r
);\r