diff options
10 files changed, 48 insertions, 45 deletions
diff --git a/ArmPkg/Application/LinuxLoader/LinuxConfig.c b/ArmPkg/Application/LinuxLoader/LinuxConfig.c index 10aadb7335..c88dc65e93 100644 --- a/ArmPkg/Application/LinuxLoader/LinuxConfig.c +++ b/ArmPkg/Application/LinuxLoader/LinuxConfig.c @@ -189,7 +189,7 @@ LinuxLoaderConfig ( Print (L"[%d] Update Linux Boot Entry\n",LINUX_LOADER_UPDATE);
Print (L"Option: ");
- Status = GetHIInputInteger (&Choice);
+ Status = GetHIInputInteger ((UINTN*)&Choice);
if (Status == EFI_INVALID_PARAMETER) {
Print (L"\n");
return Status;
@@ -268,7 +268,7 @@ LinuxLoaderConfig ( do {
Print (L"Update Boot Entry: ");
- Status = GetHIInputInteger (&Choice);
+ Status = GetHIInputInteger ((UINTN*)&Choice);
if (Status == EFI_INVALID_PARAMETER) {
Print (L"\n");
return Status;
diff --git a/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c b/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c index 5c70e51ce7..059845c04d 100644 --- a/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c +++ b/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c @@ -2,7 +2,8 @@ Support a Semi Host file system over a debuggers JTAG
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-
+ Portions copyright (c) 2011, 2012, ARM Ltd. All rights reserved.<BR>
+
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -73,7 +74,7 @@ typedef struct { EFI_FILE File;
CHAR8 *FileName;
UINT32 Position;
- UINT32 SemihostHandle;
+ UINTN SemihostHandle;
BOOLEAN IsRoot;
} SEMIHOST_FCB;
@@ -152,7 +153,7 @@ FileOpen ( {
SEMIHOST_FCB *FileFcb = NULL;
EFI_STATUS Status = EFI_SUCCESS;
- UINT32 SemihostHandle;
+ UINTN SemihostHandle;
CHAR8 *AsciiFileName;
CHAR8 *AsciiPtr;
UINTN Length;
@@ -360,7 +361,7 @@ FileSetPosition ( )
{
SEMIHOST_FCB *Fcb = NULL;
- UINT32 Length;
+ UINTN Length;
EFI_STATUS Status;
Fcb = SEMIHOST_FCB_FROM_THIS(File);
@@ -395,7 +396,7 @@ GetFileInfo ( UINTN NameSize = 0;
UINTN ResultSize;
UINTN Index;
- UINT32 Length;
+ UINTN Length;
EFI_STATUS Status;
if (Fcb->IsRoot == TRUE) {
diff --git a/ArmPkg/Include/Library/SemihostLib.h b/ArmPkg/Include/Library/SemihostLib.h index 2ced7f107c..6256551771 100644 --- a/ArmPkg/Include/Library/SemihostLib.h +++ b/ArmPkg/Include/Library/SemihostLib.h @@ -1,6 +1,7 @@ /** @file
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
+ Portions copyright (c) 2011, 2012, ARM Ltd. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -38,38 +39,38 @@ RETURN_STATUS SemihostFileOpen (
IN CHAR8 *FileName,
IN UINT32 Mode,
- OUT UINT32 *FileHandle
+ OUT UINTN *FileHandle
);
RETURN_STATUS
SemihostFileSeek (
- IN UINT32 FileHandle,
- IN UINT32 Offset
+ IN UINTN FileHandle,
+ IN UINTN Offset
);
RETURN_STATUS
SemihostFileRead (
- IN UINT32 FileHandle,
- IN OUT UINT32 *Length,
+ IN UINTN FileHandle,
+ IN OUT UINTN *Length,
OUT VOID *Buffer
);
RETURN_STATUS
SemihostFileWrite (
- IN UINT32 FileHandle,
- IN OUT UINT32 *Length,
+ IN UINTN FileHandle,
+ IN OUT UINTN *Length,
IN VOID *Buffer
);
RETURN_STATUS
SemihostFileClose (
- IN UINT32 FileHandle
+ IN UINTN FileHandle
);
RETURN_STATUS
SemihostFileLength (
- IN UINT32 FileHandle,
- OUT UINT32 *Length
+ IN UINTN FileHandle,
+ OUT UINTN *Length
);
RETURN_STATUS
diff --git a/ArmPkg/Library/BdsLib/BdsLinuxFdt.c b/ArmPkg/Library/BdsLib/BdsLinuxFdt.c index fa06287b19..a098b1cda7 100644 --- a/ArmPkg/Library/BdsLib/BdsLinuxFdt.c +++ b/ArmPkg/Library/BdsLib/BdsLinuxFdt.c @@ -170,7 +170,7 @@ PrepareFdt ( IN EFI_PHYSICAL_ADDRESS InitrdImage,
IN UINTN InitrdImageSize,
IN OUT EFI_PHYSICAL_ADDRESS *FdtBlobBase,
- IN OUT UINT32 *FdtBlobSize
+ IN OUT UINTN *FdtBlobSize
)
{
EFI_STATUS Status;
diff --git a/ArmPkg/Library/BdsLib/BdsLinuxLoader.h b/ArmPkg/Library/BdsLib/BdsLinuxLoader.h index a3ecddc4f1..09b212f364 100644 --- a/ArmPkg/Library/BdsLib/BdsLinuxLoader.h +++ b/ArmPkg/Library/BdsLib/BdsLinuxLoader.h @@ -150,7 +150,7 @@ PrepareFdt ( IN EFI_PHYSICAL_ADDRESS InitrdImage,
IN UINTN InitrdImageSize,
IN OUT EFI_PHYSICAL_ADDRESS *FdtBlobBase,
- IN OUT UINT32 *FdtBlobSize
+ IN OUT UINTN *FdtBlobSize
);
#endif
diff --git a/ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.c b/ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.c index c27d8e7dd3..25a904e3f2 100644 --- a/ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.c +++ b/ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.c @@ -221,7 +221,7 @@ GetImageContext ( ImageContext->ImageRead = PeCoffLoaderImageReadFromMemory;
Status = PeCoffLoaderGetImageInfo (ImageContext);
- if (!EFI_ERROR(Status) && ((VOID*)ImageContext->DebugDirectoryEntryRva != NULL)) {
+ if (!EFI_ERROR(Status) && ((VOID*)(UINTN)ImageContext->DebugDirectoryEntryRva != NULL)) {
ImageAddress = ImageContext->ImageAddress;
if (ImageContext->IsTeImage) {
ImageAddress += sizeof (EFI_TE_IMAGE_HEADER) - ((EFI_TE_IMAGE_HEADER*)EfiImage)->StrippedSize;
@@ -285,8 +285,8 @@ InitializeDebugAgent ( // Now we've got UART, make the check:
// - The Vector table must be 32-byte aligned
- ASSERT(((UINT32)DebugAgentVectorTable & ARM_VECTOR_TABLE_ALIGNMENT) == 0);
- ArmWriteVBar ((UINT32)DebugAgentVectorTable);
+ ASSERT(((UINTN)DebugAgentVectorTable & ARM_VECTOR_TABLE_ALIGNMENT) == 0);
+ ArmWriteVBar ((UINTN)DebugAgentVectorTable);
// We use InitFlag to know if DebugAgent has been intialized from
// Sec (DEBUG_AGENT_INIT_PREMEM_SEC) or PrePi (DEBUG_AGENT_INIT_POSTMEM_SEC)
@@ -295,7 +295,7 @@ InitializeDebugAgent ( //
// Get the Sec or PrePeiCore module (defined as SEC type module)
//
- Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)PcdGet32(PcdSecureFvBaseAddress), EFI_FV_FILETYPE_SECURITY_CORE, &FfsHeader);
+ Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)(UINTN)PcdGet32(PcdSecureFvBaseAddress), EFI_FV_FILETYPE_SECURITY_CORE, &FfsHeader);
if (!EFI_ERROR(Status)) {
Status = GetImageContext (FfsHeader,&ImageContext);
if (!EFI_ERROR(Status)) {
@@ -306,7 +306,7 @@ InitializeDebugAgent ( //
// Get the PrePi or PrePeiCore module (defined as SEC type module)
//
- Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)PcdGet32(PcdFvBaseAddress), EFI_FV_FILETYPE_SECURITY_CORE, &FfsHeader);
+ Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)(UINTN)PcdGet32(PcdFvBaseAddress), EFI_FV_FILETYPE_SECURITY_CORE, &FfsHeader);
if (!EFI_ERROR(Status)) {
Status = GetImageContext (FfsHeader,&ImageContext);
if (!EFI_ERROR(Status)) {
@@ -317,7 +317,7 @@ InitializeDebugAgent ( //
// Get the PeiCore module (defined as PEI_CORE type module)
//
- Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)PcdGet32(PcdFvBaseAddress), EFI_FV_FILETYPE_PEI_CORE, &FfsHeader);
+ Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)(UINTN)PcdGet32(PcdFvBaseAddress), EFI_FV_FILETYPE_PEI_CORE, &FfsHeader);
if (!EFI_ERROR(Status)) {
Status = GetImageContext (FfsHeader,&ImageContext);
if (!EFI_ERROR(Status)) {
diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/Arm/DefaultExceptionHandler.c b/ArmPkg/Library/DefaultExceptionHandlerLib/Arm/DefaultExceptionHandler.c index bb29b95da2..74e2a7602c 100644 --- a/ArmPkg/Library/DefaultExceptionHandlerLib/Arm/DefaultExceptionHandler.c +++ b/ArmPkg/Library/DefaultExceptionHandlerLib/Arm/DefaultExceptionHandler.c @@ -36,9 +36,9 @@ typedef struct { CHAR8 *
GetImageName (
- IN UINT32 FaultAddress,
- OUT UINT32 *ImageBase,
- OUT UINT32 *PeCoffSizeOfHeaders
+ IN UINTN FaultAddress,
+ OUT UINTN *ImageBase,
+ OUT UINTN *PeCoffSizeOfHeaders
);
/**
diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerBase.c b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerBase.c index e68617e1e7..4a54298b11 100644 --- a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerBase.c +++ b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerBase.c @@ -26,9 +26,9 @@ **/
CHAR8 *
GetImageName (
- IN UINT32 FaultAddress,
- OUT UINT32 *ImageBase,
- OUT UINT32 *PeCoffSizeOfHeaders
+ IN UINTN FaultAddress,
+ OUT UINTN *ImageBase,
+ OUT UINTN *PeCoffSizeOfHeaders
)
{
return NULL;
diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c index 8543ade99c..b2d630cb33 100644 --- a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c +++ b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c @@ -62,9 +62,9 @@ DefaultExceptionHandlerConstructor ( **/
CHAR8 *
GetImageName (
- IN UINT32 FaultAddress,
- OUT UINT32 *ImageBase,
- OUT UINT32 *PeCoffSizeOfHeaders
+ IN UINTN FaultAddress,
+ OUT UINTN *ImageBase,
+ OUT UINTN *PeCoffSizeOfHeaders
)
{
EFI_DEBUG_IMAGE_INFO *DebugTable;
@@ -83,7 +83,7 @@ GetImageName ( (DebugTable->NormalImage->LoadedImageProtocolInstance != NULL)) {
if ((Address >= (CHAR8 *)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase) &&
(Address <= ((CHAR8 *)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase + DebugTable->NormalImage->LoadedImageProtocolInstance->ImageSize))) {
- *ImageBase = (UINT32)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase;
+ *ImageBase = (UINTN)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase;
*PeCoffSizeOfHeaders = PeCoffGetSizeOfHeaders ((VOID *)(UINTN)*ImageBase);
return PeCoffLoaderGetPdbPointer (DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase);
}
@@ -93,3 +93,4 @@ GetImageName ( return NULL;
}
+
diff --git a/ArmPkg/Library/SemihostLib/SemihostLib.c b/ArmPkg/Library/SemihostLib/SemihostLib.c index 01b6dc334d..5a36515b77 100644 --- a/ArmPkg/Library/SemihostLib/SemihostLib.c +++ b/ArmPkg/Library/SemihostLib/SemihostLib.c @@ -30,7 +30,7 @@ RETURN_STATUS SemihostFileOpen (
IN CHAR8 *FileName,
IN UINT32 Mode,
- OUT UINT32 *FileHandle
+ OUT UINTN *FileHandle
)
{
SEMIHOST_FILE_OPEN_BLOCK OpenBlock;
@@ -56,8 +56,8 @@ SemihostFileOpen ( RETURN_STATUS
SemihostFileSeek (
- IN UINT32 FileHandle,
- IN UINT32 Offset
+ IN UINTN FileHandle,
+ IN UINTN Offset
)
{
SEMIHOST_FILE_SEEK_BLOCK SeekBlock;
@@ -77,8 +77,8 @@ SemihostFileSeek ( RETURN_STATUS
SemihostFileRead (
- IN UINT32 FileHandle,
- IN OUT UINT32 *Length,
+ IN UINTN FileHandle,
+ IN OUT UINTN *Length,
OUT VOID *Buffer
)
{
@@ -105,8 +105,8 @@ SemihostFileRead ( RETURN_STATUS
SemihostFileWrite (
- IN UINT32 FileHandle,
- IN OUT UINT32 *Length,
+ IN UINTN FileHandle,
+ IN OUT UINTN *Length,
IN VOID *Buffer
)
{
@@ -127,7 +127,7 @@ SemihostFileWrite ( RETURN_STATUS
SemihostFileClose (
- IN UINT32 FileHandle
+ IN UINTN FileHandle
)
{
INT32 Result = Semihost_SYS_CLOSE(&FileHandle);
@@ -141,8 +141,8 @@ SemihostFileClose ( RETURN_STATUS
SemihostFileLength (
- IN UINT32 FileHandle,
- OUT UINT32 *Length
+ IN UINTN FileHandle,
+ OUT UINTN *Length
)
{
INT32 Result;
|