ArmPkg/BdsLib: Fix incorrect pointer casting

A physical address (64bit) was cast to a 32bit pointer.

Signed-off-by: Eugene Cohen (HP)
Reviewed-by: oliviermartin



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12460 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
oliviermartin 2011-09-27 18:27:20 +00:00
parent ae7f81cba3
commit 19a7404aec
3 changed files with 12 additions and 12 deletions

View File

@ -99,7 +99,7 @@ PrepareAtagList (
IN CONST CHAR8* CommandLineString, IN CONST CHAR8* CommandLineString,
IN EFI_PHYSICAL_ADDRESS InitrdImage, IN EFI_PHYSICAL_ADDRESS InitrdImage,
IN UINTN InitrdImageSize, IN UINTN InitrdImageSize,
OUT LINUX_ATAG **AtagBase, OUT EFI_PHYSICAL_ADDRESS *AtagBase,
OUT UINT32 *AtagSize OUT UINT32 *AtagSize
); );

View File

@ -101,7 +101,7 @@ PrepareAtagList (
IN CONST CHAR8* CommandLineString, IN CONST CHAR8* CommandLineString,
IN EFI_PHYSICAL_ADDRESS InitrdImage, IN EFI_PHYSICAL_ADDRESS InitrdImage,
IN UINTN InitrdImageSize, IN UINTN InitrdImageSize,
OUT LINUX_ATAG **AtagBase, OUT EFI_PHYSICAL_ADDRESS *AtagBase,
OUT UINT32 *AtagSize OUT UINT32 *AtagSize
) )
{ {
@ -155,7 +155,7 @@ PrepareAtagList (
SetupEndTag(); SetupEndTag();
// Calculate atag list size // Calculate atag list size
*AtagBase = (LINUX_ATAG*)(UINTN)AtagStartAddress; *AtagBase = AtagStartAddress;
*AtagSize = (UINT32)mLinuxKernelCurrentAtag - (UINT32)AtagStartAddress + 1; *AtagSize = (UINT32)mLinuxKernelCurrentAtag - (UINT32)AtagStartAddress + 1;
return EFI_SUCCESS; return EFI_SUCCESS;

View File

@ -161,7 +161,7 @@ BdsBootLinuxAtag (
// //
// By setting address=0 we leave the memory allocation to the function // By setting address=0 we leave the memory allocation to the function
Status = PrepareAtagList (Arguments, InitrdImage, InitrdImageSize, (LINUX_ATAG**)&KernelParamsAddress, &KernelParamsSize); Status = PrepareAtagList (Arguments, InitrdImage, InitrdImageSize, &KernelParamsAddress, &KernelParamsSize);
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
Print(L"ERROR: Can not prepare ATAG list. Status=0x%X\n", Status); Print(L"ERROR: Can not prepare ATAG list. Status=0x%X\n", Status);
return Status; return Status;