ArmPkg: Fixed unsigned type to be architecture independent

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14181 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
oliviermartin 2013-03-12 00:50:46 +00:00
parent 2614b0c474
commit c63626b7d3
10 changed files with 48 additions and 45 deletions

View File

@ -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;

View File

@ -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) {

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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)) {

View File

@ -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
);
/**

View File

@ -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;

View File

@ -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;
}

View File

@ -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;