ARM Packages: Fixed coding style and typos

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@14179 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
oliviermartin 2013-03-12 00:45:29 +00:00
parent 8274521330
commit 6f711615ba
8 changed files with 276 additions and 279 deletions

View File

@ -1,6 +1,6 @@
/** @file
*
* Copyright (c) 2011-2012, ARM Limited. All rights reserved.
* Copyright (c) 2011-2013, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License

View File

@ -155,5 +155,5 @@ PrimaryMain (
SecCoreData.StackSize = (TemporaryRamBase + TemporaryRamSize) - (UINTN)SecCoreData.StackBase;
// Jump to PEI core entry point
(PeiCoreEntryPoint)(&SecCoreData, PpiList);
PeiCoreEntryPoint (&SecCoreData, PpiList);
}

View File

@ -75,7 +75,6 @@ GdbStubEntry (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_STATUS Status;
EFI_DEBUG_SUPPORT_PROTOCOL *DebugSupport;
@ -85,7 +84,6 @@ GdbStubEntry (
UINTN Processor;
BOOLEAN IsaSupported;
Status = EfiGetSystemConfigurationTable (&gEfiDebugImageInfoTableGuid, (VOID **)&gDebugImageTableHeader);
if (EFI_ERROR (Status)) {
gDebugImageTableHeader = NULL;
@ -139,7 +137,6 @@ GdbStubEntry (
InitializeProcessor ();
for (Processor = 0; Processor <= gMaxProcessorIndex; Processor++) {
for (Index = 0; Index < MaxEfiException (); Index++) {
Status = DebugSupport->RegisterExceptionCallback (DebugSupport, Processor, GdbExceptionHandler, gExceptionType[Index].Exception);
ASSERT_EFI_ERROR (Status);
@ -165,7 +162,7 @@ GdbStubEntry (
ASSERT_EFI_ERROR (Status);
//
// Register for protocol notifactions on this event
// Register for protocol notifications on this event
//
Status = gBS->RegisterProtocolNotify (
&gEfiLoadedImageProtocolGuid,
@ -182,8 +179,6 @@ GdbStubEntry (
return EFI_SUCCESS;
}
/**
Transfer length bytes of input buffer, starting at Address, to memory.
@ -490,7 +485,6 @@ SendNotSupported (
}
/**
Send the T signal with the given exception type (in gdb order) and possibly with n:r pairs related to the watchpoints
@ -596,11 +590,11 @@ ConvertEFItoGDBtype (
IN EFI_EXCEPTION_TYPE EFIExceptionType
)
{
UINTN i;
UINTN Index;
for (i=0; i < MaxEfiException() ; i++) {
if (gExceptionType[i].Exception == EFIExceptionType) {
return gExceptionType[i].SignalNo;
for (Index = 0; Index < MaxEfiException () ; Index++) {
if (gExceptionType[Index].Exception == EFIExceptionType) {
return gExceptionType[Index].SignalNo;
}
}
return GDB_SIGTRAP; // this is a GDB trap
@ -801,7 +795,7 @@ gXferObjectReadResponse (
CHAR8 Char;
UINTN Count;
// responce starts with 'm' or 'l' if it is the end
// Response starts with 'm' or 'l' if it is the end
OutBufPtr = gOutBuffer;
*OutBufPtr++ = Type;
Count = 1;
@ -989,12 +983,11 @@ PeCoffLoaderGetDebuggerInfo (
}
/**
Process "qXfer:object:read:annex:offset,length" request.
Returns an XML document that contains loaded libraries. In our case it is
infomration in the EFI Debug Inmage Table converted into an XML document.
information in the EFI Debug Image Table converted into an XML document.
GDB will call with an arbitrary length (it can't know the real length and
will reply with chunks of XML that are easy for us to deal with. Gdb will
@ -1006,12 +999,12 @@ PeCoffLoaderGetDebuggerInfo (
<library name="/a/l/f/f.dll"><segment address="0x30000000"/></library>
</library-list>
Since we can not allocate memory in interupt context this module has
Since we can not allocate memory in interrupt context this module has
assumptions about how it will get called:
1) Length will generally be max remote packet size (big enough)
2) First Offset of an XML document read needs to be 0
3) This code will return back small chunks of the XML document on every read.
Each subseqent call will ask for the next availble part of the document.
Each subsequent call will ask for the next available part of the document.
Note: The only variable size element in the XML is:
" <library name=\"%s\"><segment address=\"%p\"/></library>\n" and it is
@ -1039,6 +1032,7 @@ QxferLibrary (
// Force a retry from the beginning
gPacketqXferLibraryOffset = 0;
return;
}
@ -1254,7 +1248,7 @@ GdbPeriodicCallBack (
if (gCtrlCBreakFlag) {
//
// Update the context to force a single step trap when we exit the GDB
// stub. This will trasfer control to GdbExceptionHandler () and let
// stub. This will transfer control to GdbExceptionHandler () and let
// us break into the program. We don't want to break into the GDB stub.
//
AddSingleStep (SystemContext);

View File

@ -63,7 +63,7 @@ extern CONST CHAR8 mHexToStr[];
#define GDB_SIGTRAP 5 // Trace Trap (Breakpoint and SingleStep)
#define GDB_SIGEMT 7 // Emulator Trap
#define GDB_SIGFPE 8 // Floating point exception
#define GDB_SIGSEGV 11 // Setgment violation, page fault
#define GDB_SIGSEGV 11 // Segment violation, page fault
//

View File

@ -1,6 +1,6 @@
/** @file
*
* Copyright (c) 2011-2012, ARM Limited. All rights reserved.
* Copyright (c) 2011-2013, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License
@ -40,26 +40,26 @@ PrintOCR (
IN UINT32 Ocr
)
{
UINTN minv;
UINTN maxv;
UINTN volts;
UINTN loop;
UINTN MinV;
UINTN MaxV;
UINTN Volts;
UINTN Loop;
minv = 36; // 3.6
maxv = 20; // 2.0
volts = 20; // 2.0
MinV = 36; // 3.6
MaxV = 20; // 2.0
Volts = 20; // 2.0
// The MMC register bits [23:8] indicate the working range of the card
for (loop = 8; loop < 24; loop++) {
if (Ocr & (1 << loop)) {
if (minv > volts) minv = volts;
if (maxv < volts) maxv = volts + 1;
for (Loop = 8; Loop < 24; Loop++) {
if (Ocr & (1 << Loop)) {
if (MinV > Volts) MinV = Volts;
if (MaxV < Volts) MaxV = Volts + 1;
}
volts = volts + 1;
Volts = Volts + 1;
}
DEBUG ((EFI_D_ERROR, "- PrintOCR Ocr (0x%X)\n",Ocr));
DEBUG((EFI_D_ERROR, "\t- Card operating voltage: %d.%d to %d.%d\n", minv/10, minv % 10, maxv/10, maxv % 10));
DEBUG ((EFI_D_ERROR, "\t- Card operating voltage: %d.%d to %d.%d\n", MinV/10, MinV % 10, MaxV/10, MaxV % 10));
if (((Ocr >> 29) & 3) == 0) {
DEBUG ((EFI_D_ERROR, "\t- AccessMode: Byte Mode\n"));
} else {
@ -86,8 +86,10 @@ VOID PrintCID (
}
#if !defined(MDEPKG_NDEBUG)
CONST CHAR8* mStrUnit[] = { "100kbit/s","1Mbit/s","10Mbit/s","100MBit/s","Unkbown","Unkbown","Unkbown","Unkbown" };
CONST CHAR8* mStrValue[] = { "1.0","1.2","1.3","1.5","2.0","2.5","3.0","3.5","4.0","4.5","5.0","Unknown","Unknown","Unknown","Unknown" };
CONST CHAR8* mStrUnit[] = { "100kbit/s", "1Mbit/s", "10Mbit/s", "100MBit/s",
"Unknown", "Unknown", "Unknown", "Unknown" };
CONST CHAR8* mStrValue[] = { "1.0", "1.2", "1.3", "1.5", "2.0", "2.5", "3.0", "3.5", "4.0", "4.5", "5.0",
"Unknown", "Unknown", "Unknown", "Unknown" };
#endif
VOID
@ -137,7 +139,9 @@ PrintResponseR1 (
)
{
DEBUG ((EFI_D_INFO, "Response: 0x%X\n", Response));
if (Response & MMC_R0_READY_FOR_DATA) DEBUG((EFI_D_INFO, "\t- READY_FOR_DATA\n"));
if (Response & MMC_R0_READY_FOR_DATA) {
DEBUG ((EFI_D_INFO, "\t- READY_FOR_DATA\n"));
}
if (((Response >> 9) & 0xF) == 0) DEBUG ((EFI_D_INFO, "\t- State: Idle\n"));
else if (((Response >> 9) & 0xF) == 1) DEBUG ((EFI_D_INFO, "\t- State: Ready\n"));
@ -689,4 +693,3 @@ MmcFlushBlocks (
{
return EFI_SUCCESS;
}