Skip to content

Commit

Permalink
ARM Packages: Replace tabs by spaces for indentation
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: Olivier Martin <[email protected]>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15901 6f19259b-4bc3-4df7-8a09-765794883524
  • Loading branch information
ronald-cron-arm authored and oliviermartin committed Aug 26, 2014
1 parent 5c670b2 commit 91c38d4
Show file tree
Hide file tree
Showing 52 changed files with 484 additions and 485 deletions.
26 changes: 13 additions & 13 deletions ArmPkg/Include/Guid/ArmMpCoreInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ typedef struct {
} ARM_CORE_INFO;

typedef struct{
UINT64 Signature;
UINT32 Length;
UINT32 Revision;
UINT64 OemId;
UINT64 OemTableId;
UINTN OemRevision;
UINTN CreatorId;
UINTN CreatorRevision;
EFI_GUID Identifier;
UINTN DataLen;
UINT64 Signature;
UINT32 Length;
UINT32 Revision;
UINT64 OemId;
UINT64 OemTableId;
UINTN OemRevision;
UINTN CreatorId;
UINTN CreatorRevision;
EFI_GUID Identifier;
UINTN DataLen;
} ARM_PROCESSOR_TABLE_HEADER;

typedef struct {
ARM_PROCESSOR_TABLE_HEADER Header;
UINTN NumberOfEntries;
ARM_CORE_INFO *ArmCpus;
ARM_PROCESSOR_TABLE_HEADER Header;
UINTN NumberOfEntries;
ARM_CORE_INFO *ArmCpus;
} ARM_PROCESSOR_TABLE;


Expand Down
2 changes: 1 addition & 1 deletion ArmPkg/Library/ArmLib/Arm11/Arm11Support.S
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ GCC_ASM_EXPORT(ArmDisableInterrupts)
GCC_ASM_EXPORT (ArmEnableVFP)

Arm11PartNumberMask: .word 0xFFF0
Arm11PartNumber: .word 0xB020
Arm11PartNumber: .word 0xB020

.set DC_ON, (0x1<<2)
.set IC_ON, (0x1<<12)
Expand Down
2 changes: 1 addition & 1 deletion ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ ArmCallSEV

ArmReadSctlr
mrc p15, 0, r0, c1, c0, 0 // Read SCTLR into R0 (Read control register configuration data)
bx lr
bx lr


ArmReadCpuActlr
Expand Down
2 changes: 1 addition & 1 deletion ArmPkg/Library/CompilerIntrinsicsLib/Arm/uread.asm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ __aeabi_uread4
; );
;
__aeabi_uread8
mov r3, r0
mov r3, r0

ldrb r1, [r3]
ldrb r2, [r3, #1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ DefaultExceptionHandler (
UINT32 PcAdjust = 0;

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

DEBUG_CODE_BEGIN ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
#define SP810_CTRL_BASE (ARM_EB_BOARD_PERIPH_BASE + 0x01000)

// SYSTRCL Register
#define ARM_EB_SYSCTRL 0x10001000
#define ARM_EB_SYSCTRL 0x10001000

// Dynamic Memory Controller Base
#define ARM_EB_DMC_BASE 0x10018000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ GCC_ASM_IMPORT(_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask)
// IN UINTN MpId
// );
ASM_PFX(ArmPlatformGetCorePosition):
and r1, r0, #ARM_CORE_MASK
and r0, r0, #ARM_CLUSTER_MASK
add r0, r1, r0, LSR #7
bx lr
and r1, r0, #ARM_CORE_MASK
and r0, r0, #ARM_CLUSTER_MASK
add r0, r1, r0, LSR #7
bx lr

//UINTN
//ArmPlatformIsPrimaryCore (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
// IN UINTN MpId
// );
ArmPlatformGetCorePosition FUNCTION
and r1, r0, #ARM_CORE_MASK
and r0, r0, #ARM_CLUSTER_MASK
add r0, r1, r0, LSR #7
bx lr
and r1, r0, #ARM_CORE_MASK
and r0, r0, #ARM_CLUSTER_MASK
add r0, r1, r0, LSR #7
bx lr
ENDFUNC

//UINTN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ ArmFastbootPlatformInit (
// Read the GPT partition entry array into memory so we can get the partition names
Status = ReadPartitionEntries (FlashBlockIo, &PartitionEntries);
if (EFI_ERROR (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
return EFI_SUCCESS;
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
return EFI_SUCCESS;
}

// Get every Block IO protocol instance installed in the system
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ ASM_PFX(ArmPlatformPeiBootAction):
// IN UINTN MpId
// );
ASM_PFX(ArmPlatformGetCorePosition):
and r1, r0, #ARM_CORE_MASK
and r0, r0, #ARM_CLUSTER_MASK
add r0, r1, r0, LSR #7
bx lr
and r1, r0, #ARM_CORE_MASK
and r0, r0, #ARM_CLUSTER_MASK
add r0, r1, r0, LSR #7
bx lr

//UINTN
//ArmPlatformIsPrimaryCore (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ ArmPlatformPeiBootAction FUNCTION
// IN UINTN MpId
// );
ArmPlatformGetCorePosition FUNCTION
and r1, r0, #ARM_CORE_MASK
and r0, r0, #ARM_CLUSTER_MASK
add r0, r1, r0, LSR #7
bx lr
and r1, r0, #ARM_CORE_MASK
and r0, r0, #ARM_CLUSTER_MASK
add r0, r1, r0, LSR #7
bx lr
ENDFUNC

//UINTN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
ArmPlatformGetPrimaryCoreMpId FUNCTION
LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r0)
ldr r0, [r0]
bx lr
bx lr
ENDFUNC

//UINTN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ ASM_PFX(ArmPlatformIsPrimaryCore):
ldrh w1, [x1]
cmp w0, w1
b.ne 1f
mov x0, #1
mov x0, #1
ret
1:
mov x0, #0
mov x0, #0
ret

//UINTN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ ASM_PFX(ArmPlatformIsPrimaryCore):
cmp r0, r1
moveq r0, #1
movne r0, #0
bx lr
bx lr

//UINTN
//ArmPlatformGetCorePosition (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ ArmPlatformIsPrimaryCore FUNCTION
cmp r0, r1
moveq r0, #1
movne r0, #0
bx lr
bx lr
ENDFUNC

//UINTN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,23 @@ INPUT(./boot3f.o)

SECTIONS
{
. = PHYS_OFFSET;
. = PHYS_OFFSET;
#ifdef BOOT1
.text : { boot1.o }
.text : { boot1.o }
#endif

#ifdef BOOT2
.text : { boot2.o }
.text : { boot2.o }
#endif

#ifdef BOOT3
.text : { boot3.o }
.text : { boot3.o }
#endif

#ifdef BOOT3F
.text : { boot3f.o }
.text : { boot3f.o }
#endif

.data : { *(.data) }
.bss : { *(.bss) }
.data : { *(.data) }
.bss : { *(.bss) }
}
6 changes: 3 additions & 3 deletions ArmPlatformPkg/Bds/Bds.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ StartDefaultBootOnTimeout (
}
// Discard key in the buffer
do {
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
} while(!EFI_ERROR(Status));
gBS->CloseEvent (WaitList[0]);
Print(L"\n\r");
Expand All @@ -408,8 +408,8 @@ StartDefaultBootOnTimeout (
UnicodeSPrint (BootVariableName, 9 * sizeof(CHAR16), L"Boot%04X", BootOrder[Index]);
Status = BdsStartBootOption (BootVariableName);
if(!EFI_ERROR(Status)){
// Boot option returned successfully, hence don't need to start next boot option
break;
// Boot option returned successfully, hence don't need to start next boot option
break;
}
// In case of success, we should not return from this call.
}
Expand Down
100 changes: 50 additions & 50 deletions ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputBlt.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,21 +778,21 @@ EFI_STATUS
EFIAPI
LcdGraphicsBlt (
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
IN UINTN SourceX,
IN UINTN SourceY,
IN UINTN DestinationX,
IN UINTN DestinationY,
IN UINTN Width,
IN UINTN Height,
IN UINTN Delta OPTIONAL // Number of BYTES in a row of the BltBuffer
IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
IN UINTN SourceX,
IN UINTN SourceY,
IN UINTN DestinationX,
IN UINTN DestinationY,
IN UINTN Width,
IN UINTN Height,
IN UINTN Delta OPTIONAL // Number of BYTES in a row of the BltBuffer
)
{
EFI_STATUS Status;
UINT32 HorizontalResolution;
EFI_STATUS Status;
UINT32 HorizontalResolution;
UINT32 VerticalResolution;
LCD_INSTANCE* Instance;
LCD_INSTANCE* Instance;

Instance = LCD_INSTANCE_FROM_GOP_THIS(This);

Expand All @@ -811,72 +811,72 @@ LcdGraphicsBlt (
BltOperation,DestinationX,DestinationY,Width,Height,HorizontalResolution,VerticalResolution));

// 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" ));
Status = EFI_INVALID_PARAMETER;
goto EXIT;
}

if ((BltOperation == EfiBltVideoFill) || (BltOperation == EfiBltBufferToVideo) || (BltOperation == EfiBltVideoToBltBuffer)) {
ASSERT( BltBuffer != NULL);
}

/*if ((DestinationX >= HorizontalResolution) || (DestinationY >= VerticalResolution)) {
DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: ERROR - Invalid destination.\n" ));
Status = EFI_INVALID_PARAMETER;
goto EXIT;
}*/

// 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)) {
Status = EFI_INVALID_PARAMETER;
goto EXIT;
}

if ((BltOperation == EfiBltVideoFill) || (BltOperation == EfiBltBufferToVideo) || (BltOperation == EfiBltVideoToBltBuffer)) {
ASSERT( BltBuffer != NULL);
}

/*if ((DestinationX >= HorizontalResolution) || (DestinationY >= VerticalResolution)) {
DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: ERROR - Invalid destination.\n" ));
Status = EFI_INVALID_PARAMETER;
goto EXIT;
}*/

// 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 ((SourceY + Height > VerticalResolution) || (SourceX + Width > HorizontalResolution)) {
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, " - SourceX=%d + Width=%d > HorizontalResolution=%d.\n", SourceX, Width, HorizontalResolution ));
Status = EFI_INVALID_PARAMETER;
goto EXIT;
}
}
}

// 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 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 ((DestinationY + Height > VerticalResolution) || (DestinationX + Width > HorizontalResolution)) {
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, " - DestinationX=%d + Width=%d > HorizontalResolution=%d.\n", DestinationX, Width, HorizontalResolution ));
Status = EFI_INVALID_PARAMETER;
goto EXIT;
}
}
}

//
// Perform the Block Transfer Operation
//

switch (BltOperation) {
case EfiBltVideoFill:
Status = BltVideoFill (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);
break;
switch (BltOperation) {
case EfiBltVideoFill:
Status = BltVideoFill (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);
break;

case EfiBltVideoToBltBuffer:
Status = BltVideoToBltBuffer (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);
case EfiBltVideoToBltBuffer:
Status = BltVideoToBltBuffer (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);
break;

case EfiBltBufferToVideo:
Status = BltBufferToVideo (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);
break;
break;

case EfiBltVideoToVideo:
Status = BltVideoToVideo (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);
break;
case EfiBltVideoToVideo:
Status = BltVideoToVideo (This, BltBuffer, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);
break;

case EfiGraphicsOutputBltOperationMax:
default:
DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: Invalid Operation\n"));
Status = EFI_INVALID_PARAMETER;
break;
}
case EfiGraphicsOutputBltOperationMax:
default:
DEBUG((DEBUG_ERROR, "LcdGraphicsBlt: Invalid Operation\n"));
Status = EFI_INVALID_PARAMETER;
break;
}

EXIT:
return Status;
return Status;
}
Loading

0 comments on commit 91c38d4

Please sign in to comment.