diff options
Diffstat (limited to 'MdePkg/Library')
-rw-r--r-- | MdePkg/Library/BaseLib/Arm/GccInline.c | 21 | ||||
-rw-r--r-- | MdePkg/Library/BaseLib/Arm/InternalSwitchStack.c | 17 | ||||
-rw-r--r-- | MdePkg/Library/BaseLib/Ia32/GccInline.c | 10 | ||||
-rw-r--r-- | MdePkg/Library/BaseLib/Ipf/InternalSwitchStack.c | 3 | ||||
-rw-r--r-- | MdePkg/Library/BaseLib/X64/GccInline.c | 10 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLib/SetMem.c | 4 | ||||
-rw-r--r-- | MdePkg/Library/BaseSynchronizationLib/Arm/Synchronization.c | 19 | ||||
-rw-r--r-- | MdePkg/Library/DxeServicesLib/DxeServicesLib.c | 23 |
8 files changed, 76 insertions, 31 deletions
diff --git a/MdePkg/Library/BaseLib/Arm/GccInline.c b/MdePkg/Library/BaseLib/Arm/GccInline.c index 97e7d82c02..03290178e7 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<BR>
+ Copyright (c) 2006 - 2010, Intel Corporation<BR>
Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>
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 0bff206fad..3147b28bbb 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<BR>
+ Copyright (c) 2006 - 2010, Intel Corporation<BR>
Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>
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 fcb0665866..d603b3f1d5 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<BR>
+ Copyright (c) 2006 - 2010, Intel Corporation<BR>
Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>
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 ff11405b3d..8ff5832f0b 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<BR>
+ Copyright (c) 2007 - 2010, Intel Corporation<BR>
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 2473ca9fbe..d559e3be55 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<BR>
+ Copyright (c) 2006 - 2010, Intel Corporation<BR>
Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>
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)
);
}
diff --git a/MdePkg/Library/BaseMemoryLib/SetMem.c b/MdePkg/Library/BaseMemoryLib/SetMem.c index 32183d4393..2394f4878b 100644 --- a/MdePkg/Library/BaseMemoryLib/SetMem.c +++ b/MdePkg/Library/BaseMemoryLib/SetMem.c @@ -4,7 +4,7 @@ build for a particular platform easily if an optimized version
is desired.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2010, Intel Corporation<BR>
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
@@ -33,7 +33,7 @@ VOID *
EFIAPI
InternalMemSetMem (
- IN VOID *Buffer,
+ OUT VOID *Buffer,
IN UINTN Length,
IN UINT8 Value
)
diff --git a/MdePkg/Library/BaseSynchronizationLib/Arm/Synchronization.c b/MdePkg/Library/BaseSynchronizationLib/Arm/Synchronization.c index e046e1b373..56f4d3c481 100644 --- a/MdePkg/Library/BaseSynchronizationLib/Arm/Synchronization.c +++ b/MdePkg/Library/BaseSynchronizationLib/Arm/Synchronization.c @@ -1,7 +1,7 @@ /** @file
Implementation of synchronization functions. Still needs to be ported
- Copyright (c) 2006 - 2009, Intel Corporation<BR>
+ Copyright (c) 2006 - 2010, Intel Corporation<BR>
Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -13,6 +13,23 @@ **/
+/**
+ Performs an atomic compare exchange operation on a 32-bit unsigned integer.
+
+ Performs an atomic compare exchange operation on the 32-bit unsigned integer
+ specified by Value. If Value is equal to CompareValue, then Value is set to
+ ExchangeValue and CompareValue is returned. If Value is not equal to CompareValue,
+ then Value is returned. The compare exchange operation must be performed using
+ MP safe mechanisms.
+
+ @param Value A pointer to the 32-bit value for the compare exchange
+ operation.
+ @param CompareValue 32-bit value used in compare operation.
+ @param ExchangeValue 32-bit value used in exchange operation.
+
+ @return The original *Value before exchange.
+
+**/
UINT32
EFIAPI
InternalSyncCompareExchange32 (
diff --git a/MdePkg/Library/DxeServicesLib/DxeServicesLib.c b/MdePkg/Library/DxeServicesLib/DxeServicesLib.c index e44833f19f..bd7b95c400 100644 --- a/MdePkg/Library/DxeServicesLib/DxeServicesLib.c +++ b/MdePkg/Library/DxeServicesLib/DxeServicesLib.c @@ -2,7 +2,7 @@ MDE DXE Services Library provides functions that simplify the development of DXE Drivers.
These functions help access data from sections of FFS files or from file path.
- Copyright (c) 2007 - 2009, Intel Corporation<BR>
+ Copyright (c) 2007 - 2010, Intel Corporation<BR>
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
@@ -401,7 +401,7 @@ GetSectionFromFfs ( /**
Get the image file buffer data and buffer size by its device path.
- Access the file either from a a firmware volume, from a file system interface,
+ Access the file either from a firmware volume, from a file system interface,
or from the load file interface.
Allocate memory to store the found image. The caller is responsible to free memory.
@@ -410,16 +410,15 @@ GetSectionFromFfs ( If FileSize is NULL, then NULL is returned.
If AuthenticationStatus is NULL, then NULL is returned.
- @param[in] BootPolicy
- Policy for Open Image File.If TRUE, indicates that the request
- originates from the boot manager, and that the boot manager is
- attempting to load FilePath as a boot selection. If FALSE,
- then FilePath must match an exact file to be loaded.
- @param[in] FilePath Pointer to the device path of the file that is absracted to the file buffer.
- @param[out] FileSize Pointer to the size of the abstracted file buffer.
- @param[out] AuthenticationStatus
- Pointer to a caller-allocated UINT32 in which
- the authentication status is returned.
+ @param[in] BootPolicy Policy for Open Image File.If TRUE, indicates that the request
+ originates from the boot manager, and that the boot manager is
+ attempting to load FilePath as a boot selection. If FALSE,
+ then FilePath must match an exact file to be loaded.
+ @param[in] FilePath Pointer to the device path of the file that is absracted to
+ the file buffer.
+ @param[out] FileSize Pointer to the size of the abstracted file buffer.
+ @param[out] AuthenticationStatus Pointer to a caller-allocated UINT32 in which the authentication
+ status is returned.
@retval NULL File is NULL, or FileSize is NULL. Or the file can't be found.
@retval other The abstracted file buffer. The caller is responsible to free memory.
|