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:
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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)) {
|
||||
|
@@ -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
|
||||
);
|
||||
|
||||
/**
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user