summaryrefslogtreecommitdiff
path: root/ArmPkg
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-27 18:27:20 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-27 18:27:20 +0000
commit19a7404aecbc03999bb2b9f24bae96e2dcf67915 (patch)
tree0ebbb7882d99edfd8f81ce6dfd13b1e3226e4f8c /ArmPkg
parentae7f81cba3b9c8d54a7c55391f2eafdc28a9f92e (diff)
downloadedk2-platforms-19a7404aecbc03999bb2b9f24bae96e2dcf67915.tar.xz
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
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Library/BdsLib/BdsInternal.h10
-rw-r--r--ArmPkg/Library/BdsLib/BdsLinuxAtag.c12
-rw-r--r--ArmPkg/Library/BdsLib/BdsLinuxLoader.c2
3 files changed, 12 insertions, 12 deletions
diff --git a/ArmPkg/Library/BdsLib/BdsInternal.h b/ArmPkg/Library/BdsLib/BdsInternal.h
index 1b5094c17b..880d780994 100644
--- a/ArmPkg/Library/BdsLib/BdsInternal.h
+++ b/ArmPkg/Library/BdsLib/BdsInternal.h
@@ -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
diff --git a/ArmPkg/Library/BdsLib/BdsLinuxAtag.c b/ArmPkg/Library/BdsLib/BdsLinuxAtag.c
index 253cf65f36..8c16bc0ec3 100644
--- a/ArmPkg/Library/BdsLib/BdsLinuxAtag.c
+++ b/ArmPkg/Library/BdsLib/BdsLinuxAtag.c
@@ -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;
diff --git a/ArmPkg/Library/BdsLib/BdsLinuxLoader.c b/ArmPkg/Library/BdsLib/BdsLinuxLoader.c
index 81144b3ff8..3ff67f9b12 100644
--- a/ArmPkg/Library/BdsLib/BdsLinuxLoader.c
+++ b/ArmPkg/Library/BdsLib/BdsLinuxLoader.c
@@ -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;