mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 15:14:02 +02:00
1. Removed AsmSwitchStackAndBackingStore from BaseLib.h
2. Modified SwitchStack definition update to MWG 0.60e. 3. Added BaseLib/Ipf/InternalSwitchStack.c and removed BaseLib/Ipf/Non-existing.c 4. Updated any references of AsmSwitchStackAndBackingStore to SwichStack on IPF. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2499 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
ebc5b9557e
commit
cb41bea732
@ -1,6 +1,6 @@
|
|||||||
/*++
|
/*++
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006 - 2007, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -62,7 +62,7 @@ HandOffToDxeCore (
|
|||||||
Status = PeiServicesInstallPpi (EndOfPeiSignal);
|
Status = PeiServicesInstallPpi (EndOfPeiSignal);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
|
||||||
AsmSwitchStackAndBackingStore (
|
SwitchStack (
|
||||||
(SWITCH_STACK_ENTRY_POINT)(UINTN)DxeCoreEntryPoint,
|
(SWITCH_STACK_ENTRY_POINT)(UINTN)DxeCoreEntryPoint,
|
||||||
HobList.Raw,
|
HobList.Raw,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
PeiSwitchStacks() function for PEI dispatcher.
|
PeiSwitchStacks() function for PEI dispatcher.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation<BR>
|
Copyright (c) 2006 - 2007, Intel Corporation<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -48,7 +48,7 @@ PeiSwitchStacks (
|
|||||||
IN VOID *NewBsp
|
IN VOID *NewBsp
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
AsmSwitchStackAndBackingStore (
|
SwitchStack (
|
||||||
EntryPoint,
|
EntryPoint,
|
||||||
Context1,
|
Context1,
|
||||||
Context2,
|
Context2,
|
||||||
|
@ -395,22 +395,22 @@ StrnCat (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the first occurance of a Null-terminated Unicode sub-string
|
Returns the first occurance of a Null-terminated Unicode sub-string
|
||||||
in a Null-terminated Unicode string.
|
in a Null-terminated Unicode string.
|
||||||
|
|
||||||
This function scans the contents of the Null-terminated Unicode string
|
This function scans the contents of the Null-terminated Unicode string
|
||||||
specified by String and returns the first occurrence of SearchString.
|
specified by String and returns the first occurrence of SearchString.
|
||||||
If SearchString is not found in String, then NULL is returned. If
|
If SearchString is not found in String, then NULL is returned. If
|
||||||
the length of SearchString is zero, then String is
|
the length of SearchString is zero, then String is
|
||||||
returned.
|
returned.
|
||||||
|
|
||||||
If String is NULL, then ASSERT().
|
If String is NULL, then ASSERT().
|
||||||
If String is not aligned on a 16-bit boundary, then ASSERT().
|
If String is not aligned on a 16-bit boundary, then ASSERT().
|
||||||
If SearchString is NULL, then ASSERT().
|
If SearchString is NULL, then ASSERT().
|
||||||
If SearchString is not aligned on a 16-bit boundary, then ASSERT().
|
If SearchString is not aligned on a 16-bit boundary, then ASSERT().
|
||||||
|
|
||||||
If PcdMaximumUnicodeStringLength is not zero, and SearchString
|
If PcdMaximumUnicodeStringLength is not zero, and SearchString
|
||||||
or String contains more than PcdMaximumUnicodeStringLength Unicode
|
or String contains more than PcdMaximumUnicodeStringLength Unicode
|
||||||
characters not including the Null-terminator, then ASSERT().
|
characters not including the Null-terminator, then ASSERT().
|
||||||
|
|
||||||
@param String Pointer to a Null-terminated Unicode string.
|
@param String Pointer to a Null-terminated Unicode string.
|
||||||
@ -428,37 +428,37 @@ StrStr (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Convert a Null-terminated Unicode decimal string to a value of
|
Convert a Null-terminated Unicode decimal string to a value of
|
||||||
type UINTN.
|
type UINTN.
|
||||||
|
|
||||||
This function returns a value of type UINTN by interpreting the contents
|
This function returns a value of type UINTN by interpreting the contents
|
||||||
of the Unicode string specified by String as a decimal number. The format
|
of the Unicode string specified by String as a decimal number. The format
|
||||||
of the input Unicode string String is:
|
of the input Unicode string String is:
|
||||||
|
|
||||||
[spaces] [decimal digits].
|
[spaces] [decimal digits].
|
||||||
|
|
||||||
The valid decimal digit character is in the range [0-9]. The
|
The valid decimal digit character is in the range [0-9]. The
|
||||||
function will ignore the pad space, which includes spaces or
|
function will ignore the pad space, which includes spaces or
|
||||||
tab characters, before [decimal digits]. The running zero in the
|
tab characters, before [decimal digits]. The running zero in the
|
||||||
beginning of [decimal digits] will be ignored. Then, the function
|
beginning of [decimal digits] will be ignored. Then, the function
|
||||||
stops at the first character that is a not a valid decimal character
|
stops at the first character that is a not a valid decimal character
|
||||||
or a Null-terminator, whichever one comes first.
|
or a Null-terminator, whichever one comes first.
|
||||||
|
|
||||||
If String is NULL, then ASSERT().
|
If String is NULL, then ASSERT().
|
||||||
If String is not aligned in a 16-bit boundary, then ASSERT().
|
If String is not aligned in a 16-bit boundary, then ASSERT().
|
||||||
If String has only pad spaces, then 0 is returned.
|
If String has only pad spaces, then 0 is returned.
|
||||||
If String has no pad spaces or valid decimal digits,
|
If String has no pad spaces or valid decimal digits,
|
||||||
then 0 is returned.
|
then 0 is returned.
|
||||||
If the number represented by String overflows according
|
If the number represented by String overflows according
|
||||||
to the range defined by UINTN, then ASSERT().
|
to the range defined by UINTN, then ASSERT().
|
||||||
|
|
||||||
If PcdMaximumUnicodeStringLength is not zero, and String contains
|
If PcdMaximumUnicodeStringLength is not zero, and String contains
|
||||||
more than PcdMaximumUnicodeStringLength Unicode characters not including
|
more than PcdMaximumUnicodeStringLength Unicode characters not including
|
||||||
the Null-terminator, then ASSERT().
|
the Null-terminator, then ASSERT().
|
||||||
|
|
||||||
@param String Pointer to a Null-terminated Unicode string.
|
@param String Pointer to a Null-terminated Unicode string.
|
||||||
|
|
||||||
@retval UINTN
|
@retval UINTN
|
||||||
|
|
||||||
**/
|
**/
|
||||||
UINTN
|
UINTN
|
||||||
@ -468,37 +468,37 @@ StrDecimalToUintn (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Convert a Null-terminated Unicode decimal string to a value of
|
Convert a Null-terminated Unicode decimal string to a value of
|
||||||
type UINT64.
|
type UINT64.
|
||||||
|
|
||||||
This function returns a value of type UINT64 by interpreting the contents
|
This function returns a value of type UINT64 by interpreting the contents
|
||||||
of the Unicode string specified by String as a decimal number. The format
|
of the Unicode string specified by String as a decimal number. The format
|
||||||
of the input Unicode string String is:
|
of the input Unicode string String is:
|
||||||
|
|
||||||
[spaces] [decimal digits].
|
[spaces] [decimal digits].
|
||||||
|
|
||||||
The valid decimal digit character is in the range [0-9]. The
|
The valid decimal digit character is in the range [0-9]. The
|
||||||
function will ignore the pad space, which includes spaces or
|
function will ignore the pad space, which includes spaces or
|
||||||
tab characters, before [decimal digits]. The running zero in the
|
tab characters, before [decimal digits]. The running zero in the
|
||||||
beginning of [decimal digits] will be ignored. Then, the function
|
beginning of [decimal digits] will be ignored. Then, the function
|
||||||
stops at the first character that is a not a valid decimal character
|
stops at the first character that is a not a valid decimal character
|
||||||
or a Null-terminator, whichever one comes first.
|
or a Null-terminator, whichever one comes first.
|
||||||
|
|
||||||
If String is NULL, then ASSERT().
|
If String is NULL, then ASSERT().
|
||||||
If String is not aligned in a 16-bit boundary, then ASSERT().
|
If String is not aligned in a 16-bit boundary, then ASSERT().
|
||||||
If String has only pad spaces, then 0 is returned.
|
If String has only pad spaces, then 0 is returned.
|
||||||
If String has no pad spaces or valid decimal digits,
|
If String has no pad spaces or valid decimal digits,
|
||||||
then 0 is returned.
|
then 0 is returned.
|
||||||
If the number represented by String overflows according
|
If the number represented by String overflows according
|
||||||
to the range defined by UINT64, then ASSERT().
|
to the range defined by UINT64, then ASSERT().
|
||||||
|
|
||||||
If PcdMaximumUnicodeStringLength is not zero, and String contains
|
If PcdMaximumUnicodeStringLength is not zero, and String contains
|
||||||
more than PcdMaximumUnicodeStringLength Unicode characters not including
|
more than PcdMaximumUnicodeStringLength Unicode characters not including
|
||||||
the Null-terminator, then ASSERT().
|
the Null-terminator, then ASSERT().
|
||||||
|
|
||||||
@param String Pointer to a Null-terminated Unicode string.
|
@param String Pointer to a Null-terminated Unicode string.
|
||||||
|
|
||||||
@retval UINT64
|
@retval UINT64
|
||||||
|
|
||||||
**/
|
**/
|
||||||
UINT64
|
UINT64
|
||||||
@ -510,31 +510,31 @@ StrDecimalToUint64 (
|
|||||||
/**
|
/**
|
||||||
Convert a Null-terminated Unicode hexadecimal string to a value of type UINTN.
|
Convert a Null-terminated Unicode hexadecimal string to a value of type UINTN.
|
||||||
|
|
||||||
This function returns a value of type UINTN by interpreting the contents
|
This function returns a value of type UINTN by interpreting the contents
|
||||||
of the Unicode string specified by String as a hexadecimal number.
|
of the Unicode string specified by String as a hexadecimal number.
|
||||||
The format of the input Unicode string String is:
|
The format of the input Unicode string String is:
|
||||||
|
|
||||||
[spaces][zeros][x][hexadecimal digits].
|
|
||||||
|
|
||||||
The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
|
[spaces][zeros][x][hexadecimal digits].
|
||||||
The prefix "0x" is optional. Both "x" and "X" is allowed in "0x" prefix.
|
|
||||||
If "x" appears in the input string, it must be prefixed with at least one 0.
|
The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
|
||||||
The function will ignore the pad space, which includes spaces or tab characters,
|
The prefix "0x" is optional. Both "x" and "X" is allowed in "0x" prefix.
|
||||||
before [zeros], [x] or [hexadecimal digit]. The running zero before [x] or
|
If "x" appears in the input string, it must be prefixed with at least one 0.
|
||||||
[hexadecimal digit] will be ignored. Then, the decoding starts after [x] or the
|
The function will ignore the pad space, which includes spaces or tab characters,
|
||||||
first valid hexadecimal digit. Then, the function stops at the first character that is
|
before [zeros], [x] or [hexadecimal digit]. The running zero before [x] or
|
||||||
|
[hexadecimal digit] will be ignored. Then, the decoding starts after [x] or the
|
||||||
|
first valid hexadecimal digit. Then, the function stops at the first character that is
|
||||||
a not a valid hexadecimal character or NULL, whichever one comes first.
|
a not a valid hexadecimal character or NULL, whichever one comes first.
|
||||||
|
|
||||||
If String is NULL, then ASSERT().
|
If String is NULL, then ASSERT().
|
||||||
If String is not aligned in a 16-bit boundary, then ASSERT().
|
If String is not aligned in a 16-bit boundary, then ASSERT().
|
||||||
If String has only pad spaces, then zero is returned.
|
If String has only pad spaces, then zero is returned.
|
||||||
If String has no leading pad spaces, leading zeros or valid hexadecimal digits,
|
If String has no leading pad spaces, leading zeros or valid hexadecimal digits,
|
||||||
then zero is returned.
|
then zero is returned.
|
||||||
If the number represented by String overflows according to the range defined by
|
If the number represented by String overflows according to the range defined by
|
||||||
UINTN, then ASSERT().
|
UINTN, then ASSERT().
|
||||||
|
|
||||||
If PcdMaximumUnicodeStringLength is not zero, and String contains more than
|
If PcdMaximumUnicodeStringLength is not zero, and String contains more than
|
||||||
PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator,
|
PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator,
|
||||||
then ASSERT().
|
then ASSERT().
|
||||||
|
|
||||||
@param String Pointer to a Null-terminated Unicode string.
|
@param String Pointer to a Null-terminated Unicode string.
|
||||||
@ -551,31 +551,31 @@ StrHexToUintn (
|
|||||||
/**
|
/**
|
||||||
Convert a Null-terminated Unicode hexadecimal string to a value of type UINT64.
|
Convert a Null-terminated Unicode hexadecimal string to a value of type UINT64.
|
||||||
|
|
||||||
This function returns a value of type UINT64 by interpreting the contents
|
This function returns a value of type UINT64 by interpreting the contents
|
||||||
of the Unicode string specified by String as a hexadecimal number.
|
of the Unicode string specified by String as a hexadecimal number.
|
||||||
The format of the input Unicode string String is
|
The format of the input Unicode string String is
|
||||||
|
|
||||||
[spaces][zeros][x][hexadecimal digits].
|
|
||||||
|
|
||||||
The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
|
[spaces][zeros][x][hexadecimal digits].
|
||||||
The prefix "0x" is optional. Both "x" and "X" is allowed in "0x" prefix.
|
|
||||||
If "x" appears in the input string, it must be prefixed with at least one 0.
|
The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
|
||||||
The function will ignore the pad space, which includes spaces or tab characters,
|
The prefix "0x" is optional. Both "x" and "X" is allowed in "0x" prefix.
|
||||||
before [zeros], [x] or [hexadecimal digit]. The running zero before [x] or
|
If "x" appears in the input string, it must be prefixed with at least one 0.
|
||||||
[hexadecimal digit] will be ignored. Then, the decoding starts after [x] or the
|
The function will ignore the pad space, which includes spaces or tab characters,
|
||||||
first valid hexadecimal digit. Then, the function stops at the first character that is
|
before [zeros], [x] or [hexadecimal digit]. The running zero before [x] or
|
||||||
|
[hexadecimal digit] will be ignored. Then, the decoding starts after [x] or the
|
||||||
|
first valid hexadecimal digit. Then, the function stops at the first character that is
|
||||||
a not a valid hexadecimal character or NULL, whichever one comes first.
|
a not a valid hexadecimal character or NULL, whichever one comes first.
|
||||||
|
|
||||||
If String is NULL, then ASSERT().
|
If String is NULL, then ASSERT().
|
||||||
If String is not aligned in a 16-bit boundary, then ASSERT().
|
If String is not aligned in a 16-bit boundary, then ASSERT().
|
||||||
If String has only pad spaces, then zero is returned.
|
If String has only pad spaces, then zero is returned.
|
||||||
If String has no leading pad spaces, leading zeros or valid hexadecimal digits,
|
If String has no leading pad spaces, leading zeros or valid hexadecimal digits,
|
||||||
then zero is returned.
|
then zero is returned.
|
||||||
If the number represented by String overflows according to the range defined by
|
If the number represented by String overflows according to the range defined by
|
||||||
UINT64, then ASSERT().
|
UINT64, then ASSERT().
|
||||||
|
|
||||||
If PcdMaximumUnicodeStringLength is not zero, and String contains more than
|
If PcdMaximumUnicodeStringLength is not zero, and String contains more than
|
||||||
PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator,
|
PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator,
|
||||||
then ASSERT().
|
then ASSERT().
|
||||||
|
|
||||||
@param String Pointer to a Null-terminated Unicode string.
|
@param String Pointer to a Null-terminated Unicode string.
|
||||||
@ -590,27 +590,27 @@ StrHexToUint64 (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Convert one Null-terminated Unicode string to a Null-terminated
|
Convert one Null-terminated Unicode string to a Null-terminated
|
||||||
ASCII string and returns the ASCII string.
|
ASCII string and returns the ASCII string.
|
||||||
|
|
||||||
This function converts the content of the Unicode string Source
|
|
||||||
to the ASCII string Destination by copying the lower 8 bits of
|
|
||||||
each Unicode character. It returns Destination.
|
|
||||||
|
|
||||||
If any Unicode characters in Source contain non-zero value in
|
This function converts the content of the Unicode string Source
|
||||||
|
to the ASCII string Destination by copying the lower 8 bits of
|
||||||
|
each Unicode character. It returns Destination.
|
||||||
|
|
||||||
|
If any Unicode characters in Source contain non-zero value in
|
||||||
the upper 8 bits, then ASSERT().
|
the upper 8 bits, then ASSERT().
|
||||||
|
|
||||||
If Destination is NULL, then ASSERT().
|
If Destination is NULL, then ASSERT().
|
||||||
If Source is NULL, then ASSERT().
|
If Source is NULL, then ASSERT().
|
||||||
If Source is not aligned on a 16-bit boundary, then ASSERT().
|
If Source is not aligned on a 16-bit boundary, then ASSERT().
|
||||||
If Source and Destination overlap, then ASSERT().
|
If Source and Destination overlap, then ASSERT().
|
||||||
|
|
||||||
If PcdMaximumUnicodeStringLength is not zero, and Source contains
|
If PcdMaximumUnicodeStringLength is not zero, and Source contains
|
||||||
more than PcdMaximumUnicodeStringLength Unicode characters not including
|
more than PcdMaximumUnicodeStringLength Unicode characters not including
|
||||||
the Null-terminator, then ASSERT().
|
the Null-terminator, then ASSERT().
|
||||||
|
|
||||||
If PcdMaximumAsciiStringLength is not zero, and Source contains more
|
If PcdMaximumAsciiStringLength is not zero, and Source contains more
|
||||||
than PcdMaximumAsciiStringLength Unicode characters not including the
|
than PcdMaximumAsciiStringLength Unicode characters not including the
|
||||||
Null-terminator, then ASSERT().
|
Null-terminator, then ASSERT().
|
||||||
|
|
||||||
@param Source Pointer to a Null-terminated Unicode string.
|
@param Source Pointer to a Null-terminated Unicode string.
|
||||||
@ -907,19 +907,19 @@ AsciiStrnCat (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the first occurance of a Null-terminated ASCII sub-string
|
Returns the first occurance of a Null-terminated ASCII sub-string
|
||||||
in a Null-terminated ASCII string.
|
in a Null-terminated ASCII string.
|
||||||
|
|
||||||
This function scans the contents of the ASCII string specified by String
|
This function scans the contents of the ASCII string specified by String
|
||||||
and returns the first occurrence of SearchString. If SearchString is not
|
and returns the first occurrence of SearchString. If SearchString is not
|
||||||
found in String, then NULL is returned. If the length of SearchString is zero,
|
found in String, then NULL is returned. If the length of SearchString is zero,
|
||||||
then String is returned.
|
then String is returned.
|
||||||
|
|
||||||
If String is NULL, then ASSERT().
|
If String is NULL, then ASSERT().
|
||||||
If SearchString is NULL, then ASSERT().
|
If SearchString is NULL, then ASSERT().
|
||||||
|
|
||||||
If PcdMaximumAsciiStringLength is not zero, and SearchString or
|
If PcdMaximumAsciiStringLength is not zero, and SearchString or
|
||||||
String contains more than PcdMaximumAsciiStringLength Unicode characters
|
String contains more than PcdMaximumAsciiStringLength Unicode characters
|
||||||
not including the Null-terminator, then ASSERT().
|
not including the Null-terminator, then ASSERT().
|
||||||
|
|
||||||
@param String Pointer to a Null-terminated ASCII string.
|
@param String Pointer to a Null-terminated ASCII string.
|
||||||
@ -937,33 +937,33 @@ AsciiStrStr (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Convert a Null-terminated ASCII decimal string to a value of type
|
Convert a Null-terminated ASCII decimal string to a value of type
|
||||||
UINTN.
|
UINTN.
|
||||||
|
|
||||||
This function returns a value of type UINTN by interpreting the contents
|
This function returns a value of type UINTN by interpreting the contents
|
||||||
of the ASCII string String as a decimal number. The format of the input
|
of the ASCII string String as a decimal number. The format of the input
|
||||||
ASCII string String is:
|
ASCII string String is:
|
||||||
|
|
||||||
[spaces] [decimal digits].
|
[spaces] [decimal digits].
|
||||||
|
|
||||||
The valid decimal digit character is in the range [0-9]. The function will
|
The valid decimal digit character is in the range [0-9]. The function will
|
||||||
ignore the pad space, which includes spaces or tab characters, before the digits.
|
ignore the pad space, which includes spaces or tab characters, before the digits.
|
||||||
The running zero in the beginning of [decimal digits] will be ignored. Then, the
|
The running zero in the beginning of [decimal digits] will be ignored. Then, the
|
||||||
function stops at the first character that is a not a valid decimal character or
|
function stops at the first character that is a not a valid decimal character or
|
||||||
Null-terminator, whichever on comes first.
|
Null-terminator, whichever on comes first.
|
||||||
|
|
||||||
If String has only pad spaces, then 0 is returned.
|
If String has only pad spaces, then 0 is returned.
|
||||||
If String has no pad spaces or valid decimal digits, then 0 is returned.
|
If String has no pad spaces or valid decimal digits, then 0 is returned.
|
||||||
If the number represented by String overflows according to the range defined by
|
If the number represented by String overflows according to the range defined by
|
||||||
UINTN, then ASSERT().
|
UINTN, then ASSERT().
|
||||||
If String is NULL, then ASSERT().
|
If String is NULL, then ASSERT().
|
||||||
If PcdMaximumAsciiStringLength is not zero, and String contains more than
|
If PcdMaximumAsciiStringLength is not zero, and String contains more than
|
||||||
PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
|
PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
|
||||||
then ASSERT().
|
then ASSERT().
|
||||||
|
|
||||||
@param String Pointer to a Null-terminated ASCII string.
|
@param String Pointer to a Null-terminated ASCII string.
|
||||||
|
|
||||||
@retval UINTN
|
@retval UINTN
|
||||||
|
|
||||||
**/
|
**/
|
||||||
UINTN
|
UINTN
|
||||||
@ -973,33 +973,33 @@ AsciiStrDecimalToUintn (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Convert a Null-terminated ASCII decimal string to a value of type
|
Convert a Null-terminated ASCII decimal string to a value of type
|
||||||
UINT64.
|
UINT64.
|
||||||
|
|
||||||
This function returns a value of type UINT64 by interpreting the contents
|
This function returns a value of type UINT64 by interpreting the contents
|
||||||
of the ASCII string String as a decimal number. The format of the input
|
of the ASCII string String as a decimal number. The format of the input
|
||||||
ASCII string String is:
|
ASCII string String is:
|
||||||
|
|
||||||
[spaces] [decimal digits].
|
[spaces] [decimal digits].
|
||||||
|
|
||||||
The valid decimal digit character is in the range [0-9]. The function will
|
The valid decimal digit character is in the range [0-9]. The function will
|
||||||
ignore the pad space, which includes spaces or tab characters, before the digits.
|
ignore the pad space, which includes spaces or tab characters, before the digits.
|
||||||
The running zero in the beginning of [decimal digits] will be ignored. Then, the
|
The running zero in the beginning of [decimal digits] will be ignored. Then, the
|
||||||
function stops at the first character that is a not a valid decimal character or
|
function stops at the first character that is a not a valid decimal character or
|
||||||
Null-terminator, whichever on comes first.
|
Null-terminator, whichever on comes first.
|
||||||
|
|
||||||
If String has only pad spaces, then 0 is returned.
|
If String has only pad spaces, then 0 is returned.
|
||||||
If String has no pad spaces or valid decimal digits, then 0 is returned.
|
If String has no pad spaces or valid decimal digits, then 0 is returned.
|
||||||
If the number represented by String overflows according to the range defined by
|
If the number represented by String overflows according to the range defined by
|
||||||
UINT64, then ASSERT().
|
UINT64, then ASSERT().
|
||||||
If String is NULL, then ASSERT().
|
If String is NULL, then ASSERT().
|
||||||
If PcdMaximumAsciiStringLength is not zero, and String contains more than
|
If PcdMaximumAsciiStringLength is not zero, and String contains more than
|
||||||
PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
|
PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
|
||||||
then ASSERT().
|
then ASSERT().
|
||||||
|
|
||||||
@param String Pointer to a Null-terminated ASCII string.
|
@param String Pointer to a Null-terminated ASCII string.
|
||||||
|
|
||||||
@retval UINT64
|
@retval UINT64
|
||||||
|
|
||||||
**/
|
**/
|
||||||
UINT64
|
UINT64
|
||||||
@ -1011,30 +1011,30 @@ AsciiStrDecimalToUint64 (
|
|||||||
/**
|
/**
|
||||||
Convert a Null-terminated ASCII hexadecimal string to a value of type UINTN.
|
Convert a Null-terminated ASCII hexadecimal string to a value of type UINTN.
|
||||||
|
|
||||||
This function returns a value of type UINTN by interpreting the contents of
|
This function returns a value of type UINTN by interpreting the contents of
|
||||||
the ASCII string String as a hexadecimal number. The format of the input ASCII
|
the ASCII string String as a hexadecimal number. The format of the input ASCII
|
||||||
string String is:
|
string String is:
|
||||||
|
|
||||||
[spaces][zeros][x][hexadecimal digits].
|
[spaces][zeros][x][hexadecimal digits].
|
||||||
|
|
||||||
The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
|
The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
|
||||||
The prefix "0x" is optional. Both "x" and "X" is allowed in "0x" prefix. If "x"
|
The prefix "0x" is optional. Both "x" and "X" is allowed in "0x" prefix. If "x"
|
||||||
appears in the input string, it must be prefixed with at least one 0. The function
|
appears in the input string, it must be prefixed with at least one 0. The function
|
||||||
will ignore the pad space, which includes spaces or tab characters, before [zeros],
|
will ignore the pad space, which includes spaces or tab characters, before [zeros],
|
||||||
[x] or [hexadecimal digits]. The running zero before [x] or [hexadecimal digits]
|
[x] or [hexadecimal digits]. The running zero before [x] or [hexadecimal digits]
|
||||||
will be ignored. Then, the decoding starts after [x] or the first valid hexadecimal
|
will be ignored. Then, the decoding starts after [x] or the first valid hexadecimal
|
||||||
digit. Then, the function stops at the first character that is a not a valid
|
digit. Then, the function stops at the first character that is a not a valid
|
||||||
hexadecimal character or Null-terminator, whichever on comes first.
|
hexadecimal character or Null-terminator, whichever on comes first.
|
||||||
|
|
||||||
If String has only pad spaces, then 0 is returned.
|
If String has only pad spaces, then 0 is returned.
|
||||||
If String has no leading pad spaces, leading zeros or valid hexadecimal digits, then
|
If String has no leading pad spaces, leading zeros or valid hexadecimal digits, then
|
||||||
0 is returned.
|
0 is returned.
|
||||||
|
|
||||||
If the number represented by String overflows according to the range defined by UINTN,
|
If the number represented by String overflows according to the range defined by UINTN,
|
||||||
then ASSERT().
|
then ASSERT().
|
||||||
If String is NULL, then ASSERT().
|
If String is NULL, then ASSERT().
|
||||||
If PcdMaximumAsciiStringLength is not zero,
|
If PcdMaximumAsciiStringLength is not zero,
|
||||||
and String contains more than PcdMaximumAsciiStringLength ASCII characters not including
|
and String contains more than PcdMaximumAsciiStringLength ASCII characters not including
|
||||||
the Null-terminator, then ASSERT().
|
the Null-terminator, then ASSERT().
|
||||||
|
|
||||||
@param String Pointer to a Null-terminated ASCII string.
|
@param String Pointer to a Null-terminated ASCII string.
|
||||||
@ -1051,30 +1051,30 @@ AsciiStrHexToUintn (
|
|||||||
/**
|
/**
|
||||||
Convert a Null-terminated ASCII hexadecimal string to a value of type UINT64.
|
Convert a Null-terminated ASCII hexadecimal string to a value of type UINT64.
|
||||||
|
|
||||||
This function returns a value of type UINT64 by interpreting the contents of
|
This function returns a value of type UINT64 by interpreting the contents of
|
||||||
the ASCII string String as a hexadecimal number. The format of the input ASCII
|
the ASCII string String as a hexadecimal number. The format of the input ASCII
|
||||||
string String is:
|
string String is:
|
||||||
|
|
||||||
[spaces][zeros][x][hexadecimal digits].
|
[spaces][zeros][x][hexadecimal digits].
|
||||||
|
|
||||||
The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
|
The valid hexadecimal digit character is in the range [0-9], [a-f] and [A-F].
|
||||||
The prefix "0x" is optional. Both "x" and "X" is allowed in "0x" prefix. If "x"
|
The prefix "0x" is optional. Both "x" and "X" is allowed in "0x" prefix. If "x"
|
||||||
appears in the input string, it must be prefixed with at least one 0. The function
|
appears in the input string, it must be prefixed with at least one 0. The function
|
||||||
will ignore the pad space, which includes spaces or tab characters, before [zeros],
|
will ignore the pad space, which includes spaces or tab characters, before [zeros],
|
||||||
[x] or [hexadecimal digits]. The running zero before [x] or [hexadecimal digits]
|
[x] or [hexadecimal digits]. The running zero before [x] or [hexadecimal digits]
|
||||||
will be ignored. Then, the decoding starts after [x] or the first valid hexadecimal
|
will be ignored. Then, the decoding starts after [x] or the first valid hexadecimal
|
||||||
digit. Then, the function stops at the first character that is a not a valid
|
digit. Then, the function stops at the first character that is a not a valid
|
||||||
hexadecimal character or Null-terminator, whichever on comes first.
|
hexadecimal character or Null-terminator, whichever on comes first.
|
||||||
|
|
||||||
If String has only pad spaces, then 0 is returned.
|
If String has only pad spaces, then 0 is returned.
|
||||||
If String has no leading pad spaces, leading zeros or valid hexadecimal digits, then
|
If String has no leading pad spaces, leading zeros or valid hexadecimal digits, then
|
||||||
0 is returned.
|
0 is returned.
|
||||||
|
|
||||||
If the number represented by String overflows according to the range defined by UINT64,
|
If the number represented by String overflows according to the range defined by UINT64,
|
||||||
then ASSERT().
|
then ASSERT().
|
||||||
If String is NULL, then ASSERT().
|
If String is NULL, then ASSERT().
|
||||||
If PcdMaximumAsciiStringLength is not zero,
|
If PcdMaximumAsciiStringLength is not zero,
|
||||||
and String contains more than PcdMaximumAsciiStringLength ASCII characters not including
|
and String contains more than PcdMaximumAsciiStringLength ASCII characters not including
|
||||||
the Null-terminator, then ASSERT().
|
the Null-terminator, then ASSERT().
|
||||||
|
|
||||||
@param String Pointer to a Null-terminated ASCII string.
|
@param String Pointer to a Null-terminated ASCII string.
|
||||||
@ -1089,24 +1089,24 @@ AsciiStrHexToUint64 (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Convert one Null-terminated ASCII string to a Null-terminated
|
Convert one Null-terminated ASCII string to a Null-terminated
|
||||||
Unicode string and returns the Unicode string.
|
Unicode string and returns the Unicode string.
|
||||||
|
|
||||||
This function converts the contents of the ASCII string Source to the Unicode
|
This function converts the contents of the ASCII string Source to the Unicode
|
||||||
string Destination, and returns Destination. The function terminates the
|
string Destination, and returns Destination. The function terminates the
|
||||||
Unicode string Destination by appending a Null-terminator character at the end.
|
Unicode string Destination by appending a Null-terminator character at the end.
|
||||||
The caller is responsible to make sure Destination points to a buffer with size
|
The caller is responsible to make sure Destination points to a buffer with size
|
||||||
equal or greater than ((AsciiStrLen (Source) + 1) * sizeof (CHAR16)) in bytes.
|
equal or greater than ((AsciiStrLen (Source) + 1) * sizeof (CHAR16)) in bytes.
|
||||||
|
|
||||||
If Destination is NULL, then ASSERT().
|
If Destination is NULL, then ASSERT().
|
||||||
If Destination is not aligned on a 16-bit boundary, then ASSERT().
|
If Destination is not aligned on a 16-bit boundary, then ASSERT().
|
||||||
If Source is NULL, then ASSERT().
|
If Source is NULL, then ASSERT().
|
||||||
If Source and Destination overlap, then ASSERT().
|
If Source and Destination overlap, then ASSERT().
|
||||||
If PcdMaximumAsciiStringLength is not zero, and Source contains more than
|
If PcdMaximumAsciiStringLength is not zero, and Source contains more than
|
||||||
PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
|
PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
|
||||||
then ASSERT().
|
then ASSERT().
|
||||||
If PcdMaximumUnicodeStringLength is not zero, and Source contains more than
|
If PcdMaximumUnicodeStringLength is not zero, and Source contains more than
|
||||||
PcdMaximumUnicodeStringLength ASCII characters not including the
|
PcdMaximumUnicodeStringLength ASCII characters not including the
|
||||||
Null-terminator, then ASSERT().
|
Null-terminator, then ASSERT().
|
||||||
|
|
||||||
@param Source Pointer to a Null-terminated ASCII string.
|
@param Source Pointer to a Null-terminated ASCII string.
|
||||||
@ -3018,16 +3018,16 @@ InterlockedCompareExchangePointer (
|
|||||||
//
|
//
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Calculate the sum of all elements in a buffer in unit of UINT8.
|
Calculate the sum of all elements in a buffer in unit of UINT8.
|
||||||
During calculation, the carry bits are dropped.
|
During calculation, the carry bits are dropped.
|
||||||
|
|
||||||
This function calculates the sum of all elements in a buffer
|
This function calculates the sum of all elements in a buffer
|
||||||
in unit of UINT8. The carry bits in result of addition are dropped.
|
in unit of UINT8. The carry bits in result of addition are dropped.
|
||||||
The result is returned as UINT8. If Length is Zero, then Zero is
|
The result is returned as UINT8. If Length is Zero, then Zero is
|
||||||
returned.
|
returned.
|
||||||
|
|
||||||
If Buffer is NULL, then ASSERT().
|
If Buffer is NULL, then ASSERT().
|
||||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||||
|
|
||||||
@param Buffer Pointer to the buffer to carry out the sum operation.
|
@param Buffer Pointer to the buffer to carry out the sum operation.
|
||||||
@param Length The size, in bytes, of Buffer .
|
@param Length The size, in bytes, of Buffer .
|
||||||
@ -3044,14 +3044,14 @@ CalculateSum8 (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the two's complement checksum of all elements in a buffer
|
Returns the two's complement checksum of all elements in a buffer
|
||||||
of 8-bit values.
|
of 8-bit values.
|
||||||
|
|
||||||
This function first calculates the sum of the 8-bit values in the
|
This function first calculates the sum of the 8-bit values in the
|
||||||
buffer specified by Buffer and Length. The carry bits in the result
|
buffer specified by Buffer and Length. The carry bits in the result
|
||||||
of addition are dropped. Then, the two's complement of the sum is
|
of addition are dropped. Then, the two's complement of the sum is
|
||||||
returned. If Length is 0, then 0 is returned.
|
returned. If Length is 0, then 0 is returned.
|
||||||
|
|
||||||
If Buffer is NULL, then ASSERT().
|
If Buffer is NULL, then ASSERT().
|
||||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||||
|
|
||||||
@ -3070,13 +3070,13 @@ CalculateCheckSum8 (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the sum of all elements in a buffer of 16-bit values. During
|
Returns the sum of all elements in a buffer of 16-bit values. During
|
||||||
calculation, the carry bits are dropped.
|
calculation, the carry bits are dropped.
|
||||||
|
|
||||||
This function calculates the sum of the 16-bit values in the buffer
|
This function calculates the sum of the 16-bit values in the buffer
|
||||||
specified by Buffer and Length. The carry bits in result of addition are dropped.
|
specified by Buffer and Length. The carry bits in result of addition are dropped.
|
||||||
The 16-bit result is returned. If Length is 0, then 0 is returned.
|
The 16-bit result is returned. If Length is 0, then 0 is returned.
|
||||||
|
|
||||||
If Buffer is NULL, then ASSERT().
|
If Buffer is NULL, then ASSERT().
|
||||||
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
|
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
|
||||||
If Length is not aligned on a 16-bit boundary, then ASSERT().
|
If Length is not aligned on a 16-bit boundary, then ASSERT().
|
||||||
@ -3096,18 +3096,18 @@ CalculateSum16 (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the two's complement checksum of all elements in a buffer of
|
Returns the two's complement checksum of all elements in a buffer of
|
||||||
16-bit values.
|
16-bit values.
|
||||||
|
|
||||||
This function first calculates the sum of the 16-bit values in the buffer
|
This function first calculates the sum of the 16-bit values in the buffer
|
||||||
specified by Buffer and Length. The carry bits in the result of addition
|
specified by Buffer and Length. The carry bits in the result of addition
|
||||||
are dropped. Then, the two's complement of the sum is returned. If Length
|
are dropped. Then, the two's complement of the sum is returned. If Length
|
||||||
is 0, then 0 is returned.
|
is 0, then 0 is returned.
|
||||||
|
|
||||||
If Buffer is NULL, then ASSERT().
|
If Buffer is NULL, then ASSERT().
|
||||||
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
|
If Buffer is not aligned on a 16-bit boundary, then ASSERT().
|
||||||
If Length is not aligned on a 16-bit boundary, then ASSERT().
|
If Length is not aligned on a 16-bit boundary, then ASSERT().
|
||||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||||
|
|
||||||
@param Buffer Pointer to the buffer to carry out the checksum operation.
|
@param Buffer Pointer to the buffer to carry out the checksum operation.
|
||||||
@param Length The size, in bytes, of Buffer.
|
@param Length The size, in bytes, of Buffer.
|
||||||
@ -3123,13 +3123,13 @@ CalculateCheckSum16 (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the sum of all elements in a buffer of 32-bit values. During
|
Returns the sum of all elements in a buffer of 32-bit values. During
|
||||||
calculation, the carry bits are dropped.
|
calculation, the carry bits are dropped.
|
||||||
|
|
||||||
This function calculates the sum of the 32-bit values in the buffer
|
This function calculates the sum of the 32-bit values in the buffer
|
||||||
specified by Buffer and Length. The carry bits in result of addition are dropped.
|
specified by Buffer and Length. The carry bits in result of addition are dropped.
|
||||||
The 32-bit result is returned. If Length is 0, then 0 is returned.
|
The 32-bit result is returned. If Length is 0, then 0 is returned.
|
||||||
|
|
||||||
If Buffer is NULL, then ASSERT().
|
If Buffer is NULL, then ASSERT().
|
||||||
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
|
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
|
||||||
If Length is not aligned on a 32-bit boundary, then ASSERT().
|
If Length is not aligned on a 32-bit boundary, then ASSERT().
|
||||||
@ -3149,18 +3149,18 @@ CalculateSum32 (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the two's complement checksum of all elements in a buffer of
|
Returns the two's complement checksum of all elements in a buffer of
|
||||||
32-bit values.
|
32-bit values.
|
||||||
|
|
||||||
This function first calculates the sum of the 32-bit values in the buffer
|
This function first calculates the sum of the 32-bit values in the buffer
|
||||||
specified by Buffer and Length. The carry bits in the result of addition
|
specified by Buffer and Length. The carry bits in the result of addition
|
||||||
are dropped. Then, the two's complement of the sum is returned. If Length
|
are dropped. Then, the two's complement of the sum is returned. If Length
|
||||||
is 0, then 0 is returned.
|
is 0, then 0 is returned.
|
||||||
|
|
||||||
If Buffer is NULL, then ASSERT().
|
If Buffer is NULL, then ASSERT().
|
||||||
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
|
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
|
||||||
If Length is not aligned on a 32-bit boundary, then ASSERT().
|
If Length is not aligned on a 32-bit boundary, then ASSERT().
|
||||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||||
|
|
||||||
@param Buffer Pointer to the buffer to carry out the checksum operation.
|
@param Buffer Pointer to the buffer to carry out the checksum operation.
|
||||||
@param Length The size, in bytes, of Buffer.
|
@param Length The size, in bytes, of Buffer.
|
||||||
@ -3176,13 +3176,13 @@ CalculateCheckSum32 (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the sum of all elements in a buffer of 64-bit values. During
|
Returns the sum of all elements in a buffer of 64-bit values. During
|
||||||
calculation, the carry bits are dropped.
|
calculation, the carry bits are dropped.
|
||||||
|
|
||||||
This function calculates the sum of the 64-bit values in the buffer
|
This function calculates the sum of the 64-bit values in the buffer
|
||||||
specified by Buffer and Length. The carry bits in result of addition are dropped.
|
specified by Buffer and Length. The carry bits in result of addition are dropped.
|
||||||
The 64-bit result is returned. If Length is 0, then 0 is returned.
|
The 64-bit result is returned. If Length is 0, then 0 is returned.
|
||||||
|
|
||||||
If Buffer is NULL, then ASSERT().
|
If Buffer is NULL, then ASSERT().
|
||||||
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
|
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
|
||||||
If Length is not aligned on a 64-bit boundary, then ASSERT().
|
If Length is not aligned on a 64-bit boundary, then ASSERT().
|
||||||
@ -3202,18 +3202,18 @@ CalculateSum64 (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the two's complement checksum of all elements in a buffer of
|
Returns the two's complement checksum of all elements in a buffer of
|
||||||
64-bit values.
|
64-bit values.
|
||||||
|
|
||||||
This function first calculates the sum of the 64-bit values in the buffer
|
This function first calculates the sum of the 64-bit values in the buffer
|
||||||
specified by Buffer and Length. The carry bits in the result of addition
|
specified by Buffer and Length. The carry bits in the result of addition
|
||||||
are dropped. Then, the two's complement of the sum is returned. If Length
|
are dropped. Then, the two's complement of the sum is returned. If Length
|
||||||
is 0, then 0 is returned.
|
is 0, then 0 is returned.
|
||||||
|
|
||||||
If Buffer is NULL, then ASSERT().
|
If Buffer is NULL, then ASSERT().
|
||||||
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
|
If Buffer is not aligned on a 64-bit boundary, then ASSERT().
|
||||||
If Length is not aligned on a 64-bit boundary, then ASSERT().
|
If Length is not aligned on a 64-bit boundary, then ASSERT().
|
||||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||||
|
|
||||||
@param Buffer Pointer to the buffer to carry out the checksum operation.
|
@param Buffer Pointer to the buffer to carry out the checksum operation.
|
||||||
@param Length The size, in bytes, of Buffer.
|
@param Length The size, in bytes, of Buffer.
|
||||||
@ -3429,10 +3429,14 @@ CpuFlushTlb (
|
|||||||
/**
|
/**
|
||||||
Transfers control to a function starting with a new stack.
|
Transfers control to a function starting with a new stack.
|
||||||
|
|
||||||
Transfers control to the function specified by EntryPoint using the new stack
|
Transfers control to the function specified by EntryPoint using the
|
||||||
specified by NewStack and passing in the parameters specified by Context1 and
|
new stack specified by NewStack and passing in the parameters specified
|
||||||
Context2. Context1 and Context2 are optional and may be NULL. The function
|
by Context1 and Context2. Context1 and Context2 are optional and may
|
||||||
EntryPoint must never return.
|
be NULL. The function EntryPoint must never return. This function
|
||||||
|
supports a variable number of arguments following the NewStack parameter.
|
||||||
|
These additional arguments are ignored on IA-32, x64, and EBC.
|
||||||
|
IPF CPUs expect one additional parameter of type VOID * that specifies
|
||||||
|
the new backing store pointer.
|
||||||
|
|
||||||
If EntryPoint is NULL, then ASSERT().
|
If EntryPoint is NULL, then ASSERT().
|
||||||
If NewStack is NULL, then ASSERT().
|
If NewStack is NULL, then ASSERT().
|
||||||
@ -3452,7 +3456,8 @@ SwitchStack (
|
|||||||
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
||||||
IN VOID *Context1, OPTIONAL
|
IN VOID *Context1, OPTIONAL
|
||||||
IN VOID *Context2, OPTIONAL
|
IN VOID *Context2, OPTIONAL
|
||||||
IN VOID *NewStack
|
IN VOID *NewStack,
|
||||||
|
...
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -5666,38 +5671,6 @@ AsmPrepareAndThunk16 (
|
|||||||
IN OUT THUNK_CONTEXT *ThunkContext
|
IN OUT THUNK_CONTEXT *ThunkContext
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
Transfers control to a function starting with a new stack.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
If EntryPoint is NULL, then ASSERT().
|
|
||||||
If NewStack is NULL, then ASSERT().
|
|
||||||
|
|
||||||
@param EntryPoint A pointer to function to call with the new stack.
|
|
||||||
@param Context1 A pointer to the context to pass into the EntryPoint
|
|
||||||
function.
|
|
||||||
@param Context2 A pointer to the context to pass into the EntryPoint
|
|
||||||
function.
|
|
||||||
@param NewStack A pointer to the new stack to use for the EntryPoint
|
|
||||||
function.
|
|
||||||
@param NewBsp A pointer to the new memory location for RSE backing
|
|
||||||
store.
|
|
||||||
|
|
||||||
**/
|
|
||||||
VOID
|
|
||||||
EFIAPI
|
|
||||||
AsmSwitchStackAndBackingStore (
|
|
||||||
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
|
||||||
IN VOID *Context1, OPTIONAL
|
|
||||||
IN VOID *Context2, OPTIONAL
|
|
||||||
IN VOID *NewStack,
|
|
||||||
IN VOID *NewBsp
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT64 Status;
|
UINT64 Status;
|
||||||
UINT64 r9;
|
UINT64 r9;
|
||||||
@ -5751,21 +5724,21 @@ IpfReadItc (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Flush a range of cache lines in the cache coherency domain of the calling
|
Flush a range of cache lines in the cache coherency domain of the calling
|
||||||
CPU.
|
CPU.
|
||||||
|
|
||||||
Invalidates the cache lines specified by Address and Length. If Address is
|
Invalidates the cache lines specified by Address and Length. If Address is
|
||||||
not aligned on a cache line boundary, then entire cache line containing
|
not aligned on a cache line boundary, then entire cache line containing
|
||||||
Address is invalidated. If Address + Length is not aligned on a cache line
|
Address is invalidated. If Address + Length is not aligned on a cache line
|
||||||
boundary, then the entire instruction cache line containing Address + Length
|
boundary, then the entire instruction cache line containing Address + Length
|
||||||
-1 is invalidated. This function may choose to invalidate the entire
|
-1 is invalidated. This function may choose to invalidate the entire
|
||||||
instruction cache if that is more efficient than invalidating the specified
|
instruction cache if that is more efficient than invalidating the specified
|
||||||
range. If Length is 0, the no instruction cache lines are invalidated.
|
range. If Length is 0, the no instruction cache lines are invalidated.
|
||||||
Address is returned.
|
Address is returned.
|
||||||
|
|
||||||
If Length is greater than (MAX_ADDRESS - Address + 1), then ASSERT().
|
If Length is greater than (MAX_ADDRESS - Address + 1), then ASSERT().
|
||||||
|
|
||||||
@param Address The base address of the instruction lines to invalidate. If
|
@param Address The base address of the instruction lines to invalidate. If
|
||||||
the CPU is in a physical addressing mode, then Address is a
|
the CPU is in a physical addressing mode, then Address is a
|
||||||
physical address. If the CPU is in a virtual addressing mode,
|
physical address. If the CPU is in a virtual addressing mode,
|
||||||
then Address is a virtual address.
|
then Address is a virtual address.
|
||||||
|
@ -499,7 +499,7 @@
|
|||||||
<Filename SupArchList="IPF">Ipf/CpuPause.s</Filename>
|
<Filename SupArchList="IPF">Ipf/CpuPause.s</Filename>
|
||||||
<Filename SupArchList="IPF">Ipf/CpuFlushTlb.s</Filename>
|
<Filename SupArchList="IPF">Ipf/CpuFlushTlb.s</Filename>
|
||||||
<Filename SupArchList="IPF">Ipf/GetInterruptState.s</Filename>
|
<Filename SupArchList="IPF">Ipf/GetInterruptState.s</Filename>
|
||||||
<Filename SupArchList="IPF">Ipf/Non-existing.c</Filename>
|
<Filename SupArchList="IPF">Ipf/InternalSwitchStack.c</Filename>
|
||||||
<Filename SupArchList="IPF">Ipf/FlushCacheRange.s</Filename>
|
<Filename SupArchList="IPF">Ipf/FlushCacheRange.s</Filename>
|
||||||
<Filename SupArchList="IPF">Ipf/ReadItc.s</Filename>
|
<Filename SupArchList="IPF">Ipf/ReadItc.s</Filename>
|
||||||
|
|
||||||
|
@ -314,10 +314,16 @@ InternalMathDivRemS64x64 (
|
|||||||
/**
|
/**
|
||||||
Transfers control to a function starting with a new stack.
|
Transfers control to a function starting with a new stack.
|
||||||
|
|
||||||
Transfers control to the function specified by EntryPoint using the new stack
|
Transfers control to the function specified by EntryPoint using the
|
||||||
specified by NewStack and passing in the parameters specified by Context1 and
|
new stack specified by NewStack and passing in the parameters specified
|
||||||
Context2. Context1 and Context2 are optional and may be NULL. The function
|
by Context1 and Context2. Context1 and Context2 are optional and may
|
||||||
EntryPoint must never return.
|
be NULL. The function EntryPoint must never return.
|
||||||
|
Marker will be ignored on IA-32, x64, and EBC.
|
||||||
|
IPF CPUs expect one additional parameter of type VOID * that specifies
|
||||||
|
the new backing store pointer.
|
||||||
|
|
||||||
|
If EntryPoint is NULL, then ASSERT().
|
||||||
|
If NewStack is NULL, then ASSERT().
|
||||||
|
|
||||||
@param EntryPoint A pointer to function to call with the new stack.
|
@param EntryPoint A pointer to function to call with the new stack.
|
||||||
@param Context1 A pointer to the context to pass into the EntryPoint
|
@param Context1 A pointer to the context to pass into the EntryPoint
|
||||||
@ -326,15 +332,17 @@ InternalMathDivRemS64x64 (
|
|||||||
function.
|
function.
|
||||||
@param NewStack A pointer to the new stack to use for the EntryPoint
|
@param NewStack A pointer to the new stack to use for the EntryPoint
|
||||||
function.
|
function.
|
||||||
|
@param Marker VA_LIST marker for the variable argument list.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
InternalSwitchStack (
|
InternalSwitchStack (
|
||||||
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
||||||
IN VOID *Context1,
|
IN VOID *Context1, OPTIONAL
|
||||||
IN VOID *Context2,
|
IN VOID *Context2, OPTIONAL
|
||||||
IN VOID *NewStack
|
IN VOID *NewStack,
|
||||||
|
IN VA_LIST Marker
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -656,9 +664,9 @@ InternalSyncDecrement (
|
|||||||
Performs an atomic compare exchange operation on a 32-bit unsigned integer.
|
Performs an atomic compare exchange operation on a 32-bit unsigned integer.
|
||||||
|
|
||||||
Performs an atomic compare exchange operation on the 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
|
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,
|
ExchangeValue and CompareValue is returned. If Value is not equal to CompareValue,
|
||||||
then Value is returned. The compare exchange operation must be performed using
|
then Value is returned. The compare exchange operation must be performed using
|
||||||
MP safe mechanisms.
|
MP safe mechanisms.
|
||||||
|
|
||||||
@param Value A pointer to the 32-bit value for the compare exchange
|
@param Value A pointer to the 32-bit value for the compare exchange
|
||||||
@ -680,9 +688,9 @@ InternalSyncCompareExchange32 (
|
|||||||
/**
|
/**
|
||||||
Performs an atomic compare exchange operation on a 64-bit unsigned integer.
|
Performs an atomic compare exchange operation on a 64-bit unsigned integer.
|
||||||
|
|
||||||
Performs an atomic compare exchange operation on the 64-bit unsigned integer specified
|
Performs an atomic compare exchange operation on the 64-bit unsigned integer specified
|
||||||
by Value. If Value is equal to CompareValue, then Value is set to ExchangeValue and
|
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.
|
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.
|
The compare exchange operation must be performed using MP safe mechanisms.
|
||||||
|
|
||||||
@param Value A pointer to the 64-bit value for the compare exchange
|
@param Value A pointer to the 64-bit value for the compare exchange
|
||||||
@ -721,7 +729,7 @@ BitFieldReadUint (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Worker function that reads a bit field from Operand, performs a bitwise OR,
|
Worker function that reads a bit field from Operand, performs a bitwise OR,
|
||||||
and returns the result.
|
and returns the result.
|
||||||
|
|
||||||
Performs a bitwise OR between the bit field specified by StartBit and EndBit
|
Performs a bitwise OR between the bit field specified by StartBit and EndBit
|
||||||
@ -745,7 +753,7 @@ BitFieldOrUint (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Worker function that reads a bit field from Operand, performs a bitwise AND,
|
Worker function that reads a bit field from Operand, performs a bitwise AND,
|
||||||
and returns the result.
|
and returns the result.
|
||||||
|
|
||||||
Performs a bitwise AND between the bit field specified by StartBit and EndBit
|
Performs a bitwise AND between the bit field specified by StartBit and EndBit
|
||||||
@ -784,6 +792,7 @@ InternalAssertJumpBuffer (
|
|||||||
IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer
|
IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Restores the CPU context that was saved with SetJump().
|
Restores the CPU context that was saved with SetJump().
|
||||||
|
|
||||||
@ -802,4 +811,41 @@ InternalLongJump (
|
|||||||
IN UINTN Value
|
IN UINTN Value
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// IPF specific functions
|
||||||
|
//
|
||||||
|
|
||||||
|
/**
|
||||||
|
Transfers control to a function starting with a new stack.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
If EntryPoint is NULL, then ASSERT().
|
||||||
|
If NewStack is NULL, then ASSERT().
|
||||||
|
|
||||||
|
@param EntryPoint A pointer to function to call with the new stack.
|
||||||
|
@param Context1 A pointer to the context to pass into the EntryPoint
|
||||||
|
function.
|
||||||
|
@param Context2 A pointer to the context to pass into the EntryPoint
|
||||||
|
function.
|
||||||
|
@param NewStack A pointer to the new stack to use for the EntryPoint
|
||||||
|
function.
|
||||||
|
@param NewBsp A pointer to the new memory location for RSE backing
|
||||||
|
store.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
AsmSwitchStackAndBackingStore (
|
||||||
|
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
||||||
|
IN VOID *Context1, OPTIONAL
|
||||||
|
IN VOID *Context2, OPTIONAL
|
||||||
|
IN VOID *NewStack,
|
||||||
|
IN VOID *NewBsp
|
||||||
|
);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Switch Stack functions.
|
Switch Stack functions.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation<BR>
|
Copyright (c) 2006 - 2007, Intel Corporation<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -17,10 +17,13 @@
|
|||||||
/**
|
/**
|
||||||
Transfers control to a function starting with a new stack.
|
Transfers control to a function starting with a new stack.
|
||||||
|
|
||||||
Transfers control to the function specified by EntryPoint using the new stack
|
Transfers control to the function specified by EntryPoint using the
|
||||||
specified by NewStack and passing in the parameters specified by Context1 and
|
new stack specified by NewStack and passing in the parameters specified
|
||||||
Context2. Context1 and Context2 are optional and may be NULL. The function
|
by Context1 and Context2. Context1 and Context2 are optional and may
|
||||||
EntryPoint must never return.
|
be NULL. The function EntryPoint must never return.
|
||||||
|
Marker will be ignored on IA-32, x64, and EBC.
|
||||||
|
IPF CPUs expect one additional parameter of type VOID * that specifies
|
||||||
|
the new backing store pointer.
|
||||||
|
|
||||||
If EntryPoint is NULL, then ASSERT().
|
If EntryPoint is NULL, then ASSERT().
|
||||||
If NewStack is NULL, then ASSERT().
|
If NewStack is NULL, then ASSERT().
|
||||||
@ -32,21 +35,30 @@
|
|||||||
function.
|
function.
|
||||||
@param NewStack A pointer to the new stack to use for the EntryPoint
|
@param NewStack A pointer to the new stack to use for the EntryPoint
|
||||||
function.
|
function.
|
||||||
|
@param Marker VA_LIST marker for the variable argument list.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
InternalSwitchStack (
|
InternalSwitchStack (
|
||||||
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
||||||
IN VOID *Context1, OPTIONAL
|
IN VOID *Context1, OPTIONAL
|
||||||
IN VOID *Context2, OPTIONAL
|
IN VOID *Context2, OPTIONAL
|
||||||
IN VOID *NewStack
|
IN VOID *NewStack,
|
||||||
|
IN VA_LIST Marker
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// This version of this function does not actually change the stack pointer
|
// This version of this function does not actually change the stack pointer
|
||||||
// This is to support compilation of CPU types that do not support assemblers
|
// This is to support compilation of CPU types that do not support assemblers
|
||||||
// such as EBC
|
// such as EBC
|
||||||
//
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// Stack should be aligned with CPU_STACK_ALIGNMENT
|
||||||
|
//
|
||||||
|
ASSERT (((UINTN)NewStack & (CPU_STACK_ALIGNMENT - 1)) == 0);
|
||||||
|
|
||||||
EntryPoint (Context1, Context2);
|
EntryPoint (Context1, Context2);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
SwitchStack() function for IA-32.
|
SwitchStack() function for IA-32.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation<BR>
|
Copyright (c) 2006 - 2007, Intel Corporation<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -17,10 +17,16 @@
|
|||||||
/**
|
/**
|
||||||
Transfers control to a function starting with a new stack.
|
Transfers control to a function starting with a new stack.
|
||||||
|
|
||||||
Transfers control to the function specified by EntryPoint using the new stack
|
Transfers control to the function specified by EntryPoint using the
|
||||||
specified by NewStack and passing in the parameters specified by Context1 and
|
new stack specified by NewStack and passing in the parameters specified
|
||||||
Context2. Context1 and Context2 are optional and may be NULL. The function
|
by Context1 and Context2. Context1 and Context2 are optional and may
|
||||||
EntryPoint must never return.
|
be NULL. The function EntryPoint must never return.
|
||||||
|
Marker will be ignored on IA-32, x64, and EBC.
|
||||||
|
IPF CPUs expect one additional parameter of type VOID * that specifies
|
||||||
|
the new backing store pointer.
|
||||||
|
|
||||||
|
If EntryPoint is NULL, then ASSERT().
|
||||||
|
If NewStack is NULL, then ASSERT().
|
||||||
|
|
||||||
@param EntryPoint A pointer to function to call with the new stack.
|
@param EntryPoint A pointer to function to call with the new stack.
|
||||||
@param Context1 A pointer to the context to pass into the EntryPoint
|
@param Context1 A pointer to the context to pass into the EntryPoint
|
||||||
@ -29,19 +35,26 @@
|
|||||||
function.
|
function.
|
||||||
@param NewStack A pointer to the new stack to use for the EntryPoint
|
@param NewStack A pointer to the new stack to use for the EntryPoint
|
||||||
function.
|
function.
|
||||||
|
@param Marker VA_LIST marker for the variable argument list.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
InternalSwitchStack (
|
InternalSwitchStack (
|
||||||
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
||||||
IN VOID *Context1,
|
IN VOID *Context1, OPTIONAL
|
||||||
IN VOID *Context2,
|
IN VOID *Context2, OPTIONAL
|
||||||
IN VOID *NewStack
|
IN VOID *NewStack,
|
||||||
|
IN VA_LIST Marker
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
BASE_LIBRARY_JUMP_BUFFER JumpBuffer;
|
BASE_LIBRARY_JUMP_BUFFER JumpBuffer;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Stack should be aligned with CPU_STACK_ALIGNMENT
|
||||||
|
//
|
||||||
|
ASSERT (((UINTN)NewStack & (CPU_STACK_ALIGNMENT - 1)) == 0);
|
||||||
|
|
||||||
JumpBuffer.Eip = (UINTN)EntryPoint;
|
JumpBuffer.Eip = (UINTN)EntryPoint;
|
||||||
JumpBuffer.Esp = (UINTN)NewStack - sizeof (VOID*);
|
JumpBuffer.Esp = (UINTN)NewStack - sizeof (VOID*);
|
||||||
JumpBuffer.Esp -= sizeof (Context1) + sizeof (Context2);
|
JumpBuffer.Esp -= sizeof (Context1) + sizeof (Context2);
|
||||||
|
68
MdePkg/Library/BaseLib/Ipf/InternalSwitchStack.c
Normal file
68
MdePkg/Library/BaseLib/Ipf/InternalSwitchStack.c
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/** @file
|
||||||
|
SwitchStack() function for IPF.
|
||||||
|
|
||||||
|
Copyright (c) 2007, 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
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
Module Name: InternalSwitchStack.c
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include <BaseLibInternals.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
Transfers control to a function starting with a new stack.
|
||||||
|
|
||||||
|
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.
|
||||||
|
Marker will be ignored on IA-32, x64, and EBC.
|
||||||
|
IPF CPUs expect one additional parameter of type VOID * that specifies
|
||||||
|
the new backing store pointer.
|
||||||
|
|
||||||
|
If EntryPoint is NULL, then ASSERT().
|
||||||
|
If NewStack is NULL, then ASSERT().
|
||||||
|
|
||||||
|
@param EntryPoint A pointer to function to call with the new stack.
|
||||||
|
@param Context1 A pointer to the context to pass into the EntryPoint
|
||||||
|
function.
|
||||||
|
@param Context2 A pointer to the context to pass into the EntryPoint
|
||||||
|
function.
|
||||||
|
@param NewStack A pointer to the new stack to use for the EntryPoint
|
||||||
|
function.
|
||||||
|
@param Marker VA_LIST marker for the variable argument list.
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
InternalSwitchStack (
|
||||||
|
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
||||||
|
IN VOID *Context1, OPTIONAL
|
||||||
|
IN VOID *Context2, OPTIONAL
|
||||||
|
IN VOID *NewStack,
|
||||||
|
IN VA_LIST Marker
|
||||||
|
)
|
||||||
|
|
||||||
|
{
|
||||||
|
VOID *NewBsp;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Get new backing store pointer from variable list
|
||||||
|
//
|
||||||
|
NewBsp = VA_ARG (Marker, VOID *);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Stack should be aligned with CPU_STACK_ALIGNMENT
|
||||||
|
//
|
||||||
|
ASSERT (((UINTN)NewStack & (CPU_STACK_ALIGNMENT - 1)) == 0);
|
||||||
|
ASSERT (((UINTN)NewBsp & (CPU_STACK_ALIGNMENT - 1)) == 0);
|
||||||
|
|
||||||
|
AsmSwitchStackAndBackingStore (EntryPoint, Context1, Context2, NewStack, NewBsp);
|
||||||
|
}
|
@ -1,53 +0,0 @@
|
|||||||
/** @file
|
|
||||||
Non-existing BaseLib functions on Ipf
|
|
||||||
|
|
||||||
Copyright (c) 2006, 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
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
||||||
|
|
||||||
Module Name: Non-existing.c
|
|
||||||
|
|
||||||
**/
|
|
||||||
|
|
||||||
#include "../BaseLibInternals.h"
|
|
||||||
/**
|
|
||||||
Transfers control to a function starting with a new stack.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
If EntryPoint is NULL, then ASSERT().
|
|
||||||
If NewStack is NULL, then ASSERT().
|
|
||||||
|
|
||||||
@param EntryPoint A pointer to function to call with the new stack.
|
|
||||||
@param Context1 A pointer to the context to pass into the EntryPoint
|
|
||||||
function.
|
|
||||||
@param Context2 A pointer to the context to pass into the EntryPoint
|
|
||||||
function.
|
|
||||||
@param NewStack A pointer to the new stack to use for the EntryPoint
|
|
||||||
function.
|
|
||||||
|
|
||||||
**/
|
|
||||||
VOID
|
|
||||||
EFIAPI
|
|
||||||
InternalSwitchStack (
|
|
||||||
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
|
||||||
IN VOID *Context1, OPTIONAL
|
|
||||||
IN VOID *Context2, OPTIONAL
|
|
||||||
IN VOID *NewStack
|
|
||||||
)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
// This version of this function does not actually change the stack pointer
|
|
||||||
// This is to support compilation of CPU types that do not support assemblers
|
|
||||||
// such as EBC
|
|
||||||
//
|
|
||||||
ASSERT (FALSE);
|
|
||||||
}
|
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
Switch Stack functions.
|
Switch Stack functions.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation<BR>
|
Copyright (c) 2006 - 2007, Intel Corporation<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -19,14 +19,17 @@
|
|||||||
/**
|
/**
|
||||||
Transfers control to a function starting with a new stack.
|
Transfers control to a function starting with a new stack.
|
||||||
|
|
||||||
Transfers control to the function specified by EntryPoint using the new stack
|
Transfers control to the function specified by EntryPoint using the
|
||||||
specified by NewStack and passing in the parameters specified by Context1 and
|
new stack specified by NewStack and passing in the parameters specified
|
||||||
Context2. Context1 and Context2 are optional and may be NULL. The function
|
by Context1 and Context2. Context1 and Context2 are optional and may
|
||||||
EntryPoint must never return.
|
be NULL. The function EntryPoint must never return. This function
|
||||||
|
supports a variable number of arguments following the NewStack parameter.
|
||||||
|
These additional arguments are ignored on IA-32, x64, and EBC.
|
||||||
|
IPF CPUs expect one additional parameter of type VOID * that specifies
|
||||||
|
the new backing store pointer.
|
||||||
|
|
||||||
If EntryPoint is NULL, then ASSERT().
|
If EntryPoint is NULL, then ASSERT().
|
||||||
If NewStack is NULL, then ASSERT().
|
If NewStack is NULL, then ASSERT().
|
||||||
For IPF CPUs, if NewStack is not aligned on a 16-byte boundary, then ASSERT().
|
|
||||||
|
|
||||||
@param EntryPoint A pointer to function to call with the new stack.
|
@param EntryPoint A pointer to function to call with the new stack.
|
||||||
@param Context1 A pointer to the context to pass into the EntryPoint
|
@param Context1 A pointer to the context to pass into the EntryPoint
|
||||||
@ -41,16 +44,19 @@ VOID
|
|||||||
EFIAPI
|
EFIAPI
|
||||||
SwitchStack (
|
SwitchStack (
|
||||||
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
||||||
IN VOID *Context1,
|
IN VOID *Context1, OPTIONAL
|
||||||
IN VOID *Context2,
|
IN VOID *Context2, OPTIONAL
|
||||||
IN VOID *NewStack
|
IN VOID *NewStack,
|
||||||
|
...
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
VA_LIST Marker;
|
||||||
|
|
||||||
ASSERT (EntryPoint != NULL && NewStack != NULL);
|
ASSERT (EntryPoint != NULL && NewStack != NULL);
|
||||||
|
|
||||||
#ifdef MDE_CPU_IPF
|
VA_START (Marker, NewStack);
|
||||||
ASSERT (((UINTN)NewStack & 0xf) == 0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
InternalSwitchStack (EntryPoint, Context1, Context2, NewStack);
|
InternalSwitchStack (EntryPoint, Context1, Context2, NewStack, Marker);
|
||||||
|
|
||||||
|
VA_END (Marker);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user