ARM Packages: Replace tabs by spaces for indentation

Replace tabs by spaces for indentation to comply to EDK2 coding standards.
Done in files with extension ".S", ".c", ".h", ".asm", ".dsc", ".inc", "*.inf",
 "*.dec" or ".fdf" and located in ArmPkg, ArmPlatformPkg, EmbeddedPkg,
BeagleBoardPkg or Omap35xxPkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15901 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Ronald Cron
2014-08-26 10:14:17 +00:00
committed by oliviermartin
parent 5c670b2119
commit 91c38d4e94
52 changed files with 470 additions and 471 deletions

View File

@ -31,22 +31,22 @@ typedef struct {
} ARM_CORE_INFO; } ARM_CORE_INFO;
typedef struct{ typedef struct{
UINT64 Signature; UINT64 Signature;
UINT32 Length; UINT32 Length;
UINT32 Revision; UINT32 Revision;
UINT64 OemId; UINT64 OemId;
UINT64 OemTableId; UINT64 OemTableId;
UINTN OemRevision; UINTN OemRevision;
UINTN CreatorId; UINTN CreatorId;
UINTN CreatorRevision; UINTN CreatorRevision;
EFI_GUID Identifier; EFI_GUID Identifier;
UINTN DataLen; UINTN DataLen;
} ARM_PROCESSOR_TABLE_HEADER; } ARM_PROCESSOR_TABLE_HEADER;
typedef struct { typedef struct {
ARM_PROCESSOR_TABLE_HEADER Header; ARM_PROCESSOR_TABLE_HEADER Header;
UINTN NumberOfEntries; UINTN NumberOfEntries;
ARM_CORE_INFO *ArmCpus; ARM_CORE_INFO *ArmCpus;
} ARM_PROCESSOR_TABLE; } ARM_PROCESSOR_TABLE;

View File

@ -51,7 +51,7 @@ GCC_ASM_EXPORT(ArmDisableInterrupts)
GCC_ASM_EXPORT (ArmEnableVFP) GCC_ASM_EXPORT (ArmEnableVFP)
Arm11PartNumberMask: .word 0xFFF0 Arm11PartNumberMask: .word 0xFFF0
Arm11PartNumber: .word 0xB020 Arm11PartNumber: .word 0xB020
.set DC_ON, (0x1<<2) .set DC_ON, (0x1<<2)
.set IC_ON, (0x1<<12) .set IC_ON, (0x1<<12)

View File

@ -181,7 +181,7 @@ ArmCallSEV
ArmReadSctlr ArmReadSctlr
mrc p15, 0, r0, c1, c0, 0 // Read SCTLR into R0 (Read control register configuration data) mrc p15, 0, r0, c1, c0, 0 // Read SCTLR into R0 (Read control register configuration data)
bx lr bx lr
ArmReadCpuActlr ArmReadCpuActlr

View File

@ -44,7 +44,7 @@ __aeabi_uread4
; ); ; );
; ;
__aeabi_uread8 __aeabi_uread8
mov r3, r0 mov r3, r0
ldrb r1, [r3] ldrb r1, [r3]
ldrb r2, [r3, #1] ldrb r2, [r3, #1]

View File

@ -186,7 +186,7 @@ DefaultExceptionHandler (
UINT32 PcAdjust = 0; UINT32 PcAdjust = 0;
CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"\n%a Exception PC at 0x%08x CPSR 0x%08x ", CharCount = AsciiSPrint (Buffer,sizeof (Buffer),"\n%a Exception PC at 0x%08x CPSR 0x%08x ",
gExceptionTypeString[ExceptionType], SystemContext.SystemContextArm->PC, SystemContext.SystemContextArm->CPSR); gExceptionTypeString[ExceptionType], SystemContext.SystemContextArm->PC, SystemContext.SystemContextArm->CPSR);
SerialPortWrite ((UINT8 *) Buffer, CharCount); SerialPortWrite ((UINT8 *) Buffer, CharCount);
DEBUG_CODE_BEGIN (); DEBUG_CODE_BEGIN ();

View File

@ -76,7 +76,7 @@
#define SP810_CTRL_BASE (ARM_EB_BOARD_PERIPH_BASE + 0x01000) #define SP810_CTRL_BASE (ARM_EB_BOARD_PERIPH_BASE + 0x01000)
// SYSTRCL Register // SYSTRCL Register
#define ARM_EB_SYSCTRL 0x10001000 #define ARM_EB_SYSCTRL 0x10001000
// Dynamic Memory Controller Base // Dynamic Memory Controller Base
#define ARM_EB_DMC_BASE 0x10018000 #define ARM_EB_DMC_BASE 0x10018000

View File

@ -29,10 +29,10 @@ GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask)
// IN UINTN MpId // IN UINTN MpId
// ); // );
ASM_PFX(ArmPlatformGetCorePosition): ASM_PFX(ArmPlatformGetCorePosition):
and r1, r0, #ARM_CORE_MASK and r1, r0, #ARM_CORE_MASK
and r0, r0, #ARM_CLUSTER_MASK and r0, r0, #ARM_CLUSTER_MASK
add r0, r1, r0, LSR #7 add r0, r1, r0, LSR #7
bx lr bx lr
//UINTN //UINTN
//ArmPlatformIsPrimaryCore ( //ArmPlatformIsPrimaryCore (

View File

@ -30,10 +30,10 @@
// IN UINTN MpId // IN UINTN MpId
// ); // );
ArmPlatformGetCorePosition FUNCTION ArmPlatformGetCorePosition FUNCTION
and r1, r0, #ARM_CORE_MASK and r1, r0, #ARM_CORE_MASK
and r0, r0, #ARM_CLUSTER_MASK and r0, r0, #ARM_CLUSTER_MASK
add r0, r1, r0, LSR #7 add r0, r1, r0, LSR #7
bx lr bx lr
ENDFUNC ENDFUNC
//UINTN //UINTN

View File

@ -200,9 +200,9 @@ ArmFastbootPlatformInit (
// Read the GPT partition entry array into memory so we can get the partition names // Read the GPT partition entry array into memory so we can get the partition names
Status = ReadPartitionEntries (FlashBlockIo, &PartitionEntries); Status = ReadPartitionEntries (FlashBlockIo, &PartitionEntries);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Warning: Failed to read partitions from Android NVM device (status: %r)\n", Status)); DEBUG ((EFI_D_ERROR, "Warning: Failed to read partitions from Android NVM device (status: %r)\n", Status));
// Failing to locate partitions should not prevent to do other Android FastBoot actions // Failing to locate partitions should not prevent to do other Android FastBoot actions
return EFI_SUCCESS; return EFI_SUCCESS;
} }
// Get every Block IO protocol instance installed in the system // Get every Block IO protocol instance installed in the system

View File

@ -32,10 +32,10 @@ ASM_PFX(ArmPlatformPeiBootAction):
// IN UINTN MpId // IN UINTN MpId
// ); // );
ASM_PFX(ArmPlatformGetCorePosition): ASM_PFX(ArmPlatformGetCorePosition):
and r1, r0, #ARM_CORE_MASK and r1, r0, #ARM_CORE_MASK
and r0, r0, #ARM_CLUSTER_MASK and r0, r0, #ARM_CLUSTER_MASK
add r0, r1, r0, LSR #7 add r0, r1, r0, LSR #7
bx lr bx lr
//UINTN //UINTN
//ArmPlatformIsPrimaryCore ( //ArmPlatformIsPrimaryCore (

View File

@ -35,10 +35,10 @@ ArmPlatformPeiBootAction FUNCTION
// IN UINTN MpId // IN UINTN MpId
// ); // );
ArmPlatformGetCorePosition FUNCTION ArmPlatformGetCorePosition FUNCTION
and r1, r0, #ARM_CORE_MASK and r1, r0, #ARM_CORE_MASK
and r0, r0, #ARM_CLUSTER_MASK and r0, r0, #ARM_CLUSTER_MASK
add r0, r1, r0, LSR #7 add r0, r1, r0, LSR #7
bx lr bx lr
ENDFUNC ENDFUNC
//UINTN //UINTN

View File

@ -35,7 +35,7 @@
ArmPlatformGetPrimaryCoreMpId FUNCTION ArmPlatformGetPrimaryCoreMpId FUNCTION
LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r0) LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r0)
ldr r0, [r0] ldr r0, [r0]
bx lr bx lr
ENDFUNC ENDFUNC
//UINTN //UINTN

View File

@ -61,10 +61,10 @@ ASM_PFX(ArmPlatformIsPrimaryCore):
ldrh w1, [x1] ldrh w1, [x1]
cmp w0, w1 cmp w0, w1
b.ne 1f b.ne 1f
mov x0, #1 mov x0, #1
ret ret
1: 1:
mov x0, #0 mov x0, #0
ret ret
//UINTN //UINTN

View File

@ -101,7 +101,7 @@ ASM_PFX(ArmPlatformIsPrimaryCore):
cmp r0, r1 cmp r0, r1
moveq r0, #1 moveq r0, #1
movne r0, #0 movne r0, #0
bx lr bx lr
//UINTN //UINTN
//ArmPlatformGetCorePosition ( //ArmPlatformGetCorePosition (

View File

@ -107,7 +107,7 @@ ArmPlatformIsPrimaryCore FUNCTION
cmp r0, r1 cmp r0, r1
moveq r0, #1 moveq r0, #1
movne r0, #0 movne r0, #0
bx lr bx lr
ENDFUNC ENDFUNC
//UINTN //UINTN

View File

@ -55,23 +55,23 @@ INPUT(./boot3f.o)
SECTIONS SECTIONS
{ {
. = PHYS_OFFSET; . = PHYS_OFFSET;
#ifdef BOOT1 #ifdef BOOT1
.text : { boot1.o } .text : { boot1.o }
#endif #endif
#ifdef BOOT2 #ifdef BOOT2
.text : { boot2.o } .text : { boot2.o }
#endif #endif
#ifdef BOOT3 #ifdef BOOT3
.text : { boot3.o } .text : { boot3.o }
#endif #endif
#ifdef BOOT3F #ifdef BOOT3F
.text : { boot3f.o } .text : { boot3f.o }
#endif #endif
.data : { *(.data) } .data : { *(.data) }
.bss : { *(.bss) } .bss : { *(.bss) }
} }

View File

@ -393,7 +393,7 @@ StartDefaultBootOnTimeout (
} }
// Discard key in the buffer // Discard key in the buffer
do { do {
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key); Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
} while(!EFI_ERROR(Status)); } while(!EFI_ERROR(Status));
gBS->CloseEvent (WaitList[0]); gBS->CloseEvent (WaitList[0]);
Print(L"\n\r"); Print(L"\n\r");
@ -408,8 +408,8 @@ StartDefaultBootOnTimeout (
UnicodeSPrint (BootVariableName, 9 * sizeof(CHAR16), L"Boot%04X", BootOrder[Index]); UnicodeSPrint (BootVariableName, 9 * sizeof(CHAR16), L"Boot%04X", BootOrder[Index]);
Status = BdsStartBootOption (BootVariableName); Status = BdsStartBootOption (BootVariableName);
if(!EFI_ERROR(Status)){ if(!EFI_ERROR(Status)){
// Boot option returned successfully, hence don't need to start next boot option // Boot option returned successfully, hence don't need to start next boot option
break; break;
} }
// In case of success, we should not return from this call. // In case of success, we should not return from this call.
} }

View File

@ -778,21 +778,21 @@ EFI_STATUS
EFIAPI EFIAPI
LcdGraphicsBlt ( LcdGraphicsBlt (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
IN UINTN SourceX, IN UINTN SourceX,
IN UINTN SourceY, IN UINTN SourceY,
IN UINTN DestinationX, IN UINTN DestinationX,
IN UINTN DestinationY, IN UINTN DestinationY,
IN UINTN Width, IN UINTN Width,
IN UINTN Height, IN UINTN Height,
IN UINTN Delta OPTIONAL // Number of BYTES in a row of the BltBuffer IN UINTN Delta OPTIONAL // Number of BYTES in a row of the BltBuffer
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;
UINT32 HorizontalResolution; UINT32 HorizontalResolution;
UINT32 VerticalResolution; UINT32 VerticalResolution;
LCD_INSTANCE* Instance; LCD_INSTANCE* Instance;
Instance = LCD_INSTANCE_FROM_GOP_THIS(This); Instance = LCD_INSTANCE_FROM_GOP_THIS(This);
@ -811,24 +811,24 @@ LcdGraphicsBlt (
BltOperation,DestinationX,DestinationY,Width,Height,HorizontalResolution,VerticalResolution)); BltOperation,DestinationX,DestinationY,Width,Height,HorizontalResolution,VerticalResolution));
// Check we have reasonable parameters // Check we have reasonable parameters
if (Width == 0 || Height == 0) { if (Width == 0 || Height == 0) {
DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: ERROR - Invalid dimension: Zero size area.\n" )); DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: ERROR - Invalid dimension: Zero size area.\n" ));
Status = EFI_INVALID_PARAMETER; Status = EFI_INVALID_PARAMETER;
goto EXIT; goto EXIT;
} }
if ((BltOperation == EfiBltVideoFill) || (BltOperation == EfiBltBufferToVideo) || (BltOperation == EfiBltVideoToBltBuffer)) { if ((BltOperation == EfiBltVideoFill) || (BltOperation == EfiBltBufferToVideo) || (BltOperation == EfiBltVideoToBltBuffer)) {
ASSERT( BltBuffer != NULL); ASSERT( BltBuffer != NULL);
} }
/*if ((DestinationX >= HorizontalResolution) || (DestinationY >= VerticalResolution)) { /*if ((DestinationX >= HorizontalResolution) || (DestinationY >= VerticalResolution)) {
DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: ERROR - Invalid destination.\n" )); DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: ERROR - Invalid destination.\n" ));
Status = EFI_INVALID_PARAMETER; Status = EFI_INVALID_PARAMETER;
goto EXIT; goto EXIT;
}*/ }*/
// If we are reading data out of the video buffer, check that the source area is within the display limits // If we are reading data out of the video buffer, check that the source area is within the display limits
if ((BltOperation == EfiBltVideoToBltBuffer) || (BltOperation == EfiBltVideoToVideo)) { if ((BltOperation == EfiBltVideoToBltBuffer) || (BltOperation == EfiBltVideoToVideo)) {
if ((SourceY + Height > VerticalResolution) || (SourceX + Width > HorizontalResolution)) { if ((SourceY + Height > VerticalResolution) || (SourceX + Width > HorizontalResolution)) {
DEBUG((DEBUG_INFO, "LcdGraphicsBlt: ERROR - Invalid source resolution.\n" )); DEBUG((DEBUG_INFO, "LcdGraphicsBlt: ERROR - Invalid source resolution.\n" ));
DEBUG((DEBUG_INFO, " - SourceY=%d + Height=%d > VerticalResolution=%d.\n", SourceY, Height, VerticalResolution )); DEBUG((DEBUG_INFO, " - SourceY=%d + Height=%d > VerticalResolution=%d.\n", SourceY, Height, VerticalResolution ));
@ -836,10 +836,10 @@ LcdGraphicsBlt (
Status = EFI_INVALID_PARAMETER; Status = EFI_INVALID_PARAMETER;
goto EXIT; goto EXIT;
} }
} }
// If we are writing data into the video buffer, that the destination area is within the display limits // If we are writing data into the video buffer, that the destination area is within the display limits
if ((BltOperation == EfiBltVideoFill) || (BltOperation == EfiBltBufferToVideo) || (BltOperation == EfiBltVideoToVideo)) { if ((BltOperation == EfiBltVideoFill) || (BltOperation == EfiBltBufferToVideo) || (BltOperation == EfiBltVideoToVideo)) {
if ((DestinationY + Height > VerticalResolution) || (DestinationX + Width > HorizontalResolution)) { if ((DestinationY + Height > VerticalResolution) || (DestinationX + Width > HorizontalResolution)) {
DEBUG((DEBUG_INFO, "LcdGraphicsBlt: ERROR - Invalid destination resolution.\n" )); DEBUG((DEBUG_INFO, "LcdGraphicsBlt: ERROR - Invalid destination resolution.\n" ));
DEBUG((DEBUG_INFO, " - DestinationY=%d + Height=%d > VerticalResolution=%d.\n", DestinationY, Height, VerticalResolution )); DEBUG((DEBUG_INFO, " - DestinationY=%d + Height=%d > VerticalResolution=%d.\n", DestinationY, Height, VerticalResolution ));
@ -847,36 +847,36 @@ LcdGraphicsBlt (
Status = EFI_INVALID_PARAMETER; Status = EFI_INVALID_PARAMETER;
goto EXIT; goto EXIT;
} }
} }
// //
// Perform the Block Transfer Operation // Perform the Block Transfer Operation
// //
switch (BltOperation) { switch (BltOperation) {
case EfiBltVideoFill: case EfiBltVideoFill:
Status = BltVideoFill (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta); Status = BltVideoFill (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);
break; break;
case EfiBltVideoToBltBuffer: case EfiBltVideoToBltBuffer:
Status = BltVideoToBltBuffer (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta); Status = BltVideoToBltBuffer (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);
break; break;
case EfiBltBufferToVideo: case EfiBltBufferToVideo:
Status = BltBufferToVideo (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta); Status = BltBufferToVideo (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);
break; break;
case EfiBltVideoToVideo: case EfiBltVideoToVideo:
Status = BltVideoToVideo (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta); Status = BltVideoToVideo (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);
break; break;
case EfiGraphicsOutputBltOperationMax: case EfiGraphicsOutputBltOperationMax:
default: default:
DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: Invalid Operation\n")); DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: Invalid Operation\n"));
Status = EFI_INVALID_PARAMETER; Status = EFI_INVALID_PARAMETER;
break; break;
} }
EXIT: EXIT:
return Status; return Status;
} }

View File

@ -161,52 +161,52 @@ LcdGraphicsOutputDxeInitialize (
goto EXIT; goto EXIT;
} }
// Install the Graphics Output Protocol and the Device Path // Install the Graphics Output Protocol and the Device Path
Status = gBS->InstallMultipleProtocolInterfaces( Status = gBS->InstallMultipleProtocolInterfaces(
&Instance->Handle, &Instance->Handle,
&gEfiGraphicsOutputProtocolGuid, &Instance->Gop, &gEfiGraphicsOutputProtocolGuid, &Instance->Gop,
&gEfiDevicePathProtocolGuid, &Instance->DevicePath, &gEfiDevicePathProtocolGuid, &Instance->DevicePath,
NULL NULL
); );
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
DEBUG((DEBUG_ERROR, "GraphicsOutputDxeInitialize: Can not install the protocol. Exit Status=%r\n", Status)); DEBUG((DEBUG_ERROR, "GraphicsOutputDxeInitialize: Can not install the protocol. Exit Status=%r\n", Status));
goto EXIT; goto EXIT;
} }
// Register for an ExitBootServicesEvent // Register for an ExitBootServicesEvent
// When ExitBootServices starts, this function here will make sure that the graphics driver will shut down properly, // When ExitBootServices starts, this function here will make sure that the graphics driver will shut down properly,
// i.e. it will free up all allocated memory and perform any necessary hardware re-configuration. // i.e. it will free up all allocated memory and perform any necessary hardware re-configuration.
Status = gBS->CreateEvent ( Status = gBS->CreateEvent (
EVT_SIGNAL_EXIT_BOOT_SERVICES, EVT_SIGNAL_EXIT_BOOT_SERVICES,
TPL_NOTIFY, TPL_NOTIFY,
LcdGraphicsExitBootServicesEvent, NULL, LcdGraphicsExitBootServicesEvent, NULL,
&Instance->ExitBootServicesEvent &Instance->ExitBootServicesEvent
); );
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
DEBUG((DEBUG_ERROR, "GraphicsOutputDxeInitialize: Can not install the ExitBootServicesEvent handler. Exit Status=%r\n", Status)); DEBUG((DEBUG_ERROR, "GraphicsOutputDxeInitialize: Can not install the ExitBootServicesEvent handler. Exit Status=%r\n", Status));
goto EXIT_ERROR_UNINSTALL_PROTOCOL; goto EXIT_ERROR_UNINSTALL_PROTOCOL;
} }
// To get here, everything must be fine, so just exit // To get here, everything must be fine, so just exit
goto EXIT; goto EXIT;
EXIT_ERROR_UNINSTALL_PROTOCOL: EXIT_ERROR_UNINSTALL_PROTOCOL:
/* The following function could return an error message, /* The following function could return an error message,
* however, to get here something must have gone wrong already, * however, to get here something must have gone wrong already,
* so preserve the original error, i.e. don't change * so preserve the original error, i.e. don't change
* the Status variable, even it fails to uninstall the protocol. * the Status variable, even it fails to uninstall the protocol.
*/ */
gBS->UninstallMultipleProtocolInterfaces ( gBS->UninstallMultipleProtocolInterfaces (
Instance->Handle, Instance->Handle,
&gEfiGraphicsOutputProtocolGuid, &Instance->Gop, // Uninstall Graphics Output protocol &gEfiGraphicsOutputProtocolGuid, &Instance->Gop, // Uninstall Graphics Output protocol
&gEfiDevicePathProtocolGuid, &Instance->DevicePath, // Uninstall device path &gEfiDevicePathProtocolGuid, &Instance->DevicePath, // Uninstall device path
NULL NULL
); );
EXIT: EXIT:
return Status; return Status;
} }
@ -239,15 +239,15 @@ EFI_STATUS
EFIAPI EFIAPI
LcdGraphicsQueryMode ( LcdGraphicsQueryMode (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN UINT32 ModeNumber, IN UINT32 ModeNumber,
OUT UINTN *SizeOfInfo, OUT UINTN *SizeOfInfo,
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
) )
{ {
EFI_STATUS Status = EFI_SUCCESS; EFI_STATUS Status = EFI_SUCCESS;
LCD_INSTANCE *Instance; LCD_INSTANCE *Instance;
Instance = LCD_INSTANCE_FROM_GOP_THIS(This); Instance = LCD_INSTANCE_FROM_GOP_THIS(This);
// Setup the hardware if not already done // Setup the hardware if not already done
if( !mDisplayInitialized ) { if( !mDisplayInitialized ) {
@ -257,14 +257,14 @@ LcdGraphicsQueryMode (
} }
} }
// Error checking // Error checking
if ( (This == NULL) || (Info == NULL) || (SizeOfInfo == NULL) || (ModeNumber >= This->Mode->MaxMode) ) { if ( (This == NULL) || (Info == NULL) || (SizeOfInfo == NULL) || (ModeNumber >= This->Mode->MaxMode) ) {
DEBUG((DEBUG_ERROR, "LcdGraphicsQueryMode: ERROR - For mode number %d : Invalid Parameter.\n", ModeNumber )); DEBUG((DEBUG_ERROR, "LcdGraphicsQueryMode: ERROR - For mode number %d : Invalid Parameter.\n", ModeNumber ));
Status = EFI_INVALID_PARAMETER; Status = EFI_INVALID_PARAMETER;
goto EXIT; goto EXIT;
} }
*Info = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION)); *Info = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));
if (*Info == NULL) { if (*Info == NULL) {
Status = EFI_OUT_OF_RESOURCES; Status = EFI_OUT_OF_RESOURCES;
goto EXIT; goto EXIT;
@ -278,7 +278,7 @@ LcdGraphicsQueryMode (
} }
EXIT: EXIT:
return Status; return Status;
} }
/*************************************** /***************************************
@ -289,15 +289,15 @@ EFI_STATUS
EFIAPI EFIAPI
LcdGraphicsSetMode ( LcdGraphicsSetMode (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN UINT32 ModeNumber IN UINT32 ModeNumber
) )
{ {
EFI_STATUS Status = EFI_SUCCESS; EFI_STATUS Status = EFI_SUCCESS;
EFI_GRAPHICS_OUTPUT_BLT_PIXEL FillColour; EFI_GRAPHICS_OUTPUT_BLT_PIXEL FillColour;
LCD_INSTANCE* Instance; LCD_INSTANCE* Instance;
LCD_BPP Bpp; LCD_BPP Bpp;
Instance = LCD_INSTANCE_FROM_GOP_THIS (This); Instance = LCD_INSTANCE_FROM_GOP_THIS (This);
// Setup the hardware if not already done // Setup the hardware if not already done
if(!mDisplayInitialized) { if(!mDisplayInitialized) {
@ -314,33 +314,33 @@ LcdGraphicsSetMode (
goto EXIT; goto EXIT;
} }
// Set the oscillator frequency to support the new mode // Set the oscillator frequency to support the new mode
Status = LcdPlatformSetMode (ModeNumber); Status = LcdPlatformSetMode (ModeNumber);
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
Status = EFI_DEVICE_ERROR; Status = EFI_DEVICE_ERROR;
goto EXIT; goto EXIT;
} }
// Update the UEFI mode information // Update the UEFI mode information
This->Mode->Mode = ModeNumber; This->Mode->Mode = ModeNumber;
LcdPlatformQueryMode (ModeNumber,&Instance->ModeInfo); LcdPlatformQueryMode (ModeNumber,&Instance->ModeInfo);
Status = LcdPlatformGetBpp(ModeNumber, &Bpp); Status = LcdPlatformGetBpp(ModeNumber, &Bpp);
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
DEBUG ((DEBUG_ERROR, "LcdGraphicsSetMode: ERROR - Couldn't get bytes per pixel, status: %r\n", Status)); DEBUG ((DEBUG_ERROR, "LcdGraphicsSetMode: ERROR - Couldn't get bytes per pixel, status: %r\n", Status));
goto EXIT; goto EXIT;
} }
This->Mode->FrameBufferSize = Instance->ModeInfo.VerticalResolution This->Mode->FrameBufferSize = Instance->ModeInfo.VerticalResolution
* Instance->ModeInfo.PixelsPerScanLine * Instance->ModeInfo.PixelsPerScanLine
* GetBytesPerPixel(Bpp); * GetBytesPerPixel(Bpp);
// Set the hardware to the new mode // Set the hardware to the new mode
Status = LcdSetMode (ModeNumber); Status = LcdSetMode (ModeNumber);
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
Status = EFI_DEVICE_ERROR; Status = EFI_DEVICE_ERROR;
goto EXIT; goto EXIT;
} }
// The UEFI spec requires that we now clear the visible portions of the output display to black. // The UEFI spec requires that we now clear the visible portions of the output display to black.
// Set the fill colour to black // Set the fill colour to black
SetMem (&FillColour, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0); SetMem (&FillColour, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0);
@ -359,7 +359,7 @@ LcdGraphicsSetMode (
0); 0);
EXIT: EXIT:
return Status; return Status;
} }
UINTN UINTN

View File

@ -149,7 +149,7 @@ struct _NOR_FLASH_INSTANCE {
EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL FvbProtocol; EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL FvbProtocol;
VOID* ShadowBuffer; VOID* ShadowBuffer;
NOR_FLASH_DEVICE_PATH DevicePath; NOR_FLASH_DEVICE_PATH DevicePath;
}; };
EFI_STATUS EFI_STATUS

View File

@ -141,7 +141,7 @@ ValidateFvHeader (
EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader; EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader;
VARIABLE_STORE_HEADER *VariableStoreHeader; VARIABLE_STORE_HEADER *VariableStoreHeader;
UINTN VariableStoreLength; UINTN VariableStoreLength;
UINTN FvLength; UINTN FvLength;
FwVolHeader = (EFI_FIRMWARE_VOLUME_HEADER*)Instance->RegionBaseAddress; FwVolHeader = (EFI_FIRMWARE_VOLUME_HEADER*)Instance->RegionBaseAddress;

View File

@ -17,36 +17,36 @@
typedef struct { typedef struct {
UINTN HasQos; // has QoS registers UINTN HasQos; // has QoS registers
UINTN MaxChip; // number of memory chips accessible UINTN MaxChip; // number of memory chips accessible
BOOLEAN IsUserCfg; BOOLEAN IsUserCfg;
UINT32 User0Cfg; UINT32 User0Cfg;
UINT32 User2Cfg; UINT32 User2Cfg;
UINT32 RefreshPeriod; UINT32 RefreshPeriod;
UINT32 CasLatency; UINT32 CasLatency;
UINT32 WriteLatency; UINT32 WriteLatency;
UINT32 t_mrd; UINT32 t_mrd;
UINT32 t_ras; UINT32 t_ras;
UINT32 t_rc; UINT32 t_rc;
UINT32 t_rcd; UINT32 t_rcd;
UINT32 t_rfc; UINT32 t_rfc;
UINT32 t_rp; UINT32 t_rp;
UINT32 t_rrd; UINT32 t_rrd;
UINT32 t_wr; UINT32 t_wr;
UINT32 t_wtr; UINT32 t_wtr;
UINT32 t_xp; UINT32 t_xp;
UINT32 t_xsr; UINT32 t_xsr;
UINT32 t_esr; UINT32 t_esr;
UINT32 MemoryCfg; UINT32 MemoryCfg;
UINT32 MemoryCfg2; UINT32 MemoryCfg2;
UINT32 MemoryCfg3; UINT32 MemoryCfg3;
UINT32 ChipCfg0; UINT32 ChipCfg0;
UINT32 ChipCfg1; UINT32 ChipCfg1;
UINT32 ChipCfg2; UINT32 ChipCfg2;
UINT32 ChipCfg3; UINT32 ChipCfg3;
UINT32 t_faw; UINT32 t_faw;
UINT32 t_data_en; UINT32 t_data_en;
UINT32 t_wdata_en; UINT32 t_wdata_en;
UINT32 ModeReg; UINT32 ModeReg;
UINT32 ExtModeReg; UINT32 ExtModeReg;
} PL341_DMC_CONFIG; } PL341_DMC_CONFIG;
@ -107,7 +107,7 @@ typedef struct {
#define DMC_MEMORY_CFG2_REG 0x4C #define DMC_MEMORY_CFG2_REG 0x4C
#define DMC_MEMORY_CFG3_REG 0x50 #define DMC_MEMORY_CFG3_REG 0x50
#define DMC_T_FAW_REG 0x54 #define DMC_T_FAW_REG 0x54
#define DMC_T_RDATA_EN 0x5C /* DFI read data enable register */ #define DMC_T_RDATA_EN 0x5C /* DFI read data enable register */
#define DMC_T_WRLAT_DIFF 0x60 /* DFI write data enable register */ #define DMC_T_WRLAT_DIFF 0x60 /* DFI write data enable register */
// Returns the state of the memory controller: // Returns the state of the memory controller:
@ -182,66 +182,66 @@ typedef struct {
// //
// PHY Register Settings // PHY Register Settings
// //
#define PHY_PTM_DFI_CLK_RANGE 0xE00 // DDR2 PHY PTM register offset #define PHY_PTM_DFI_CLK_RANGE 0xE00 // DDR2 PHY PTM register offset
#define PHY_PTM_IOTERM 0xE04 #define PHY_PTM_IOTERM 0xE04
#define PHY_PTM_PLL_EN 0xe0c #define PHY_PTM_PLL_EN 0xe0c
#define PHY_PTM_PLL_RANGE 0xe18 #define PHY_PTM_PLL_RANGE 0xe18
#define PHY_PTM_FEEBACK_DIV 0xe1c #define PHY_PTM_FEEBACK_DIV 0xe1c
#define PHY_PTM_RCLK_DIV 0xe20 #define PHY_PTM_RCLK_DIV 0xe20
#define PHY_PTM_LOCK_STATUS 0xe28 #define PHY_PTM_LOCK_STATUS 0xe28
#define PHY_PTM_INIT_DONE 0xe34 #define PHY_PTM_INIT_DONE 0xe34
#define PHY_PTM_ADDCOM_IOSTR_OFF 0xec8 #define PHY_PTM_ADDCOM_IOSTR_OFF 0xec8
#define PHY_PTM_SQU_TRAINING 0xee8 #define PHY_PTM_SQU_TRAINING 0xee8
#define PHY_PTM_SQU_STAT 0xeec #define PHY_PTM_SQU_STAT 0xeec
// ============================================================================== // ==============================================================================
// PIPD 40G DDR2/DDR3 PHY Register definitions // PIPD 40G DDR2/DDR3 PHY Register definitions
// //
// Offsets from APB Base Address // Offsets from APB Base Address
// ============================================================================== // ==============================================================================
#define PHY_BYTE0_OFFSET 0x000 #define PHY_BYTE0_OFFSET 0x000
#define PHY_BYTE1_OFFSET 0x200 #define PHY_BYTE1_OFFSET 0x200
#define PHY_BYTE2_OFFSET 0x400 #define PHY_BYTE2_OFFSET 0x400
#define PHY_BYTE3_OFFSET 0x600 #define PHY_BYTE3_OFFSET 0x600
#define PHY_BYTE0_COARSE_SQADJ_INIT 0x064 ;// Coarse squelch adjust #define PHY_BYTE0_COARSE_SQADJ_INIT 0x064 ;// Coarse squelch adjust
#define PHY_BYTE1_COARSE_SQADJ_INIT 0x264 ;// Coarse squelch adjust #define PHY_BYTE1_COARSE_SQADJ_INIT 0x264 ;// Coarse squelch adjust
#define PHY_BYTE2_COARSE_SQADJ_INIT 0x464 ;// Coarse squelch adjust #define PHY_BYTE2_COARSE_SQADJ_INIT 0x464 ;// Coarse squelch adjust
#define PHY_BYTE3_COARSE_SQADJ_INIT 0x664 ;// Coarse squelch adjust #define PHY_BYTE3_COARSE_SQADJ_INIT 0x664 ;// Coarse squelch adjust
#define PHY_BYTE0_IOSTR_OFFSET 0x004 #define PHY_BYTE0_IOSTR_OFFSET 0x004
#define PHY_BYTE1_IOSTR_OFFSET 0x204 #define PHY_BYTE1_IOSTR_OFFSET 0x204
#define PHY_BYTE2_IOSTR_OFFSET 0x404 #define PHY_BYTE2_IOSTR_OFFSET 0x404
#define PHY_BYTE3_IOSTR_OFFSET 0x604 #define PHY_BYTE3_IOSTR_OFFSET 0x604
;//-------------------------------------------------------------------------- ;//--------------------------------------------------------------------------
// DFI Clock ranges: // DFI Clock ranges:
#define PHY_PTM_DFI_CLK_RANGE_200MHz 0x0 #define PHY_PTM_DFI_CLK_RANGE_200MHz 0x0
#define PHY_PTM_DFI_CLK_RANGE_201_267MHz 0x1 #define PHY_PTM_DFI_CLK_RANGE_201_267MHz 0x1
#define PHY_PTM_DFI_CLK_RANGE_268_333MHz 0x2 #define PHY_PTM_DFI_CLK_RANGE_268_333MHz 0x2
#define PHY_PTM_DFI_CLK_RANGE_334_400MHz 0x3 #define PHY_PTM_DFI_CLK_RANGE_334_400MHz 0x3
#define PHY_PTM_DFI_CLK_RANGE_401_533MHz 0x4 #define PHY_PTM_DFI_CLK_RANGE_401_533MHz 0x4
#define PHY_PTM_DFI_CLK_RANGE_534_667MHz 0x5 #define PHY_PTM_DFI_CLK_RANGE_534_667MHz 0x5
#define PHY_PTM_DFI_CLK_RANGE_668_800MHz 0x6 #define PHY_PTM_DFI_CLK_RANGE_668_800MHz 0x6
#define PHY_PTM_DFI_CLK_RANGE_VAL PHY_PTM_DFI_CLK_RANGE_334_400MHz #define PHY_PTM_DFI_CLK_RANGE_VAL PHY_PTM_DFI_CLK_RANGE_334_400MHz
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
// PLL Range // PLL Range
#define PHY_PTM_PLL_RANGE_200_400MHz 0x0 // b0 = frequency >= 200 MHz and < 400 MHz #define PHY_PTM_PLL_RANGE_200_400MHz 0x0 // b0 = frequency >= 200 MHz and < 400 MHz
#define PHY_PTM_PLL_RANGE_400_800MHz 0x1 // b1 = frequency >= 400 MHz. #define PHY_PTM_PLL_RANGE_400_800MHz 0x1 // b1 = frequency >= 400 MHz.
#define PHY_PTM_FEEBACK_DIV_200_400MHz 0x0 // b0 = frequency >= 200 MHz and < 400 MHz #define PHY_PTM_FEEBACK_DIV_200_400MHz 0x0 // b0 = frequency >= 200 MHz and < 400 MHz
#define PHY_PTM_FEEBACK_DIV_400_800MHz 0x1 // b1 = frequency >= 400 MHz. #define PHY_PTM_FEEBACK_DIV_400_800MHz 0x1 // b1 = frequency >= 400 MHz.
#define PHY_PTM_REFCLK_DIV_200_400MHz 0x0 #define PHY_PTM_REFCLK_DIV_200_400MHz 0x0
#define PHY_PTM_REFCLK_DIV_400_800MHz 0x1 #define PHY_PTM_REFCLK_DIV_400_800MHz 0x1
#define TC_UIOLHNC_MASK 0x000003C0 #define TC_UIOLHNC_MASK 0x000003C0
#define TC_UIOLHNC_SHIFT 0x6 #define TC_UIOLHNC_SHIFT 0x6
@ -252,18 +252,18 @@ typedef struct {
#define TC_UIOHSTOP_SHIFT 0x0 #define TC_UIOHSTOP_SHIFT 0x0
#define TC_UIOLHXC_VALUE 0x4 #define TC_UIOLHXC_VALUE 0x4
#define PHY_PTM_SQU_TRAINING_ENABLE 0x1 #define PHY_PTM_SQU_TRAINING_ENABLE 0x1
#define PHY_PTM_SQU_TRAINING_DISABLE 0x0 #define PHY_PTM_SQU_TRAINING_DISABLE 0x0
//-------------------------------------- //--------------------------------------
// JEDEC DDR2 Device Register definitions and settings // JEDEC DDR2 Device Register definitions and settings
//-------------------------------------- //--------------------------------------
#define DDR_MODESET_SHFT 14 #define DDR_MODESET_SHFT 14
#define DDR_MODESET_MR 0x0 ;// Mode register #define DDR_MODESET_MR 0x0 ;// Mode register
#define DDR_MODESET_EMR 0x1 ;// Extended Mode register #define DDR_MODESET_EMR 0x1 ;// Extended Mode register
#define DDR_MODESET_EMR2 0x2 #define DDR_MODESET_EMR2 0x2
#define DDR_MODESET_EMR3 0x3 #define DDR_MODESET_EMR3 0x3
// //
// Extended Mode Register settings // Extended Mode Register settings
@ -290,21 +290,21 @@ typedef struct {
#define DDR_EMR_ODS_VAL DDR_EMR_ODS_FULL #define DDR_EMR_ODS_VAL DDR_EMR_ODS_FULL
#define DDR_SDRAM_START_ADDR 0x10000000 #define DDR_SDRAM_START_ADDR 0x10000000
// ---------------------------------------- // ----------------------------------------
// PHY IOTERM values // PHY IOTERM values
// ---------------------------------------- // ----------------------------------------
#define PHY_PTM_IOTERM_OFF 0x0 #define PHY_PTM_IOTERM_OFF 0x0
#define PHY_PTM_IOTERM_150R 0x1 #define PHY_PTM_IOTERM_150R 0x1
#define PHY_PTM_IOTERM_75R 0x2 #define PHY_PTM_IOTERM_75R 0x2
#define PHY_PTM_IOTERM_50R 0x3 #define PHY_PTM_IOTERM_50R 0x3
#define PHY_BYTE_IOSTR_60OHM 0x0 #define PHY_BYTE_IOSTR_60OHM 0x0
#define PHY_BYTE_IOSTR_40OHM 0x1 #define PHY_BYTE_IOSTR_40OHM 0x1
#define PHY_BYTE_IOSTR_30OHM 0x2 #define PHY_BYTE_IOSTR_30OHM 0x2
#define PHY_BYTE_IOSTR_30AOHM 0x3 #define PHY_BYTE_IOSTR_30AOHM 0x3
#define DDR2_MR_BURST_LENGTH_4 (2) #define DDR2_MR_BURST_LENGTH_4 (2)
#define DDR2_MR_BURST_LENGTH_8 (3) #define DDR2_MR_BURST_LENGTH_8 (3)

View File

@ -33,10 +33,10 @@ ASM_PFX(ArmPlatformPeiBootAction):
// IN UINTN MpId // IN UINTN MpId
// ); // );
ASM_PFX(ArmPlatformGetCorePosition): ASM_PFX(ArmPlatformGetCorePosition):
and r1, r0, #ARM_CORE_MASK and r1, r0, #ARM_CORE_MASK
and r0, r0, #ARM_CLUSTER_MASK and r0, r0, #ARM_CLUSTER_MASK
add r0, r1, r0, LSR #7 add r0, r1, r0, LSR #7
bx lr bx lr
//UINTN //UINTN
//ArmPlatformGetPrimaryCoreMpId ( //ArmPlatformGetPrimaryCoreMpId (

View File

@ -36,10 +36,10 @@ ArmPlatformPeiBootAction FUNCTION
// IN UINTN MpId // IN UINTN MpId
// ); // );
ArmPlatformGetCorePosition FUNCTION ArmPlatformGetCorePosition FUNCTION
and r1, r0, #ARM_CORE_MASK and r1, r0, #ARM_CORE_MASK
and r0, r0, #ARM_CLUSTER_MASK and r0, r0, #ARM_CLUSTER_MASK
add r0, r1, r0, LSR #7 add r0, r1, r0, LSR #7
bx lr bx lr
ENDFUNC ENDFUNC
//UINTN //UINTN

View File

@ -61,7 +61,7 @@ ArmPlatformStackSet FUNCTION
// Restore the Link register // Restore the Link register
mov lr, r7 mov lr, r7
beq ArmPlatformStackSetPrimary beq ArmPlatformStackSetPrimary
bne ArmPlatformStackSetSecondary bne ArmPlatformStackSetSecondary
ENDFUNC ENDFUNC
@ -73,19 +73,19 @@ ArmPlatformStackSet FUNCTION
// IN UINTN SecondaryStackSize // IN UINTN SecondaryStackSize
// ); // );
ArmPlatformStackSetPrimary FUNCTION ArmPlatformStackSetPrimary FUNCTION
mov r4, lr mov r4, lr
// Add stack of primary stack to StackBase // Add stack of primary stack to StackBase
add r0, r0, r2 add r0, r0, r2
// Compute SecondaryCoresCount * SecondaryCoreStackSize // Compute SecondaryCoresCount * SecondaryCoreStackSize
LoadConstantToReg (_gPcd_FixedAtBuild_PcdCoreCount, r1) LoadConstantToReg (_gPcd_FixedAtBuild_PcdCoreCount, r1)
ldr r1, [r1] ldr r1, [r1]
sub r1, #1 sub r1, #1
mul r3, r3, r1 mul r3, r3, r1
// Set Primary Stack ((StackBase + PrimaryStackSize) + (SecondaryCoresCount * SecondaryCoreStackSize)) // Set Primary Stack ((StackBase + PrimaryStackSize) + (SecondaryCoresCount * SecondaryCoreStackSize))
add sp, r0, r3 add sp, r0, r3
bx r4 bx r4
ENDFUNC ENDFUNC
@ -98,28 +98,28 @@ ArmPlatformStackSetPrimary FUNCTION
// IN UINTN SecondaryStackSize // IN UINTN SecondaryStackSize
// ); // );
ArmPlatformStackSetSecondary FUNCTION ArmPlatformStackSetSecondary FUNCTION
mov r4, lr mov r4, lr
mov sp, r0 mov sp, r0
// Get Core Position // Get Core Position
mov r0, r1 mov r0, r1
bl ArmPlatformGetCorePosition bl ArmPlatformGetCorePosition
mov r5, r0 mov r5, r0
// Get Primary Core Position // Get Primary Core Position
bl ArmPlatformGetPrimaryCoreMpId bl ArmPlatformGetPrimaryCoreMpId
bl ArmPlatformGetCorePosition bl ArmPlatformGetCorePosition
// Get Secondary Core Position. We should get consecutive secondary stack number from 1...(CoreCount-1) // Get Secondary Core Position. We should get consecutive secondary stack number from 1...(CoreCount-1)
cmp r5, r0 cmp r5, r0
subhi r5, r5, #1 subhi r5, r5, #1
add r5, r5, #1 add r5, r5, #1
// Compute top of the secondary stack // Compute top of the secondary stack
mul r3, r3, r5 mul r3, r3, r5
// Set stack // Set stack
add sp, sp, r3 add sp, sp, r3
bx r4 bx r4
ENDFUNC ENDFUNC

View File

@ -26,41 +26,41 @@
#define GET_TT_LARGEPAGE_ATTRIBUTES(TTEntry) ((TTEntry) & 0xFFFF) #define GET_TT_LARGEPAGE_ATTRIBUTES(TTEntry) ((TTEntry) & 0xFFFF)
// Section // Section
#define TT_DESCRIPTOR_SECTION_STRONGLY_ORDER (TT_DESCRIPTOR_SECTION_TYPE_SECTION | \ #define TT_DESCRIPTOR_SECTION_STRONGLY_ORDER (TT_DESCRIPTOR_SECTION_TYPE_SECTION | \
TT_DESCRIPTOR_SECTION_NG_GLOBAL | \ TT_DESCRIPTOR_SECTION_NG_GLOBAL | \
TT_DESCRIPTOR_SECTION_S_NOT_SHARED | \ TT_DESCRIPTOR_SECTION_S_NOT_SHARED | \
TT_DESCRIPTOR_SECTION_DOMAIN(0) | \ TT_DESCRIPTOR_SECTION_DOMAIN(0) | \
TT_DESCRIPTOR_SECTION_AP_RW_RW | \ TT_DESCRIPTOR_SECTION_AP_RW_RW | \
TT_DESCRIPTOR_SECTION_CACHE_POLICY_STRONGLY_ORDERED) TT_DESCRIPTOR_SECTION_CACHE_POLICY_STRONGLY_ORDERED)
// Small Page // Small Page
#define TT_DESCRIPTOR_PAGE_STRONGLY_ORDER (TT_DESCRIPTOR_PAGE_TYPE_PAGE | \ #define TT_DESCRIPTOR_PAGE_STRONGLY_ORDER (TT_DESCRIPTOR_PAGE_TYPE_PAGE | \
TT_DESCRIPTOR_PAGE_NG_GLOBAL | \ TT_DESCRIPTOR_PAGE_NG_GLOBAL | \
TT_DESCRIPTOR_PAGE_S_NOT_SHARED | \ TT_DESCRIPTOR_PAGE_S_NOT_SHARED | \
TT_DESCRIPTOR_PAGE_AP_RW_RW | \ TT_DESCRIPTOR_PAGE_AP_RW_RW | \
TT_DESCRIPTOR_PAGE_CACHE_POLICY_STRONGLY_ORDERED) TT_DESCRIPTOR_PAGE_CACHE_POLICY_STRONGLY_ORDERED)
// Large Page // Large Page
#define TT_DESCRIPTOR_LARGEPAGE_WRITE_BACK (TT_DESCRIPTOR_PAGE_TYPE_LARGEPAGE | \ #define TT_DESCRIPTOR_LARGEPAGE_WRITE_BACK (TT_DESCRIPTOR_PAGE_TYPE_LARGEPAGE | \
TT_DESCRIPTOR_PAGE_NG_GLOBAL | \ TT_DESCRIPTOR_PAGE_NG_GLOBAL | \
TT_DESCRIPTOR_PAGE_S_NOT_SHARED | \ TT_DESCRIPTOR_PAGE_S_NOT_SHARED | \
TT_DESCRIPTOR_PAGE_AP_RW_RW | \ TT_DESCRIPTOR_PAGE_AP_RW_RW | \
TT_DESCRIPTOR_SECTION_CACHE_POLICY_WRITE_BACK_ALLOC) TT_DESCRIPTOR_SECTION_CACHE_POLICY_WRITE_BACK_ALLOC)
#define TT_DESCRIPTOR_LARGEPAGE_WRITE_THROUGH (TT_DESCRIPTOR_PAGE_TYPE_LARGEPAGE | \ #define TT_DESCRIPTOR_LARGEPAGE_WRITE_THROUGH (TT_DESCRIPTOR_PAGE_TYPE_LARGEPAGE | \
TT_DESCRIPTOR_PAGE_NG_GLOBAL | \ TT_DESCRIPTOR_PAGE_NG_GLOBAL | \
TT_DESCRIPTOR_PAGE_S_NOT_SHARED | \ TT_DESCRIPTOR_PAGE_S_NOT_SHARED | \
TT_DESCRIPTOR_PAGE_AP_RW_RW | \ TT_DESCRIPTOR_PAGE_AP_RW_RW | \
TT_DESCRIPTOR_SECTION_CACHE_POLICY_WRITE_THROUGH_NO_ALLOC) TT_DESCRIPTOR_SECTION_CACHE_POLICY_WRITE_THROUGH_NO_ALLOC)
#define TT_DESCRIPTOR_LARGEPAGE_DEVICE (TT_DESCRIPTOR_PAGE_TYPE_LARGEPAGE | \ #define TT_DESCRIPTOR_LARGEPAGE_DEVICE (TT_DESCRIPTOR_PAGE_TYPE_LARGEPAGE | \
TT_DESCRIPTOR_PAGE_NG_GLOBAL | \ TT_DESCRIPTOR_PAGE_NG_GLOBAL | \
TT_DESCRIPTOR_PAGE_S_NOT_SHARED | \ TT_DESCRIPTOR_PAGE_S_NOT_SHARED | \
TT_DESCRIPTOR_PAGE_AP_RW_RW | \ TT_DESCRIPTOR_PAGE_AP_RW_RW | \
TT_DESCRIPTOR_SECTION_CACHE_POLICY_SHAREABLE_DEVICE) TT_DESCRIPTOR_SECTION_CACHE_POLICY_SHAREABLE_DEVICE)
#define TT_DESCRIPTOR_LARGEPAGE_UNCACHED (TT_DESCRIPTOR_PAGE_TYPE_LARGEPAGE | \ #define TT_DESCRIPTOR_LARGEPAGE_UNCACHED (TT_DESCRIPTOR_PAGE_TYPE_LARGEPAGE | \
TT_DESCRIPTOR_PAGE_NG_GLOBAL | \ TT_DESCRIPTOR_PAGE_NG_GLOBAL | \
TT_DESCRIPTOR_PAGE_S_NOT_SHARED | \ TT_DESCRIPTOR_PAGE_S_NOT_SHARED | \
TT_DESCRIPTOR_PAGE_AP_RW_RW | \ TT_DESCRIPTOR_PAGE_AP_RW_RW | \
TT_DESCRIPTOR_SECTION_CACHE_POLICY_NON_CACHEABLE) TT_DESCRIPTOR_SECTION_CACHE_POLICY_NON_CACHEABLE)
typedef enum { Level0, Level1,Level2 } MMU_LEVEL; typedef enum { Level0, Level1,Level2 } MMU_LEVEL;
@ -296,7 +296,7 @@ DumpMmuLevel (
UINT32 Index = 0, Count; UINT32 Index = 0, Count;
MMU_ENTRY LastEntry, Entry; MMU_ENTRY LastEntry, Entry;
ASSERT((Level == Level1) || (Level == Level2)); ASSERT((Level == Level1) || (Level == Level2));
if (Level == Level1) Count = 4096; if (Level == Level1) Count = 4096;
else Count = 256; else Count = 256;

View File

@ -40,7 +40,7 @@ _ModuleEntryPoint
mov r5, r0 mov r5, r0
// Is it the Primary Core ? // Is it the Primary Core ?
bl ArmPlatformIsPrimaryCore bl ArmPlatformIsPrimaryCore
// Get the top of the primary stacks (and the base of the secondary stacks) // Get the top of the primary stacks (and the base of the secondary stacks)
LoadConstantToReg (FixedPcdGet32(PcdCPUCoresStackBase), r1) LoadConstantToReg (FixedPcdGet32(PcdCPUCoresStackBase), r1)

View File

@ -69,13 +69,13 @@ _SetupStackPosition:
// //
// Calculate how much space there is between the top of the Firmware and the Top of the System Memory // Calculate how much space there is between the top of the Firmware and the Top of the System Memory
subs r0, r1, r3 // r0 = SystemMemoryTop - FdTop subs r0, r1, r3 // r0 = SystemMemoryTop - FdTop
bmi _SetupStack // Jump if negative (FdTop > SystemMemoryTop). Case when the PrePi is in XIP memory outside of the DRAM bmi _SetupStack // Jump if negative (FdTop > SystemMemoryTop). Case when the PrePi is in XIP memory outside of the DRAM
cmp r0, r4 cmp r0, r4
bge _SetupStack bge _SetupStack
// Case the top of stacks is the FdBaseAddress // Case the top of stacks is the FdBaseAddress
mov r1, r2 mov r1, r2
_SetupStack: _SetupStack:
// r1 contains the top of the stack (and the UEFI Memory) // r1 contains the top of the stack (and the UEFI Memory)
@ -109,18 +109,18 @@ _GetStackBase:
// Stack for the secondary core = Number of Cores - 1 // Stack for the secondary core = Number of Cores - 1
LoadConstantToReg (FixedPcdGet32(PcdCoreCount), r0) LoadConstantToReg (FixedPcdGet32(PcdCoreCount), r0)
sub r0, r0, #1 sub r0, r0, #1
LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecondaryStackSize), r1) LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecondaryStackSize), r1)
mul r1, r1, r0 mul r1, r1, r0
sub r10, r10, r1 sub r10, r10, r1
// r10 = The base of the MpCore Stacks (primary stack & secondary stacks) // r10 = The base of the MpCore Stacks (primary stack & secondary stacks)
mov r0, r10 mov r0, r10
mov r1, r8 mov r1, r8
//ArmPlatformStackSet(StackBase, MpId, PrimaryStackSize, SecondaryStackSize) //ArmPlatformStackSet(StackBase, MpId, PrimaryStackSize, SecondaryStackSize)
LoadConstantToReg (FixedPcdGet32(PcdCPUCorePrimaryStackSize), r2) LoadConstantToReg (FixedPcdGet32(PcdCPUCorePrimaryStackSize), r2)
LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecondaryStackSize), r3) LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecondaryStackSize), r3)
bl ASM_PFX(ArmPlatformStackSet) bl ASM_PFX(ArmPlatformStackSet)
// Is it the Primary Core ? // Is it the Primary Core ?
mov r0, r8 mov r0, r8

View File

@ -71,13 +71,13 @@ _SetupStackPosition
// //
// Calculate how much space there is between the top of the Firmware and the Top of the System Memory // Calculate how much space there is between the top of the Firmware and the Top of the System Memory
subs r0, r1, r3 // r0 = SystemMemoryTop - FdTop subs r0, r1, r3 // r0 = SystemMemoryTop - FdTop
bmi _SetupStack // Jump if negative (FdTop > SystemMemoryTop). Case when the PrePi is in XIP memory outside of the DRAM bmi _SetupStack // Jump if negative (FdTop > SystemMemoryTop). Case when the PrePi is in XIP memory outside of the DRAM
cmp r0, r4 cmp r0, r4
bge _SetupStack bge _SetupStack
// Case the top of stacks is the FdBaseAddress // Case the top of stacks is the FdBaseAddress
mov r1, r2 mov r1, r2
_SetupStack _SetupStack
// r1 contains the top of the stack (and the UEFI Memory) // r1 contains the top of the stack (and the UEFI Memory)
@ -111,18 +111,18 @@ _GetStackBase
// Stack for the secondary core = Number of Cores - 1 // Stack for the secondary core = Number of Cores - 1
LoadConstantToReg (FixedPcdGet32(PcdCoreCount), r0) LoadConstantToReg (FixedPcdGet32(PcdCoreCount), r0)
sub r0, r0, #1 sub r0, r0, #1
LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecondaryStackSize), r1) LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecondaryStackSize), r1)
mul r1, r1, r0 mul r1, r1, r0
sub r10, r10, r1 sub r10, r10, r1
// r10 = The base of the MpCore Stacks (primary stack & secondary stacks) // r10 = The base of the MpCore Stacks (primary stack & secondary stacks)
mov r0, r10 mov r0, r10
mov r1, r8 mov r1, r8
//ArmPlatformStackSet(StackBase, MpId, PrimaryStackSize, SecondaryStackSize) //ArmPlatformStackSet(StackBase, MpId, PrimaryStackSize, SecondaryStackSize)
LoadConstantToReg (FixedPcdGet32(PcdCPUCorePrimaryStackSize), r2) LoadConstantToReg (FixedPcdGet32(PcdCPUCorePrimaryStackSize), r2)
LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecondaryStackSize), r3) LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecondaryStackSize), r3)
bl ArmPlatformStackSet bl ArmPlatformStackSet
// Is it the Primary Core ? // Is it the Primary Core ?
mov r0, r8 mov r0, r8

View File

@ -72,10 +72,10 @@ ASM_PFX(copy_cpsr_into_spsr):
# Set the Non Secure Mode # Set the Non Secure Mode
ASM_PFX(set_non_secure_mode): ASM_PFX(set_non_secure_mode):
push { r1 } push { r1 }
and r0, r0, #0x1f @ Keep only the mode bits and r0, r0, #0x1f @ Keep only the mode bits
mrs r1, spsr @ Read the spsr mrs r1, spsr @ Read the spsr
bic r1, r1, #0x1f @ Clear all mode bits bic r1, r1, #0x1f @ Clear all mode bits
orr r1, r1, r0 orr r1, r1, r0
msr spsr_cxsf, r1 @ write back spsr (may have caused a mode switch) msr spsr_cxsf, r1 @ write back spsr (may have caused a mode switch)
isb isb
pop { r1 } pop { r1 }

View File

@ -67,7 +67,7 @@ set_non_secure_mode
and r0, r0, #0x1f // Keep only the mode bits and r0, r0, #0x1f // Keep only the mode bits
mrs r1, spsr // Read the spsr mrs r1, spsr // Read the spsr
bic r1, r1, #0x1f // Clear all mode bits bic r1, r1, #0x1f // Clear all mode bits
orr r1, r1, r0 orr r1, r1, r0
msr spsr_cxsf, r1 // write back spsr (may have caused a mode switch) msr spsr_cxsf, r1 // write back spsr (may have caused a mode switch)
isb isb
pop { r1 } pop { r1 }

View File

@ -51,7 +51,7 @@ _IdentifyCpu:
mov r9, r0 mov r9, r0
// Is it the Primary Core ? // Is it the Primary Core ?
bl ASM_PFX(ArmPlatformIsPrimaryCore) bl ASM_PFX(ArmPlatformIsPrimaryCore)
cmp r0, #1 cmp r0, #1
// Only the primary core initialize the memory (SMC) // Only the primary core initialize the memory (SMC)
beq _InitMem beq _InitMem

View File

@ -53,7 +53,7 @@ _IdentifyCpu
mov r9, r0 mov r9, r0
// Is it the Primary Core ? // Is it the Primary Core ?
bl ArmPlatformIsPrimaryCore bl ArmPlatformIsPrimaryCore
cmp r0, #1 cmp r0, #1
// Only the primary core initialize the memory (SMC) // Only the primary core initialize the memory (SMC)
beq _InitMem beq _InitMem

View File

@ -94,7 +94,7 @@
#define SP810_CTRL_BASE (ARM_EB_BOARD_PERIPH_BASE + 0x01000) #define SP810_CTRL_BASE (ARM_EB_BOARD_PERIPH_BASE + 0x01000)
// SYSTRCL Register // SYSTRCL Register
#define ARM_EB_SYSCTRL 0x10001000 #define ARM_EB_SYSCTRL 0x10001000
// Uart0 // Uart0
#define PL011_CONSOLE_UART_BASE (ARM_EB_BOARD_PERIPH_BASE + 0x09000) #define PL011_CONSOLE_UART_BASE (ARM_EB_BOARD_PERIPH_BASE + 0x09000)

View File

@ -29,8 +29,8 @@ GCC_ASM_IMPORT(ArmReadMpidr)
// ); // );
ASM_PFX(ArmPlatformIsPrimaryCore): ASM_PFX(ArmPlatformIsPrimaryCore):
// BeagleBoard has a single core. We must always return 1. // BeagleBoard has a single core. We must always return 1.
mov r0, #1 mov r0, #1
bx lr bx lr
ASM_PFX(ArmPlatformPeiBootAction): ASM_PFX(ArmPlatformPeiBootAction):
bx lr bx lr
@ -42,6 +42,6 @@ ASM_PFX(ArmPlatformPeiBootAction):
ASM_PFX(ArmPlatformGetPrimaryCoreMpId): ASM_PFX(ArmPlatformGetPrimaryCoreMpId):
// The BeagleBoard is a uniprocessor platform. The MPIDR of primary core is // The BeagleBoard is a uniprocessor platform. The MPIDR of primary core is
// always the MPIDR of the calling CPU. // always the MPIDR of the calling CPU.
b ASM_PFX(ArmReadMpidr) b ASM_PFX(ArmReadMpidr)
ASM_FUNCTION_REMOVE_IF_UNREFERENCED ASM_FUNCTION_REMOVE_IF_UNREFERENCED

View File

@ -22,7 +22,7 @@
EXPORT ArmPlatformIsPrimaryCore EXPORT ArmPlatformIsPrimaryCore
EXPORT ArmPlatformGetPrimaryCoreMpId EXPORT ArmPlatformGetPrimaryCoreMpId
IMPORT ArmReadMpidr IMPORT ArmReadMpidr
AREA BeagleBoardHelper, CODE, READONLY AREA BeagleBoardHelper, CODE, READONLY
@ -32,8 +32,8 @@
// ); // );
ArmPlatformIsPrimaryCore FUNCTION ArmPlatformIsPrimaryCore FUNCTION
// BeagleBoard has a single core. We must always return 1. // BeagleBoard has a single core. We must always return 1.
mov r0, #1 mov r0, #1
bx lr bx lr
ENDFUNC ENDFUNC
ArmPlatformPeiBootAction FUNCTION ArmPlatformPeiBootAction FUNCTION
@ -47,7 +47,7 @@ ArmPlatformPeiBootAction FUNCTION
ArmPlatformGetPrimaryCoreMpId FUNCTION ArmPlatformGetPrimaryCoreMpId FUNCTION
// The BeagleBoard is a uniprocessor platform. The MPIDR of primary core is // The BeagleBoard is a uniprocessor platform. The MPIDR of primary core is
// always the MPIDR of the calling CPU. // always the MPIDR of the calling CPU.
b ArmReadMpidr b ArmReadMpidr
ENDFUNC ENDFUNC
END END

View File

@ -89,12 +89,12 @@ typedef struct {
* *
* Parameters: * Parameters:
* *
* @param pobj: A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance. * @param pobj: A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.
* *
* Description: * Description:
* *
* This function starts a network interface. If the network interface successfully starts, then * This function starts a network interface. If the network interface successfully starts, then
* EFI_SUCCESS will be returned. * EFI_SUCCESS will be returned.
*/ */
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI

View File

@ -644,9 +644,9 @@ OutputData (
TextLine[Line++] = ConvertToTextLine(*Address++); TextLine[Line++] = ConvertToTextLine(*Address++);
break; break;
default: default:
AsciiPrint ("Width must be 1, 2, or 4!\n"); AsciiPrint ("Width must be 1, 2, or 4!\n");
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
} }

View File

@ -61,7 +61,7 @@ EblIpCmd (
goto Exit; goto Exit;
} }
AsciiPrint("IP Address: %d.%d.%d.%d\n", Ip.v4.Addr[0], Ip.v4.Addr[1],Ip.v4.Addr[2], Ip.v4.Addr[3]); AsciiPrint("IP Address: %d.%d.%d.%d\n", Ip.v4.Addr[0], Ip.v4.Addr[1],Ip.v4.Addr[2], Ip.v4.Addr[3]);
} else if ((Argv[1][0] == 'r') && (Argc == 2)) { } else if ((Argv[1][0] == 'r') && (Argc == 2)) {
// Get new address via dhcp // Get new address via dhcp

View File

@ -398,7 +398,7 @@ LIST_ENTRY BreakpointList;
/** /**
Insert Single Step in the SystemContext Insert Single Step in the SystemContext
@param SystemContext Register content at time of the exception @param SystemContext Register content at time of the exception
**/ **/
VOID VOID
AddSingleStep ( AddSingleStep (
@ -429,7 +429,7 @@ AddSingleStep (
/** /**
Remove Single Step in the SystemContext Remove Single Step in the SystemContext
@param SystemContext Register content at time of the exception @param SystemContext Register content at time of the exception
**/ **/
VOID VOID
RemoveSingleStep ( RemoveSingleStep (

View File

@ -272,7 +272,7 @@ CheckIsa (
VOID VOID
GdbSendTSignal ( GdbSendTSignal (
IN EFI_SYSTEM_CONTEXT SystemContext, IN EFI_SYSTEM_CONTEXT SystemContext,
IN UINT8 GdbExceptionType IN UINT8 GdbExceptionType
); );

View File

@ -316,7 +316,7 @@ WriteNthRegister (
// check if this is a valid Register Number // check if this is a valid Register Number
if ((RegNumber < 0) || (RegNumber >= MaxRegisterCount())) { if ((RegNumber < 0) || (RegNumber >= MaxRegisterCount())) {
SendError (GDB_EINVALIDREGNUM); SendError (GDB_EINVALIDREGNUM);
return; return;
} }
InBufPtr++; // skips the '=' character InBufPtr++; // skips the '=' character
@ -344,7 +344,7 @@ WriteGeneralRegisters (
// check to see if the buffer is the right size which is // check to see if the buffer is the right size which is
// 1 (for 'G') + 16 (for 16 registers) * 8 ( for 8 hex chars each) = 129 // 1 (for 'G') + 16 (for 16 registers) * 8 ( for 8 hex chars each) = 129
if (AsciiStrLen(InBuffer) != 129) { // 16 regs, 8 hex chars each, and the end '\0' (escape seq) if (AsciiStrLen(InBuffer) != 129) { // 16 regs, 8 hex chars each, and the end '\0' (escape seq)
//Bad message. Message is not the right length //Bad message. Message is not the right length
SendError (GDB_EBADBUFSIZE); SendError (GDB_EBADBUFSIZE);
return; return;
} }

View File

@ -285,7 +285,7 @@ WriteNthRegister (
// check if this is a valid Register Number // check if this is a valid Register Number
if ((RegNumber < 0) || (RegNumber >= MaxRegisterCount())) { if ((RegNumber < 0) || (RegNumber >= MaxRegisterCount())) {
SendError (GDB_EINVALIDREGNUM); SendError (GDB_EINVALIDREGNUM);
return; return;
} }
InBufPtr++; // skips the '=' character InBufPtr++; // skips the '=' character

View File

@ -160,11 +160,10 @@ FfsGetVolumeInfo (
/** /**
Get Fv image from the FV type file, then add FV & FV2 Hob. Get Fv image from the FV type file, then add FV & FV2 Hob.
@param FileHandle File handle of a Fv type file. @param FileHandle File handle of a Fv type file.
@retval EFI_NOT_FOUND FV image can't be found.
@retval EFI_NOT_FOUND FV image can't be found. @retval EFI_SUCCESS Successfully to process it.
@retval EFI_SUCCESS Successfully to process it.
**/ **/
EFI_STATUS EFI_STATUS
@ -177,12 +176,12 @@ FfsProcessFvFile (
/** /**
Search through every FV until you find a file of type FileType Search through every FV until you find a file of type FileType
@param FileType File handle of a Fv type file. @param FileType File handle of a Fv type file.
@param Volumehandle On succes Volume Handle of the match @param Volumehandle On succes Volume Handle of the match
@param FileHandle On success File Handle of the match @param FileHandle On success File Handle of the match
@retval EFI_NOT_FOUND FV image can't be found. @retval EFI_NOT_FOUND FV image can't be found.
@retval EFI_SUCCESS Successfully found FileType @retval EFI_SUCCESS Successfully found FileType
**/ **/
EFI_STATUS EFI_STATUS
@ -197,11 +196,11 @@ FfsAnyFvFindFirstFile (
/** /**
Get Fv image from the FV type file, then add FV & FV2 Hob. Get Fv image from the FV type file, then add FV & FV2 Hob.
@param FileHandle File handle of a Fv type file. @param FileHandle File handle of a Fv type file.
@retval EFI_NOT_FOUND FV image can't be found. @retval EFI_NOT_FOUND FV image can't be found.
@retval EFI_SUCCESS Successfully to process it. @retval EFI_SUCCESS Successfully to process it.
**/ **/
EFI_STATUS EFI_STATUS

View File

@ -91,4 +91,4 @@ struct _EMBEDDED_EXTERNAL_DEVICE {
extern EFI_GUID gEmbeddedExternalDeviceProtocolGuid; extern EFI_GUID gEmbeddedExternalDeviceProtocolGuid;
#endif // __EMBEDDED_EXTERNAL_DEVICE_H__ #endif // __EMBEDDED_EXTERNAL_DEVICE_H__

View File

@ -218,7 +218,7 @@ CheckIsa (
VOID VOID
GdbSendTSignal ( GdbSendTSignal (
IN EFI_SYSTEM_CONTEXT SystemContext, IN EFI_SYSTEM_CONTEXT SystemContext,
IN UINT8 GdbExceptionType IN UINT8 GdbExceptionType
); );

View File

@ -302,7 +302,7 @@ WriteNthRegister (
// check if this is a valid Register Number // check if this is a valid Register Number
if ((RegNumber < 0) || (RegNumber >= sizeof (gRegisterOffsets)/sizeof (UINTN))) { if ((RegNumber < 0) || (RegNumber >= sizeof (gRegisterOffsets)/sizeof (UINTN))) {
SendError (GDB_EINVALIDREGNUM); SendError (GDB_EINVALIDREGNUM);
return; return;
} }
InBufPtr++; // skips the '=' character InBufPtr++; // skips the '=' character
@ -330,7 +330,7 @@ WriteGeneralRegisters (
// check to see if the buffer is the right size which is // check to see if the buffer is the right size which is
// 1 (for 'G') + 16 (for 16 registers) * 8 ( for 8 hex chars each) = 129 // 1 (for 'G') + 16 (for 16 registers) * 8 ( for 8 hex chars each) = 129
if (AsciiStrLen(InBuffer) != 129) { // 16 regs, 8 hex chars each, and the end '\0' (escape seq) if (AsciiStrLen(InBuffer) != 129) { // 16 regs, 8 hex chars each, and the end '\0' (escape seq)
//Bad message. Message is not the right length //Bad message. Message is not the right length
SendError (GDB_EBADBUFSIZE); SendError (GDB_EBADBUFSIZE);
return; return;
} }

View File

@ -285,7 +285,7 @@ WriteNthRegister (
// check if this is a valid Register Number // check if this is a valid Register Number
if ((RegNumber < 0) || (RegNumber >= MaxRegisterCount())) { if ((RegNumber < 0) || (RegNumber >= MaxRegisterCount())) {
SendError (GDB_EINVALIDREGNUM); SendError (GDB_EINVALIDREGNUM);
return; return;
} }
InBufPtr++; // skips the '=' character InBufPtr++; // skips the '=' character

View File

@ -695,12 +695,12 @@ FfsGetVolumeInfo (
/** /**
Search through every FV until you find a file of type FileType Search through every FV until you find a file of type FileType
@param FileType File handle of a Fv type file. @param FileType File handle of a Fv type file.
@param Volumehandle On succes Volume Handle of the match @param Volumehandle On succes Volume Handle of the match
@param FileHandle On success File Handle of the match @param FileHandle On success File Handle of the match
@retval EFI_NOT_FOUND FV image can't be found. @retval EFI_NOT_FOUND FV image can't be found.
@retval EFI_SUCCESS Successfully found FileType @retval EFI_SUCCESS Successfully found FileType
**/ **/
EFI_STATUS EFI_STATUS
@ -743,11 +743,11 @@ FfsAnyFvFindFirstFile (
/** /**
Get Fv image from the FV type file, then add FV & FV2 Hob. Get Fv image from the FV type file, then add FV & FV2 Hob.
@param FileHandle File handle of a Fv type file. @param FileHandle File handle of a Fv type file.
@retval EFI_NOT_FOUND FV image can't be found. @retval EFI_NOT_FOUND FV image can't be found.
@retval EFI_SUCCESS Successfully to process it. @retval EFI_SUCCESS Successfully to process it.
**/ **/
EFI_STATUS EFI_STATUS

View File

@ -397,49 +397,49 @@ EFI_STATUS
EFIAPI EFIAPI
LcdGraphicsBlt ( LcdGraphicsBlt (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
IN UINTN SourceX, IN UINTN SourceX,
IN UINTN SourceY, IN UINTN SourceY,
IN UINTN DestinationX, IN UINTN DestinationX,
IN UINTN DestinationY, IN UINTN DestinationY,
IN UINTN Width, IN UINTN Width,
IN UINTN Height, IN UINTN Height,
IN UINTN Delta OPTIONAL // Number of BYTES in a row of the BltBuffer IN UINTN Delta OPTIONAL // Number of BYTES in a row of the BltBuffer
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;
LCD_INSTANCE *Instance; LCD_INSTANCE *Instance;
Instance = LCD_INSTANCE_FROM_GOP_THIS(This); Instance = LCD_INSTANCE_FROM_GOP_THIS(This);
if (!mDisplayInitialized) { if (!mDisplayInitialized) {
InitializeDisplay (Instance); InitializeDisplay (Instance);
} }
switch (BltOperation) { switch (BltOperation) {
case EfiBltVideoFill: case EfiBltVideoFill:
Status = BltVideoFill (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta); Status = BltVideoFill (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);
break; break;
case EfiBltVideoToBltBuffer: case EfiBltVideoToBltBuffer:
Status = BltVideoToBltBuffer (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta); Status = BltVideoToBltBuffer (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);
break; break;
case EfiBltBufferToVideo: case EfiBltBufferToVideo:
Status = BltBufferToVideo (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta); Status = BltBufferToVideo (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);
break; break;
case EfiBltVideoToVideo: case EfiBltVideoToVideo:
Status = BltVideoToVideo (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta); Status = BltVideoToVideo (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);
break; break;
case EfiGraphicsOutputBltOperationMax: case EfiGraphicsOutputBltOperationMax:
default: default:
DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: Invalid Operation\n")); DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: Invalid Operation\n"));
Status = EFI_INVALID_PARAMETER; Status = EFI_INVALID_PARAMETER;
break; break;
} }
return Status; return Status;
} }

View File

@ -273,24 +273,24 @@ EFI_STATUS
EFIAPI EFIAPI
LcdGraphicsQueryMode ( LcdGraphicsQueryMode (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN UINT32 ModeNumber, IN UINT32 ModeNumber,
OUT UINTN *SizeOfInfo, OUT UINTN *SizeOfInfo,
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
) )
{ {
LCD_INSTANCE *Instance; LCD_INSTANCE *Instance;
Instance = LCD_INSTANCE_FROM_GOP_THIS(This); Instance = LCD_INSTANCE_FROM_GOP_THIS(This);
if (!mDisplayInitialized) { if (!mDisplayInitialized) {
InitializeDisplay (Instance); InitializeDisplay (Instance);
} }
// Error checking // Error checking
if ( (This == NULL) || (Info == NULL) || (SizeOfInfo == NULL) || (ModeNumber >= This->Mode->MaxMode) ) { if ( (This == NULL) || (Info == NULL) || (SizeOfInfo == NULL) || (ModeNumber >= This->Mode->MaxMode) ) {
DEBUG((DEBUG_ERROR, "LcdGraphicsQueryMode: ERROR - For mode number %d : Invalid Parameter.\n", ModeNumber )); DEBUG((DEBUG_ERROR, "LcdGraphicsQueryMode: ERROR - For mode number %d : Invalid Parameter.\n", ModeNumber ));
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
*Info = AllocateCopyPool(sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION), &Instance->ModeInfo); *Info = AllocateCopyPool(sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION), &Instance->ModeInfo);
if (*Info == NULL) { if (*Info == NULL) {
@ -311,12 +311,12 @@ EFI_STATUS
EFIAPI EFIAPI
LcdGraphicsSetMode ( LcdGraphicsSetMode (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN UINT32 ModeNumber IN UINT32 ModeNumber
) )
{ {
LCD_INSTANCE *Instance; LCD_INSTANCE *Instance;
Instance = LCD_INSTANCE_FROM_GOP_THIS(This); Instance = LCD_INSTANCE_FROM_GOP_THIS(This);
if (ModeNumber >= Instance->Mode.MaxMode) { if (ModeNumber >= Instance->Mode.MaxMode) {
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
@ -350,51 +350,51 @@ LcdGraphicsOutputDxeInitialize (
goto EXIT; goto EXIT;
} }
// Install the Graphics Output Protocol and the Device Path // Install the Graphics Output Protocol and the Device Path
Status = gBS->InstallMultipleProtocolInterfaces( Status = gBS->InstallMultipleProtocolInterfaces(
&Instance->Handle, &Instance->Handle,
&gEfiGraphicsOutputProtocolGuid, &Instance->Gop, &gEfiGraphicsOutputProtocolGuid, &Instance->Gop,
&gEfiDevicePathProtocolGuid, &Instance->DevicePath, &gEfiDevicePathProtocolGuid, &Instance->DevicePath,
NULL NULL
); );
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
DEBUG((DEBUG_ERROR, "GraphicsOutputDxeInitialize: Can not install the protocol. Exit Status=%r\n", Status)); DEBUG((DEBUG_ERROR, "GraphicsOutputDxeInitialize: Can not install the protocol. Exit Status=%r\n", Status));
goto EXIT; goto EXIT;
} }
// Register for an ExitBootServicesEvent // Register for an ExitBootServicesEvent
// When ExitBootServices starts, this function here will make sure that the graphics driver will shut down properly, // When ExitBootServices starts, this function here will make sure that the graphics driver will shut down properly,
// i.e. it will free up all allocated memory and perform any necessary hardware re-configuration. // i.e. it will free up all allocated memory and perform any necessary hardware re-configuration.
/*Status = gBS->CreateEvent ( /*Status = gBS->CreateEvent (
EVT_SIGNAL_EXIT_BOOT_SERVICES, EVT_SIGNAL_EXIT_BOOT_SERVICES,
TPL_NOTIFY, TPL_NOTIFY,
LcdGraphicsExitBootServicesEvent, NULL, LcdGraphicsExitBootServicesEvent, NULL,
&Instance->ExitBootServicesEvent &Instance->ExitBootServicesEvent
); );
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
DEBUG((DEBUG_ERROR, "GraphicsOutputDxeInitialize: Can not install the ExitBootServicesEvent handler. Exit Status=%r\n", Status)); DEBUG((DEBUG_ERROR, "GraphicsOutputDxeInitialize: Can not install the ExitBootServicesEvent handler. Exit Status=%r\n", Status));
goto EXIT_ERROR_UNINSTALL_PROTOCOL; goto EXIT_ERROR_UNINSTALL_PROTOCOL;
}*/ }*/
// To get here, everything must be fine, so just exit // To get here, everything must be fine, so just exit
goto EXIT; goto EXIT;
//EXIT_ERROR_UNINSTALL_PROTOCOL: //EXIT_ERROR_UNINSTALL_PROTOCOL:
/* The following function could return an error message, /* The following function could return an error message,
* however, to get here something must have gone wrong already, * however, to get here something must have gone wrong already,
* so preserve the original error, i.e. don't change * so preserve the original error, i.e. don't change
* the Status variable, even it fails to uninstall the protocol. * the Status variable, even it fails to uninstall the protocol.
*/ */
/* gBS->UninstallMultipleProtocolInterfaces ( /* gBS->UninstallMultipleProtocolInterfaces (
Instance->Handle, Instance->Handle,
&gEfiGraphicsOutputProtocolGuid, &Instance->Gop, // Uninstall Graphics Output protocol &gEfiGraphicsOutputProtocolGuid, &Instance->Gop, // Uninstall Graphics Output protocol
&gEfiDevicePathProtocolGuid, &Instance->DevicePath, // Uninstall device path &gEfiDevicePathProtocolGuid, &Instance->DevicePath, // Uninstall device path
NULL NULL
);*/ );*/
EXIT: EXIT:
return Status; return Status;
} }

View File

@ -89,15 +89,15 @@ EFI_STATUS
EFIAPI EFIAPI
LcdGraphicsBlt ( LcdGraphicsBlt (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This, IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
IN UINTN SourceX, IN UINTN SourceX,
IN UINTN SourceY, IN UINTN SourceY,
IN UINTN DestinationX, IN UINTN DestinationX,
IN UINTN DestinationY, IN UINTN DestinationY,
IN UINTN Width, IN UINTN Width,
IN UINTN Height, IN UINTN Height,
IN UINTN Delta OPTIONAL // Number of BYTES in a row of the BltBuffer IN UINTN Delta OPTIONAL // Number of BYTES in a row of the BltBuffer
); );
// HW registers // HW registers