Print (L"[%d] Update Linux Boot Entry\n",LINUX_LOADER_UPDATE);\r
\r
Print (L"Option: ");\r
- Status = GetHIInputInteger (&Choice);\r
+ Status = GetHIInputInteger ((UINTN*)&Choice);\r
if (Status == EFI_INVALID_PARAMETER) {\r
Print (L"\n");\r
return Status;\r
\r
do {\r
Print (L"Update Boot Entry: ");\r
- Status = GetHIInputInteger (&Choice);\r
+ Status = GetHIInputInteger ((UINTN*)&Choice);\r
if (Status == EFI_INVALID_PARAMETER) {\r
Print (L"\n");\r
return Status;\r
Support a Semi Host file system over a debuggers JTAG\r
\r
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
- \r
+ Portions copyright (c) 2011, 2012, ARM Ltd. All rights reserved.<BR>\r
+\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
EFI_FILE File;\r
CHAR8 *FileName;\r
UINT32 Position;\r
- UINT32 SemihostHandle;\r
+ UINTN SemihostHandle;\r
BOOLEAN IsRoot;\r
} SEMIHOST_FCB;\r
\r
{\r
SEMIHOST_FCB *FileFcb = NULL;\r
EFI_STATUS Status = EFI_SUCCESS;\r
- UINT32 SemihostHandle;\r
+ UINTN SemihostHandle;\r
CHAR8 *AsciiFileName;\r
CHAR8 *AsciiPtr;\r
UINTN Length;\r
)\r
{\r
SEMIHOST_FCB *Fcb = NULL;\r
- UINT32 Length;\r
+ UINTN Length;\r
EFI_STATUS Status;\r
\r
Fcb = SEMIHOST_FCB_FROM_THIS(File);\r
UINTN NameSize = 0;\r
UINTN ResultSize;\r
UINTN Index;\r
- UINT32 Length;\r
+ UINTN Length;\r
EFI_STATUS Status;\r
\r
if (Fcb->IsRoot == TRUE) {\r
/** @file\r
\r
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+ Portions copyright (c) 2011, 2012, ARM Ltd. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
SemihostFileOpen (\r
IN CHAR8 *FileName,\r
IN UINT32 Mode,\r
- OUT UINT32 *FileHandle\r
+ OUT UINTN *FileHandle\r
);\r
\r
RETURN_STATUS\r
SemihostFileSeek (\r
- IN UINT32 FileHandle,\r
- IN UINT32 Offset\r
+ IN UINTN FileHandle,\r
+ IN UINTN Offset\r
);\r
\r
RETURN_STATUS\r
SemihostFileRead (\r
- IN UINT32 FileHandle,\r
- IN OUT UINT32 *Length,\r
+ IN UINTN FileHandle,\r
+ IN OUT UINTN *Length,\r
OUT VOID *Buffer\r
);\r
\r
RETURN_STATUS\r
SemihostFileWrite (\r
- IN UINT32 FileHandle,\r
- IN OUT UINT32 *Length,\r
+ IN UINTN FileHandle,\r
+ IN OUT UINTN *Length,\r
IN VOID *Buffer\r
);\r
\r
RETURN_STATUS\r
SemihostFileClose (\r
- IN UINT32 FileHandle\r
+ IN UINTN FileHandle\r
);\r
\r
RETURN_STATUS\r
SemihostFileLength (\r
- IN UINT32 FileHandle,\r
- OUT UINT32 *Length\r
+ IN UINTN FileHandle,\r
+ OUT UINTN *Length\r
);\r
\r
RETURN_STATUS\r
IN EFI_PHYSICAL_ADDRESS InitrdImage,\r
IN UINTN InitrdImageSize,\r
IN OUT EFI_PHYSICAL_ADDRESS *FdtBlobBase,\r
- IN OUT UINT32 *FdtBlobSize\r
+ IN OUT UINTN *FdtBlobSize\r
)\r
{\r
EFI_STATUS Status;\r
IN EFI_PHYSICAL_ADDRESS InitrdImage,\r
IN UINTN InitrdImageSize,\r
IN OUT EFI_PHYSICAL_ADDRESS *FdtBlobBase,\r
- IN OUT UINT32 *FdtBlobSize\r
+ IN OUT UINTN *FdtBlobSize\r
);\r
\r
#endif\r
ImageContext->ImageRead = PeCoffLoaderImageReadFromMemory;\r
\r
Status = PeCoffLoaderGetImageInfo (ImageContext);\r
- if (!EFI_ERROR(Status) && ((VOID*)ImageContext->DebugDirectoryEntryRva != NULL)) {\r
+ if (!EFI_ERROR(Status) && ((VOID*)(UINTN)ImageContext->DebugDirectoryEntryRva != NULL)) {\r
ImageAddress = ImageContext->ImageAddress;\r
if (ImageContext->IsTeImage) {\r
ImageAddress += sizeof (EFI_TE_IMAGE_HEADER) - ((EFI_TE_IMAGE_HEADER*)EfiImage)->StrippedSize;\r
\r
// Now we've got UART, make the check:\r
// - The Vector table must be 32-byte aligned\r
- ASSERT(((UINT32)DebugAgentVectorTable & ARM_VECTOR_TABLE_ALIGNMENT) == 0);\r
- ArmWriteVBar ((UINT32)DebugAgentVectorTable);\r
+ ASSERT(((UINTN)DebugAgentVectorTable & ARM_VECTOR_TABLE_ALIGNMENT) == 0);\r
+ ArmWriteVBar ((UINTN)DebugAgentVectorTable);\r
\r
// We use InitFlag to know if DebugAgent has been intialized from\r
// Sec (DEBUG_AGENT_INIT_PREMEM_SEC) or PrePi (DEBUG_AGENT_INIT_POSTMEM_SEC)\r
//\r
// Get the Sec or PrePeiCore module (defined as SEC type module)\r
//\r
- Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)PcdGet32(PcdSecureFvBaseAddress), EFI_FV_FILETYPE_SECURITY_CORE, &FfsHeader);\r
+ Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)(UINTN)PcdGet32(PcdSecureFvBaseAddress), EFI_FV_FILETYPE_SECURITY_CORE, &FfsHeader);\r
if (!EFI_ERROR(Status)) {\r
Status = GetImageContext (FfsHeader,&ImageContext);\r
if (!EFI_ERROR(Status)) {\r
//\r
// Get the PrePi or PrePeiCore module (defined as SEC type module)\r
//\r
- Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)PcdGet32(PcdFvBaseAddress), EFI_FV_FILETYPE_SECURITY_CORE, &FfsHeader);\r
+ Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)(UINTN)PcdGet32(PcdFvBaseAddress), EFI_FV_FILETYPE_SECURITY_CORE, &FfsHeader);\r
if (!EFI_ERROR(Status)) {\r
Status = GetImageContext (FfsHeader,&ImageContext);\r
if (!EFI_ERROR(Status)) {\r
//\r
// Get the PeiCore module (defined as PEI_CORE type module)\r
//\r
- Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)PcdGet32(PcdFvBaseAddress), EFI_FV_FILETYPE_PEI_CORE, &FfsHeader);\r
+ Status = GetFfsFile ((EFI_FIRMWARE_VOLUME_HEADER*)(UINTN)PcdGet32(PcdFvBaseAddress), EFI_FV_FILETYPE_PEI_CORE, &FfsHeader);\r
if (!EFI_ERROR(Status)) {\r
Status = GetImageContext (FfsHeader,&ImageContext);\r
if (!EFI_ERROR(Status)) {\r
\r
CHAR8 *\r
GetImageName (\r
- IN UINT32 FaultAddress,\r
- OUT UINT32 *ImageBase,\r
- OUT UINT32 *PeCoffSizeOfHeaders\r
+ IN UINTN FaultAddress,\r
+ OUT UINTN *ImageBase,\r
+ OUT UINTN *PeCoffSizeOfHeaders\r
);\r
\r
/**\r
**/\r
CHAR8 *\r
GetImageName (\r
- IN UINT32 FaultAddress,\r
- OUT UINT32 *ImageBase,\r
- OUT UINT32 *PeCoffSizeOfHeaders\r
+ IN UINTN FaultAddress,\r
+ OUT UINTN *ImageBase,\r
+ OUT UINTN *PeCoffSizeOfHeaders\r
)\r
{\r
return NULL;\r
**/\r
CHAR8 *\r
GetImageName (\r
- IN UINT32 FaultAddress,\r
- OUT UINT32 *ImageBase,\r
- OUT UINT32 *PeCoffSizeOfHeaders\r
+ IN UINTN FaultAddress,\r
+ OUT UINTN *ImageBase,\r
+ OUT UINTN *PeCoffSizeOfHeaders\r
)\r
{\r
EFI_DEBUG_IMAGE_INFO *DebugTable;\r
(DebugTable->NormalImage->LoadedImageProtocolInstance != NULL)) {\r
if ((Address >= (CHAR8 *)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase) &&\r
(Address <= ((CHAR8 *)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase + DebugTable->NormalImage->LoadedImageProtocolInstance->ImageSize))) {\r
- *ImageBase = (UINT32)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase;\r
+ *ImageBase = (UINTN)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase;\r
*PeCoffSizeOfHeaders = PeCoffGetSizeOfHeaders ((VOID *)(UINTN)*ImageBase);\r
return PeCoffLoaderGetPdbPointer (DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase);\r
}\r
\r
return NULL;\r
}\r
+\r
SemihostFileOpen (\r
IN CHAR8 *FileName,\r
IN UINT32 Mode,\r
- OUT UINT32 *FileHandle\r
+ OUT UINTN *FileHandle\r
)\r
{\r
SEMIHOST_FILE_OPEN_BLOCK OpenBlock;\r
\r
RETURN_STATUS\r
SemihostFileSeek (\r
- IN UINT32 FileHandle,\r
- IN UINT32 Offset\r
+ IN UINTN FileHandle,\r
+ IN UINTN Offset\r
)\r
{\r
SEMIHOST_FILE_SEEK_BLOCK SeekBlock;\r
\r
RETURN_STATUS\r
SemihostFileRead (\r
- IN UINT32 FileHandle,\r
- IN OUT UINT32 *Length,\r
+ IN UINTN FileHandle,\r
+ IN OUT UINTN *Length,\r
OUT VOID *Buffer\r
)\r
{\r
\r
RETURN_STATUS\r
SemihostFileWrite (\r
- IN UINT32 FileHandle,\r
- IN OUT UINT32 *Length,\r
+ IN UINTN FileHandle,\r
+ IN OUT UINTN *Length,\r
IN VOID *Buffer\r
)\r
{\r
\r
RETURN_STATUS\r
SemihostFileClose (\r
- IN UINT32 FileHandle\r
+ IN UINTN FileHandle\r
)\r
{\r
INT32 Result = Semihost_SYS_CLOSE(&FileHandle);\r
\r
RETURN_STATUS\r
SemihostFileLength (\r
- IN UINT32 FileHandle,\r
- OUT UINT32 *Length\r
+ IN UINTN FileHandle,\r
+ OUT UINTN *Length\r
)\r
{\r
INT32 Result;\r