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

@ -96,11 +96,11 @@ BdsLoadImage (
EFI_STATUS
PrepareAtagList (
IN CONST CHAR8* CommandLineString,
IN EFI_PHYSICAL_ADDRESS InitrdImage,
IN UINTN InitrdImageSize,
OUT LINUX_ATAG **AtagBase,
OUT UINT32 *AtagSize
IN CONST CHAR8* CommandLineString,
IN EFI_PHYSICAL_ADDRESS InitrdImage,
IN UINTN InitrdImageSize,
OUT EFI_PHYSICAL_ADDRESS *AtagBase,
OUT UINT32 *AtagSize
);
#endif

View File

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

View File

@ -161,7 +161,7 @@ BdsBootLinuxAtag (
//
// 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)) {
Print(L"ERROR: Can not prepare ATAG list. Status=0x%X\n", Status);
return Status;