From ea6898b902464c0a0c32b49543386b962a64032c Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Wed, 27 Jan 2010 03:25:28 +0000 Subject: Clean up MdePkg source to correct some coding style issues, etc. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9832 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/BaseLib/Arm/GccInline.c | 21 ++++++++++++++++++--- MdePkg/Library/BaseLib/Arm/InternalSwitchStack.c | 17 ++++++++++++++++- MdePkg/Library/BaseLib/Ia32/GccInline.c | 10 +++++----- MdePkg/Library/BaseLib/Ipf/InternalSwitchStack.c | 3 +-- MdePkg/Library/BaseLib/X64/GccInline.c | 10 +++++----- 5 files changed, 45 insertions(+), 16 deletions(-) (limited to 'MdePkg/Library/BaseLib') diff --git a/MdePkg/Library/BaseLib/Arm/GccInline.c b/MdePkg/Library/BaseLib/Arm/GccInline.c index 97e7d82..0329017 100644 --- a/MdePkg/Library/BaseLib/Arm/GccInline.c +++ b/MdePkg/Library/BaseLib/Arm/GccInline.c @@ -1,7 +1,7 @@ /** @file GCC inline implementation of BaseLib processor specific functions. - Copyright (c) 2006 - 2007, Intel Corporation
+ Copyright (c) 2006 - 2010, Intel Corporation
Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.
All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -37,11 +37,26 @@ CpuPause ( ); } +/** + Transfers control to a function starting with a new stack. + + This internal worker function transfers control to the function + specified by EntryPoint using the new stack specified by NewStack + and passing in the parameters specified by Context1 and Context2. + Context1 and Context2 are optional and may be NULL. + The function EntryPoint must never return. + + @param EntryPoint The pointer to the function to enter. + @param Context1 The first parameter to pass in. + @param Context2 The second Parameter to pass in + @param NewStack The new Location of the stack + +**/ VOID EFIAPI InternalSwitchStackAsm ( SWITCH_STACK_ENTRY_POINT EntryPoint, - VOID *Context, + VOID *Context1, VOID *Context2, VOID *NewStack ) @@ -54,7 +69,7 @@ InternalSwitchStackAsm ( "bx lr\n\t" : /* no output operand */ : "r" (EntryPoint), - "r" (Context), + "r" (Context1), "r" (Context2), "r" (NewStack) ); diff --git a/MdePkg/Library/BaseLib/Arm/InternalSwitchStack.c b/MdePkg/Library/BaseLib/Arm/InternalSwitchStack.c index 0bff206..3147b28 100644 --- a/MdePkg/Library/BaseLib/Arm/InternalSwitchStack.c +++ b/MdePkg/Library/BaseLib/Arm/InternalSwitchStack.c @@ -1,7 +1,7 @@ /** @file SwitchStack() function for ARM. - Copyright (c) 2006 - 2007, Intel Corporation
+ Copyright (c) 2006 - 2010, Intel Corporation
Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.
All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -15,6 +15,21 @@ #include "BaseLibInternals.h" +/** + Transfers control to a function starting with a new stack. + + This internal worker function transfers control to the function + specified by EntryPoint using the new stack specified by NewStack + and passing in the parameters specified by Context1 and Context2. + Context1 and Context2 are optional and may be NULL. + The function EntryPoint must never return. + + @param EntryPoint The pointer to the function to enter. + @param Context1 The first parameter to pass in. + @param Context2 The second Parameter to pass in + @param NewStack The new Location of the stack + +**/ VOID EFIAPI InternalSwitchStackAsm ( diff --git a/MdePkg/Library/BaseLib/Ia32/GccInline.c b/MdePkg/Library/BaseLib/Ia32/GccInline.c index fcb0665..d603b3f 100644 --- a/MdePkg/Library/BaseLib/Ia32/GccInline.c +++ b/MdePkg/Library/BaseLib/Ia32/GccInline.c @@ -1,7 +1,7 @@ /** @file GCC inline implementation of BaseLib processor specific functions. - Copyright (c) 2006 - 2007, Intel Corporation
+ Copyright (c) 2006 - 2010, Intel Corporation
Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.
All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -1078,12 +1078,12 @@ InternalX86WriteGdtr ( VOID EFIAPI InternalX86ReadIdtr ( - OUT IA32_DESCRIPTOR *Ldtr + OUT IA32_DESCRIPTOR *Idtr ) { __asm__ __volatile__ ( "sldt %0" - : "=m" (*Ldtr) + : "=m" (*Idtr) ); } @@ -1100,13 +1100,13 @@ InternalX86ReadIdtr ( VOID EFIAPI InternalX86WriteIdtr ( - IN CONST IA32_DESCRIPTOR *Ldtr + IN CONST IA32_DESCRIPTOR *Idtr ) { __asm__ __volatile__ ( "lidt %0" : - : "m" (*Ldtr) + : "m" (*Idtr) ); } diff --git a/MdePkg/Library/BaseLib/Ipf/InternalSwitchStack.c b/MdePkg/Library/BaseLib/Ipf/InternalSwitchStack.c index ff11405..8ff5832 100644 --- a/MdePkg/Library/BaseLib/Ipf/InternalSwitchStack.c +++ b/MdePkg/Library/BaseLib/Ipf/InternalSwitchStack.c @@ -1,7 +1,7 @@ /** @file SwitchStack() function for IPF. - Copyright (c) 2007 - 2008, Intel Corporation
+ Copyright (c) 2007 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -47,7 +47,6 @@ InternalSwitchStack ( IN VOID *NewStack, IN VA_LIST Marker ) - { VOID *NewBsp; diff --git a/MdePkg/Library/BaseLib/X64/GccInline.c b/MdePkg/Library/BaseLib/X64/GccInline.c index 2473ca9..d559e3b 100644 --- a/MdePkg/Library/BaseLib/X64/GccInline.c +++ b/MdePkg/Library/BaseLib/X64/GccInline.c @@ -1,7 +1,7 @@ /** @file GCC inline implementation of BaseLib processor specific functions. - Copyright (c) 2006 - 2007, Intel Corporation
+ Copyright (c) 2006 - 2010, Intel Corporation
Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.
All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -1088,12 +1088,12 @@ InternalX86WriteGdtr ( VOID EFIAPI InternalX86ReadIdtr ( - OUT IA32_DESCRIPTOR *Ldtr + OUT IA32_DESCRIPTOR *Idtr ) { __asm__ __volatile__ ( "sldt %0" - : "=m" (*Ldtr) + : "=m" (*Idtr) ); } @@ -1110,13 +1110,13 @@ InternalX86ReadIdtr ( VOID EFIAPI InternalX86WriteIdtr ( - IN CONST IA32_DESCRIPTOR *Ldtr + IN CONST IA32_DESCRIPTOR *Idtr ) { __asm__ __volatile__ ( "lidt %0" : - : "m" (*Ldtr) + : "m" (*Idtr) ); } -- cgit v1.1