MdePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Cache Maintenance Functions. These functions vary by ARM architecture so the MdePkg
|
||||
versions are null functions used to make sure things will compile.
|
||||
Cache Maintenance Functions. These functions vary by ARM architecture so the MdePkg
|
||||
versions are null functions used to make sure things will compile.
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# Cache Maintenance Library that uses Base Library services to maintain caches.
|
||||
# This library assumes there are no chipset dependencies required to maintain caches.
|
||||
#
|
||||
# Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
@@ -24,7 +24,7 @@
|
||||
FILE_GUID = 123dd843-57c9-4158-8418-ce68b3944ce7
|
||||
MODULE_TYPE = BASE
|
||||
VERSION_STRING = 1.1
|
||||
LIBRARY_CLASS = CacheMaintenanceLib
|
||||
LIBRARY_CLASS = CacheMaintenanceLib
|
||||
|
||||
|
||||
#
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Cache Maintenance Functions.
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -194,7 +194,7 @@ InvalidateDataCache (
|
||||
)
|
||||
{
|
||||
//
|
||||
// Invalidation of the entire data cache without writing back is not supported
|
||||
// Invalidation of the entire data cache without writing back is not supported
|
||||
// on IPF architecture, so a write back and invalidate operation is performed.
|
||||
//
|
||||
WriteBackInvalidateDataCache ();
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Cache Maintenance Functions.
|
||||
|
||||
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -135,7 +135,7 @@ WriteBackInvalidateDataCacheRange (
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Address));
|
||||
|
||||
//
|
||||
// If the CPU does not support CLFLUSH instruction,
|
||||
// If the CPU does not support CLFLUSH instruction,
|
||||
// then promote flush range to flush entire cache.
|
||||
//
|
||||
AsmCpuid (0x01, NULL, &RegEbx, NULL, &RegEdx);
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# CpuFlushTlb() for ARM
|
||||
#
|
||||
# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -1,8 +1,8 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; CpuFlushTlb() for ARM
|
||||
;
|
||||
; Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
; Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -29,7 +29,7 @@
|
||||
; VOID
|
||||
; );
|
||||
;
|
||||
CpuFlushTlb
|
||||
CpuFlushTlb
|
||||
MOV r0,#0
|
||||
MCR p15,0,r0,c8,c5,0 ;Invalidate all the unlocked entried in TLB
|
||||
BX LR
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# CpuSleep() for ARMv7
|
||||
#
|
||||
@@ -8,7 +8,7 @@
|
||||
#
|
||||
# But this is a no-op on ARMv7
|
||||
#
|
||||
# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -1,4 +1,4 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; CpuSleep() for ARMv7
|
||||
;
|
||||
@@ -8,7 +8,7 @@
|
||||
;
|
||||
; But this is a no-op on ARMv7
|
||||
;
|
||||
; Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
; Portions copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -25,7 +25,7 @@
|
||||
FILE_GUID = 4FBD2538-249C-4b50-8F4A-A9E66609CBF6
|
||||
MODULE_TYPE = BASE
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = CpuLib
|
||||
LIBRARY_CLASS = CpuLib
|
||||
|
||||
|
||||
#
|
||||
@@ -33,23 +33,23 @@
|
||||
#
|
||||
|
||||
[Sources.IA32]
|
||||
Ia32/CpuSleep.c | MSFT
|
||||
Ia32/CpuFlushTlb.c | MSFT
|
||||
Ia32/CpuSleep.c | MSFT
|
||||
Ia32/CpuFlushTlb.c | MSFT
|
||||
|
||||
Ia32/CpuSleep.nasm| INTEL
|
||||
Ia32/CpuFlushTlb.nasm| INTEL
|
||||
|
||||
Ia32/CpuSleepGcc.c | GCC
|
||||
Ia32/CpuFlushTlbGcc.c | GCC
|
||||
Ia32/CpuSleepGcc.c | GCC
|
||||
Ia32/CpuFlushTlbGcc.c | GCC
|
||||
|
||||
[Sources.X64]
|
||||
X64/CpuFlushTlb.nasm
|
||||
X64/CpuSleep.nasm
|
||||
|
||||
X64/CpuSleep.nasm| GCC
|
||||
X64/CpuSleep.S | GCC
|
||||
X64/CpuSleep.S | GCC
|
||||
X64/CpuFlushTlb.nasm| GCC
|
||||
X64/CpuFlushTlb.S | GCC
|
||||
X64/CpuFlushTlb.S | GCC
|
||||
|
||||
[Sources.IPF]
|
||||
Ipf/CpuFlushTlb.s
|
||||
@@ -60,11 +60,11 @@
|
||||
|
||||
[Sources.ARM]
|
||||
Arm/CpuFlushTlb.asm | RVCT
|
||||
Arm/CpuSleep.asm | RVCT
|
||||
Arm/CpuSleep.asm | RVCT
|
||||
Arm/CpuFlushTlb.asm | MSFT
|
||||
Arm/CpuSleep.asm | MSFT
|
||||
Arm/CpuFlushTlb.S | GCC
|
||||
Arm/CpuSleep.S | GCC
|
||||
Arm/CpuSleep.S | GCC
|
||||
|
||||
[Sources.AARCH64]
|
||||
AArch64/CpuFlushTlb.S | GCC
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# Debug Library with empty functions.
|
||||
#
|
||||
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -20,7 +20,7 @@
|
||||
FILE_GUID = 9ba1d976-0624-41a3-8650-28165e8d9ae8
|
||||
MODULE_TYPE = BASE
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = DebugLib
|
||||
LIBRARY_CLASS = DebugLib
|
||||
|
||||
|
||||
#
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Null Base Debug Library instance with empty functions.
|
||||
|
||||
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -18,15 +18,15 @@
|
||||
/**
|
||||
Prints a debug message to the debug output device if the specified error level is enabled.
|
||||
|
||||
If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
|
||||
GetDebugPrintErrorLevel (), then print the message specified by Format and the
|
||||
If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
|
||||
GetDebugPrintErrorLevel (), then print the message specified by Format and the
|
||||
associated variable argument list to the debug output device.
|
||||
|
||||
If Format is NULL, then ASSERT().
|
||||
|
||||
@param ErrorLevel The error level of the debug message.
|
||||
@param Format Format string for the debug message to print.
|
||||
@param ... Variable argument list whose contents are accessed
|
||||
@param ... Variable argument list whose contents are accessed
|
||||
based on the format string specified by Format.
|
||||
|
||||
**/
|
||||
@@ -42,14 +42,14 @@ DebugPrint (
|
||||
|
||||
|
||||
/**
|
||||
Prints an assert message containing a filename, line number, and description.
|
||||
Prints an assert message containing a filename, line number, and description.
|
||||
This may be followed by a breakpoint or a dead loop.
|
||||
|
||||
Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"
|
||||
to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
|
||||
PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
|
||||
DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
|
||||
CpuDeadLoop() is called. If neither of these bits are set, then this function
|
||||
to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
|
||||
PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
|
||||
DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
|
||||
CpuDeadLoop() is called. If neither of these bits are set, then this function
|
||||
returns immediately after the message is printed to the debug output device.
|
||||
DebugAssert() must actively prevent recursion. If DebugAssert() is called while
|
||||
processing another DebugAssert(), then DebugAssert() must return immediately.
|
||||
@@ -76,14 +76,14 @@ DebugAssert (
|
||||
/**
|
||||
Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
|
||||
|
||||
This function fills Length bytes of Buffer with the value specified by
|
||||
This function fills Length bytes of Buffer with the value specified by
|
||||
PcdDebugClearMemoryValue, and returns Buffer.
|
||||
|
||||
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 The pointer to the target buffer to be filled with PcdDebugClearMemoryValue.
|
||||
@param Length The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
|
||||
@param Length The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
|
||||
|
||||
@return Buffer The pointer to the target buffer filled with PcdDebugClearMemoryValue.
|
||||
|
||||
@@ -102,7 +102,7 @@ DebugClearMemory (
|
||||
/**
|
||||
Returns TRUE if ASSERT() macros are enabled.
|
||||
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of
|
||||
PcdDebugProperyMask is set. Otherwise FALSE is returned.
|
||||
|
||||
@retval TRUE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set.
|
||||
@@ -119,10 +119,10 @@ DebugAssertEnabled (
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
Returns TRUE if DEBUG() macros are enabled.
|
||||
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of
|
||||
PcdDebugProperyMask is set. Otherwise FALSE is returned.
|
||||
|
||||
@retval TRUE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is set.
|
||||
@@ -139,10 +139,10 @@ DebugPrintEnabled (
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
Returns TRUE if DEBUG_CODE() macros are enabled.
|
||||
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of
|
||||
PcdDebugProperyMask is set. Otherwise FALSE is returned.
|
||||
|
||||
@retval TRUE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set.
|
||||
@@ -159,10 +159,10 @@ DebugCodeEnabled (
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.
|
||||
|
||||
This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of
|
||||
This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of
|
||||
PcdDebugProperyMask is set. Otherwise FALSE is returned.
|
||||
|
||||
@retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
# Instance of Debug Library based on Serial Port Library.
|
||||
# It uses Print Library to produce formatted output strings to seiral port device.
|
||||
#
|
||||
# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -21,7 +21,7 @@
|
||||
FILE_GUID = BB83F95F-EDBC-4884-A520-CD42AF388FAE
|
||||
MODULE_TYPE = BASE
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = DebugLib
|
||||
LIBRARY_CLASS = DebugLib
|
||||
CONSTRUCTOR = BaseDebugLibSerialPortConstructor
|
||||
|
||||
#
|
||||
|
@@ -1,20 +1,20 @@
|
||||
/** @file
|
||||
Base Debug library instance base on Serial Port library.
|
||||
It uses PrintLib to send debug messages to serial port device.
|
||||
|
||||
NOTE: If the Serial Port library enables hardware flow control, then a call
|
||||
to DebugPrint() or DebugAssert() may hang if writes to the serial port are
|
||||
|
||||
NOTE: If the Serial Port library enables hardware flow control, then a call
|
||||
to DebugPrint() or DebugAssert() may hang if writes to the serial port are
|
||||
being blocked. This may occur if a key(s) are pressed in a terminal emulator
|
||||
used to monitor the DEBUG() and ASSERT() messages.
|
||||
used to monitor the DEBUG() and ASSERT() messages.
|
||||
|
||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
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.
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <Library/DebugPrintErrorLevelLib.h>
|
||||
|
||||
//
|
||||
// Define the maximum debug and assert message length that this library supports
|
||||
// Define the maximum debug and assert message length that this library supports
|
||||
//
|
||||
#define MAX_DEBUG_MESSAGE_LENGTH 0x100
|
||||
|
||||
@@ -50,15 +50,15 @@ BaseDebugLibSerialPortConstructor (
|
||||
/**
|
||||
Prints a debug message to the debug output device if the specified error level is enabled.
|
||||
|
||||
If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
|
||||
GetDebugPrintErrorLevel (), then print the message specified by Format and the
|
||||
If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
|
||||
GetDebugPrintErrorLevel (), then print the message specified by Format and the
|
||||
associated variable argument list to the debug output device.
|
||||
|
||||
If Format is NULL, then ASSERT().
|
||||
|
||||
@param ErrorLevel The error level of the debug message.
|
||||
@param Format Format string for the debug message to print.
|
||||
@param ... Variable argument list whose contents are accessed
|
||||
@param ... Variable argument list whose contents are accessed
|
||||
based on the format string specified by Format.
|
||||
|
||||
**/
|
||||
@@ -93,21 +93,21 @@ DebugPrint (
|
||||
VA_END (Marker);
|
||||
|
||||
//
|
||||
// Send the print string to a Serial Port
|
||||
// Send the print string to a Serial Port
|
||||
//
|
||||
SerialPortWrite ((UINT8 *)Buffer, AsciiStrLen (Buffer));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Prints an assert message containing a filename, line number, and description.
|
||||
Prints an assert message containing a filename, line number, and description.
|
||||
This may be followed by a breakpoint or a dead loop.
|
||||
|
||||
Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"
|
||||
to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
|
||||
PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
|
||||
DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
|
||||
CpuDeadLoop() is called. If neither of these bits are set, then this function
|
||||
to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
|
||||
PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
|
||||
DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
|
||||
CpuDeadLoop() is called. If neither of these bits are set, then this function
|
||||
returns immediately after the message is printed to the debug output device.
|
||||
DebugAssert() must actively prevent recursion. If DebugAssert() is called while
|
||||
processing another DebugAssert(), then DebugAssert() must return immediately.
|
||||
@@ -154,14 +154,14 @@ DebugAssert (
|
||||
/**
|
||||
Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
|
||||
|
||||
This function fills Length bytes of Buffer with the value specified by
|
||||
This function fills Length bytes of Buffer with the value specified by
|
||||
PcdDebugClearMemoryValue, and returns Buffer.
|
||||
|
||||
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 The pointer to the target buffer to be filled with PcdDebugClearMemoryValue.
|
||||
@param Length The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
|
||||
@param Length The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
|
||||
|
||||
@return Buffer The pointer to the target buffer filled with PcdDebugClearMemoryValue.
|
||||
|
||||
@@ -188,7 +188,7 @@ DebugClearMemory (
|
||||
/**
|
||||
Returns TRUE if ASSERT() macros are enabled.
|
||||
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of
|
||||
PcdDebugProperyMask is set. Otherwise FALSE is returned.
|
||||
|
||||
@retval TRUE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set.
|
||||
@@ -205,10 +205,10 @@ DebugAssertEnabled (
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
Returns TRUE if DEBUG() macros are enabled.
|
||||
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of
|
||||
PcdDebugProperyMask is set. Otherwise FALSE is returned.
|
||||
|
||||
@retval TRUE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is set.
|
||||
@@ -225,10 +225,10 @@ DebugPrintEnabled (
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
Returns TRUE if DEBUG_CODE() macros are enabled.
|
||||
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of
|
||||
This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of
|
||||
PcdDebugProperyMask is set. Otherwise FALSE is returned.
|
||||
|
||||
@retval TRUE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set.
|
||||
@@ -245,10 +245,10 @@ DebugCodeEnabled (
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.
|
||||
|
||||
This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of
|
||||
This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of
|
||||
PcdDebugProperyMask is set. Otherwise FALSE is returned.
|
||||
|
||||
@retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set.
|
||||
|
@@ -1,9 +1,9 @@
|
||||
/** @file
|
||||
Debug Print Error Level library instance that retrieves the current error
|
||||
level from PcdDebugPrintErrorLevel. This generic library instance does not
|
||||
Debug Print Error Level library instance that retrieves the current error
|
||||
level from PcdDebugPrintErrorLevel. This generic library instance does not
|
||||
support the setting of the global debug print error level mask for the platform.
|
||||
|
||||
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -38,9 +38,9 @@ GetDebugPrintErrorLevel (
|
||||
|
||||
/**
|
||||
Sets the global debug print error level mask fpr the entire platform.
|
||||
|
||||
|
||||
@param ErrorLevel Global debug print error level.
|
||||
|
||||
|
||||
@retval TRUE The debug print error level mask was sucessfully set.
|
||||
@retval FALSE The debug print error level mask could not be set.
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
## @file
|
||||
# Debug Print Error Level library instance based on PcdDebugPrintErrorLevel.
|
||||
# It retrieves the current error level from PcdDebugPrintErrorLevel.
|
||||
# It retrieves the current error level from PcdDebugPrintErrorLevel.
|
||||
#
|
||||
# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
[LibraryClasses]
|
||||
PcdLib
|
||||
|
||||
|
||||
[Pcd]
|
||||
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel ## CONSUMES
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Provide generic extract guided section functions.
|
||||
|
||||
Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -30,8 +30,8 @@ typedef struct {
|
||||
} EXTRACT_GUIDED_SECTION_HANDLER_INFO;
|
||||
|
||||
/**
|
||||
HandlerInfo table address is set by PcdGuidedExtractHandlerTableAddress, which is used to store
|
||||
the registered guid and Handler list. When it is initialized, it will be directly returned.
|
||||
HandlerInfo table address is set by PcdGuidedExtractHandlerTableAddress, which is used to store
|
||||
the registered guid and Handler list. When it is initialized, it will be directly returned.
|
||||
Or, HandlerInfo table will be initialized in this function.
|
||||
|
||||
@param[in, out] InfoPointer The pointer to the handler information structure.
|
||||
@@ -45,7 +45,7 @@ GetExtractGuidedSectionHandlerInfo (
|
||||
)
|
||||
{
|
||||
EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo;
|
||||
|
||||
|
||||
//
|
||||
// Set the available memory address to handler info.
|
||||
//
|
||||
@@ -84,12 +84,12 @@ GetExtractGuidedSectionHandlerInfo (
|
||||
HandlerInfo->NumberOfExtractHandler = 0;
|
||||
HandlerInfo->ExtractHandlerGuidTable = (GUID *) (HandlerInfo + 1);
|
||||
HandlerInfo->ExtractDecodeHandlerTable = (EXTRACT_GUIDED_SECTION_DECODE_HANDLER *) (
|
||||
(UINT8 *)HandlerInfo->ExtractHandlerGuidTable +
|
||||
(UINT8 *)HandlerInfo->ExtractHandlerGuidTable +
|
||||
PcdGet32 (PcdMaximumGuidedExtractHandler) * sizeof (GUID)
|
||||
);
|
||||
HandlerInfo->ExtractGetInfoHandlerTable = (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *) (
|
||||
(UINT8 *)HandlerInfo->ExtractDecodeHandlerTable +
|
||||
PcdGet32 (PcdMaximumGuidedExtractHandler) *
|
||||
(UINT8 *)HandlerInfo->ExtractDecodeHandlerTable +
|
||||
PcdGet32 (PcdMaximumGuidedExtractHandler) *
|
||||
sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER)
|
||||
);
|
||||
*InfoPointer = HandlerInfo;
|
||||
@@ -101,7 +101,7 @@ GetExtractGuidedSectionHandlerInfo (
|
||||
|
||||
Sets ExtractHandlerGuidTable so it points at a callee allocated array of registered GUIDs.
|
||||
The total number of GUIDs in the array are returned. Since the array of GUIDs is callee allocated
|
||||
and caller must treat this array of GUIDs as read-only data.
|
||||
and caller must treat this array of GUIDs as read-only data.
|
||||
If ExtractHandlerGuidTable is NULL, then ASSERT().
|
||||
|
||||
@param[out] ExtractHandlerGuidTable A pointer to the array of GUIDs that have been registered through
|
||||
@@ -145,7 +145,7 @@ ExtractGuidedSectionGetGuidList (
|
||||
Registers the handlers specified by GetInfoHandler and DecodeHandler with the GUID specified by SectionGuid.
|
||||
If the GUID value specified by SectionGuid has already been registered, then return RETURN_ALREADY_STARTED.
|
||||
If there are not enough resources available to register the handlers then RETURN_OUT_OF_RESOURCES is returned.
|
||||
|
||||
|
||||
If SectionGuid is NULL, then ASSERT().
|
||||
If GetInfoHandler is NULL, then ASSERT().
|
||||
If DecodeHandler is NULL, then ASSERT().
|
||||
@@ -156,7 +156,7 @@ ExtractGuidedSectionGetGuidList (
|
||||
size of the decoded buffer and the size of an optional scratch buffer
|
||||
required to actually decode the data in a GUIDed section.
|
||||
@param[in] DecodeHandler The pointer to a function that decodes a GUIDed section into a caller
|
||||
allocated output buffer.
|
||||
allocated output buffer.
|
||||
|
||||
@retval RETURN_SUCCESS The handlers were registered.
|
||||
@retval RETURN_OUT_OF_RESOURCES There are not enough resources available to register the handlers.
|
||||
@@ -210,7 +210,7 @@ ExtractGuidedSectionRegisterHandlers (
|
||||
if (HandlerInfo->NumberOfExtractHandler >= PcdGet32 (PcdMaximumGuidedExtractHandler)) {
|
||||
return RETURN_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Register new Handler and guid value.
|
||||
//
|
||||
@@ -227,14 +227,14 @@ ExtractGuidedSectionRegisterHandlers (
|
||||
The selected handler is used to retrieve and return the size of the decoded buffer and the size of an
|
||||
optional scratch buffer required to actually decode the data in a GUIDed section.
|
||||
|
||||
Examines a GUIDed section specified by InputSection.
|
||||
Examines a GUIDed section specified by InputSection.
|
||||
If GUID for InputSection does not match any of the GUIDs registered through ExtractGuidedSectionRegisterHandlers(),
|
||||
then RETURN_UNSUPPORTED is returned.
|
||||
If the GUID of InputSection does match the GUID that this handler supports, then the the associated handler
|
||||
then RETURN_UNSUPPORTED is returned.
|
||||
If the GUID of InputSection does match the GUID that this handler supports, then the the associated handler
|
||||
of type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER that was registered with ExtractGuidedSectionRegisterHandlers()
|
||||
is used to retrieve the OututBufferSize, ScratchSize, and Attributes values. The return status from the handler of
|
||||
type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER is returned.
|
||||
|
||||
|
||||
If InputSection is NULL, then ASSERT().
|
||||
If OutputBufferSize is NULL, then ASSERT().
|
||||
If ScratchBufferSize is NULL, then ASSERT().
|
||||
@@ -261,14 +261,14 @@ ExtractGuidedSectionGetInfo (
|
||||
IN CONST VOID *InputSection,
|
||||
OUT UINT32 *OutputBufferSize,
|
||||
OUT UINT32 *ScratchBufferSize,
|
||||
OUT UINT16 *SectionAttribute
|
||||
OUT UINT16 *SectionAttribute
|
||||
)
|
||||
{
|
||||
UINT32 Index;
|
||||
RETURN_STATUS Status;
|
||||
EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo;
|
||||
EFI_GUID *SectionDefinitionGuid;
|
||||
|
||||
|
||||
//
|
||||
// Check input parameter
|
||||
//
|
||||
@@ -310,7 +310,7 @@ ExtractGuidedSectionGetInfo (
|
||||
}
|
||||
|
||||
//
|
||||
// Not found, the input guided section is not supported.
|
||||
// Not found, the input guided section is not supported.
|
||||
//
|
||||
return RETURN_UNSUPPORTED;
|
||||
}
|
||||
@@ -321,26 +321,26 @@ ExtractGuidedSectionGetInfo (
|
||||
The selected handler is used to decode the data in a GUIDed section and return the result in a caller
|
||||
allocated output buffer.
|
||||
|
||||
Decodes the GUIDed section specified by InputSection.
|
||||
Decodes the GUIDed section specified by InputSection.
|
||||
If GUID for InputSection does not match any of the GUIDs registered through ExtractGuidedSectionRegisterHandlers(),
|
||||
then RETURN_UNSUPPORTED is returned.
|
||||
then RETURN_UNSUPPORTED is returned.
|
||||
If the GUID of InputSection does match the GUID that this handler supports, then the the associated handler
|
||||
of type EXTRACT_GUIDED_SECTION_DECODE_HANDLER that was registered with ExtractGuidedSectionRegisterHandlers()
|
||||
is used to decode InputSection into the buffer specified by OutputBuffer and the authentication status of this
|
||||
decode operation is returned in AuthenticationStatus. If the decoded buffer is identical to the data in InputSection,
|
||||
then OutputBuffer is set to point at the data in InputSection. Otherwise, the decoded data will be placed in a caller
|
||||
allocated buffer specified by OutputBuffer. This function is responsible for computing the EFI_AUTH_STATUS_PLATFORM_OVERRIDE
|
||||
bit of in AuthenticationStatus. The return status from the handler of type EXTRACT_GUIDED_SECTION_DECODE_HANDLER is returned.
|
||||
|
||||
bit of in AuthenticationStatus. The return status from the handler of type EXTRACT_GUIDED_SECTION_DECODE_HANDLER is returned.
|
||||
|
||||
If InputSection is NULL, then ASSERT().
|
||||
If OutputBuffer is NULL, then ASSERT().
|
||||
If ScratchBuffer is NULL and this decode operation requires a scratch buffer, then ASSERT().
|
||||
If AuthenticationStatus is NULL, then ASSERT().
|
||||
If AuthenticationStatus is NULL, then ASSERT().
|
||||
|
||||
@param[in] InputSection A pointer to a GUIDed section of an FFS formatted file.
|
||||
@param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation.
|
||||
@param[in] ScratchBuffer A caller allocated buffer that may be required by this function as a scratch buffer to perform the decode operation.
|
||||
@param[out] AuthenticationStatus
|
||||
@param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation.
|
||||
@param[in] ScratchBuffer A caller allocated buffer that may be required by this function as a scratch buffer to perform the decode operation.
|
||||
@param[out] AuthenticationStatus
|
||||
A pointer to the authentication status of the decoded output buffer. See the definition
|
||||
of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI section of the PI
|
||||
Specification.
|
||||
@@ -356,14 +356,14 @@ ExtractGuidedSectionDecode (
|
||||
IN CONST VOID *InputSection,
|
||||
OUT VOID **OutputBuffer,
|
||||
IN VOID *ScratchBuffer, OPTIONAL
|
||||
OUT UINT32 *AuthenticationStatus
|
||||
OUT UINT32 *AuthenticationStatus
|
||||
)
|
||||
{
|
||||
UINT32 Index;
|
||||
RETURN_STATUS Status;
|
||||
EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo;
|
||||
EFI_GUID *SectionDefinitionGuid;
|
||||
|
||||
|
||||
//
|
||||
// Check input parameter
|
||||
//
|
||||
@@ -373,7 +373,7 @@ ExtractGuidedSectionDecode (
|
||||
|
||||
//
|
||||
// Get all registered handler information.
|
||||
//
|
||||
//
|
||||
Status = GetExtractGuidedSectionHandlerInfo (&HandlerInfo);
|
||||
if (RETURN_ERROR (Status)) {
|
||||
return Status;
|
||||
@@ -404,29 +404,29 @@ ExtractGuidedSectionDecode (
|
||||
}
|
||||
|
||||
//
|
||||
// Not found, the input guided section is not supported.
|
||||
// Not found, the input guided section is not supported.
|
||||
//
|
||||
return RETURN_UNSUPPORTED;
|
||||
}
|
||||
|
||||
/**
|
||||
Retrieves handlers of type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER and
|
||||
Retrieves handlers of type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER and
|
||||
EXTRACT_GUIDED_SECTION_DECODE_HANDLER for a specific GUID section type.
|
||||
|
||||
Retrieves the handlers associated with SectionGuid and returns them in
|
||||
|
||||
Retrieves the handlers associated with SectionGuid and returns them in
|
||||
GetInfoHandler and DecodeHandler.
|
||||
|
||||
If the GUID value specified by SectionGuid has not been registered, then
|
||||
If the GUID value specified by SectionGuid has not been registered, then
|
||||
return RETURN_NOT_FOUND.
|
||||
|
||||
|
||||
If SectionGuid is NULL, then ASSERT().
|
||||
|
||||
@param[in] SectionGuid A pointer to the GUID associated with the handlersof the GUIDed
|
||||
@param[in] SectionGuid A pointer to the GUID associated with the handlersof the GUIDed
|
||||
section type being retrieved.
|
||||
@param[out] GetInfoHandler Pointer to a function that examines a GUIDed section and returns
|
||||
the size of the decoded buffer and the size of an optional scratch
|
||||
buffer required to actually decode the data in a GUIDed section.
|
||||
This is an optional parameter that may be NULL. If it is NULL, then
|
||||
@param[out] GetInfoHandler Pointer to a function that examines a GUIDed section and returns
|
||||
the size of the decoded buffer and the size of an optional scratch
|
||||
buffer required to actually decode the data in a GUIDed section.
|
||||
This is an optional parameter that may be NULL. If it is NULL, then
|
||||
the previously registered handler is not returned.
|
||||
@param[out] DecodeHandler Pointer to a function that decodes a GUIDed section into a caller
|
||||
allocated output buffer. This is an optional parameter that may be NULL.
|
||||
|
@@ -1,148 +1,148 @@
|
||||
#
|
||||
# Copyright (c) 2014-2018, Linaro Limited. 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.
|
||||
#
|
||||
#
|
||||
|
||||
.text
|
||||
.align 3
|
||||
|
||||
GCC_ASM_EXPORT(MmioRead8Internal)
|
||||
GCC_ASM_EXPORT(MmioWrite8Internal)
|
||||
GCC_ASM_EXPORT(MmioRead16Internal)
|
||||
GCC_ASM_EXPORT(MmioWrite16Internal)
|
||||
GCC_ASM_EXPORT(MmioRead32Internal)
|
||||
GCC_ASM_EXPORT(MmioWrite32Internal)
|
||||
GCC_ASM_EXPORT(MmioRead64Internal)
|
||||
GCC_ASM_EXPORT(MmioWrite64Internal)
|
||||
|
||||
//
|
||||
// Reads an 8-bit MMIO register.
|
||||
//
|
||||
// Reads the 8-bit MMIO register specified by Address. The 8-bit read value is
|
||||
// returned. This function must guarantee that all MMIO read and write
|
||||
// operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to read.
|
||||
//
|
||||
// @return The value read.
|
||||
//
|
||||
ASM_PFX(MmioRead8Internal):
|
||||
ldrb w0, [x0]
|
||||
dmb ld
|
||||
ret
|
||||
|
||||
//
|
||||
// Writes an 8-bit MMIO register.
|
||||
//
|
||||
// Writes the 8-bit MMIO register specified by Address with the value specified
|
||||
// by Value and returns Value. This function must guarantee that all MMIO read
|
||||
// and write operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to write.
|
||||
// @param Value The value to write to the MMIO register.
|
||||
//
|
||||
ASM_PFX(MmioWrite8Internal):
|
||||
dmb st
|
||||
strb w1, [x0]
|
||||
ret
|
||||
|
||||
//
|
||||
// Reads a 16-bit MMIO register.
|
||||
//
|
||||
// Reads the 16-bit MMIO register specified by Address. The 16-bit read value is
|
||||
// returned. This function must guarantee that all MMIO read and write
|
||||
// operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to read.
|
||||
//
|
||||
// @return The value read.
|
||||
//
|
||||
ASM_PFX(MmioRead16Internal):
|
||||
ldrh w0, [x0]
|
||||
dmb ld
|
||||
ret
|
||||
|
||||
//
|
||||
// Writes a 16-bit MMIO register.
|
||||
//
|
||||
// Writes the 16-bit MMIO register specified by Address with the value specified
|
||||
// by Value and returns Value. This function must guarantee that all MMIO read
|
||||
// and write operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to write.
|
||||
// @param Value The value to write to the MMIO register.
|
||||
//
|
||||
ASM_PFX(MmioWrite16Internal):
|
||||
dmb st
|
||||
strh w1, [x0]
|
||||
ret
|
||||
|
||||
//
|
||||
// Reads a 32-bit MMIO register.
|
||||
//
|
||||
// Reads the 32-bit MMIO register specified by Address. The 32-bit read value is
|
||||
// returned. This function must guarantee that all MMIO read and write
|
||||
// operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to read.
|
||||
//
|
||||
// @return The value read.
|
||||
//
|
||||
ASM_PFX(MmioRead32Internal):
|
||||
ldr w0, [x0]
|
||||
dmb ld
|
||||
ret
|
||||
|
||||
//
|
||||
// Writes a 32-bit MMIO register.
|
||||
//
|
||||
// Writes the 32-bit MMIO register specified by Address with the value specified
|
||||
// by Value and returns Value. This function must guarantee that all MMIO read
|
||||
// and write operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to write.
|
||||
// @param Value The value to write to the MMIO register.
|
||||
//
|
||||
ASM_PFX(MmioWrite32Internal):
|
||||
dmb st
|
||||
str w1, [x0]
|
||||
ret
|
||||
|
||||
//
|
||||
// Reads a 64-bit MMIO register.
|
||||
//
|
||||
// Reads the 64-bit MMIO register specified by Address. The 64-bit read value is
|
||||
// returned. This function must guarantee that all MMIO read and write
|
||||
// operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to read.
|
||||
//
|
||||
// @return The value read.
|
||||
//
|
||||
ASM_PFX(MmioRead64Internal):
|
||||
ldr x0, [x0]
|
||||
dmb ld
|
||||
ret
|
||||
|
||||
//
|
||||
// Writes a 64-bit MMIO register.
|
||||
//
|
||||
// Writes the 64-bit MMIO register specified by Address with the value specified
|
||||
// by Value and returns Value. This function must guarantee that all MMIO read
|
||||
// and write operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to write.
|
||||
// @param Value The value to write to the MMIO register.
|
||||
//
|
||||
ASM_PFX(MmioWrite64Internal):
|
||||
dmb st
|
||||
str x1, [x0]
|
||||
ret
|
||||
#
|
||||
# Copyright (c) 2014-2018, Linaro Limited. 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.
|
||||
#
|
||||
#
|
||||
|
||||
.text
|
||||
.align 3
|
||||
|
||||
GCC_ASM_EXPORT(MmioRead8Internal)
|
||||
GCC_ASM_EXPORT(MmioWrite8Internal)
|
||||
GCC_ASM_EXPORT(MmioRead16Internal)
|
||||
GCC_ASM_EXPORT(MmioWrite16Internal)
|
||||
GCC_ASM_EXPORT(MmioRead32Internal)
|
||||
GCC_ASM_EXPORT(MmioWrite32Internal)
|
||||
GCC_ASM_EXPORT(MmioRead64Internal)
|
||||
GCC_ASM_EXPORT(MmioWrite64Internal)
|
||||
|
||||
//
|
||||
// Reads an 8-bit MMIO register.
|
||||
//
|
||||
// Reads the 8-bit MMIO register specified by Address. The 8-bit read value is
|
||||
// returned. This function must guarantee that all MMIO read and write
|
||||
// operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to read.
|
||||
//
|
||||
// @return The value read.
|
||||
//
|
||||
ASM_PFX(MmioRead8Internal):
|
||||
ldrb w0, [x0]
|
||||
dmb ld
|
||||
ret
|
||||
|
||||
//
|
||||
// Writes an 8-bit MMIO register.
|
||||
//
|
||||
// Writes the 8-bit MMIO register specified by Address with the value specified
|
||||
// by Value and returns Value. This function must guarantee that all MMIO read
|
||||
// and write operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to write.
|
||||
// @param Value The value to write to the MMIO register.
|
||||
//
|
||||
ASM_PFX(MmioWrite8Internal):
|
||||
dmb st
|
||||
strb w1, [x0]
|
||||
ret
|
||||
|
||||
//
|
||||
// Reads a 16-bit MMIO register.
|
||||
//
|
||||
// Reads the 16-bit MMIO register specified by Address. The 16-bit read value is
|
||||
// returned. This function must guarantee that all MMIO read and write
|
||||
// operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to read.
|
||||
//
|
||||
// @return The value read.
|
||||
//
|
||||
ASM_PFX(MmioRead16Internal):
|
||||
ldrh w0, [x0]
|
||||
dmb ld
|
||||
ret
|
||||
|
||||
//
|
||||
// Writes a 16-bit MMIO register.
|
||||
//
|
||||
// Writes the 16-bit MMIO register specified by Address with the value specified
|
||||
// by Value and returns Value. This function must guarantee that all MMIO read
|
||||
// and write operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to write.
|
||||
// @param Value The value to write to the MMIO register.
|
||||
//
|
||||
ASM_PFX(MmioWrite16Internal):
|
||||
dmb st
|
||||
strh w1, [x0]
|
||||
ret
|
||||
|
||||
//
|
||||
// Reads a 32-bit MMIO register.
|
||||
//
|
||||
// Reads the 32-bit MMIO register specified by Address. The 32-bit read value is
|
||||
// returned. This function must guarantee that all MMIO read and write
|
||||
// operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to read.
|
||||
//
|
||||
// @return The value read.
|
||||
//
|
||||
ASM_PFX(MmioRead32Internal):
|
||||
ldr w0, [x0]
|
||||
dmb ld
|
||||
ret
|
||||
|
||||
//
|
||||
// Writes a 32-bit MMIO register.
|
||||
//
|
||||
// Writes the 32-bit MMIO register specified by Address with the value specified
|
||||
// by Value and returns Value. This function must guarantee that all MMIO read
|
||||
// and write operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to write.
|
||||
// @param Value The value to write to the MMIO register.
|
||||
//
|
||||
ASM_PFX(MmioWrite32Internal):
|
||||
dmb st
|
||||
str w1, [x0]
|
||||
ret
|
||||
|
||||
//
|
||||
// Reads a 64-bit MMIO register.
|
||||
//
|
||||
// Reads the 64-bit MMIO register specified by Address. The 64-bit read value is
|
||||
// returned. This function must guarantee that all MMIO read and write
|
||||
// operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to read.
|
||||
//
|
||||
// @return The value read.
|
||||
//
|
||||
ASM_PFX(MmioRead64Internal):
|
||||
ldr x0, [x0]
|
||||
dmb ld
|
||||
ret
|
||||
|
||||
//
|
||||
// Writes a 64-bit MMIO register.
|
||||
//
|
||||
// Writes the 64-bit MMIO register specified by Address with the value specified
|
||||
// by Value and returns Value. This function must guarantee that all MMIO read
|
||||
// and write operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to write.
|
||||
// @param Value The value to write to the MMIO register.
|
||||
//
|
||||
ASM_PFX(MmioWrite64Internal):
|
||||
dmb st
|
||||
str x1, [x0]
|
||||
ret
|
||||
|
@@ -1,149 +1,149 @@
|
||||
;
|
||||
; Copyright (c) 2014-2018, Linaro Limited. 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.
|
||||
;
|
||||
|
||||
|
||||
AREA IoLibMmio, CODE, READONLY
|
||||
|
||||
EXPORT MmioRead8Internal
|
||||
EXPORT MmioWrite8Internal
|
||||
EXPORT MmioRead16Internal
|
||||
EXPORT MmioWrite16Internal
|
||||
EXPORT MmioRead32Internal
|
||||
EXPORT MmioWrite32Internal
|
||||
EXPORT MmioRead64Internal
|
||||
EXPORT MmioWrite64Internal
|
||||
|
||||
;
|
||||
; Reads an 8-bit MMIO register.
|
||||
;
|
||||
; Reads the 8-bit MMIO register specified by Address. The 8-bit read value is
|
||||
; returned. This function must guarantee that all MMIO read and write
|
||||
; operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to read.
|
||||
;
|
||||
; @return The value read.
|
||||
;
|
||||
MmioRead8Internal
|
||||
ldrb w0, [x0]
|
||||
dmb ld
|
||||
ret
|
||||
|
||||
;
|
||||
; Writes an 8-bit MMIO register.
|
||||
;
|
||||
; Writes the 8-bit MMIO register specified by Address with the value specified
|
||||
; by Value and returns Value. This function must guarantee that all MMIO read
|
||||
; and write operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to write.
|
||||
; @param Value The value to write to the MMIO register.
|
||||
;
|
||||
MmioWrite8Internal
|
||||
dmb st
|
||||
strb w1, [x0]
|
||||
ret
|
||||
|
||||
;
|
||||
; Reads a 16-bit MMIO register.
|
||||
;
|
||||
; Reads the 16-bit MMIO register specified by Address. The 16-bit read value is
|
||||
; returned. This function must guarantee that all MMIO read and write
|
||||
; operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to read.
|
||||
;
|
||||
; @return The value read.
|
||||
;
|
||||
MmioRead16Internal
|
||||
ldrh w0, [x0]
|
||||
dmb ld
|
||||
ret
|
||||
|
||||
;
|
||||
; Writes a 16-bit MMIO register.
|
||||
;
|
||||
; Writes the 16-bit MMIO register specified by Address with the value specified
|
||||
; by Value and returns Value. This function must guarantee that all MMIO read
|
||||
; and write operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to write.
|
||||
; @param Value The value to write to the MMIO register.
|
||||
;
|
||||
MmioWrite16Internal
|
||||
dmb st
|
||||
strh w1, [x0]
|
||||
ret
|
||||
|
||||
;
|
||||
; Reads a 32-bit MMIO register.
|
||||
;
|
||||
; Reads the 32-bit MMIO register specified by Address. The 32-bit read value is
|
||||
; returned. This function must guarantee that all MMIO read and write
|
||||
; operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to read.
|
||||
;
|
||||
; @return The value read.
|
||||
;
|
||||
MmioRead32Internal
|
||||
ldr w0, [x0]
|
||||
dmb ld
|
||||
ret
|
||||
|
||||
;
|
||||
; Writes a 32-bit MMIO register.
|
||||
;
|
||||
; Writes the 32-bit MMIO register specified by Address with the value specified
|
||||
; by Value and returns Value. This function must guarantee that all MMIO read
|
||||
; and write operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to write.
|
||||
; @param Value The value to write to the MMIO register.
|
||||
;
|
||||
MmioWrite32Internal
|
||||
dmb st
|
||||
str w1, [x0]
|
||||
ret
|
||||
|
||||
;
|
||||
; Reads a 64-bit MMIO register.
|
||||
;
|
||||
; Reads the 64-bit MMIO register specified by Address. The 64-bit read value is
|
||||
; returned. This function must guarantee that all MMIO read and write
|
||||
; operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to read.
|
||||
;
|
||||
; @return The value read.
|
||||
;
|
||||
MmioRead64Internal
|
||||
ldr x0, [x0]
|
||||
dmb ld
|
||||
ret
|
||||
|
||||
;
|
||||
; Writes a 64-bit MMIO register.
|
||||
;
|
||||
; Writes the 64-bit MMIO register specified by Address with the value specified
|
||||
; by Value and returns Value. This function must guarantee that all MMIO read
|
||||
; and write operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to write.
|
||||
; @param Value The value to write to the MMIO register.
|
||||
;
|
||||
MmioWrite64Internal
|
||||
dmb st
|
||||
str x1, [x0]
|
||||
ret
|
||||
|
||||
END
|
||||
;
|
||||
; Copyright (c) 2014-2018, Linaro Limited. 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.
|
||||
;
|
||||
|
||||
|
||||
AREA IoLibMmio, CODE, READONLY
|
||||
|
||||
EXPORT MmioRead8Internal
|
||||
EXPORT MmioWrite8Internal
|
||||
EXPORT MmioRead16Internal
|
||||
EXPORT MmioWrite16Internal
|
||||
EXPORT MmioRead32Internal
|
||||
EXPORT MmioWrite32Internal
|
||||
EXPORT MmioRead64Internal
|
||||
EXPORT MmioWrite64Internal
|
||||
|
||||
;
|
||||
; Reads an 8-bit MMIO register.
|
||||
;
|
||||
; Reads the 8-bit MMIO register specified by Address. The 8-bit read value is
|
||||
; returned. This function must guarantee that all MMIO read and write
|
||||
; operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to read.
|
||||
;
|
||||
; @return The value read.
|
||||
;
|
||||
MmioRead8Internal
|
||||
ldrb w0, [x0]
|
||||
dmb ld
|
||||
ret
|
||||
|
||||
;
|
||||
; Writes an 8-bit MMIO register.
|
||||
;
|
||||
; Writes the 8-bit MMIO register specified by Address with the value specified
|
||||
; by Value and returns Value. This function must guarantee that all MMIO read
|
||||
; and write operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to write.
|
||||
; @param Value The value to write to the MMIO register.
|
||||
;
|
||||
MmioWrite8Internal
|
||||
dmb st
|
||||
strb w1, [x0]
|
||||
ret
|
||||
|
||||
;
|
||||
; Reads a 16-bit MMIO register.
|
||||
;
|
||||
; Reads the 16-bit MMIO register specified by Address. The 16-bit read value is
|
||||
; returned. This function must guarantee that all MMIO read and write
|
||||
; operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to read.
|
||||
;
|
||||
; @return The value read.
|
||||
;
|
||||
MmioRead16Internal
|
||||
ldrh w0, [x0]
|
||||
dmb ld
|
||||
ret
|
||||
|
||||
;
|
||||
; Writes a 16-bit MMIO register.
|
||||
;
|
||||
; Writes the 16-bit MMIO register specified by Address with the value specified
|
||||
; by Value and returns Value. This function must guarantee that all MMIO read
|
||||
; and write operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to write.
|
||||
; @param Value The value to write to the MMIO register.
|
||||
;
|
||||
MmioWrite16Internal
|
||||
dmb st
|
||||
strh w1, [x0]
|
||||
ret
|
||||
|
||||
;
|
||||
; Reads a 32-bit MMIO register.
|
||||
;
|
||||
; Reads the 32-bit MMIO register specified by Address. The 32-bit read value is
|
||||
; returned. This function must guarantee that all MMIO read and write
|
||||
; operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to read.
|
||||
;
|
||||
; @return The value read.
|
||||
;
|
||||
MmioRead32Internal
|
||||
ldr w0, [x0]
|
||||
dmb ld
|
||||
ret
|
||||
|
||||
;
|
||||
; Writes a 32-bit MMIO register.
|
||||
;
|
||||
; Writes the 32-bit MMIO register specified by Address with the value specified
|
||||
; by Value and returns Value. This function must guarantee that all MMIO read
|
||||
; and write operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to write.
|
||||
; @param Value The value to write to the MMIO register.
|
||||
;
|
||||
MmioWrite32Internal
|
||||
dmb st
|
||||
str w1, [x0]
|
||||
ret
|
||||
|
||||
;
|
||||
; Reads a 64-bit MMIO register.
|
||||
;
|
||||
; Reads the 64-bit MMIO register specified by Address. The 64-bit read value is
|
||||
; returned. This function must guarantee that all MMIO read and write
|
||||
; operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to read.
|
||||
;
|
||||
; @return The value read.
|
||||
;
|
||||
MmioRead64Internal
|
||||
ldr x0, [x0]
|
||||
dmb ld
|
||||
ret
|
||||
|
||||
;
|
||||
; Writes a 64-bit MMIO register.
|
||||
;
|
||||
; Writes the 64-bit MMIO register specified by Address with the value specified
|
||||
; by Value and returns Value. This function must guarantee that all MMIO read
|
||||
; and write operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to write.
|
||||
; @param Value The value to write to the MMIO register.
|
||||
;
|
||||
MmioWrite64Internal
|
||||
dmb st
|
||||
str x1, [x0]
|
||||
ret
|
||||
|
||||
END
|
||||
|
@@ -1,145 +1,145 @@
|
||||
#
|
||||
# Copyright (c) 2014-2018, Linaro Limited. 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.
|
||||
#
|
||||
#
|
||||
|
||||
GCC_ASM_EXPORT(MmioRead8Internal)
|
||||
GCC_ASM_EXPORT(MmioWrite8Internal)
|
||||
GCC_ASM_EXPORT(MmioRead16Internal)
|
||||
GCC_ASM_EXPORT(MmioWrite16Internal)
|
||||
GCC_ASM_EXPORT(MmioRead32Internal)
|
||||
GCC_ASM_EXPORT(MmioWrite32Internal)
|
||||
GCC_ASM_EXPORT(MmioRead64Internal)
|
||||
GCC_ASM_EXPORT(MmioWrite64Internal)
|
||||
|
||||
//
|
||||
// Reads an 8-bit MMIO register.
|
||||
//
|
||||
// Reads the 8-bit MMIO register specified by Address. The 8-bit read value is
|
||||
// returned. This function must guarantee that all MMIO read and write
|
||||
// operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to read.
|
||||
//
|
||||
// @return The value read.
|
||||
//
|
||||
ASM_PFX(MmioRead8Internal):
|
||||
ldrb r0, [r0]
|
||||
dmb
|
||||
bx lr
|
||||
|
||||
//
|
||||
// Writes an 8-bit MMIO register.
|
||||
//
|
||||
// Writes the 8-bit MMIO register specified by Address with the value specified
|
||||
// by Value and returns Value. This function must guarantee that all MMIO read
|
||||
// and write operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to write.
|
||||
// @param Value The value to write to the MMIO register.
|
||||
//
|
||||
ASM_PFX(MmioWrite8Internal):
|
||||
dmb st
|
||||
strb r1, [r0]
|
||||
bx lr
|
||||
|
||||
//
|
||||
// Reads a 16-bit MMIO register.
|
||||
//
|
||||
// Reads the 16-bit MMIO register specified by Address. The 16-bit read value is
|
||||
// returned. This function must guarantee that all MMIO read and write
|
||||
// operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to read.
|
||||
//
|
||||
// @return The value read.
|
||||
//
|
||||
ASM_PFX(MmioRead16Internal):
|
||||
ldrh r0, [r0]
|
||||
dmb
|
||||
bx lr
|
||||
|
||||
//
|
||||
// Writes a 16-bit MMIO register.
|
||||
//
|
||||
// Writes the 16-bit MMIO register specified by Address with the value specified
|
||||
// by Value and returns Value. This function must guarantee that all MMIO read
|
||||
// and write operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to write.
|
||||
// @param Value The value to write to the MMIO register.
|
||||
//
|
||||
ASM_PFX(MmioWrite16Internal):
|
||||
dmb st
|
||||
strh r1, [r0]
|
||||
bx lr
|
||||
|
||||
//
|
||||
// Reads a 32-bit MMIO register.
|
||||
//
|
||||
// Reads the 32-bit MMIO register specified by Address. The 32-bit read value is
|
||||
// returned. This function must guarantee that all MMIO read and write
|
||||
// operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to read.
|
||||
//
|
||||
// @return The value read.
|
||||
//
|
||||
ASM_PFX(MmioRead32Internal):
|
||||
ldr r0, [r0]
|
||||
dmb
|
||||
bx lr
|
||||
|
||||
//
|
||||
// Writes a 32-bit MMIO register.
|
||||
//
|
||||
// Writes the 32-bit MMIO register specified by Address with the value specified
|
||||
// by Value and returns Value. This function must guarantee that all MMIO read
|
||||
// and write operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to write.
|
||||
// @param Value The value to write to the MMIO register.
|
||||
//
|
||||
ASM_PFX(MmioWrite32Internal):
|
||||
dmb st
|
||||
str r1, [r0]
|
||||
bx lr
|
||||
|
||||
//
|
||||
// Reads a 64-bit MMIO register.
|
||||
//
|
||||
// Reads the 64-bit MMIO register specified by Address. The 64-bit read value is
|
||||
// returned. This function must guarantee that all MMIO read and write
|
||||
// operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to read.
|
||||
//
|
||||
// @return The value read.
|
||||
//
|
||||
ASM_PFX(MmioRead64Internal):
|
||||
ldrd r0, r1, [r0]
|
||||
dmb
|
||||
bx lr
|
||||
|
||||
//
|
||||
// Writes a 64-bit MMIO register.
|
||||
//
|
||||
// Writes the 64-bit MMIO register specified by Address with the value specified
|
||||
// by Value and returns Value. This function must guarantee that all MMIO read
|
||||
// and write operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to write.
|
||||
// @param Value The value to write to the MMIO register.
|
||||
//
|
||||
ASM_PFX(MmioWrite64Internal):
|
||||
dmb st
|
||||
strd r2, r3, [r0]
|
||||
bx lr
|
||||
#
|
||||
# Copyright (c) 2014-2018, Linaro Limited. 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.
|
||||
#
|
||||
#
|
||||
|
||||
GCC_ASM_EXPORT(MmioRead8Internal)
|
||||
GCC_ASM_EXPORT(MmioWrite8Internal)
|
||||
GCC_ASM_EXPORT(MmioRead16Internal)
|
||||
GCC_ASM_EXPORT(MmioWrite16Internal)
|
||||
GCC_ASM_EXPORT(MmioRead32Internal)
|
||||
GCC_ASM_EXPORT(MmioWrite32Internal)
|
||||
GCC_ASM_EXPORT(MmioRead64Internal)
|
||||
GCC_ASM_EXPORT(MmioWrite64Internal)
|
||||
|
||||
//
|
||||
// Reads an 8-bit MMIO register.
|
||||
//
|
||||
// Reads the 8-bit MMIO register specified by Address. The 8-bit read value is
|
||||
// returned. This function must guarantee that all MMIO read and write
|
||||
// operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to read.
|
||||
//
|
||||
// @return The value read.
|
||||
//
|
||||
ASM_PFX(MmioRead8Internal):
|
||||
ldrb r0, [r0]
|
||||
dmb
|
||||
bx lr
|
||||
|
||||
//
|
||||
// Writes an 8-bit MMIO register.
|
||||
//
|
||||
// Writes the 8-bit MMIO register specified by Address with the value specified
|
||||
// by Value and returns Value. This function must guarantee that all MMIO read
|
||||
// and write operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to write.
|
||||
// @param Value The value to write to the MMIO register.
|
||||
//
|
||||
ASM_PFX(MmioWrite8Internal):
|
||||
dmb st
|
||||
strb r1, [r0]
|
||||
bx lr
|
||||
|
||||
//
|
||||
// Reads a 16-bit MMIO register.
|
||||
//
|
||||
// Reads the 16-bit MMIO register specified by Address. The 16-bit read value is
|
||||
// returned. This function must guarantee that all MMIO read and write
|
||||
// operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to read.
|
||||
//
|
||||
// @return The value read.
|
||||
//
|
||||
ASM_PFX(MmioRead16Internal):
|
||||
ldrh r0, [r0]
|
||||
dmb
|
||||
bx lr
|
||||
|
||||
//
|
||||
// Writes a 16-bit MMIO register.
|
||||
//
|
||||
// Writes the 16-bit MMIO register specified by Address with the value specified
|
||||
// by Value and returns Value. This function must guarantee that all MMIO read
|
||||
// and write operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to write.
|
||||
// @param Value The value to write to the MMIO register.
|
||||
//
|
||||
ASM_PFX(MmioWrite16Internal):
|
||||
dmb st
|
||||
strh r1, [r0]
|
||||
bx lr
|
||||
|
||||
//
|
||||
// Reads a 32-bit MMIO register.
|
||||
//
|
||||
// Reads the 32-bit MMIO register specified by Address. The 32-bit read value is
|
||||
// returned. This function must guarantee that all MMIO read and write
|
||||
// operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to read.
|
||||
//
|
||||
// @return The value read.
|
||||
//
|
||||
ASM_PFX(MmioRead32Internal):
|
||||
ldr r0, [r0]
|
||||
dmb
|
||||
bx lr
|
||||
|
||||
//
|
||||
// Writes a 32-bit MMIO register.
|
||||
//
|
||||
// Writes the 32-bit MMIO register specified by Address with the value specified
|
||||
// by Value and returns Value. This function must guarantee that all MMIO read
|
||||
// and write operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to write.
|
||||
// @param Value The value to write to the MMIO register.
|
||||
//
|
||||
ASM_PFX(MmioWrite32Internal):
|
||||
dmb st
|
||||
str r1, [r0]
|
||||
bx lr
|
||||
|
||||
//
|
||||
// Reads a 64-bit MMIO register.
|
||||
//
|
||||
// Reads the 64-bit MMIO register specified by Address. The 64-bit read value is
|
||||
// returned. This function must guarantee that all MMIO read and write
|
||||
// operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to read.
|
||||
//
|
||||
// @return The value read.
|
||||
//
|
||||
ASM_PFX(MmioRead64Internal):
|
||||
ldrd r0, r1, [r0]
|
||||
dmb
|
||||
bx lr
|
||||
|
||||
//
|
||||
// Writes a 64-bit MMIO register.
|
||||
//
|
||||
// Writes the 64-bit MMIO register specified by Address with the value specified
|
||||
// by Value and returns Value. This function must guarantee that all MMIO read
|
||||
// and write operations are serialized.
|
||||
//
|
||||
// @param Address The MMIO register to write.
|
||||
// @param Value The value to write to the MMIO register.
|
||||
//
|
||||
ASM_PFX(MmioWrite64Internal):
|
||||
dmb st
|
||||
strd r2, r3, [r0]
|
||||
bx lr
|
||||
|
@@ -1,149 +1,149 @@
|
||||
;
|
||||
; Copyright (c) 2014-2018, Linaro Limited. 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.
|
||||
;
|
||||
|
||||
|
||||
AREA IoLibMmio, CODE, READONLY
|
||||
|
||||
EXPORT MmioRead8Internal
|
||||
EXPORT MmioWrite8Internal
|
||||
EXPORT MmioRead16Internal
|
||||
EXPORT MmioWrite16Internal
|
||||
EXPORT MmioRead32Internal
|
||||
EXPORT MmioWrite32Internal
|
||||
EXPORT MmioRead64Internal
|
||||
EXPORT MmioWrite64Internal
|
||||
|
||||
;
|
||||
; Reads an 8-bit MMIO register.
|
||||
;
|
||||
; Reads the 8-bit MMIO register specified by Address. The 8-bit read value is
|
||||
; returned. This function must guarantee that all MMIO read and write
|
||||
; operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to read.
|
||||
;
|
||||
; @return The value read.
|
||||
;
|
||||
MmioRead8Internal
|
||||
ldrb r0, [r0]
|
||||
dmb
|
||||
bx lr
|
||||
|
||||
;
|
||||
; Writes an 8-bit MMIO register.
|
||||
;
|
||||
; Writes the 8-bit MMIO register specified by Address with the value specified
|
||||
; by Value and returns Value. This function must guarantee that all MMIO read
|
||||
; and write operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to write.
|
||||
; @param Value The value to write to the MMIO register.
|
||||
;
|
||||
MmioWrite8Internal
|
||||
dmb st
|
||||
strb r1, [r0]
|
||||
bx lr
|
||||
|
||||
;
|
||||
; Reads a 16-bit MMIO register.
|
||||
;
|
||||
; Reads the 16-bit MMIO register specified by Address. The 16-bit read value is
|
||||
; returned. This function must guarantee that all MMIO read and write
|
||||
; operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to read.
|
||||
;
|
||||
; @return The value read.
|
||||
;
|
||||
MmioRead16Internal
|
||||
ldrh r0, [r0]
|
||||
dmb
|
||||
bx lr
|
||||
|
||||
;
|
||||
; Writes a 16-bit MMIO register.
|
||||
;
|
||||
; Writes the 16-bit MMIO register specified by Address with the value specified
|
||||
; by Value and returns Value. This function must guarantee that all MMIO read
|
||||
; and write operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to write.
|
||||
; @param Value The value to write to the MMIO register.
|
||||
;
|
||||
MmioWrite16Internal
|
||||
dmb st
|
||||
strh r1, [r0]
|
||||
bx lr
|
||||
|
||||
;
|
||||
; Reads a 32-bit MMIO register.
|
||||
;
|
||||
; Reads the 32-bit MMIO register specified by Address. The 32-bit read value is
|
||||
; returned. This function must guarantee that all MMIO read and write
|
||||
; operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to read.
|
||||
;
|
||||
; @return The value read.
|
||||
;
|
||||
MmioRead32Internal
|
||||
ldr r0, [r0]
|
||||
dmb
|
||||
bx lr
|
||||
|
||||
;
|
||||
; Writes a 32-bit MMIO register.
|
||||
;
|
||||
; Writes the 32-bit MMIO register specified by Address with the value specified
|
||||
; by Value and returns Value. This function must guarantee that all MMIO read
|
||||
; and write operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to write.
|
||||
; @param Value The value to write to the MMIO register.
|
||||
;
|
||||
MmioWrite32Internal
|
||||
dmb st
|
||||
str r1, [r0]
|
||||
bx lr
|
||||
|
||||
;
|
||||
; Reads a 64-bit MMIO register.
|
||||
;
|
||||
; Reads the 64-bit MMIO register specified by Address. The 64-bit read value is
|
||||
; returned. This function must guarantee that all MMIO read and write
|
||||
; operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to read.
|
||||
;
|
||||
; @return The value read.
|
||||
;
|
||||
MmioRead64Internal
|
||||
ldrd r0, r1, [r0]
|
||||
dmb
|
||||
bx lr
|
||||
|
||||
;
|
||||
; Writes a 64-bit MMIO register.
|
||||
;
|
||||
; Writes the 64-bit MMIO register specified by Address with the value specified
|
||||
; by Value and returns Value. This function must guarantee that all MMIO read
|
||||
; and write operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to write.
|
||||
; @param Value The value to write to the MMIO register.
|
||||
;
|
||||
MmioWrite64Internal
|
||||
dmb st
|
||||
strd r2, r3, [r0]
|
||||
bx lr
|
||||
|
||||
END
|
||||
;
|
||||
; Copyright (c) 2014-2018, Linaro Limited. 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.
|
||||
;
|
||||
|
||||
|
||||
AREA IoLibMmio, CODE, READONLY
|
||||
|
||||
EXPORT MmioRead8Internal
|
||||
EXPORT MmioWrite8Internal
|
||||
EXPORT MmioRead16Internal
|
||||
EXPORT MmioWrite16Internal
|
||||
EXPORT MmioRead32Internal
|
||||
EXPORT MmioWrite32Internal
|
||||
EXPORT MmioRead64Internal
|
||||
EXPORT MmioWrite64Internal
|
||||
|
||||
;
|
||||
; Reads an 8-bit MMIO register.
|
||||
;
|
||||
; Reads the 8-bit MMIO register specified by Address. The 8-bit read value is
|
||||
; returned. This function must guarantee that all MMIO read and write
|
||||
; operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to read.
|
||||
;
|
||||
; @return The value read.
|
||||
;
|
||||
MmioRead8Internal
|
||||
ldrb r0, [r0]
|
||||
dmb
|
||||
bx lr
|
||||
|
||||
;
|
||||
; Writes an 8-bit MMIO register.
|
||||
;
|
||||
; Writes the 8-bit MMIO register specified by Address with the value specified
|
||||
; by Value and returns Value. This function must guarantee that all MMIO read
|
||||
; and write operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to write.
|
||||
; @param Value The value to write to the MMIO register.
|
||||
;
|
||||
MmioWrite8Internal
|
||||
dmb st
|
||||
strb r1, [r0]
|
||||
bx lr
|
||||
|
||||
;
|
||||
; Reads a 16-bit MMIO register.
|
||||
;
|
||||
; Reads the 16-bit MMIO register specified by Address. The 16-bit read value is
|
||||
; returned. This function must guarantee that all MMIO read and write
|
||||
; operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to read.
|
||||
;
|
||||
; @return The value read.
|
||||
;
|
||||
MmioRead16Internal
|
||||
ldrh r0, [r0]
|
||||
dmb
|
||||
bx lr
|
||||
|
||||
;
|
||||
; Writes a 16-bit MMIO register.
|
||||
;
|
||||
; Writes the 16-bit MMIO register specified by Address with the value specified
|
||||
; by Value and returns Value. This function must guarantee that all MMIO read
|
||||
; and write operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to write.
|
||||
; @param Value The value to write to the MMIO register.
|
||||
;
|
||||
MmioWrite16Internal
|
||||
dmb st
|
||||
strh r1, [r0]
|
||||
bx lr
|
||||
|
||||
;
|
||||
; Reads a 32-bit MMIO register.
|
||||
;
|
||||
; Reads the 32-bit MMIO register specified by Address. The 32-bit read value is
|
||||
; returned. This function must guarantee that all MMIO read and write
|
||||
; operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to read.
|
||||
;
|
||||
; @return The value read.
|
||||
;
|
||||
MmioRead32Internal
|
||||
ldr r0, [r0]
|
||||
dmb
|
||||
bx lr
|
||||
|
||||
;
|
||||
; Writes a 32-bit MMIO register.
|
||||
;
|
||||
; Writes the 32-bit MMIO register specified by Address with the value specified
|
||||
; by Value and returns Value. This function must guarantee that all MMIO read
|
||||
; and write operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to write.
|
||||
; @param Value The value to write to the MMIO register.
|
||||
;
|
||||
MmioWrite32Internal
|
||||
dmb st
|
||||
str r1, [r0]
|
||||
bx lr
|
||||
|
||||
;
|
||||
; Reads a 64-bit MMIO register.
|
||||
;
|
||||
; Reads the 64-bit MMIO register specified by Address. The 64-bit read value is
|
||||
; returned. This function must guarantee that all MMIO read and write
|
||||
; operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to read.
|
||||
;
|
||||
; @return The value read.
|
||||
;
|
||||
MmioRead64Internal
|
||||
ldrd r0, r1, [r0]
|
||||
dmb
|
||||
bx lr
|
||||
|
||||
;
|
||||
; Writes a 64-bit MMIO register.
|
||||
;
|
||||
; Writes the 64-bit MMIO register specified by Address with the value specified
|
||||
; by Value and returns Value. This function must guarantee that all MMIO read
|
||||
; and write operations are serialized.
|
||||
;
|
||||
; @param Address The MMIO register to write.
|
||||
; @param Value The value to write to the MMIO register.
|
||||
;
|
||||
MmioWrite64Internal
|
||||
dmb st
|
||||
strd r2, r3, [r0]
|
||||
bx lr
|
||||
|
||||
END
|
||||
|
@@ -26,7 +26,7 @@
|
||||
FILE_GUID = 926c9cd0-4bb8-479b-9ac4-8a2a23f85307
|
||||
MODULE_TYPE = BASE
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = IoLib
|
||||
LIBRARY_CLASS = IoLib
|
||||
|
||||
|
||||
#
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# I/O Library that uses compiler intrinsics to perform IN and OUT instructions
|
||||
# for IA-32 and x64.
|
||||
#
|
||||
# Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
# Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
|
||||
#
|
||||
@@ -24,7 +24,7 @@
|
||||
FILE_GUID = 93742f95-6e71-4581-b600-8e1da443f95a
|
||||
MODULE_TYPE = BASE
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = IoLib
|
||||
LIBRARY_CLASS = IoLib
|
||||
|
||||
|
||||
#
|
||||
|
@@ -4,7 +4,7 @@
|
||||
All assertions for bit field operations are handled bit field functions in the
|
||||
Base Library.
|
||||
|
||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -80,7 +80,7 @@ IoAnd8 (
|
||||
}
|
||||
|
||||
/**
|
||||
Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise
|
||||
Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 8-bit I/O port.
|
||||
|
||||
Reads the 8-bit I/O port specified by Port, performs a bitwise AND between
|
||||
@@ -146,7 +146,7 @@ IoBitFieldRead8 (
|
||||
|
||||
Writes Value to the bit field of the I/O register. The bit field is specified
|
||||
by the StartBit and the EndBit. All other bits in the destination I/O
|
||||
register are preserved. The value written to the I/O port is returned.
|
||||
register are preserved. The value written to the I/O port is returned.
|
||||
|
||||
If 8-bit I/O port operations are not supported, then ASSERT().
|
||||
If StartBit is greater than 7, then ASSERT().
|
||||
@@ -348,7 +348,7 @@ IoOr16 (
|
||||
|
||||
If 16-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 16-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to write.
|
||||
@param AndData The value to AND with the read value from the I/O port.
|
||||
|
||||
@@ -366,7 +366,7 @@ IoAnd16 (
|
||||
}
|
||||
|
||||
/**
|
||||
Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise
|
||||
Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 16-bit I/O port.
|
||||
|
||||
Reads the 16-bit I/O port specified by Port, performs a bitwise AND between
|
||||
@@ -378,7 +378,7 @@ IoAnd16 (
|
||||
|
||||
If 16-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 16-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to write.
|
||||
@param AndData The value to AND with the read value from the I/O port.
|
||||
@param OrData The value to OR with the result of the AND operation.
|
||||
@@ -659,7 +659,7 @@ IoAnd32 (
|
||||
}
|
||||
|
||||
/**
|
||||
Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise
|
||||
Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 32-bit I/O port.
|
||||
|
||||
Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
|
||||
@@ -952,7 +952,7 @@ IoAnd64 (
|
||||
}
|
||||
|
||||
/**
|
||||
Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise
|
||||
Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 64-bit I/O port.
|
||||
|
||||
Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
|
||||
@@ -1190,7 +1190,7 @@ IoBitFieldAndThenOr64 (
|
||||
Reads an 8-bit MMIO register, performs a bitwise OR, and writes the
|
||||
result back to the 8-bit MMIO register.
|
||||
|
||||
Reads the 8-bit MMIO register specified by Address, performs a bitwise
|
||||
Reads the 8-bit MMIO register specified by Address, performs a bitwise
|
||||
OR between the read result and the value specified by OrData, and
|
||||
writes the result to the 8-bit MMIO register specified by Address. The value
|
||||
written to the MMIO register is returned. This function must guarantee that
|
||||
@@ -1243,7 +1243,7 @@ MmioAnd8 (
|
||||
}
|
||||
|
||||
/**
|
||||
Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise
|
||||
Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 8-bit MMIO register.
|
||||
|
||||
Reads the 8-bit MMIO register specified by Address, performs a bitwise AND
|
||||
@@ -1347,7 +1347,7 @@ MmioBitFieldWrite8 (
|
||||
Reads a bit field in an 8-bit MMIO register, performs a bitwise OR, and
|
||||
writes the result back to the bit field in the 8-bit MMIO register.
|
||||
|
||||
Reads the 8-bit MMIO register specified by Address, performs a bitwise
|
||||
Reads the 8-bit MMIO register specified by Address, performs a bitwise
|
||||
OR between the read result and the value specified by OrData, and
|
||||
writes the result to the 8-bit MMIO register specified by Address. The value
|
||||
written to the MMIO register is returned. This function must guarantee that
|
||||
@@ -1477,7 +1477,7 @@ MmioBitFieldAndThenOr8 (
|
||||
Reads a 16-bit MMIO register, performs a bitwise OR, and writes the
|
||||
result back to the 16-bit MMIO register.
|
||||
|
||||
Reads the 16-bit MMIO register specified by Address, performs a bitwise
|
||||
Reads the 16-bit MMIO register specified by Address, performs a bitwise
|
||||
OR between the read result and the value specified by OrData, and
|
||||
writes the result to the 16-bit MMIO register specified by Address. The value
|
||||
written to the MMIO register is returned. This function must guarantee that
|
||||
@@ -1532,7 +1532,7 @@ MmioAnd16 (
|
||||
}
|
||||
|
||||
/**
|
||||
Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise
|
||||
Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 16-bit MMIO register.
|
||||
|
||||
Reads the 16-bit MMIO register specified by Address, performs a bitwise AND
|
||||
@@ -1638,7 +1638,7 @@ MmioBitFieldWrite16 (
|
||||
Reads a bit field in a 16-bit MMIO register, performs a bitwise OR, and
|
||||
writes the result back to the bit field in the 16-bit MMIO register.
|
||||
|
||||
Reads the 16-bit MMIO register specified by Address, performs a bitwise
|
||||
Reads the 16-bit MMIO register specified by Address, performs a bitwise
|
||||
OR between the read result and the value specified by OrData, and
|
||||
writes the result to the 16-bit MMIO register specified by Address. The value
|
||||
written to the MMIO register is returned. This function must guarantee that
|
||||
@@ -1771,7 +1771,7 @@ MmioBitFieldAndThenOr16 (
|
||||
Reads a 32-bit MMIO register, performs a bitwise OR, and writes the
|
||||
result back to the 32-bit MMIO register.
|
||||
|
||||
Reads the 32-bit MMIO register specified by Address, performs a bitwise
|
||||
Reads the 32-bit MMIO register specified by Address, performs a bitwise
|
||||
OR between the read result and the value specified by OrData, and
|
||||
writes the result to the 32-bit MMIO register specified by Address. The value
|
||||
written to the MMIO register is returned. This function must guarantee that
|
||||
@@ -1826,7 +1826,7 @@ MmioAnd32 (
|
||||
}
|
||||
|
||||
/**
|
||||
Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise
|
||||
Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 32-bit MMIO register.
|
||||
|
||||
Reads the 32-bit MMIO register specified by Address, performs a bitwise AND
|
||||
@@ -1932,7 +1932,7 @@ MmioBitFieldWrite32 (
|
||||
Reads a bit field in a 32-bit MMIO register, performs a bitwise OR, and
|
||||
writes the result back to the bit field in the 32-bit MMIO register.
|
||||
|
||||
Reads the 32-bit MMIO register specified by Address, performs a bitwise
|
||||
Reads the 32-bit MMIO register specified by Address, performs a bitwise
|
||||
OR between the read result and the value specified by OrData, and
|
||||
writes the result to the 32-bit MMIO register specified by Address. The value
|
||||
written to the MMIO register is returned. This function must guarantee that
|
||||
@@ -2065,7 +2065,7 @@ MmioBitFieldAndThenOr32 (
|
||||
Reads a 64-bit MMIO register, performs a bitwise OR, and writes the
|
||||
result back to the 64-bit MMIO register.
|
||||
|
||||
Reads the 64-bit MMIO register specified by Address, performs a bitwise
|
||||
Reads the 64-bit MMIO register specified by Address, performs a bitwise
|
||||
OR between the read result and the value specified by OrData, and
|
||||
writes the result to the 64-bit MMIO register specified by Address. The value
|
||||
written to the MMIO register is returned. This function must guarantee that
|
||||
@@ -2120,7 +2120,7 @@ MmioAnd64 (
|
||||
}
|
||||
|
||||
/**
|
||||
Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise
|
||||
Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 64-bit MMIO register.
|
||||
|
||||
Reads the 64-bit MMIO register specified by Address, performs a bitwise AND
|
||||
@@ -2226,7 +2226,7 @@ MmioBitFieldWrite64 (
|
||||
Reads a bit field in a 64-bit MMIO register, performs a bitwise OR, and
|
||||
writes the result back to the bit field in the 64-bit MMIO register.
|
||||
|
||||
Reads the 64-bit MMIO register specified by Address, performs a bitwise
|
||||
Reads the 64-bit MMIO register specified by Address, performs a bitwise
|
||||
OR between the read result and the value specified by OrData, and
|
||||
writes the result to the 64-bit MMIO register specified by Address. The value
|
||||
written to the MMIO register is returned. This function must guarantee that
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Common I/O Library routines.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -107,7 +107,7 @@ MmioRead8 (
|
||||
|
||||
@param Address The MMIO register to write.
|
||||
@param Value The value to write to the MMIO register.
|
||||
|
||||
|
||||
@return Value.
|
||||
|
||||
**/
|
||||
@@ -169,7 +169,7 @@ MmioRead16 (
|
||||
|
||||
@param Address The MMIO register to write.
|
||||
@param Value The value to write to the MMIO register.
|
||||
|
||||
|
||||
@return Value.
|
||||
|
||||
**/
|
||||
@@ -185,7 +185,7 @@ MmioWrite16 (
|
||||
MemoryFence ();
|
||||
*(volatile UINT16*)Address = Value;
|
||||
MemoryFence ();
|
||||
|
||||
|
||||
return Value;
|
||||
}
|
||||
|
||||
@@ -213,11 +213,11 @@ MmioRead32 (
|
||||
UINT32 Value;
|
||||
|
||||
ASSERT ((Address & 3) == 0);
|
||||
|
||||
|
||||
MemoryFence ();
|
||||
Value = *(volatile UINT32*)Address;
|
||||
MemoryFence ();
|
||||
|
||||
|
||||
return Value;
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ MmioRead32 (
|
||||
|
||||
@param Address The MMIO register to write.
|
||||
@param Value The value to write to the MMIO register.
|
||||
|
||||
|
||||
@return Value.
|
||||
|
||||
**/
|
||||
@@ -245,11 +245,11 @@ MmioWrite32 (
|
||||
)
|
||||
{
|
||||
ASSERT ((Address & 3) == 0);
|
||||
|
||||
|
||||
MemoryFence ();
|
||||
*(volatile UINT32*)Address = Value;
|
||||
MemoryFence ();
|
||||
|
||||
|
||||
return Value;
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ MmioRead64 (
|
||||
UINT64 Value;
|
||||
|
||||
ASSERT ((Address & 7) == 0);
|
||||
|
||||
|
||||
MemoryFence ();
|
||||
Value = *(volatile UINT64*)Address;
|
||||
MemoryFence ();
|
||||
@@ -307,11 +307,11 @@ MmioWrite64 (
|
||||
)
|
||||
{
|
||||
ASSERT ((Address & 7) == 0);
|
||||
|
||||
|
||||
MemoryFence ();
|
||||
*(volatile UINT64*)Address = Value;
|
||||
MemoryFence ();
|
||||
|
||||
|
||||
return Value;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
I/O Library for ARM.
|
||||
I/O Library for ARM.
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
|
||||
|
||||
|
@@ -10,7 +10,7 @@
|
||||
We don't advocate putting compiler specifics in libraries or drivers but there
|
||||
is no other way to make this work.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -116,7 +116,7 @@ IoRead16 (
|
||||
|
||||
If 16-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 16-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to write.
|
||||
@param Value The value to write to the I/O port.
|
||||
|
||||
@@ -145,7 +145,7 @@ IoWrite16 (
|
||||
|
||||
If 32-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 32-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to read.
|
||||
|
||||
@return The value read.
|
||||
@@ -174,7 +174,7 @@ IoRead32 (
|
||||
|
||||
If 32-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 32-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to write.
|
||||
@param Value The value to write to the I/O port.
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
I/O Library. This file has compiler specifics for ICC as there
|
||||
is no ANSI C standard for doing IO.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -73,7 +73,7 @@ IoWrite8 (
|
||||
mov dx, word ptr [Port]
|
||||
out dx, al
|
||||
}
|
||||
return Value;
|
||||
return Value;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -119,7 +119,7 @@ IoRead16 (
|
||||
|
||||
If 16-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 16-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to write.
|
||||
@param Value The value to write to the I/O port.
|
||||
|
||||
@@ -153,7 +153,7 @@ IoWrite16 (
|
||||
|
||||
If 32-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 32-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to read.
|
||||
|
||||
@return The value read.
|
||||
@@ -174,7 +174,7 @@ IoRead32 (
|
||||
in eax, dx
|
||||
mov dword ptr [Data], eax
|
||||
}
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ IoRead32 (
|
||||
|
||||
If 32-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 32-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to write.
|
||||
@param Value The value to write to the I/O port.
|
||||
|
||||
@@ -202,7 +202,7 @@ IoWrite32 (
|
||||
)
|
||||
{
|
||||
ASSERT ((Port & 3) == 0);
|
||||
|
||||
|
||||
__asm {
|
||||
mov eax, dword ptr [Value]
|
||||
mov dx, word ptr [Port]
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Common I/O Library routines.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
This function translates I/O port address to memory address by adding the 64MB
|
||||
aligned I/O Port space to the I/O address.
|
||||
If I/O Port space base is not 64MB aligned, then ASSERT ().
|
||||
If I/O Port space base is not 64MB aligned, then ASSERT ().
|
||||
|
||||
@param Port The I/O port to read.
|
||||
|
||||
@@ -46,7 +46,7 @@ InternalGetMemoryMapAddress (
|
||||
|
||||
//
|
||||
// Make sure that the I/O Port space base is 64MB aligned.
|
||||
//
|
||||
//
|
||||
ASSERT ((IoBlockBaseAddress & 0x3ffffff) == 0);
|
||||
Address += IoBlockBaseAddress;
|
||||
|
||||
@@ -109,7 +109,7 @@ IoRead16 (
|
||||
|
||||
If 32-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 32-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to read.
|
||||
|
||||
@return The value read.
|
||||
@@ -184,7 +184,7 @@ IoWrite8 (
|
||||
|
||||
If 16-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 16-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to write.
|
||||
@param Value The value to write to the I/O port.
|
||||
|
||||
@@ -210,7 +210,7 @@ IoWrite16 (
|
||||
|
||||
If 32-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 32-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to write.
|
||||
@param Value The value to write to the I/O port.
|
||||
|
||||
@@ -508,7 +508,7 @@ MmioRead16 (
|
||||
|
||||
//
|
||||
// Make sure that Address is 16-bit aligned.
|
||||
//
|
||||
//
|
||||
ASSERT ((Address & 1) == 0);
|
||||
|
||||
Address |= BIT63;
|
||||
@@ -545,7 +545,7 @@ MmioRead32 (
|
||||
|
||||
//
|
||||
// Make sure that Address is 32-bit aligned.
|
||||
//
|
||||
//
|
||||
ASSERT ((Address & 3) == 0);
|
||||
|
||||
Address |= BIT63;
|
||||
@@ -582,7 +582,7 @@ MmioRead64 (
|
||||
|
||||
//
|
||||
// Make sure that Address is 64-bit aligned.
|
||||
//
|
||||
//
|
||||
ASSERT ((Address & 7) == 0);
|
||||
|
||||
Address |= BIT63;
|
||||
@@ -606,7 +606,7 @@ MmioRead64 (
|
||||
|
||||
@param Address The MMIO register to write.
|
||||
@param Value The value to write to the MMIO register.
|
||||
|
||||
|
||||
@return Value.
|
||||
|
||||
**/
|
||||
@@ -638,7 +638,7 @@ MmioWrite8 (
|
||||
|
||||
@param Address The MMIO register to write.
|
||||
@param Value The value to write to the MMIO register.
|
||||
|
||||
|
||||
@return Value.
|
||||
|
||||
**/
|
||||
@@ -651,7 +651,7 @@ MmioWrite16 (
|
||||
{
|
||||
//
|
||||
// Make sure that Address is 16-bit aligned.
|
||||
//
|
||||
//
|
||||
ASSERT ((Address & 1) == 0);
|
||||
|
||||
Address |= BIT63;
|
||||
@@ -675,7 +675,7 @@ MmioWrite16 (
|
||||
|
||||
@param Address The MMIO register to write.
|
||||
@param Value The value to write to the MMIO register.
|
||||
|
||||
|
||||
@return Value.
|
||||
|
||||
**/
|
||||
@@ -688,7 +688,7 @@ MmioWrite32 (
|
||||
{
|
||||
//
|
||||
// Make sure that Address is 32-bit aligned.
|
||||
//
|
||||
//
|
||||
ASSERT ((Address & 3) == 0);
|
||||
|
||||
Address |= BIT63;
|
||||
@@ -723,7 +723,7 @@ MmioWrite64 (
|
||||
{
|
||||
//
|
||||
// Make sure that Address is 64-bit aligned.
|
||||
//
|
||||
//
|
||||
ASSERT ((Address & 7) == 0);
|
||||
|
||||
Address |= BIT63;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
I/O Library MMIO Buffer Functions.
|
||||
|
||||
Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -17,11 +17,11 @@
|
||||
/**
|
||||
Copy data from the MMIO region to system memory by using 8-bit access.
|
||||
|
||||
Copy data from the MMIO region specified by starting address StartAddress
|
||||
to system memory specified by Buffer by using 8-bit access. The total
|
||||
Copy data from the MMIO region specified by starting address StartAddress
|
||||
to system memory specified by Buffer by using 8-bit access. The total
|
||||
number of byte to be copied is specified by Length. Buffer is returned.
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
|
||||
@@ -44,9 +44,9 @@ MmioReadBuffer8 (
|
||||
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
|
||||
|
||||
|
||||
ReturnBuffer = Buffer;
|
||||
|
||||
|
||||
while (Length-- != 0) {
|
||||
*(Buffer++) = MmioRead8 (StartAddress++);
|
||||
}
|
||||
@@ -57,13 +57,13 @@ MmioReadBuffer8 (
|
||||
/**
|
||||
Copy data from the MMIO region to system memory by using 16-bit access.
|
||||
|
||||
Copy data from the MMIO region specified by starting address StartAddress
|
||||
to system memory specified by Buffer by using 16-bit access. The total
|
||||
Copy data from the MMIO region specified by starting address StartAddress
|
||||
to system memory specified by Buffer by using 16-bit access. The total
|
||||
number of byte to be copied is specified by Length. Buffer is returned.
|
||||
|
||||
|
||||
If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
If Length is not aligned on a 16-bit boundary, then ASSERT().
|
||||
@@ -87,15 +87,15 @@ MmioReadBuffer16 (
|
||||
UINT16 *ReturnBuffer;
|
||||
|
||||
ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0);
|
||||
|
||||
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
|
||||
|
||||
ASSERT ((Length & (sizeof (UINT16) - 1)) == 0);
|
||||
ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0);
|
||||
|
||||
|
||||
ReturnBuffer = Buffer;
|
||||
|
||||
|
||||
while (Length != 0) {
|
||||
*(Buffer++) = MmioRead16 (StartAddress);
|
||||
StartAddress += sizeof (UINT16);
|
||||
@@ -108,13 +108,13 @@ MmioReadBuffer16 (
|
||||
/**
|
||||
Copy data from the MMIO region to system memory by using 32-bit access.
|
||||
|
||||
Copy data from the MMIO region specified by starting address StartAddress
|
||||
to system memory specified by Buffer by using 32-bit access. The total
|
||||
Copy data from the MMIO region specified by starting address StartAddress
|
||||
to system memory specified by Buffer by using 32-bit access. The total
|
||||
number of byte to be copied is specified by Length. Buffer is returned.
|
||||
|
||||
|
||||
If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
If Length is not aligned on a 32-bit boundary, then ASSERT().
|
||||
@@ -138,15 +138,15 @@ MmioReadBuffer32 (
|
||||
UINT32 *ReturnBuffer;
|
||||
|
||||
ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0);
|
||||
|
||||
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
|
||||
|
||||
ASSERT ((Length & (sizeof (UINT32) - 1)) == 0);
|
||||
ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0);
|
||||
|
||||
|
||||
ReturnBuffer = Buffer;
|
||||
|
||||
|
||||
while (Length != 0) {
|
||||
*(Buffer++) = MmioRead32 (StartAddress);
|
||||
StartAddress += sizeof (UINT32);
|
||||
@@ -159,13 +159,13 @@ MmioReadBuffer32 (
|
||||
/**
|
||||
Copy data from the MMIO region to system memory by using 64-bit access.
|
||||
|
||||
Copy data from the MMIO region specified by starting address StartAddress
|
||||
to system memory specified by Buffer by using 64-bit access. The total
|
||||
Copy data from the MMIO region specified by starting address StartAddress
|
||||
to system memory specified by Buffer by using 64-bit access. The total
|
||||
number of byte to be copied is specified by Length. Buffer is returned.
|
||||
|
||||
|
||||
If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
If Length is not aligned on a 64-bit boundary, then ASSERT().
|
||||
@@ -189,15 +189,15 @@ MmioReadBuffer64 (
|
||||
UINT64 *ReturnBuffer;
|
||||
|
||||
ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0);
|
||||
|
||||
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
|
||||
|
||||
ASSERT ((Length & (sizeof (UINT64) - 1)) == 0);
|
||||
ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0);
|
||||
|
||||
|
||||
ReturnBuffer = Buffer;
|
||||
|
||||
|
||||
while (Length != 0) {
|
||||
*(Buffer++) = MmioRead64 (StartAddress);
|
||||
StartAddress += sizeof (UINT64);
|
||||
@@ -211,11 +211,11 @@ MmioReadBuffer64 (
|
||||
/**
|
||||
Copy data from system memory to the MMIO region by using 8-bit access.
|
||||
|
||||
Copy data from system memory specified by Buffer to the MMIO region specified
|
||||
by starting address StartAddress by using 8-bit access. The total number
|
||||
Copy data from system memory specified by Buffer to the MMIO region specified
|
||||
by starting address StartAddress by using 8-bit access. The total number
|
||||
of byte to be copied is specified by Length. Buffer is returned.
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
|
||||
|
||||
|
||||
@@ -238,27 +238,27 @@ MmioWriteBuffer8 (
|
||||
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
|
||||
|
||||
|
||||
ReturnBuffer = (UINT8 *) Buffer;
|
||||
|
||||
|
||||
while (Length-- != 0) {
|
||||
MmioWrite8 (StartAddress++, *(Buffer++));
|
||||
}
|
||||
|
||||
return ReturnBuffer;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
Copy data from system memory to the MMIO region by using 16-bit access.
|
||||
|
||||
Copy data from system memory specified by Buffer to the MMIO region specified
|
||||
by starting address StartAddress by using 16-bit access. The total number
|
||||
Copy data from system memory specified by Buffer to the MMIO region specified
|
||||
by starting address StartAddress by using 16-bit access. The total number
|
||||
of byte to be copied is specified by Length. Buffer is returned.
|
||||
|
||||
|
||||
If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
|
||||
|
||||
If Length is not aligned on a 16-bit boundary, then ASSERT().
|
||||
@@ -283,7 +283,7 @@ MmioWriteBuffer16 (
|
||||
UINT16 *ReturnBuffer;
|
||||
|
||||
ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0);
|
||||
|
||||
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
|
||||
|
||||
@@ -291,10 +291,10 @@ MmioWriteBuffer16 (
|
||||
ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0);
|
||||
|
||||
ReturnBuffer = (UINT16 *) Buffer;
|
||||
|
||||
|
||||
while (Length != 0) {
|
||||
MmioWrite16 (StartAddress, *(Buffer++));
|
||||
|
||||
|
||||
StartAddress += sizeof (UINT16);
|
||||
Length -= sizeof (UINT16);
|
||||
}
|
||||
@@ -306,13 +306,13 @@ MmioWriteBuffer16 (
|
||||
/**
|
||||
Copy data from system memory to the MMIO region by using 32-bit access.
|
||||
|
||||
Copy data from system memory specified by Buffer to the MMIO region specified
|
||||
by starting address StartAddress by using 32-bit access. The total number
|
||||
Copy data from system memory specified by Buffer to the MMIO region specified
|
||||
by starting address StartAddress by using 32-bit access. The total number
|
||||
of byte to be copied is specified by Length. Buffer is returned.
|
||||
|
||||
|
||||
If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
|
||||
|
||||
If Length is not aligned on a 32-bit boundary, then ASSERT().
|
||||
@@ -337,7 +337,7 @@ MmioWriteBuffer32 (
|
||||
UINT32 *ReturnBuffer;
|
||||
|
||||
ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0);
|
||||
|
||||
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
|
||||
|
||||
@@ -345,10 +345,10 @@ MmioWriteBuffer32 (
|
||||
ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0);
|
||||
|
||||
ReturnBuffer = (UINT32 *) Buffer;
|
||||
|
||||
|
||||
while (Length != 0) {
|
||||
MmioWrite32 (StartAddress, *(Buffer++));
|
||||
|
||||
|
||||
StartAddress += sizeof (UINT32);
|
||||
Length -= sizeof (UINT32);
|
||||
}
|
||||
@@ -359,13 +359,13 @@ MmioWriteBuffer32 (
|
||||
/**
|
||||
Copy data from system memory to the MMIO region by using 64-bit access.
|
||||
|
||||
Copy data from system memory specified by Buffer to the MMIO region specified
|
||||
by starting address StartAddress by using 64-bit access. The total number
|
||||
Copy data from system memory specified by Buffer to the MMIO region specified
|
||||
by starting address StartAddress by using 64-bit access. The total number
|
||||
of byte to be copied is specified by Length. Buffer is returned.
|
||||
|
||||
|
||||
If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
|
||||
|
||||
If Length is not aligned on a 64-bit boundary, then ASSERT().
|
||||
@@ -390,7 +390,7 @@ MmioWriteBuffer64 (
|
||||
UINT64 *ReturnBuffer;
|
||||
|
||||
ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0);
|
||||
|
||||
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress));
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer));
|
||||
|
||||
@@ -398,10 +398,10 @@ MmioWriteBuffer64 (
|
||||
ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0);
|
||||
|
||||
ReturnBuffer = (UINT64 *) Buffer;
|
||||
|
||||
|
||||
while (Length != 0) {
|
||||
MmioWrite64 (StartAddress, *(Buffer++));
|
||||
|
||||
|
||||
StartAddress += sizeof (UINT64);
|
||||
Length -= sizeof (UINT64);
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@
|
||||
We don't advocate putting compiler specifics in libraries or drivers but there
|
||||
is no other way to make this work.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -146,7 +146,7 @@ IoRead16 (
|
||||
|
||||
If 16-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 16-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to write.
|
||||
@param Value The value to write to the I/O port.
|
||||
|
||||
@@ -176,7 +176,7 @@ IoWrite16 (
|
||||
|
||||
If 32-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 32-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to read.
|
||||
|
||||
@return The value read.
|
||||
@@ -206,7 +206,7 @@ IoRead32 (
|
||||
|
||||
If 32-bit I/O port operations are not supported, then ASSERT().
|
||||
If Port is not aligned on a 32-bit boundary, then ASSERT().
|
||||
|
||||
|
||||
@param Port The I/O port to write.
|
||||
@param Value The value to write to the I/O port.
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# CpuBreakpoint() for ARM
|
||||
#
|
||||
# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -32,5 +32,5 @@ GCC_ASM_EXPORT(CpuBreakpoint)
|
||||
# );
|
||||
#
|
||||
ASM_PFX(CpuBreakpoint):
|
||||
swi 0xdbdbdb
|
||||
swi 0xdbdbdb
|
||||
bx lr
|
||||
|
@@ -1,8 +1,8 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; CpuBreakpoint() for ARM
|
||||
;
|
||||
; Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
; Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -37,5 +37,5 @@
|
||||
CpuBreakpoint
|
||||
swi 0xdbdbdb
|
||||
bx lr
|
||||
|
||||
|
||||
END
|
||||
|
@@ -1,8 +1,8 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; CpuPause() for ARM
|
||||
;
|
||||
; Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
; Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# DisableInterrupts() for ARM
|
||||
#
|
||||
# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -1,8 +1,8 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; DisableInterrupts() for ARM
|
||||
;
|
||||
; Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
; Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -33,5 +33,5 @@ DisableInterrupts
|
||||
ORR R0,R0,#0x80 ;Disable IRQ interrupts
|
||||
MSR CPSR_c,R0
|
||||
BX LR
|
||||
|
||||
|
||||
END
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# EnableInterrupts() for ARM
|
||||
#
|
||||
# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -1,8 +1,8 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; EnableInterrupts() for ARM
|
||||
;
|
||||
; Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
; Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -33,5 +33,5 @@ EnableInterrupts
|
||||
BIC R0,R0,#0x80 ;Enable IRQ interrupts
|
||||
MSR CPSR_c,R0
|
||||
BX LR
|
||||
|
||||
|
||||
END
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# GetInterruptState() function for ARM
|
||||
#
|
||||
# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -1,8 +1,8 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; GetInterruptState() function for ARM
|
||||
;
|
||||
; Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
; Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -41,5 +41,5 @@ GetInterruptState
|
||||
MOVEQ R0, #1
|
||||
MOVNE R0, #0
|
||||
BX LR
|
||||
|
||||
|
||||
END
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
SwitchStack() function for ARM.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -39,7 +39,7 @@ InternalSwitchStackAsm (
|
||||
IN VOID *NewStack
|
||||
);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Transfers control to a function starting with a new stack.
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Replacement for Math64.c that is coded to use older GCC intrinsics.
|
||||
# Replacement for Math64.c that is coded to use older GCC intrinsics.
|
||||
# Doing this reduces the number of intrinsics that are required when
|
||||
# you port to a new version of gcc.
|
||||
# you port to a new version of gcc.
|
||||
#
|
||||
# Need to split this into multple files to size optimize the image.
|
||||
#
|
||||
@@ -17,253 +17,253 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.text
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathLShiftU64)
|
||||
.text
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathLShiftU64)
|
||||
|
||||
ASM_PFX(InternalMathLShiftU64):
|
||||
stmfd sp!, {r4, r5, r6}
|
||||
mov r6, r1
|
||||
rsb ip, r2, #32
|
||||
mov r4, r6, asl r2
|
||||
subs r1, r2, #32
|
||||
orr r4, r4, r0, lsr ip
|
||||
mov r3, r0, asl r2
|
||||
movpl r4, r0, asl r1
|
||||
mov r5, r0
|
||||
mov r0, r3
|
||||
mov r1, r4
|
||||
ldmfd sp!, {r4, r5, r6}
|
||||
bx lr
|
||||
stmfd sp!, {r4, r5, r6}
|
||||
mov r6, r1
|
||||
rsb ip, r2, #32
|
||||
mov r4, r6, asl r2
|
||||
subs r1, r2, #32
|
||||
orr r4, r4, r0, lsr ip
|
||||
mov r3, r0, asl r2
|
||||
movpl r4, r0, asl r1
|
||||
mov r5, r0
|
||||
mov r0, r3
|
||||
mov r1, r4
|
||||
ldmfd sp!, {r4, r5, r6}
|
||||
bx lr
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathRShiftU64)
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathRShiftU64)
|
||||
|
||||
ASM_PFX(InternalMathRShiftU64):
|
||||
stmfd sp!, {r4, r5, r6}
|
||||
mov r5, r0
|
||||
rsb ip, r2, #32
|
||||
mov r3, r5, lsr r2
|
||||
subs r0, r2, #32
|
||||
orr r3, r3, r1, asl ip
|
||||
mov r4, r1, lsr r2
|
||||
movpl r3, r1, lsr r0
|
||||
mov r6, r1
|
||||
mov r0, r3
|
||||
mov r1, r4
|
||||
ldmfd sp!, {r4, r5, r6}
|
||||
bx lr
|
||||
stmfd sp!, {r4, r5, r6}
|
||||
mov r5, r0
|
||||
rsb ip, r2, #32
|
||||
mov r3, r5, lsr r2
|
||||
subs r0, r2, #32
|
||||
orr r3, r3, r1, asl ip
|
||||
mov r4, r1, lsr r2
|
||||
movpl r3, r1, lsr r0
|
||||
mov r6, r1
|
||||
mov r0, r3
|
||||
mov r1, r4
|
||||
ldmfd sp!, {r4, r5, r6}
|
||||
bx lr
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathARShiftU64)
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathARShiftU64)
|
||||
|
||||
ASM_PFX(InternalMathARShiftU64):
|
||||
stmfd sp!, {r4, r5, r6}
|
||||
mov r5, r0
|
||||
rsb ip, r2, #32
|
||||
mov r3, r5, lsr r2
|
||||
subs r0, r2, #32
|
||||
orr r3, r3, r1, asl ip
|
||||
mov r4, r1, asr r2
|
||||
movpl r3, r1, asr r0
|
||||
mov r6, r1
|
||||
mov r0, r3
|
||||
mov r1, r4
|
||||
ldmfd sp!, {r4, r5, r6}
|
||||
bx lr
|
||||
stmfd sp!, {r4, r5, r6}
|
||||
mov r5, r0
|
||||
rsb ip, r2, #32
|
||||
mov r3, r5, lsr r2
|
||||
subs r0, r2, #32
|
||||
orr r3, r3, r1, asl ip
|
||||
mov r4, r1, asr r2
|
||||
movpl r3, r1, asr r0
|
||||
mov r6, r1
|
||||
mov r0, r3
|
||||
mov r1, r4
|
||||
ldmfd sp!, {r4, r5, r6}
|
||||
bx lr
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathLRotU64)
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathLRotU64)
|
||||
|
||||
ASM_PFX(InternalMathLRotU64):
|
||||
stmfd sp!, {r4, r5, r6, r7, lr}
|
||||
add r7, sp, #12
|
||||
mov r6, r1
|
||||
rsb ip, r2, #32
|
||||
mov r4, r6, asl r2
|
||||
rsb lr, r2, #64
|
||||
subs r1, r2, #32
|
||||
orr r4, r4, r0, lsr ip
|
||||
mov r3, r0, asl r2
|
||||
movpl r4, r0, asl r1
|
||||
sub ip, r2, #32
|
||||
mov r5, r0
|
||||
mov r0, r0, lsr lr
|
||||
rsbs r2, r2, #32
|
||||
orr r0, r0, r6, asl ip
|
||||
mov r1, r6, lsr lr
|
||||
movpl r0, r6, lsr r2
|
||||
orr r1, r1, r4
|
||||
orr r0, r0, r3
|
||||
ldmfd sp!, {r4, r5, r6, r7, pc}
|
||||
stmfd sp!, {r4, r5, r6, r7, lr}
|
||||
add r7, sp, #12
|
||||
mov r6, r1
|
||||
rsb ip, r2, #32
|
||||
mov r4, r6, asl r2
|
||||
rsb lr, r2, #64
|
||||
subs r1, r2, #32
|
||||
orr r4, r4, r0, lsr ip
|
||||
mov r3, r0, asl r2
|
||||
movpl r4, r0, asl r1
|
||||
sub ip, r2, #32
|
||||
mov r5, r0
|
||||
mov r0, r0, lsr lr
|
||||
rsbs r2, r2, #32
|
||||
orr r0, r0, r6, asl ip
|
||||
mov r1, r6, lsr lr
|
||||
movpl r0, r6, lsr r2
|
||||
orr r1, r1, r4
|
||||
orr r0, r0, r3
|
||||
ldmfd sp!, {r4, r5, r6, r7, pc}
|
||||
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathRRotU64)
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathRRotU64)
|
||||
|
||||
ASM_PFX(InternalMathRRotU64):
|
||||
stmfd sp!, {r4, r5, r6, r7, lr}
|
||||
add r7, sp, #12
|
||||
mov r5, r0
|
||||
rsb ip, r2, #32
|
||||
mov r3, r5, lsr r2
|
||||
rsb lr, r2, #64
|
||||
subs r0, r2, #32
|
||||
orr r3, r3, r1, asl ip
|
||||
mov r4, r1, lsr r2
|
||||
movpl r3, r1, lsr r0
|
||||
sub ip, r2, #32
|
||||
mov r6, r1
|
||||
mov r1, r1, asl lr
|
||||
rsbs r2, r2, #32
|
||||
orr r1, r1, r5, lsr ip
|
||||
mov r0, r5, asl lr
|
||||
movpl r1, r5, asl r2
|
||||
orr r0, r0, r3
|
||||
orr r1, r1, r4
|
||||
ldmfd sp!, {r4, r5, r6, r7, pc}
|
||||
stmfd sp!, {r4, r5, r6, r7, lr}
|
||||
add r7, sp, #12
|
||||
mov r5, r0
|
||||
rsb ip, r2, #32
|
||||
mov r3, r5, lsr r2
|
||||
rsb lr, r2, #64
|
||||
subs r0, r2, #32
|
||||
orr r3, r3, r1, asl ip
|
||||
mov r4, r1, lsr r2
|
||||
movpl r3, r1, lsr r0
|
||||
sub ip, r2, #32
|
||||
mov r6, r1
|
||||
mov r1, r1, asl lr
|
||||
rsbs r2, r2, #32
|
||||
orr r1, r1, r5, lsr ip
|
||||
mov r0, r5, asl lr
|
||||
movpl r1, r5, asl r2
|
||||
orr r0, r0, r3
|
||||
orr r1, r1, r4
|
||||
ldmfd sp!, {r4, r5, r6, r7, pc}
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathMultU64x32)
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathMultU64x32)
|
||||
|
||||
ASM_PFX(InternalMathMultU64x32):
|
||||
stmfd sp!, {r7, lr}
|
||||
add r7, sp, #0
|
||||
mov r3, #0
|
||||
mov ip, r0
|
||||
mov lr, r1
|
||||
umull r0, r1, ip, r2
|
||||
mla r1, lr, r2, r1
|
||||
mla r1, ip, r3, r1
|
||||
ldmfd sp!, {r7, pc}
|
||||
stmfd sp!, {r7, lr}
|
||||
add r7, sp, #0
|
||||
mov r3, #0
|
||||
mov ip, r0
|
||||
mov lr, r1
|
||||
umull r0, r1, ip, r2
|
||||
mla r1, lr, r2, r1
|
||||
mla r1, ip, r3, r1
|
||||
ldmfd sp!, {r7, pc}
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathMultU64x64)
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathMultU64x64)
|
||||
|
||||
ASM_PFX(InternalMathMultU64x64):
|
||||
stmfd sp!, {r7, lr}
|
||||
add r7, sp, #0
|
||||
mov ip, r0
|
||||
mov lr, r1
|
||||
umull r0, r1, ip, r2
|
||||
mla r1, lr, r2, r1
|
||||
mla r1, ip, r3, r1
|
||||
ldmfd sp!, {r7, pc}
|
||||
stmfd sp!, {r7, lr}
|
||||
add r7, sp, #0
|
||||
mov ip, r0
|
||||
mov lr, r1
|
||||
umull r0, r1, ip, r2
|
||||
mla r1, lr, r2, r1
|
||||
mla r1, ip, r3, r1
|
||||
ldmfd sp!, {r7, pc}
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathDivU64x32)
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathDivU64x32)
|
||||
|
||||
ASM_PFX(InternalMathDivU64x32):
|
||||
stmfd sp!, {r7, lr}
|
||||
add r7, sp, #0
|
||||
mov r3, #0
|
||||
bl ASM_PFX(__udivdi3)
|
||||
ldmfd sp!, {r7, pc}
|
||||
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathModU64x32)
|
||||
stmfd sp!, {r7, lr}
|
||||
add r7, sp, #0
|
||||
mov r3, #0
|
||||
bl ASM_PFX(__udivdi3)
|
||||
ldmfd sp!, {r7, pc}
|
||||
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathModU64x32)
|
||||
|
||||
ASM_PFX(InternalMathModU64x32):
|
||||
stmfd sp!, {r7, lr}
|
||||
add r7, sp, #0
|
||||
mov r3, #0
|
||||
bl ASM_PFX(__umoddi3)
|
||||
ldmfd sp!, {r7, pc}
|
||||
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathDivRemU64x32)
|
||||
stmfd sp!, {r7, lr}
|
||||
add r7, sp, #0
|
||||
mov r3, #0
|
||||
bl ASM_PFX(__umoddi3)
|
||||
ldmfd sp!, {r7, pc}
|
||||
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathDivRemU64x32)
|
||||
|
||||
ASM_PFX(InternalMathDivRemU64x32):
|
||||
stmfd sp!, {r4, r5, r6, r7, lr}
|
||||
add r7, sp, #12
|
||||
stmfd sp!, {r10, r11}
|
||||
subs r6, r3, #0
|
||||
mov r10, r0
|
||||
mov r11, r1
|
||||
moveq r4, r2
|
||||
moveq r5, #0
|
||||
beq L22
|
||||
mov r4, r2
|
||||
mov r5, #0
|
||||
mov r3, #0
|
||||
bl ASM_PFX(__umoddi3)
|
||||
str r0, [r6, #0]
|
||||
stmfd sp!, {r4, r5, r6, r7, lr}
|
||||
add r7, sp, #12
|
||||
stmfd sp!, {r10, r11}
|
||||
subs r6, r3, #0
|
||||
mov r10, r0
|
||||
mov r11, r1
|
||||
moveq r4, r2
|
||||
moveq r5, #0
|
||||
beq L22
|
||||
mov r4, r2
|
||||
mov r5, #0
|
||||
mov r3, #0
|
||||
bl ASM_PFX(__umoddi3)
|
||||
str r0, [r6, #0]
|
||||
L22:
|
||||
mov r0, r10
|
||||
mov r1, r11
|
||||
mov r2, r4
|
||||
mov r3, r5
|
||||
bl ASM_PFX(__udivdi3)
|
||||
ldmfd sp!, {r10, r11}
|
||||
ldmfd sp!, {r4, r5, r6, r7, pc}
|
||||
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathDivRemU64x64)
|
||||
mov r0, r10
|
||||
mov r1, r11
|
||||
mov r2, r4
|
||||
mov r3, r5
|
||||
bl ASM_PFX(__udivdi3)
|
||||
ldmfd sp!, {r10, r11}
|
||||
ldmfd sp!, {r4, r5, r6, r7, pc}
|
||||
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathDivRemU64x64)
|
||||
|
||||
ASM_PFX(InternalMathDivRemU64x64):
|
||||
stmfd sp!, {r4, r5, r6, r7, lr}
|
||||
add r7, sp, #12
|
||||
stmfd sp!, {r10, r11}
|
||||
ldr r6, [sp, #28]
|
||||
mov r4, r0
|
||||
cmp r6, #0
|
||||
mov r5, r1
|
||||
mov r10, r2
|
||||
mov r11, r3
|
||||
beq L26
|
||||
bl ASM_PFX(__umoddi3)
|
||||
stmia r6, {r0-r1}
|
||||
stmfd sp!, {r4, r5, r6, r7, lr}
|
||||
add r7, sp, #12
|
||||
stmfd sp!, {r10, r11}
|
||||
ldr r6, [sp, #28]
|
||||
mov r4, r0
|
||||
cmp r6, #0
|
||||
mov r5, r1
|
||||
mov r10, r2
|
||||
mov r11, r3
|
||||
beq L26
|
||||
bl ASM_PFX(__umoddi3)
|
||||
stmia r6, {r0-r1}
|
||||
L26:
|
||||
mov r0, r4
|
||||
mov r1, r5
|
||||
mov r2, r10
|
||||
mov r3, r11
|
||||
bl ASM_PFX(__udivdi3)
|
||||
ldmfd sp!, {r10, r11}
|
||||
ldmfd sp!, {r4, r5, r6, r7, pc}
|
||||
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathDivRemS64x64)
|
||||
mov r0, r4
|
||||
mov r1, r5
|
||||
mov r2, r10
|
||||
mov r3, r11
|
||||
bl ASM_PFX(__udivdi3)
|
||||
ldmfd sp!, {r10, r11}
|
||||
ldmfd sp!, {r4, r5, r6, r7, pc}
|
||||
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathDivRemS64x64)
|
||||
|
||||
ASM_PFX(InternalMathDivRemS64x64):
|
||||
stmfd sp!, {r4, r5, r6, r7, lr}
|
||||
add r7, sp, #12
|
||||
stmfd sp!, {r10, r11}
|
||||
ldr r6, [sp, #28]
|
||||
mov r4, r0
|
||||
cmp r6, #0
|
||||
mov r5, r1
|
||||
mov r10, r2
|
||||
mov r11, r3
|
||||
beq L30
|
||||
bl ASM_PFX(__moddi3)
|
||||
stmia r6, {r0-r1}
|
||||
stmfd sp!, {r4, r5, r6, r7, lr}
|
||||
add r7, sp, #12
|
||||
stmfd sp!, {r10, r11}
|
||||
ldr r6, [sp, #28]
|
||||
mov r4, r0
|
||||
cmp r6, #0
|
||||
mov r5, r1
|
||||
mov r10, r2
|
||||
mov r11, r3
|
||||
beq L30
|
||||
bl ASM_PFX(__moddi3)
|
||||
stmia r6, {r0-r1}
|
||||
L30:
|
||||
mov r0, r4
|
||||
mov r1, r5
|
||||
mov r2, r10
|
||||
mov r3, r11
|
||||
bl ASM_PFX(__divdi3)
|
||||
ldmfd sp!, {r10, r11}
|
||||
ldmfd sp!, {r4, r5, r6, r7, pc}
|
||||
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathSwapBytes64)
|
||||
mov r0, r4
|
||||
mov r1, r5
|
||||
mov r2, r10
|
||||
mov r3, r11
|
||||
bl ASM_PFX(__divdi3)
|
||||
ldmfd sp!, {r10, r11}
|
||||
ldmfd sp!, {r4, r5, r6, r7, pc}
|
||||
|
||||
|
||||
.align 2
|
||||
GCC_ASM_EXPORT(InternalMathSwapBytes64)
|
||||
|
||||
ASM_PFX(InternalMathSwapBytes64):
|
||||
stmfd sp!, {r4, r5, r7, lr}
|
||||
mov r5, r1
|
||||
bl ASM_PFX(SwapBytes32)
|
||||
mov r4, r0
|
||||
mov r0, r5
|
||||
bl ASM_PFX(SwapBytes32)
|
||||
mov r1, r4
|
||||
ldmfd sp!, {r4, r5, r7, pc}
|
||||
stmfd sp!, {r4, r5, r7, lr}
|
||||
mov r5, r1
|
||||
bl ASM_PFX(SwapBytes32)
|
||||
mov r4, r0
|
||||
mov r0, r5
|
||||
bl ASM_PFX(SwapBytes32)
|
||||
mov r1, r4
|
||||
ldmfd sp!, {r4, r5, r7, pc}
|
||||
|
||||
|
||||
ASM_FUNCTION_REMOVE_IF_UNREFERENCED
|
||||
ASM_FUNCTION_REMOVE_IF_UNREFERENCED
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
; Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -1,6 +1,6 @@
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
// Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
// Portions copyright (c) 2011, ARM Limited. All rights reserved.<BR>
|
||||
// This program and the accompanying materials
|
||||
@@ -12,13 +12,13 @@
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
.text
|
||||
.align 5
|
||||
|
||||
GCC_ASM_EXPORT(InternalSwitchStackAsm)
|
||||
GCC_ASM_EXPORT(CpuPause)
|
||||
|
||||
GCC_ASM_EXPORT(CpuPause)
|
||||
|
||||
/**
|
||||
//
|
||||
// This allows the caller to switch the stack and goes to the new entry point
|
||||
|
@@ -1,6 +1,6 @@
|
||||
;------------------------------------------------------------------------------
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
; Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
; This program and the accompanying materials
|
||||
; are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -11,11 +11,11 @@
|
||||
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
|
||||
EXPORT InternalSwitchStackAsm
|
||||
|
||||
|
||||
AREA Switch_Stack, CODE, READONLY
|
||||
|
||||
|
||||
;/**
|
||||
; This allows the caller to switch the stack and goes to the new entry point
|
||||
;
|
||||
|
@@ -1,9 +1,9 @@
|
||||
/** @file
|
||||
Unaligned access functions of BaseLib for ARM.
|
||||
|
||||
|
||||
volatile was added to work around optimization issues.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -22,7 +22,7 @@
|
||||
FILE_GUID = 27d67720-ea68-48ae-93da-a3a074c90e30
|
||||
MODULE_TYPE = BASE
|
||||
VERSION_STRING = 1.1
|
||||
LIBRARY_CLASS = BaseLib
|
||||
LIBRARY_CLASS = BaseLib
|
||||
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC ARM AARCH64
|
||||
@@ -69,94 +69,94 @@
|
||||
[Sources.Ia32]
|
||||
Ia32/WriteTr.nasm
|
||||
|
||||
Ia32/Wbinvd.c | MSFT
|
||||
Ia32/WriteMm7.c | MSFT
|
||||
Ia32/WriteMm6.c | MSFT
|
||||
Ia32/WriteMm5.c | MSFT
|
||||
Ia32/WriteMm4.c | MSFT
|
||||
Ia32/WriteMm3.c | MSFT
|
||||
Ia32/WriteMm2.c | MSFT
|
||||
Ia32/WriteMm1.c | MSFT
|
||||
Ia32/WriteMm0.c | MSFT
|
||||
Ia32/WriteLdtr.c | MSFT
|
||||
Ia32/WriteIdtr.c | MSFT
|
||||
Ia32/WriteGdtr.c | MSFT
|
||||
Ia32/WriteDr7.c | MSFT
|
||||
Ia32/WriteDr6.c | MSFT
|
||||
Ia32/WriteDr5.c | MSFT
|
||||
Ia32/WriteDr4.c | MSFT
|
||||
Ia32/WriteDr3.c | MSFT
|
||||
Ia32/WriteDr2.c | MSFT
|
||||
Ia32/WriteDr1.c | MSFT
|
||||
Ia32/WriteDr0.c | MSFT
|
||||
Ia32/WriteCr4.c | MSFT
|
||||
Ia32/WriteCr3.c | MSFT
|
||||
Ia32/WriteCr2.c | MSFT
|
||||
Ia32/WriteCr0.c | MSFT
|
||||
Ia32/WriteMsr64.c | MSFT
|
||||
Ia32/SwapBytes64.c | MSFT
|
||||
Ia32/SetJump.c | MSFT
|
||||
Ia32/RRotU64.c | MSFT
|
||||
Ia32/RShiftU64.c | MSFT
|
||||
Ia32/ReadPmc.c | MSFT
|
||||
Ia32/ReadTsc.c | MSFT
|
||||
Ia32/ReadLdtr.c | MSFT
|
||||
Ia32/ReadIdtr.c | MSFT
|
||||
Ia32/ReadGdtr.c | MSFT
|
||||
Ia32/ReadTr.c | MSFT
|
||||
Ia32/ReadSs.c | MSFT
|
||||
Ia32/ReadGs.c | MSFT
|
||||
Ia32/ReadFs.c | MSFT
|
||||
Ia32/ReadEs.c | MSFT
|
||||
Ia32/ReadDs.c | MSFT
|
||||
Ia32/ReadCs.c | MSFT
|
||||
Ia32/ReadMsr64.c | MSFT
|
||||
Ia32/ReadMm7.c | MSFT
|
||||
Ia32/ReadMm6.c | MSFT
|
||||
Ia32/ReadMm5.c | MSFT
|
||||
Ia32/ReadMm4.c | MSFT
|
||||
Ia32/ReadMm3.c | MSFT
|
||||
Ia32/ReadMm2.c | MSFT
|
||||
Ia32/ReadMm1.c | MSFT
|
||||
Ia32/ReadMm0.c | MSFT
|
||||
Ia32/ReadEflags.c | MSFT
|
||||
Ia32/ReadDr7.c | MSFT
|
||||
Ia32/ReadDr6.c | MSFT
|
||||
Ia32/ReadDr5.c | MSFT
|
||||
Ia32/ReadDr4.c | MSFT
|
||||
Ia32/ReadDr3.c | MSFT
|
||||
Ia32/ReadDr2.c | MSFT
|
||||
Ia32/ReadDr1.c | MSFT
|
||||
Ia32/ReadDr0.c | MSFT
|
||||
Ia32/ReadCr4.c | MSFT
|
||||
Ia32/ReadCr3.c | MSFT
|
||||
Ia32/ReadCr2.c | MSFT
|
||||
Ia32/ReadCr0.c | MSFT
|
||||
Ia32/Mwait.c | MSFT
|
||||
Ia32/Monitor.c | MSFT
|
||||
Ia32/ModU64x32.c | MSFT
|
||||
Ia32/MultU64x64.c | MSFT
|
||||
Ia32/MultU64x32.c | MSFT
|
||||
Ia32/LShiftU64.c | MSFT
|
||||
Ia32/LRotU64.c | MSFT
|
||||
Ia32/LongJump.c | MSFT
|
||||
Ia32/Invd.c | MSFT
|
||||
Ia32/FxRestore.c | MSFT
|
||||
Ia32/FxSave.c | MSFT
|
||||
Ia32/FlushCacheLine.c | MSFT
|
||||
Ia32/EnablePaging32.c | MSFT
|
||||
Ia32/EnableInterrupts.c | MSFT
|
||||
Ia32/EnableDisableInterrupts.c | MSFT
|
||||
Ia32/Wbinvd.c | MSFT
|
||||
Ia32/WriteMm7.c | MSFT
|
||||
Ia32/WriteMm6.c | MSFT
|
||||
Ia32/WriteMm5.c | MSFT
|
||||
Ia32/WriteMm4.c | MSFT
|
||||
Ia32/WriteMm3.c | MSFT
|
||||
Ia32/WriteMm2.c | MSFT
|
||||
Ia32/WriteMm1.c | MSFT
|
||||
Ia32/WriteMm0.c | MSFT
|
||||
Ia32/WriteLdtr.c | MSFT
|
||||
Ia32/WriteIdtr.c | MSFT
|
||||
Ia32/WriteGdtr.c | MSFT
|
||||
Ia32/WriteDr7.c | MSFT
|
||||
Ia32/WriteDr6.c | MSFT
|
||||
Ia32/WriteDr5.c | MSFT
|
||||
Ia32/WriteDr4.c | MSFT
|
||||
Ia32/WriteDr3.c | MSFT
|
||||
Ia32/WriteDr2.c | MSFT
|
||||
Ia32/WriteDr1.c | MSFT
|
||||
Ia32/WriteDr0.c | MSFT
|
||||
Ia32/WriteCr4.c | MSFT
|
||||
Ia32/WriteCr3.c | MSFT
|
||||
Ia32/WriteCr2.c | MSFT
|
||||
Ia32/WriteCr0.c | MSFT
|
||||
Ia32/WriteMsr64.c | MSFT
|
||||
Ia32/SwapBytes64.c | MSFT
|
||||
Ia32/SetJump.c | MSFT
|
||||
Ia32/RRotU64.c | MSFT
|
||||
Ia32/RShiftU64.c | MSFT
|
||||
Ia32/ReadPmc.c | MSFT
|
||||
Ia32/ReadTsc.c | MSFT
|
||||
Ia32/ReadLdtr.c | MSFT
|
||||
Ia32/ReadIdtr.c | MSFT
|
||||
Ia32/ReadGdtr.c | MSFT
|
||||
Ia32/ReadTr.c | MSFT
|
||||
Ia32/ReadSs.c | MSFT
|
||||
Ia32/ReadGs.c | MSFT
|
||||
Ia32/ReadFs.c | MSFT
|
||||
Ia32/ReadEs.c | MSFT
|
||||
Ia32/ReadDs.c | MSFT
|
||||
Ia32/ReadCs.c | MSFT
|
||||
Ia32/ReadMsr64.c | MSFT
|
||||
Ia32/ReadMm7.c | MSFT
|
||||
Ia32/ReadMm6.c | MSFT
|
||||
Ia32/ReadMm5.c | MSFT
|
||||
Ia32/ReadMm4.c | MSFT
|
||||
Ia32/ReadMm3.c | MSFT
|
||||
Ia32/ReadMm2.c | MSFT
|
||||
Ia32/ReadMm1.c | MSFT
|
||||
Ia32/ReadMm0.c | MSFT
|
||||
Ia32/ReadEflags.c | MSFT
|
||||
Ia32/ReadDr7.c | MSFT
|
||||
Ia32/ReadDr6.c | MSFT
|
||||
Ia32/ReadDr5.c | MSFT
|
||||
Ia32/ReadDr4.c | MSFT
|
||||
Ia32/ReadDr3.c | MSFT
|
||||
Ia32/ReadDr2.c | MSFT
|
||||
Ia32/ReadDr1.c | MSFT
|
||||
Ia32/ReadDr0.c | MSFT
|
||||
Ia32/ReadCr4.c | MSFT
|
||||
Ia32/ReadCr3.c | MSFT
|
||||
Ia32/ReadCr2.c | MSFT
|
||||
Ia32/ReadCr0.c | MSFT
|
||||
Ia32/Mwait.c | MSFT
|
||||
Ia32/Monitor.c | MSFT
|
||||
Ia32/ModU64x32.c | MSFT
|
||||
Ia32/MultU64x64.c | MSFT
|
||||
Ia32/MultU64x32.c | MSFT
|
||||
Ia32/LShiftU64.c | MSFT
|
||||
Ia32/LRotU64.c | MSFT
|
||||
Ia32/LongJump.c | MSFT
|
||||
Ia32/Invd.c | MSFT
|
||||
Ia32/FxRestore.c | MSFT
|
||||
Ia32/FxSave.c | MSFT
|
||||
Ia32/FlushCacheLine.c | MSFT
|
||||
Ia32/EnablePaging32.c | MSFT
|
||||
Ia32/EnableInterrupts.c | MSFT
|
||||
Ia32/EnableDisableInterrupts.c | MSFT
|
||||
Ia32/DivU64x64Remainder.nasm| MSFT
|
||||
Ia32/DivU64x32Remainder.c | MSFT
|
||||
Ia32/DivU64x32.c | MSFT
|
||||
Ia32/DisablePaging32.c | MSFT
|
||||
Ia32/DisableInterrupts.c | MSFT
|
||||
Ia32/CpuPause.c | MSFT
|
||||
Ia32/CpuIdEx.c | MSFT
|
||||
Ia32/CpuId.c | MSFT
|
||||
Ia32/CpuBreakpoint.c | MSFT
|
||||
Ia32/ARShiftU64.c | MSFT
|
||||
Ia32/DivU64x32Remainder.c | MSFT
|
||||
Ia32/DivU64x32.c | MSFT
|
||||
Ia32/DisablePaging32.c | MSFT
|
||||
Ia32/DisableInterrupts.c | MSFT
|
||||
Ia32/CpuPause.c | MSFT
|
||||
Ia32/CpuIdEx.c | MSFT
|
||||
Ia32/CpuId.c | MSFT
|
||||
Ia32/CpuBreakpoint.c | MSFT
|
||||
Ia32/ARShiftU64.c | MSFT
|
||||
Ia32/Thunk16.nasm | MSFT
|
||||
Ia32/EnablePaging64.nasm| MSFT
|
||||
Ia32/EnableCache.c | MSFT
|
||||
@@ -258,52 +258,52 @@
|
||||
Ia32/RdRand.nasm| INTEL
|
||||
|
||||
Ia32/GccInline.c | GCC
|
||||
Ia32/Thunk16.nasm | GCC
|
||||
Ia32/Thunk16.S | XCODE
|
||||
Ia32/Thunk16.nasm | GCC
|
||||
Ia32/Thunk16.S | XCODE
|
||||
Ia32/EnableDisableInterrupts.nasm| GCC
|
||||
Ia32/EnableDisableInterrupts.S | GCC
|
||||
Ia32/EnableDisableInterrupts.S | GCC
|
||||
Ia32/EnablePaging64.nasm| GCC
|
||||
Ia32/EnablePaging64.S | GCC
|
||||
Ia32/EnablePaging64.S | GCC
|
||||
Ia32/DisablePaging32.nasm| GCC
|
||||
Ia32/DisablePaging32.S | GCC
|
||||
Ia32/DisablePaging32.S | GCC
|
||||
Ia32/EnablePaging32.nasm| GCC
|
||||
Ia32/EnablePaging32.S | GCC
|
||||
Ia32/EnablePaging32.S | GCC
|
||||
Ia32/Mwait.nasm| GCC
|
||||
Ia32/Mwait.S | GCC
|
||||
Ia32/Mwait.S | GCC
|
||||
Ia32/Monitor.nasm| GCC
|
||||
Ia32/Monitor.S | GCC
|
||||
Ia32/Monitor.S | GCC
|
||||
Ia32/CpuIdEx.nasm| GCC
|
||||
Ia32/CpuIdEx.S | GCC
|
||||
Ia32/CpuIdEx.S | GCC
|
||||
Ia32/CpuId.nasm| GCC
|
||||
Ia32/CpuId.S | GCC
|
||||
Ia32/CpuId.S | GCC
|
||||
Ia32/LongJump.nasm| GCC
|
||||
Ia32/LongJump.S | GCC
|
||||
Ia32/LongJump.S | GCC
|
||||
Ia32/SetJump.nasm| GCC
|
||||
Ia32/SetJump.S | GCC
|
||||
Ia32/SetJump.S | GCC
|
||||
Ia32/SwapBytes64.nasm| GCC
|
||||
Ia32/SwapBytes64.S | GCC
|
||||
Ia32/SwapBytes64.S | GCC
|
||||
Ia32/DivU64x64Remainder.nasm| GCC
|
||||
Ia32/DivU64x64Remainder.S | GCC
|
||||
Ia32/DivU64x64Remainder.S | GCC
|
||||
Ia32/DivU64x32Remainder.nasm| GCC
|
||||
Ia32/DivU64x32Remainder.S | GCC
|
||||
Ia32/DivU64x32Remainder.S | GCC
|
||||
Ia32/ModU64x32.nasm| GCC
|
||||
Ia32/ModU64x32.S | GCC
|
||||
Ia32/ModU64x32.S | GCC
|
||||
Ia32/DivU64x32.nasm| GCC
|
||||
Ia32/DivU64x32.S | GCC
|
||||
Ia32/DivU64x32.S | GCC
|
||||
Ia32/MultU64x64.nasm| GCC
|
||||
Ia32/MultU64x64.S | GCC
|
||||
Ia32/MultU64x64.S | GCC
|
||||
Ia32/MultU64x32.nasm| GCC
|
||||
Ia32/MultU64x32.S | GCC
|
||||
Ia32/MultU64x32.S | GCC
|
||||
Ia32/RRotU64.nasm| GCC
|
||||
Ia32/RRotU64.S | GCC
|
||||
Ia32/RRotU64.S | GCC
|
||||
Ia32/LRotU64.nasm| GCC
|
||||
Ia32/LRotU64.S | GCC
|
||||
Ia32/LRotU64.S | GCC
|
||||
Ia32/ARShiftU64.nasm| GCC
|
||||
Ia32/ARShiftU64.S | GCC
|
||||
Ia32/ARShiftU64.S | GCC
|
||||
Ia32/RShiftU64.nasm| GCC
|
||||
Ia32/RShiftU64.S | GCC
|
||||
Ia32/RShiftU64.S | GCC
|
||||
Ia32/LShiftU64.nasm| GCC
|
||||
Ia32/LShiftU64.S | GCC
|
||||
Ia32/LShiftU64.S | GCC
|
||||
Ia32/EnableCache.nasm| GCC
|
||||
Ia32/EnableCache.S | GCC
|
||||
Ia32/DisableCache.nasm| GCC
|
||||
@@ -347,9 +347,9 @@
|
||||
X64/DisableCache.nasm
|
||||
X64/WriteTr.nasm
|
||||
|
||||
X64/CpuBreakpoint.c | MSFT
|
||||
X64/WriteMsr64.c | MSFT
|
||||
X64/ReadMsr64.c | MSFT
|
||||
X64/CpuBreakpoint.c | MSFT
|
||||
X64/WriteMsr64.c | MSFT
|
||||
X64/ReadMsr64.c | MSFT
|
||||
X64/RdRand.nasm| MSFT
|
||||
X64/CpuPause.nasm| MSFT
|
||||
X64/EnableDisableInterrupts.nasm| MSFT
|
||||
@@ -514,28 +514,28 @@
|
||||
X86RdRand.c
|
||||
X86PatchInstruction.c
|
||||
X64/GccInline.c | GCC
|
||||
X64/Thunk16.S | XCODE
|
||||
X64/Thunk16.S | XCODE
|
||||
X64/SwitchStack.nasm| GCC
|
||||
X64/SwitchStack.S | GCC
|
||||
X64/SwitchStack.S | GCC
|
||||
X64/SetJump.nasm| GCC
|
||||
X64/SetJump.S | GCC
|
||||
X64/SetJump.S | GCC
|
||||
X64/LongJump.nasm| GCC
|
||||
X64/LongJump.S | GCC
|
||||
X64/LongJump.S | GCC
|
||||
X64/EnableDisableInterrupts.nasm| GCC
|
||||
X64/EnableDisableInterrupts.S | GCC
|
||||
X64/EnableDisableInterrupts.S | GCC
|
||||
X64/DisablePaging64.nasm| GCC
|
||||
X64/DisablePaging64.S | GCC
|
||||
X64/DisablePaging64.S | GCC
|
||||
X64/CpuId.nasm| GCC
|
||||
X64/CpuId.S | GCC
|
||||
X64/CpuId.S | GCC
|
||||
X64/CpuIdEx.nasm| GCC
|
||||
X64/CpuIdEx.S | GCC
|
||||
X64/CpuIdEx.S | GCC
|
||||
X64/EnableCache.nasm| GCC
|
||||
X64/EnableCache.S | GCC
|
||||
X64/DisableCache.nasm| GCC
|
||||
X64/DisableCache.S | GCC
|
||||
X64/RdRand.nasm| GCC
|
||||
X64/RdRand.S | GCC
|
||||
ChkStkGcc.c | GCC
|
||||
ChkStkGcc.c | GCC
|
||||
|
||||
[Sources.IPF]
|
||||
Ipf/AccessGp.s
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Bit field functions of BaseLib.
|
||||
|
||||
Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -69,13 +69,13 @@ InternalBaseLibBitFieldOrUint (
|
||||
)
|
||||
{
|
||||
//
|
||||
// Higher bits in OrData those are not used must be zero.
|
||||
// Higher bits in OrData those are not used must be zero.
|
||||
//
|
||||
// EndBit - StartBit + 1 might be 32 while the result right shifting 32 on a 32bit integer is undefined,
|
||||
// So the logic is updated to right shift (EndBit - StartBit) bits and compare the last bit directly.
|
||||
//
|
||||
ASSERT ((OrData >> (EndBit - StartBit)) == ((OrData >> (EndBit - StartBit)) & 1));
|
||||
|
||||
|
||||
//
|
||||
// ~((UINTN)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit]
|
||||
// are 1's while bit[EndBit + 1] thru the most significant bit are 0's.
|
||||
@@ -111,7 +111,7 @@ InternalBaseLibBitFieldAndUint (
|
||||
)
|
||||
{
|
||||
//
|
||||
// Higher bits in AndData those are not used must be zero.
|
||||
// Higher bits in AndData those are not used must be zero.
|
||||
//
|
||||
// EndBit - StartBit + 1 might be 32 while the result right shifting 32 on a 32bit integer is undefined,
|
||||
// So the logic is updated to right shift (EndBit - StartBit) bits and compare the last bit directly.
|
||||
@@ -275,7 +275,7 @@ BitFieldAnd8 (
|
||||
bitwise OR, and returns the result.
|
||||
|
||||
Performs a bitwise AND between the bit field specified by StartBit and EndBit
|
||||
in Operand and the value specified by AndData, followed by a bitwise
|
||||
in Operand and the value specified by AndData, followed by a bitwise
|
||||
OR with value specified by OrData. All other bits in Operand are
|
||||
preserved. The new 8-bit value is returned.
|
||||
|
||||
@@ -467,7 +467,7 @@ BitFieldAnd16 (
|
||||
bitwise OR, and returns the result.
|
||||
|
||||
Performs a bitwise AND between the bit field specified by StartBit and EndBit
|
||||
in Operand and the value specified by AndData, followed by a bitwise
|
||||
in Operand and the value specified by AndData, followed by a bitwise
|
||||
OR with value specified by OrData. All other bits in Operand are
|
||||
preserved. The new 16-bit value is returned.
|
||||
|
||||
@@ -659,7 +659,7 @@ BitFieldAnd32 (
|
||||
bitwise OR, and returns the result.
|
||||
|
||||
Performs a bitwise AND between the bit field specified by StartBit and EndBit
|
||||
in Operand and the value specified by AndData, followed by a bitwise
|
||||
in Operand and the value specified by AndData, followed by a bitwise
|
||||
OR with value specified by OrData. All other bits in Operand are
|
||||
preserved. The new 32-bit value is returned.
|
||||
|
||||
@@ -809,7 +809,7 @@ BitFieldOr64 (
|
||||
ASSERT (EndBit < 64);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
//
|
||||
// Higher bits in OrData those are not used must be zero.
|
||||
// Higher bits in OrData those are not used must be zero.
|
||||
//
|
||||
// EndBit - StartBit + 1 might be 64 while the result right shifting 64 on RShiftU64() API is invalid,
|
||||
// So the logic is updated to right shift (EndBit - StartBit) bits and compare the last bit directly.
|
||||
@@ -857,11 +857,11 @@ BitFieldAnd64 (
|
||||
{
|
||||
UINT64 Value1;
|
||||
UINT64 Value2;
|
||||
|
||||
|
||||
ASSERT (EndBit < 64);
|
||||
ASSERT (StartBit <= EndBit);
|
||||
//
|
||||
// Higher bits in AndData those are not used must be zero.
|
||||
// Higher bits in AndData those are not used must be zero.
|
||||
//
|
||||
// EndBit - StartBit + 1 might be 64 while the right shifting 64 on RShiftU64() API is invalid,
|
||||
// So the logic is updated to right shift (EndBit - StartBit) bits and compare the last bit directly.
|
||||
@@ -879,7 +879,7 @@ BitFieldAnd64 (
|
||||
bitwise OR, and returns the result.
|
||||
|
||||
Performs a bitwise AND between the bit field specified by StartBit and EndBit
|
||||
in Operand and the value specified by AndData, followed by a bitwise
|
||||
in Operand and the value specified by AndData, followed by a bitwise
|
||||
OR with value specified by OrData. All other bits in Operand are
|
||||
preserved. The new 64-bit value is returned.
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Utility functions to generate checksum based on 2's complement
|
||||
algorithm.
|
||||
|
||||
Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -49,7 +49,7 @@ CalculateSum8 (
|
||||
for (Sum = 0, Count = 0; Count < Length; Count++) {
|
||||
Sum = (UINT8) (Sum + *(Buffer + Count));
|
||||
}
|
||||
|
||||
|
||||
return Sum;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ CalculateSum16 (
|
||||
for (Sum = 0, Count = 0; Count < Total; Count++) {
|
||||
Sum = (UINT16) (Sum + *(Buffer + Count));
|
||||
}
|
||||
|
||||
|
||||
return Sum;
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ CalculateSum32 (
|
||||
for (Sum = 0, Count = 0; Count < Total; Count++) {
|
||||
Sum = Sum + *(Buffer + Count);
|
||||
}
|
||||
|
||||
|
||||
return Sum;
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ CalculateSum64 (
|
||||
for (Sum = 0, Count = 0; Count < Total; Count++) {
|
||||
Sum = Sum + *(Buffer + Count);
|
||||
}
|
||||
|
||||
|
||||
return Sum;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Provides hack function for passng GCC build.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -17,8 +17,8 @@
|
||||
/**
|
||||
Hack function for passing GCC build.
|
||||
**/
|
||||
VOID
|
||||
__chkstk()
|
||||
VOID
|
||||
__chkstk()
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Math worker functions.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -27,7 +27,7 @@
|
||||
function returns the 64-bit signed quotient.
|
||||
|
||||
It is the caller's responsibility to not call this function with a Divisor of 0.
|
||||
If Divisor is 0, then the quotient and remainder should be assumed to be
|
||||
If Divisor is 0, then the quotient and remainder should be assumed to be
|
||||
the largest negative integer.
|
||||
|
||||
If Divisor is 0, then ASSERT().
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -37,7 +37,7 @@ ASM_PFX(InternalMathARShiftU64):
|
||||
jnz L0
|
||||
movl %eax, %edx
|
||||
movl 4(%esp), %eax
|
||||
L0:
|
||||
L0:
|
||||
shrdl %cl, %edx, %eax
|
||||
sar %cl, %edx
|
||||
ret
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -57,22 +57,22 @@ L2:
|
||||
shrl %ecx
|
||||
jnz L2
|
||||
divl %ebx
|
||||
movl %eax, %ebx # ebx <- quotient
|
||||
movl 28(%esp), %ecx # ecx <- high dword of divisor
|
||||
movl %eax, %ebx # ebx <- quotient
|
||||
movl 28(%esp), %ecx # ecx <- high dword of divisor
|
||||
mull 24(%esp) # edx:eax <- quotient * divisor[0..31]
|
||||
imull %ebx, %ecx # ecx <- quotient * divisor[32..63]
|
||||
addl %ecx, %edx # edx <- (quotient * divisor)[32..63]
|
||||
mov 32(%esp), %ecx # ecx <- addr for Remainder
|
||||
jc TooLarge # product > 2^64
|
||||
cmpl %edx, %edi # compare high 32 bits
|
||||
ja Correct
|
||||
jb TooLarge # product > dividend
|
||||
cmpl %eax, %esi
|
||||
jae Correct # product <= dividend
|
||||
imull %ebx, %ecx # ecx <- quotient * divisor[32..63]
|
||||
addl %ecx, %edx # edx <- (quotient * divisor)[32..63]
|
||||
mov 32(%esp), %ecx # ecx <- addr for Remainder
|
||||
jc TooLarge # product > 2^64
|
||||
cmpl %edx, %edi # compare high 32 bits
|
||||
ja Correct
|
||||
jb TooLarge # product > dividend
|
||||
cmpl %eax, %esi
|
||||
jae Correct # product <= dividend
|
||||
TooLarge:
|
||||
decl %ebx # adjust quotient by -1
|
||||
jecxz Return # return if Remainder == NULL
|
||||
sub 24(%esp), %eax
|
||||
decl %ebx # adjust quotient by -1
|
||||
jecxz Return # return if Remainder == NULL
|
||||
sub 24(%esp), %eax
|
||||
sbb 28(%esp), %edx # edx:eax <- (quotient - 1) * divisor
|
||||
Correct:
|
||||
jecxz Return
|
||||
@@ -81,7 +81,7 @@ Correct:
|
||||
movl %esi, (%ecx)
|
||||
movl %edi, 4(%ecx)
|
||||
Return:
|
||||
movl %ebx, %eax # eax <- quotient
|
||||
movl %ebx, %eax # eax <- quotient
|
||||
xorl %edx, %edx # quotient is 32 bits long
|
||||
pop %edi
|
||||
pop %esi
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# Flush all caches with a WBINVD instruction, clear the CD bit of CR0 to 0, and clear
|
||||
# Flush all caches with a WBINVD instruction, clear the CD bit of CR0 to 0, and clear
|
||||
# the NW bit of CR0 to 0
|
||||
#
|
||||
# Notes:
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
AsmFlushCacheLine function
|
||||
|
||||
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -37,7 +37,7 @@ AsmFlushCacheLine (
|
||||
)
|
||||
{
|
||||
//
|
||||
// If the CPU does not support CLFLUSH instruction,
|
||||
// If the CPU does not support CLFLUSH instruction,
|
||||
// then promote flush range to flush entire cache.
|
||||
//
|
||||
_asm {
|
||||
@@ -52,7 +52,7 @@ NoClflush:
|
||||
wbinvd
|
||||
Done:
|
||||
}
|
||||
|
||||
|
||||
return LinearAddress;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
GCC inline implementation of BaseLib processor specific functions.
|
||||
|
||||
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -32,7 +32,7 @@ MemoryFence (
|
||||
)
|
||||
{
|
||||
// This is a little bit of overkill and it is more about the compiler that it is
|
||||
// actually processor synchronization. This is like the _ReadWriteBarrier
|
||||
// actually processor synchronization. This is like the _ReadWriteBarrier
|
||||
// Microsoft specific intrinsic
|
||||
__asm__ __volatile__ ("":::"memory");
|
||||
}
|
||||
@@ -65,7 +65,7 @@ EFIAPI
|
||||
DisableInterrupts (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
{
|
||||
__asm__ __volatile__ ("cli"::: "memory");
|
||||
}
|
||||
|
||||
@@ -128,13 +128,13 @@ AsmReadMsr64 (
|
||||
)
|
||||
{
|
||||
UINT64 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"rdmsr"
|
||||
: "=A" (Data) // %0
|
||||
: "c" (Index) // %1
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ AsmWriteMsr64 (
|
||||
: "c" (Index),
|
||||
"A" (Value)
|
||||
);
|
||||
|
||||
|
||||
return Value;
|
||||
}
|
||||
|
||||
@@ -191,13 +191,13 @@ AsmReadEflags (
|
||||
)
|
||||
{
|
||||
UINTN Eflags;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"pushfl \n\t"
|
||||
"popl %0 "
|
||||
: "=r" (Eflags)
|
||||
);
|
||||
|
||||
|
||||
return Eflags;
|
||||
}
|
||||
|
||||
@@ -220,12 +220,12 @@ AsmReadCr0 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"movl %%cr0,%0"
|
||||
"movl %%cr0,%0"
|
||||
: "=a" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -247,12 +247,12 @@ AsmReadCr2 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"movl %%cr2, %0"
|
||||
"movl %%cr2, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -273,12 +273,12 @@ AsmReadCr3 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"movl %%cr3, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -300,12 +300,12 @@ AsmReadCr4 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"movl %%cr4, %0"
|
||||
: "=a" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -431,12 +431,12 @@ AsmReadDr0 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"movl %%dr0, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -458,12 +458,12 @@ AsmReadDr1 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"movl %%dr1, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -485,12 +485,12 @@ AsmReadDr2 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"movl %%dr2, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -512,12 +512,12 @@ AsmReadDr3 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"movl %%dr3, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -539,12 +539,12 @@ AsmReadDr4 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"movl %%dr4, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -566,12 +566,12 @@ AsmReadDr5 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"movl %%dr5, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -593,12 +593,12 @@ AsmReadDr6 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"movl %%dr6, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -620,12 +620,12 @@ AsmReadDr7 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"movl %%dr7, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -854,12 +854,12 @@ AsmReadCs (
|
||||
)
|
||||
{
|
||||
UINT16 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%cs, %0"
|
||||
:"=a" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -880,12 +880,12 @@ AsmReadDs (
|
||||
)
|
||||
{
|
||||
UINT16 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%ds, %0"
|
||||
:"=a" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -906,12 +906,12 @@ AsmReadEs (
|
||||
)
|
||||
{
|
||||
UINT16 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%es, %0"
|
||||
:"=a" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -932,12 +932,12 @@ AsmReadFs (
|
||||
)
|
||||
{
|
||||
UINT16 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%fs, %0"
|
||||
:"=a" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -958,12 +958,12 @@ AsmReadGs (
|
||||
)
|
||||
{
|
||||
UINT16 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%gs, %0"
|
||||
:"=a" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -984,12 +984,12 @@ AsmReadSs (
|
||||
)
|
||||
{
|
||||
UINT16 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%ds, %0"
|
||||
:"=a" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1010,12 +1010,12 @@ AsmReadTr (
|
||||
)
|
||||
{
|
||||
UINT16 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"str %0"
|
||||
: "=a" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1062,7 +1062,7 @@ InternalX86WriteGdtr (
|
||||
:
|
||||
: "m" (*Gdtr)
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1127,12 +1127,12 @@ AsmReadLdtr (
|
||||
)
|
||||
{
|
||||
UINT16 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"sldt %0"
|
||||
: "=g" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1180,7 +1180,7 @@ InternalX86FxSave (
|
||||
"fxsave %0"
|
||||
:
|
||||
: "m" (*Buffer) // %0
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1233,7 +1233,7 @@ AsmReadMm0 (
|
||||
"pop %%edx \n\t"
|
||||
: "=A" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1263,7 +1263,7 @@ AsmReadMm1 (
|
||||
"pop %%edx \n\t"
|
||||
: "=A" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1293,7 +1293,7 @@ AsmReadMm2 (
|
||||
"pop %%edx \n\t"
|
||||
: "=A" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1323,7 +1323,7 @@ AsmReadMm3 (
|
||||
"pop %%edx \n\t"
|
||||
: "=A" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1353,7 +1353,7 @@ AsmReadMm4 (
|
||||
"pop %%edx \n\t"
|
||||
: "=A" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1383,7 +1383,7 @@ AsmReadMm5 (
|
||||
"pop %%edx \n\t"
|
||||
: "=A" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1413,7 +1413,7 @@ AsmReadMm6 (
|
||||
"pop %%edx \n\t"
|
||||
: "=A" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1443,7 +1443,7 @@ AsmReadMm7 (
|
||||
"pop %%edx \n\t"
|
||||
: "=A" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1465,7 +1465,7 @@ AsmWriteMm0 (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"movq %0, %%mm0" // %0
|
||||
:
|
||||
:
|
||||
: "m" (Value)
|
||||
);
|
||||
}
|
||||
@@ -1488,7 +1488,7 @@ AsmWriteMm1 (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"movq %0, %%mm1" // %0
|
||||
:
|
||||
:
|
||||
: "m" (Value)
|
||||
);
|
||||
}
|
||||
@@ -1511,7 +1511,7 @@ AsmWriteMm2 (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"movq %0, %%mm2" // %0
|
||||
:
|
||||
:
|
||||
: "m" (Value)
|
||||
);
|
||||
}
|
||||
@@ -1534,7 +1534,7 @@ AsmWriteMm3 (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"movq %0, %%mm3" // %0
|
||||
:
|
||||
:
|
||||
: "m" (Value)
|
||||
);
|
||||
}
|
||||
@@ -1557,7 +1557,7 @@ AsmWriteMm4 (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"movq %0, %%mm4" // %0
|
||||
:
|
||||
:
|
||||
: "m" (Value)
|
||||
);
|
||||
}
|
||||
@@ -1580,7 +1580,7 @@ AsmWriteMm5 (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"movq %0, %%mm5" // %0
|
||||
:
|
||||
:
|
||||
: "m" (Value)
|
||||
);
|
||||
}
|
||||
@@ -1603,7 +1603,7 @@ AsmWriteMm6 (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"movq %0, %%mm6" // %0
|
||||
:
|
||||
:
|
||||
: "m" (Value)
|
||||
);
|
||||
}
|
||||
@@ -1626,7 +1626,7 @@ AsmWriteMm7 (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"movq %0, %%mm7" // %0
|
||||
:
|
||||
:
|
||||
: "m" (Value)
|
||||
);
|
||||
}
|
||||
@@ -1648,13 +1648,13 @@ AsmReadTsc (
|
||||
)
|
||||
{
|
||||
UINT64 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"rdtsc"
|
||||
: "=A" (Data)
|
||||
);
|
||||
|
||||
return Data;
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
|
||||
@@ -1676,14 +1676,14 @@ AsmReadPmc (
|
||||
)
|
||||
{
|
||||
UINT64 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"rdpmc"
|
||||
: "=A" (Data)
|
||||
: "c" (Index)
|
||||
);
|
||||
|
||||
return Data;
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
|
||||
@@ -1720,7 +1720,7 @@ AsmInvd (
|
||||
)
|
||||
{
|
||||
__asm__ __volatile__ ("invd":::"memory");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1748,7 +1748,7 @@ AsmFlushCacheLine (
|
||||
UINT32 RegEdx;
|
||||
|
||||
//
|
||||
// If the CPU does not support CLFLUSH instruction,
|
||||
// If the CPU does not support CLFLUSH instruction,
|
||||
// then promote flush range to flush entire cache.
|
||||
//
|
||||
AsmCpuid (0x01, NULL, NULL, NULL, &RegEdx);
|
||||
@@ -1760,11 +1760,11 @@ AsmFlushCacheLine (
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"clflush (%0)"
|
||||
: "+a" (LinearAddress)
|
||||
:
|
||||
: "+a" (LinearAddress)
|
||||
:
|
||||
: "memory"
|
||||
);
|
||||
|
||||
|
||||
return LinearAddress;
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# Portions copyright (c) 2011, Apple Inc. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -34,15 +34,15 @@ ASM_GLOBAL ASM_PFX(InternalSwitchStack)
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalSwitchStack):
|
||||
pushl %ebp
|
||||
movl %esp, %ebp
|
||||
movl %esp, %ebp
|
||||
|
||||
movl 20(%ebp), %esp # switch stack
|
||||
subl $8, %esp
|
||||
movl 20(%ebp), %esp # switch stack
|
||||
subl $8, %esp
|
||||
|
||||
movl 16(%ebp), %eax
|
||||
movl %eax, 4(%esp)
|
||||
movl 12(%ebp), %eax
|
||||
movl %eax, (%esp)
|
||||
pushl $0 # keeps gdb from unwinding stack
|
||||
jmp *8(%ebp) # call and never return
|
||||
movl 16(%ebp), %eax
|
||||
movl %eax, 4(%esp)
|
||||
movl 12(%ebp), %eax
|
||||
movl %eax, (%esp)
|
||||
pushl $0 # keeps gdb from unwinding stack
|
||||
jmp *8(%ebp) # call and never return
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -43,6 +43,6 @@ ASM_PFX(InternalMathLRotU64):
|
||||
movl %eax, %ecx
|
||||
movl %edx, %eax
|
||||
movl %ecx, %edx
|
||||
L0:
|
||||
L0:
|
||||
pop %ebx
|
||||
ret
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -37,7 +37,7 @@ ASM_PFX(InternalMathLShiftU64):
|
||||
jnz L0
|
||||
movl %edx, %eax
|
||||
movl 0x8(%esp), %edx
|
||||
L0:
|
||||
L0:
|
||||
shld %cl, %eax, %edx
|
||||
shl %cl, %eax
|
||||
ret
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -30,15 +30,15 @@ ASM_GLOBAL ASM_PFX(InternalMathMultU64x64)
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_PFX(InternalMathMultU64x64):
|
||||
push %ebx
|
||||
movl 8(%esp), %ebx # ebx <- M1[0..31]
|
||||
movl 16(%esp), %edx # edx <- M2[0..31]
|
||||
movl %ebx, %ecx
|
||||
movl %edx, %eax
|
||||
imull 20(%esp), %ebx # ebx <- M1[0..31] * M2[32..63]
|
||||
imull 12(%esp), %edx # edx <- M1[32..63] * M2[0..31]
|
||||
addl %edx, %ebx # carries are abandoned
|
||||
push %ebx
|
||||
movl 8(%esp), %ebx # ebx <- M1[0..31]
|
||||
movl 16(%esp), %edx # edx <- M2[0..31]
|
||||
movl %ebx, %ecx
|
||||
movl %edx, %eax
|
||||
imull 20(%esp), %ebx # ebx <- M1[0..31] * M2[32..63]
|
||||
imull 12(%esp), %edx # edx <- M1[32..63] * M2[0..31]
|
||||
addl %edx, %ebx # carries are abandoned
|
||||
mull %ecx # edx:eax <- M1[0..31] * M2[0..31]
|
||||
addl %ebx, %edx # carries are abandoned
|
||||
addl %ebx, %edx # carries are abandoned
|
||||
pop %ebx
|
||||
ret
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -43,6 +43,6 @@ ASM_PFX(InternalMathRRotU64):
|
||||
movl %eax, %ecx # switch eax & edx if Count >= 32
|
||||
movl %edx, %eax
|
||||
movl %ecx, %edx
|
||||
L0:
|
||||
L0:
|
||||
pop %ebx
|
||||
ret
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -40,7 +40,7 @@ ASM_PFX(InternalMathRShiftU64):
|
||||
jnz L0
|
||||
movl %eax, %edx
|
||||
movl 0x4(%esp), %eax
|
||||
L0:
|
||||
L0:
|
||||
shrdl %cl, %edx, %eax
|
||||
shr %cl, %edx
|
||||
ret
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
/** @file
|
||||
|
||||
This module contains generic macros for an assembly writer.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
AsmFlushCacheRange() function for IPF.
|
||||
|
||||
Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -19,12 +19,12 @@
|
||||
Flush a range of cache lines in the cache coherency domain of the calling
|
||||
CPU.
|
||||
|
||||
Flushes the cache lines specified by Address and Length. If Address is not aligned
|
||||
on a cache line boundary, then entire cache line containing Address is flushed.
|
||||
If Address + Length is not aligned on a cache line boundary, then the entire cache
|
||||
line containing Address + Length - 1 is flushed. This function may choose to flush
|
||||
the entire cache if that is more efficient than flushing the specified range. If
|
||||
Length is 0, the no cache lines are flushed. Address is returned.
|
||||
Flushes the cache lines specified by Address and Length. If Address is not aligned
|
||||
on a cache line boundary, then entire cache line containing Address is flushed.
|
||||
If Address + Length is not aligned on a cache line boundary, then the entire cache
|
||||
line containing Address + Length - 1 is flushed. This function may choose to flush
|
||||
the entire cache if that is more efficient than flushing the specified range. If
|
||||
Length is 0, the no cache lines are flushed. Address is returned.
|
||||
This function is only available on IPF.
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - Address + 1), then ASSERT().
|
||||
|
@@ -1,16 +1,16 @@
|
||||
/** @file
|
||||
/** @file
|
||||
|
||||
Register Definition for IPF.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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.
|
||||
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
#ifndef _IA64GEN_H_
|
||||
#define _IA64GEN_H_
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Linked List Library Functions.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -59,9 +59,9 @@
|
||||
|
||||
@retval TRUE if PcdVerifyNodeInList is FALSE
|
||||
@retval TRUE if DoMembershipCheck is FALSE
|
||||
@retval TRUE if PcdVerifyNodeInList is TRUE and DoMembershipCheck is TRUE
|
||||
@retval TRUE if PcdVerifyNodeInList is TRUE and DoMembershipCheck is TRUE
|
||||
and Node is a member of List.
|
||||
@retval FALSE if PcdVerifyNodeInList is TRUE and DoMembershipCheck is TRUE
|
||||
@retval FALSE if PcdVerifyNodeInList is TRUE and DoMembershipCheck is TRUE
|
||||
and Node is in not a member of List.
|
||||
|
||||
**/
|
||||
@@ -143,7 +143,7 @@ IsNodeInList (
|
||||
Ptr = FirstEntry;
|
||||
|
||||
//
|
||||
// Check to see if SecondEntry is a member of FirstEntry.
|
||||
// Check to see if SecondEntry is a member of FirstEntry.
|
||||
// Exit early if the number of nodes in List >= PcdMaximumLinkedListLength
|
||||
//
|
||||
do {
|
||||
@@ -230,7 +230,7 @@ InsertHeadList (
|
||||
// ASSERT List not too long and Entry is not one of the nodes of List
|
||||
//
|
||||
ASSERT_VERIFY_NODE_IN_VALID_LIST (ListHead, Entry, FALSE);
|
||||
|
||||
|
||||
Entry->ForwardLink = ListHead->ForwardLink;
|
||||
Entry->BackLink = ListHead;
|
||||
Entry->ForwardLink->BackLink = Entry;
|
||||
@@ -247,7 +247,7 @@ InsertHeadList (
|
||||
|
||||
If ListHead is NULL, then ASSERT().
|
||||
If Entry is NULL, then ASSERT().
|
||||
If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
InitializeListHead(), then ASSERT().
|
||||
If PcdMaximumLinkedListLength is not zero, and prior to insertion the number
|
||||
of nodes in ListHead, including the ListHead node, is greater than or
|
||||
@@ -271,7 +271,7 @@ InsertTailList (
|
||||
// ASSERT List not too long and Entry is not one of the nodes of List
|
||||
//
|
||||
ASSERT_VERIFY_NODE_IN_VALID_LIST (ListHead, Entry, FALSE);
|
||||
|
||||
|
||||
Entry->ForwardLink = ListHead;
|
||||
Entry->BackLink = ListHead->BackLink;
|
||||
Entry->BackLink->ForwardLink = Entry;
|
||||
@@ -282,12 +282,12 @@ InsertTailList (
|
||||
/**
|
||||
Retrieves the first node of a doubly-linked list.
|
||||
|
||||
Returns the first node of a doubly-linked list. List must have been
|
||||
Returns the first node of a doubly-linked list. List must have been
|
||||
initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead().
|
||||
If List is empty, then List is returned.
|
||||
|
||||
If List is NULL, then ASSERT().
|
||||
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
InitializeListHead(), then ASSERT().
|
||||
If PcdMaximumLinkedListLength is not zero, and the number of nodes
|
||||
in List, including the List node, is greater than or equal to
|
||||
@@ -316,13 +316,13 @@ GetFirstNode (
|
||||
/**
|
||||
Retrieves the next node of a doubly-linked list.
|
||||
|
||||
Returns the node of a doubly-linked list that follows Node.
|
||||
Returns the node of a doubly-linked list that follows Node.
|
||||
List must have been initialized with INTIALIZE_LIST_HEAD_VARIABLE()
|
||||
or InitializeListHead(). If List is empty, then List is returned.
|
||||
|
||||
If List is NULL, then ASSERT().
|
||||
If Node is NULL, then ASSERT().
|
||||
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
InitializeListHead(), then ASSERT().
|
||||
If PcdMaximumLinkedListLength is not zero, and List contains more than
|
||||
PcdMaximumLinkedListLength nodes, then ASSERT().
|
||||
@@ -351,24 +351,24 @@ GetNextNode (
|
||||
|
||||
/**
|
||||
Retrieves the previous node of a doubly-linked list.
|
||||
|
||||
Returns the node of a doubly-linked list that precedes Node.
|
||||
|
||||
Returns the node of a doubly-linked list that precedes Node.
|
||||
List must have been initialized with INTIALIZE_LIST_HEAD_VARIABLE()
|
||||
or InitializeListHead(). If List is empty, then List is returned.
|
||||
|
||||
|
||||
If List is NULL, then ASSERT().
|
||||
If Node is NULL, then ASSERT().
|
||||
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
InitializeListHead(), then ASSERT().
|
||||
If PcdMaximumLinkedListLength is not zero, and List contains more than
|
||||
PcdMaximumLinkedListLength nodes, then ASSERT().
|
||||
If PcdVerifyNodeInList is TRUE and Node is not a node in List, then ASSERT().
|
||||
|
||||
|
||||
@param List A pointer to the head node of a doubly-linked list.
|
||||
@param Node A pointer to a node in the doubly-linked list.
|
||||
|
||||
|
||||
@return A pointer to the previous node if one exists. Otherwise List is returned.
|
||||
|
||||
|
||||
**/
|
||||
LIST_ENTRY *
|
||||
EFIAPI
|
||||
@@ -381,7 +381,7 @@ GetPreviousNode (
|
||||
// ASSERT List not too long and Node is one of the nodes of List
|
||||
//
|
||||
ASSERT_VERIFY_NODE_IN_VALID_LIST (List, Node, TRUE);
|
||||
|
||||
|
||||
return Node->BackLink;
|
||||
}
|
||||
|
||||
@@ -392,7 +392,7 @@ GetPreviousNode (
|
||||
zero nodes, this function returns TRUE. Otherwise, it returns FALSE.
|
||||
|
||||
If ListHead is NULL, then ASSERT().
|
||||
If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
InitializeListHead(), then ASSERT().
|
||||
If PcdMaximumLinkedListLength is not zero, and the number of nodes
|
||||
in List, including the List node, is greater than or equal to
|
||||
@@ -414,7 +414,7 @@ IsListEmpty (
|
||||
// ASSERT List not too long
|
||||
//
|
||||
ASSERT (InternalBaseLibIsListValid (ListHead));
|
||||
|
||||
|
||||
return (BOOLEAN)(ListHead->ForwardLink == ListHead);
|
||||
}
|
||||
|
||||
@@ -429,12 +429,12 @@ IsListEmpty (
|
||||
|
||||
If List is NULL, then ASSERT().
|
||||
If Node is NULL, then ASSERT().
|
||||
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead(),
|
||||
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead(),
|
||||
then ASSERT().
|
||||
If PcdMaximumLinkedListLength is not zero, and the number of nodes
|
||||
in List, including the List node, is greater than or equal to
|
||||
PcdMaximumLinkedListLength, then ASSERT().
|
||||
If PcdVerifyNodeInList is TRUE and Node is not a node in List and Node is not
|
||||
If PcdVerifyNodeInList is TRUE and Node is not a node in List and Node is not
|
||||
equal to List, then ASSERT().
|
||||
|
||||
@param List A pointer to the head node of a doubly-linked list.
|
||||
@@ -455,7 +455,7 @@ IsNull (
|
||||
// ASSERT List not too long and Node is one of the nodes of List
|
||||
//
|
||||
ASSERT_VERIFY_NODE_IN_VALID_LIST (List, Node, TRUE);
|
||||
|
||||
|
||||
return (BOOLEAN)(Node == List);
|
||||
}
|
||||
|
||||
@@ -493,7 +493,7 @@ IsNodeAtEnd (
|
||||
// ASSERT List not too long and Node is one of the nodes of List
|
||||
//
|
||||
ASSERT_VERIFY_NODE_IN_VALID_LIST (List, Node, TRUE);
|
||||
|
||||
|
||||
return (BOOLEAN)(!IsNull (List, Node) && List->BackLink == Node);
|
||||
}
|
||||
|
||||
@@ -505,12 +505,12 @@ IsNodeAtEnd (
|
||||
Otherwise, the location of the FirstEntry node is swapped with the location
|
||||
of the SecondEntry node in a doubly-linked list. SecondEntry must be in the
|
||||
same double linked list as FirstEntry and that double linked list must have
|
||||
been initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead().
|
||||
been initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead().
|
||||
SecondEntry is returned after the nodes are swapped.
|
||||
|
||||
If FirstEntry is NULL, then ASSERT().
|
||||
If SecondEntry is NULL, then ASSERT().
|
||||
If PcdVerifyNodeInList is TRUE and SecondEntry and FirstEntry are not in the
|
||||
If PcdVerifyNodeInList is TRUE and SecondEntry and FirstEntry are not in the
|
||||
same linked list, then ASSERT().
|
||||
If PcdMaximumLinkedListLength is not zero, and the number of nodes in the
|
||||
linked list containing the FirstEntry and SecondEntry nodes, including
|
||||
@@ -519,7 +519,7 @@ IsNodeAtEnd (
|
||||
|
||||
@param FirstEntry A pointer to a node in a linked list.
|
||||
@param SecondEntry A pointer to another node in the same linked list.
|
||||
|
||||
|
||||
@return SecondEntry.
|
||||
|
||||
**/
|
||||
@@ -540,7 +540,7 @@ SwapListEntries (
|
||||
// ASSERT Entry1 and Entry2 are in the same linked list
|
||||
//
|
||||
ASSERT_VERIFY_NODE_IN_VALID_LIST (FirstEntry, SecondEntry, TRUE);
|
||||
|
||||
|
||||
//
|
||||
// Ptr is the node pointed to by FirstEntry->ForwardLink
|
||||
//
|
||||
@@ -598,7 +598,7 @@ RemoveEntryList (
|
||||
)
|
||||
{
|
||||
ASSERT (!IsListEmpty (Entry));
|
||||
|
||||
|
||||
Entry->ForwardLink->BackLink = Entry->BackLink;
|
||||
Entry->BackLink->ForwardLink = Entry->ForwardLink;
|
||||
return Entry->ForwardLink;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Unicode and ASCII string primitives.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -73,7 +73,7 @@ StrCpy (
|
||||
/**
|
||||
[ATTENTION] This function will be deprecated for security reason.
|
||||
|
||||
Copies up to a specified length from one Null-terminated Unicode string to
|
||||
Copies up to a specified length from one Null-terminated Unicode string to
|
||||
another Null-terminated Unicode string and returns the new Unicode string.
|
||||
|
||||
This function copies the contents of the Unicode string Source to the Unicode
|
||||
@@ -89,7 +89,7 @@ StrCpy (
|
||||
If Length > 0 and Source is NULL, then ASSERT().
|
||||
If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
|
||||
If Source and Destination overlap, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and Length is greater than
|
||||
If PcdMaximumUnicodeStringLength is not zero, and Length is greater than
|
||||
PcdMaximumUnicodeStringLength, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and Source contains more than
|
||||
PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator,
|
||||
@@ -188,7 +188,7 @@ StrLen (
|
||||
Returns the size of a Null-terminated Unicode string in bytes, including the
|
||||
Null terminator.
|
||||
|
||||
This function returns the size, in bytes, of the Null-terminated Unicode string
|
||||
This function returns the size, in bytes, of the Null-terminated Unicode string
|
||||
specified by String.
|
||||
|
||||
If String is NULL, then ASSERT().
|
||||
@@ -262,7 +262,7 @@ StrCmp (
|
||||
/**
|
||||
Compares up to a specified length the contents of two Null-terminated Unicode strings,
|
||||
and returns the difference between the first mismatched Unicode characters.
|
||||
|
||||
|
||||
This function compares the Null-terminated Unicode string FirstString to the
|
||||
Null-terminated Unicode string SecondString. At most, Length Unicode
|
||||
characters will be compared. If Length is 0, then 0 is returned. If
|
||||
@@ -382,8 +382,8 @@ StrCat (
|
||||
/**
|
||||
[ATTENTION] This function will be deprecated for security reason.
|
||||
|
||||
Concatenates up to a specified length one Null-terminated Unicode to the end
|
||||
of another Null-terminated Unicode string, and returns the concatenated
|
||||
Concatenates up to a specified length one Null-terminated Unicode to the end
|
||||
of another Null-terminated Unicode string, and returns the concatenated
|
||||
Unicode string.
|
||||
|
||||
This function concatenates two Null-terminated Unicode strings. The contents
|
||||
@@ -399,7 +399,7 @@ StrCat (
|
||||
If Length > 0 and Source is NULL, then ASSERT().
|
||||
If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
|
||||
If Source and Destination overlap, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and Length is greater than
|
||||
If PcdMaximumUnicodeStringLength is not zero, and Length is greater than
|
||||
PcdMaximumUnicodeStringLength, then ASSERT().
|
||||
If PcdMaximumUnicodeStringLength is not zero, and Destination contains more
|
||||
than PcdMaximumUnicodeStringLength Unicode characters, not including the
|
||||
@@ -492,13 +492,13 @@ StrStr (
|
||||
while (*String != L'\0') {
|
||||
SearchStringTmp = SearchString;
|
||||
FirstMatch = String;
|
||||
|
||||
while ((*String == *SearchStringTmp)
|
||||
|
||||
while ((*String == *SearchStringTmp)
|
||||
&& (*String != L'\0')) {
|
||||
String++;
|
||||
SearchStringTmp++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (*SearchStringTmp == L'\0') {
|
||||
return (CHAR16 *) FirstMatch;
|
||||
}
|
||||
@@ -516,7 +516,7 @@ StrStr (
|
||||
/**
|
||||
Check if a Unicode character is a decimal character.
|
||||
|
||||
This internal function checks if a Unicode character is a
|
||||
This internal function checks if a Unicode character is a
|
||||
decimal character. The valid decimal character is from
|
||||
L'0' to L'9'.
|
||||
|
||||
@@ -536,7 +536,7 @@ InternalIsDecimalDigitCharacter (
|
||||
}
|
||||
|
||||
/**
|
||||
Convert a Unicode character to upper case only if
|
||||
Convert a Unicode character to upper case only if
|
||||
it maps to a valid small-case ASCII character.
|
||||
|
||||
This internal function only deal with Unicode character
|
||||
@@ -568,7 +568,7 @@ InternalCharToUpper (
|
||||
|
||||
This internal function only deal with Unicode character
|
||||
which maps to a valid hexadecimal ASII character, i.e.
|
||||
L'0' to L'9', L'a' to L'f' or L'A' to L'F'. For other
|
||||
L'0' to L'9', L'a' to L'f' or L'A' to L'F'. For other
|
||||
Unicode character, the value returned does not make sense.
|
||||
|
||||
@param Char The character to convert.
|
||||
@@ -592,8 +592,8 @@ InternalHexCharToUintn (
|
||||
/**
|
||||
Check if a Unicode character is a hexadecimal character.
|
||||
|
||||
This internal function checks if a Unicode character is a
|
||||
decimal character. The valid hexadecimal character is
|
||||
This internal function checks if a Unicode character is a
|
||||
decimal character. The valid hexadecimal character is
|
||||
L'0' to L'9', L'a' to L'f', or L'A' to L'F'.
|
||||
|
||||
|
||||
@@ -703,7 +703,7 @@ StrDecimalToUint64 (
|
||||
)
|
||||
{
|
||||
UINT64 Result;
|
||||
|
||||
|
||||
StrDecimalToUint64S (String, (CHAR16 **) NULL, &Result);
|
||||
return Result;
|
||||
}
|
||||
@@ -806,7 +806,7 @@ StrHexToUint64 (
|
||||
/**
|
||||
Check if a ASCII character is a decimal character.
|
||||
|
||||
This internal function checks if a Unicode character is a
|
||||
This internal function checks if a Unicode character is a
|
||||
decimal character. The valid decimal character is from
|
||||
'0' to '9'.
|
||||
|
||||
@@ -828,8 +828,8 @@ InternalAsciiIsDecimalDigitCharacter (
|
||||
/**
|
||||
Check if a ASCII character is a hexadecimal character.
|
||||
|
||||
This internal function checks if a ASCII character is a
|
||||
decimal character. The valid hexadecimal character is
|
||||
This internal function checks if a ASCII character is a
|
||||
decimal character. The valid hexadecimal character is
|
||||
L'0' to L'9', L'a' to L'f', or L'A' to L'F'.
|
||||
|
||||
|
||||
@@ -915,7 +915,7 @@ UnicodeStrToAsciiStr (
|
||||
ReturnValue = Destination;
|
||||
while (*Source != '\0') {
|
||||
//
|
||||
// If any Unicode characters in Source contain
|
||||
// If any Unicode characters in Source contain
|
||||
// non-zero value in the upper 8 bits, then ASSERT().
|
||||
//
|
||||
ASSERT (*Source < 0x100);
|
||||
@@ -987,7 +987,7 @@ AsciiStrCpy (
|
||||
/**
|
||||
[ATTENTION] This function will be deprecated for security reason.
|
||||
|
||||
Copies up to a specified length one Null-terminated ASCII string to another
|
||||
Copies up to a specified length one Null-terminated ASCII string to another
|
||||
Null-terminated ASCII string and returns the new ASCII string.
|
||||
|
||||
This function copies the contents of the ASCII string Source to the ASCII
|
||||
@@ -1000,7 +1000,7 @@ AsciiStrCpy (
|
||||
If Destination is NULL, then ASSERT().
|
||||
If Source is NULL, then ASSERT().
|
||||
If Source and Destination overlap, then ASSERT().
|
||||
If PcdMaximumAsciiStringLength is not zero, and Length is greater than
|
||||
If PcdMaximumAsciiStringLength is not zero, and Length is greater than
|
||||
PcdMaximumAsciiStringLength, then ASSERT().
|
||||
If PcdMaximumAsciiStringLength is not zero, and Source contains more than
|
||||
PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
|
||||
@@ -1176,7 +1176,7 @@ AsciiStrCmp (
|
||||
|
||||
@param Chr one Ascii character
|
||||
|
||||
@return The uppercase value of Ascii character
|
||||
@return The uppercase value of Ascii character
|
||||
|
||||
**/
|
||||
CHAR8
|
||||
@@ -1193,7 +1193,7 @@ InternalBaseLibAsciiToUpper (
|
||||
|
||||
This internal function only deal with Unicode character
|
||||
which maps to a valid hexadecimal ASII character, i.e.
|
||||
'0' to '9', 'a' to 'f' or 'A' to 'F'. For other
|
||||
'0' to '9', 'a' to 'f' or 'A' to 'F'. For other
|
||||
ASCII character, the value returned does not make sense.
|
||||
|
||||
@param Char The character to convert.
|
||||
@@ -1285,7 +1285,7 @@ AsciiStriCmp (
|
||||
|
||||
If Length > 0 and FirstString is NULL, then ASSERT().
|
||||
If Length > 0 and SecondString is NULL, then ASSERT().
|
||||
If PcdMaximumAsciiStringLength is not zero, and Length is greater than
|
||||
If PcdMaximumAsciiStringLength is not zero, and Length is greater than
|
||||
PcdMaximumAsciiStringLength, then ASSERT().
|
||||
If PcdMaximumAsciiStringLength is not zero, and FirstString contains more than
|
||||
PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
|
||||
@@ -1297,7 +1297,7 @@ AsciiStriCmp (
|
||||
@param FirstString A pointer to a Null-terminated ASCII string.
|
||||
@param SecondString A pointer to a Null-terminated ASCII string.
|
||||
@param Length The maximum number of ASCII characters for compare.
|
||||
|
||||
|
||||
@retval ==0 FirstString is identical to SecondString.
|
||||
@retval !=0 FirstString is not identical to SecondString.
|
||||
|
||||
@@ -1386,8 +1386,8 @@ AsciiStrCat (
|
||||
/**
|
||||
[ATTENTION] This function will be deprecated for security reason.
|
||||
|
||||
Concatenates up to a specified length one Null-terminated ASCII string to
|
||||
the end of another Null-terminated ASCII string, and returns the
|
||||
Concatenates up to a specified length one Null-terminated ASCII string to
|
||||
the end of another Null-terminated ASCII string, and returns the
|
||||
concatenated ASCII string.
|
||||
|
||||
This function concatenates two Null-terminated ASCII strings. The contents
|
||||
@@ -1491,13 +1491,13 @@ AsciiStrStr (
|
||||
while (*String != '\0') {
|
||||
SearchStringTmp = SearchString;
|
||||
FirstMatch = String;
|
||||
|
||||
while ((*String == *SearchStringTmp)
|
||||
|
||||
while ((*String == *SearchStringTmp)
|
||||
&& (*String != '\0')) {
|
||||
String++;
|
||||
SearchStringTmp++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (*SearchStringTmp == '\0') {
|
||||
return (CHAR8 *) FirstMatch;
|
||||
}
|
||||
@@ -1549,7 +1549,7 @@ AsciiStrDecimalToUintn (
|
||||
)
|
||||
{
|
||||
UINTN Result;
|
||||
|
||||
|
||||
AsciiStrDecimalToUintnS (String, (CHAR8 **) NULL, &Result);
|
||||
return Result;
|
||||
}
|
||||
@@ -1592,7 +1592,7 @@ AsciiStrDecimalToUint64 (
|
||||
)
|
||||
{
|
||||
UINT64 Result;
|
||||
|
||||
|
||||
AsciiStrDecimalToUint64S (String, (CHAR8 **) NULL, &Result);
|
||||
return Result;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Switch Stack functions.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -36,9 +36,9 @@
|
||||
function.
|
||||
@param NewStack A pointer to the new stack to use for the EntryPoint
|
||||
function.
|
||||
@param ... This variable argument list is ignored for IA32, x64, and EBC.
|
||||
For IPF, this variable argument list is expected to contain
|
||||
a single parameter of type VOID * that specifies the new backing
|
||||
@param ... This variable argument list is ignored for IA32, x64, and EBC.
|
||||
For IPF, this variable argument list is expected to contain
|
||||
a single parameter of type VOID * that specifies the new backing
|
||||
store pointer.
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -44,19 +44,19 @@ ASM_PFX(AsmCpuidEx):
|
||||
test %r10, %r10
|
||||
jz L1
|
||||
mov %ecx,(%r10)
|
||||
L1:
|
||||
L1:
|
||||
mov %r8, %rcx
|
||||
jrcxz L2
|
||||
movl %eax,(%rcx)
|
||||
L2:
|
||||
L2:
|
||||
mov %r9, %rcx
|
||||
jrcxz L3
|
||||
mov %ebx, (%rcx)
|
||||
L3:
|
||||
L3:
|
||||
mov 0x40(%rsp), %rcx
|
||||
jrcxz L4
|
||||
mov %edx, (%rcx)
|
||||
L4:
|
||||
L4:
|
||||
pop %rax # restore Index to rax as return value
|
||||
pop %rbx
|
||||
ret
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -21,7 +21,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
@@ -37,29 +37,29 @@
|
||||
|
||||
ASM_GLOBAL ASM_PFX(InternalX86DisablePaging64)
|
||||
ASM_PFX(InternalX86DisablePaging64):
|
||||
cli
|
||||
cli
|
||||
lea L1(%rip), %rsi # rsi <- The start address of transition code
|
||||
mov 0x28(%rsp), %edi # rdi <- New stack
|
||||
lea _mTransitionEnd(%rip), %rax # rax <- end of transition code
|
||||
sub %rsi, %rax # rax <- The size of transition piece code
|
||||
add $4, %rax # round rax up to the next 4 byte boundary
|
||||
and $0xfc, %al
|
||||
sub %rax, %rdi # rdi <- use stack to hold transition code
|
||||
sub %rax, %rdi # rdi <- use stack to hold transition code
|
||||
mov %edi, %r10d # r10 <- The start address of transicition code below 4G
|
||||
push %rcx # save rcx to stack
|
||||
mov %rax, %rcx # rcx <- The size of transition piece code
|
||||
rep
|
||||
movsb # copy transition code to (new stack - 64byte) below 4G
|
||||
pop %rcx # restore rcx
|
||||
|
||||
mov %r8d, %esi
|
||||
mov %r9d, %edi
|
||||
|
||||
mov %r8d, %esi
|
||||
mov %r9d, %edi
|
||||
mov %r10d, %eax
|
||||
sub $4, %eax
|
||||
push %rcx # push Cs to stack
|
||||
push %r10 # push address of transition code on stack
|
||||
push %r10 # push address of transition code on stack
|
||||
.byte 0x48, 0xcb # retq: Use far return to load CS register from stack
|
||||
# (Use raw byte code since some GNU assemblers generates incorrect code for "retq")
|
||||
# (Use raw byte code since some GNU assemblers generates incorrect code for "retq")
|
||||
L1:
|
||||
mov %eax,%esp # set up new stack
|
||||
mov %cr0,%rax
|
||||
@@ -68,9 +68,9 @@ L1:
|
||||
|
||||
mov %edx,%ebx # save EntryPoint to ebx, for rdmsr will overwrite edx
|
||||
mov $0xc0000080,%ecx
|
||||
rdmsr
|
||||
rdmsr
|
||||
and $0xfe,%ah # clear LME
|
||||
wrmsr
|
||||
wrmsr
|
||||
mov %cr4,%rax
|
||||
and $0xdf,%al # clear PAE
|
||||
mov %rax,%cr4
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -15,7 +15,7 @@
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# Flush all caches with a WBINVD instruction, clear the CD bit of CR0 to 0, and clear
|
||||
# Flush all caches with a WBINVD instruction, clear the CD bit of CR0 to 0, and clear
|
||||
# the NW bit of CR0 to 0
|
||||
#
|
||||
# Notes:
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
GCC inline implementation of BaseLib processor specific functions.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
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 @@ MemoryFence (
|
||||
)
|
||||
{
|
||||
// This is a little bit of overkill and it is more about the compiler that it is
|
||||
// actually processor synchronization. This is like the _ReadWriteBarrier
|
||||
// actually processor synchronization. This is like the _ReadWriteBarrier
|
||||
// Microsoft specific intrinsic
|
||||
__asm__ __volatile__ ("":::"memory");
|
||||
}
|
||||
@@ -66,7 +66,7 @@ EFIAPI
|
||||
DisableInterrupts (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
{
|
||||
__asm__ __volatile__ ("cli"::: "memory");
|
||||
}
|
||||
|
||||
@@ -130,14 +130,14 @@ AsmReadMsr64 (
|
||||
{
|
||||
UINT32 LowData;
|
||||
UINT32 HighData;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"rdmsr"
|
||||
: "=a" (LowData), // %0
|
||||
"=d" (HighData) // %1
|
||||
: "c" (Index) // %2
|
||||
);
|
||||
|
||||
|
||||
return (((UINT64)HighData) << 32) | LowData;
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ AsmWriteMsr64 (
|
||||
|
||||
LowData = (UINT32)(Value);
|
||||
HighData = (UINT32)(Value >> 32);
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"wrmsr"
|
||||
:
|
||||
@@ -178,7 +178,7 @@ AsmWriteMsr64 (
|
||||
"a" (LowData),
|
||||
"d" (HighData)
|
||||
);
|
||||
|
||||
|
||||
return Value;
|
||||
}
|
||||
|
||||
@@ -201,13 +201,13 @@ AsmReadEflags (
|
||||
)
|
||||
{
|
||||
UINTN Eflags;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"pushfq \n\t"
|
||||
"pop %0 "
|
||||
: "=r" (Eflags) // %0
|
||||
);
|
||||
|
||||
|
||||
return Eflags;
|
||||
}
|
||||
|
||||
@@ -230,12 +230,12 @@ AsmReadCr0 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%cr0,%0"
|
||||
"mov %%cr0,%0"
|
||||
: "=r" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -257,12 +257,12 @@ AsmReadCr2 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%cr2, %0"
|
||||
"mov %%cr2, %0"
|
||||
: "=r" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -283,12 +283,12 @@ AsmReadCr3 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%cr3, %0"
|
||||
"mov %%cr3, %0"
|
||||
: "=r" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -310,12 +310,12 @@ AsmReadCr4 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%cr4, %0"
|
||||
"mov %%cr4, %0"
|
||||
: "=r" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -441,12 +441,12 @@ AsmReadDr0 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%dr0, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -468,12 +468,12 @@ AsmReadDr1 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%dr1, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -495,12 +495,12 @@ AsmReadDr2 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%dr2, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -522,12 +522,12 @@ AsmReadDr3 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%dr3, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -549,12 +549,12 @@ AsmReadDr4 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%dr4, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -576,12 +576,12 @@ AsmReadDr5 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%dr5, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -603,12 +603,12 @@ AsmReadDr6 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%dr6, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -630,12 +630,12 @@ AsmReadDr7 (
|
||||
)
|
||||
{
|
||||
UINTN Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%dr7, %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -864,12 +864,12 @@ AsmReadCs (
|
||||
)
|
||||
{
|
||||
UINT16 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%cs, %0"
|
||||
:"=a" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -890,12 +890,12 @@ AsmReadDs (
|
||||
)
|
||||
{
|
||||
UINT16 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%ds, %0"
|
||||
:"=a" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -916,12 +916,12 @@ AsmReadEs (
|
||||
)
|
||||
{
|
||||
UINT16 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%es, %0"
|
||||
:"=a" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -942,12 +942,12 @@ AsmReadFs (
|
||||
)
|
||||
{
|
||||
UINT16 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%fs, %0"
|
||||
:"=a" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -968,12 +968,12 @@ AsmReadGs (
|
||||
)
|
||||
{
|
||||
UINT16 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%gs, %0"
|
||||
:"=a" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -994,12 +994,12 @@ AsmReadSs (
|
||||
)
|
||||
{
|
||||
UINT16 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"mov %%ds, %0"
|
||||
:"=a" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1020,12 +1020,12 @@ AsmReadTr (
|
||||
)
|
||||
{
|
||||
UINT16 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"str %0"
|
||||
: "=r" (Data)
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1072,7 +1072,7 @@ InternalX86WriteGdtr (
|
||||
:
|
||||
: "m" (*Gdtr)
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1137,12 +1137,12 @@ AsmReadLdtr (
|
||||
)
|
||||
{
|
||||
UINT16 Data;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"sldt %0"
|
||||
: "=g" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1190,7 +1190,7 @@ InternalX86FxSave (
|
||||
"fxsave %0"
|
||||
:
|
||||
: "m" (*Buffer) // %0
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1239,7 +1239,7 @@ AsmReadMm0 (
|
||||
"movd %%mm0, %0 \n\t"
|
||||
: "=r" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1265,7 +1265,7 @@ AsmReadMm1 (
|
||||
"movd %%mm1, %0 \n\t"
|
||||
: "=r" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1291,7 +1291,7 @@ AsmReadMm2 (
|
||||
"movd %%mm2, %0 \n\t"
|
||||
: "=r" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1317,7 +1317,7 @@ AsmReadMm3 (
|
||||
"movd %%mm3, %0 \n\t"
|
||||
: "=r" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1343,7 +1343,7 @@ AsmReadMm4 (
|
||||
"movd %%mm4, %0 \n\t"
|
||||
: "=r" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1369,7 +1369,7 @@ AsmReadMm5 (
|
||||
"movd %%mm5, %0 \n\t"
|
||||
: "=r" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1395,7 +1395,7 @@ AsmReadMm6 (
|
||||
"movd %%mm6, %0 \n\t"
|
||||
: "=r" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1421,7 +1421,7 @@ AsmReadMm7 (
|
||||
"movd %%mm7, %0 \n\t"
|
||||
: "=r" (Data) // %0
|
||||
);
|
||||
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
@@ -1443,7 +1443,7 @@ AsmWriteMm0 (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"movd %0, %%mm0" // %0
|
||||
:
|
||||
:
|
||||
: "m" (Value)
|
||||
);
|
||||
}
|
||||
@@ -1466,7 +1466,7 @@ AsmWriteMm1 (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"movd %0, %%mm1" // %0
|
||||
:
|
||||
:
|
||||
: "m" (Value)
|
||||
);
|
||||
}
|
||||
@@ -1489,7 +1489,7 @@ AsmWriteMm2 (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"movd %0, %%mm2" // %0
|
||||
:
|
||||
:
|
||||
: "m" (Value)
|
||||
);
|
||||
}
|
||||
@@ -1512,7 +1512,7 @@ AsmWriteMm3 (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"movd %0, %%mm3" // %0
|
||||
:
|
||||
:
|
||||
: "m" (Value)
|
||||
);
|
||||
}
|
||||
@@ -1535,7 +1535,7 @@ AsmWriteMm4 (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"movd %0, %%mm4" // %0
|
||||
:
|
||||
:
|
||||
: "m" (Value)
|
||||
);
|
||||
}
|
||||
@@ -1558,7 +1558,7 @@ AsmWriteMm5 (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"movd %0, %%mm5" // %0
|
||||
:
|
||||
:
|
||||
: "m" (Value)
|
||||
);
|
||||
}
|
||||
@@ -1581,7 +1581,7 @@ AsmWriteMm6 (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"movd %0, %%mm6" // %0
|
||||
:
|
||||
:
|
||||
: "m" (Value)
|
||||
);
|
||||
}
|
||||
@@ -1604,7 +1604,7 @@ AsmWriteMm7 (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"movd %0, %%mm7" // %0
|
||||
:
|
||||
:
|
||||
: "m" (Value)
|
||||
);
|
||||
}
|
||||
@@ -1627,14 +1627,14 @@ AsmReadTsc (
|
||||
{
|
||||
UINT32 LowData;
|
||||
UINT32 HiData;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"rdtsc"
|
||||
: "=a" (LowData),
|
||||
"=d" (HiData)
|
||||
);
|
||||
|
||||
return (((UINT64)HiData) << 32) | LowData;
|
||||
|
||||
return (((UINT64)HiData) << 32) | LowData;
|
||||
}
|
||||
|
||||
|
||||
@@ -1657,15 +1657,15 @@ AsmReadPmc (
|
||||
{
|
||||
UINT32 LowData;
|
||||
UINT32 HiData;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
"rdpmc"
|
||||
: "=a" (LowData),
|
||||
"=d" (HiData)
|
||||
: "c" (Index)
|
||||
);
|
||||
|
||||
return (((UINT64)HiData) << 32) | LowData;
|
||||
|
||||
return (((UINT64)HiData) << 32) | LowData;
|
||||
}
|
||||
|
||||
|
||||
@@ -1700,7 +1700,7 @@ AsmMonitor (
|
||||
"c" (Ecx),
|
||||
"d" (Edx)
|
||||
);
|
||||
|
||||
|
||||
return Eax;
|
||||
}
|
||||
|
||||
@@ -1728,12 +1728,12 @@ AsmMwait (
|
||||
{
|
||||
__asm__ __volatile__ (
|
||||
"mwait"
|
||||
:
|
||||
:
|
||||
: "a" (Eax),
|
||||
"c" (Ecx)
|
||||
);
|
||||
|
||||
return Eax;
|
||||
|
||||
return Eax;
|
||||
}
|
||||
|
||||
|
||||
@@ -1768,7 +1768,7 @@ AsmInvd (
|
||||
)
|
||||
{
|
||||
__asm__ __volatile__ ("invd":::"memory");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1796,10 +1796,10 @@ AsmFlushCacheLine (
|
||||
__asm__ __volatile__ (
|
||||
"clflush (%0)"
|
||||
:
|
||||
: "r" (LinearAddress)
|
||||
: "r" (LinearAddress)
|
||||
: "memory"
|
||||
);
|
||||
|
||||
|
||||
return LinearAddress;
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -49,6 +49,6 @@ ASM_PFX(InternalLongJump):
|
||||
movdqu 0xB8(%rcx), %xmm12
|
||||
movdqu 0xC8(%rcx), %xmm13
|
||||
movdqu 0xD8(%rcx), %xmm14
|
||||
movdqu 0xE8(%rcx), %xmm15
|
||||
movdqu 0xE8(%rcx), %xmm15
|
||||
mov %rdx, %rax # set return value
|
||||
jmp *0x48(%rcx)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -39,7 +39,7 @@ ASM_PFX(SetJump):
|
||||
mov %rdx,0x48(%rcx)
|
||||
# save non-volatile fp registers
|
||||
stmxcsr 0x50(%rcx)
|
||||
movdqu %xmm6, 0x58(%rcx)
|
||||
movdqu %xmm6, 0x58(%rcx)
|
||||
movdqu %xmm7, 0x68(%rcx)
|
||||
movdqu %xmm8, 0x78(%rcx)
|
||||
movdqu %xmm9, 0x88(%rcx)
|
||||
@@ -48,6 +48,6 @@ ASM_PFX(SetJump):
|
||||
movdqu %xmm12, 0xB8(%rcx)
|
||||
movdqu %xmm13, 0xC8(%rcx)
|
||||
movdqu %xmm14, 0xD8(%rcx)
|
||||
movdqu %xmm15, 0xE8(%rcx)
|
||||
movdqu %xmm15, 0xE8(%rcx)
|
||||
xor %rax,%rax
|
||||
jmpq *%rdx
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -37,9 +37,9 @@
|
||||
#------------------------------------------------------------------------------
|
||||
ASM_GLOBAL ASM_PFX(InternalSwitchStack)
|
||||
ASM_PFX(InternalSwitchStack):
|
||||
pushq %rbp
|
||||
movq %rsp, %rbp
|
||||
|
||||
pushq %rbp
|
||||
movq %rsp, %rbp
|
||||
|
||||
mov %rcx, %rax // Shift registers for new call
|
||||
mov %rdx, %rcx
|
||||
mov %r8, %rdx
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -49,7 +49,7 @@ ASM_GLOBAL ASM_PFX(InternalAsmThunk16)
|
||||
.set IA32_REGS_SIZE, 56
|
||||
|
||||
.data
|
||||
|
||||
|
||||
.set Lm16Size, ASM_PFX(InternalAsmThunk16) - ASM_PFX(m16Start)
|
||||
ASM_PFX(m16Size): .word Lm16Size
|
||||
.set LmThunk16Attr, L_ThunkAttr - ASM_PFX(m16Start)
|
||||
@@ -85,7 +85,7 @@ ASM_PFX(BackFromUserCode):
|
||||
.byte 0xe # push cs
|
||||
.byte 0x66
|
||||
call L_Base # push eip
|
||||
L_Base:
|
||||
L_Base:
|
||||
.byte 0x66
|
||||
pushq $0 # reserved high order 32 bits of EFlags
|
||||
.byte 0x66, 0x9c # pushfd actually
|
||||
@@ -102,13 +102,13 @@ L_ThunkAttr: .space 4
|
||||
movl $0x15cd2401,%eax # mov ax, 2401h & int 15h
|
||||
cli # disable interrupts
|
||||
jnc L_2
|
||||
L_1:
|
||||
L_1:
|
||||
testb $THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL, %dl
|
||||
jz L_2
|
||||
inb $0x92,%al
|
||||
orb $2,%al
|
||||
outb %al, $0x92 # deactivate A20M#
|
||||
L_2:
|
||||
L_2:
|
||||
xorw %ax, %ax # xor eax, eax
|
||||
movl %ss, %eax # mov ax, ss
|
||||
lea IA32_REGS_SIZE(%esp), %bp
|
||||
@@ -180,13 +180,13 @@ ASM_PFX(ToUserCode):
|
||||
movw %bx,%sp # set up 16-bit stack pointer
|
||||
.byte 0x66 # make the following call 32-bit
|
||||
call L_Base1 # push eip
|
||||
L_Base1:
|
||||
L_Base1:
|
||||
popw %bp # ebp <- address of L_Base1
|
||||
pushq (IA32_REGS_SIZE + 2)(%esp)
|
||||
lea 0x0c(%rsi), %eax
|
||||
pushq %rax
|
||||
lret # execution begins at next instruction
|
||||
L_RealMode:
|
||||
L_RealMode:
|
||||
.byte 0x66,0x2e # CS and operand size override
|
||||
lidt (_16Idtr - L_Base1)(%rsi)
|
||||
.byte 0x66,0x61 # popad
|
||||
@@ -243,7 +243,7 @@ ASM_PFX(InternalAsmThunk16):
|
||||
pushq %rbx
|
||||
pushq %rsi
|
||||
pushq %rdi
|
||||
|
||||
|
||||
movl %ds, %ebx
|
||||
pushq %rbx # Save ds segment register on the stack
|
||||
movl %es, %ebx
|
||||
@@ -257,7 +257,7 @@ ASM_PFX(InternalAsmThunk16):
|
||||
movzwl _SS(%rsi), %r8d
|
||||
movl _ESP(%rsi), %edi
|
||||
lea -(IA32_REGS_SIZE + 4)(%edi), %rdi
|
||||
imul $16, %r8d, %eax
|
||||
imul $16, %r8d, %eax
|
||||
movl %edi,%ebx # ebx <- stack for 16-bit code
|
||||
pushq $(IA32_REGS_SIZE / 4)
|
||||
addl %eax,%edi # edi <- linear address of 16-bit stack
|
||||
@@ -268,26 +268,26 @@ ASM_PFX(InternalAsmThunk16):
|
||||
movl %edx,%eax # eax <- transition code address
|
||||
andl $0xf,%edx
|
||||
shll $12,%eax # segment address in high order 16 bits
|
||||
.set LBackFromUserCodeDelta, ASM_PFX(BackFromUserCode) - ASM_PFX(m16Start)
|
||||
.set LBackFromUserCodeDelta, ASM_PFX(BackFromUserCode) - ASM_PFX(m16Start)
|
||||
lea (LBackFromUserCodeDelta)(%rdx), %ax
|
||||
stosl # [edi] <- return address of user code
|
||||
sgdt 0x60(%rsp) # save GDT stack in argument space
|
||||
movzwq 0x60(%rsp), %r10 # r10 <- GDT limit
|
||||
lea ((ASM_PFX(InternalAsmThunk16) - L_SavedCr4) + 0xf)(%rcx), %r11
|
||||
andq $0xfffffffffffffff0, %r11 # r11 <- 16-byte aligned shadowed GDT table in real mode buffer
|
||||
|
||||
movzwq 0x60(%rsp), %r10 # r10 <- GDT limit
|
||||
lea ((ASM_PFX(InternalAsmThunk16) - L_SavedCr4) + 0xf)(%rcx), %r11
|
||||
andq $0xfffffffffffffff0, %r11 # r11 <- 16-byte aligned shadowed GDT table in real mode buffer
|
||||
|
||||
movw %r10w, (SavedGdt - L_SavedCr4)(%rcx) # save the limit of shadowed GDT table
|
||||
movq %r11, (SavedGdt - L_SavedCr4 + 0x2)(%rcx) # save the base address of shadowed GDT table
|
||||
|
||||
|
||||
movq 0x62(%rsp) ,%rsi # rsi <- the original GDT base address
|
||||
xchg %r10, %rcx # save rcx to r10 and initialize rcx to be the limit of GDT table
|
||||
xchg %r10, %rcx # save rcx to r10 and initialize rcx to be the limit of GDT table
|
||||
incq %rcx # rcx <- the size of memory to copy
|
||||
xchg %r11, %rdi # save rdi to r11 and initialize rdi to the base address of shadowed GDT table
|
||||
rep
|
||||
movsb # perform memory copy to shadow GDT table
|
||||
movq %r10, %rcx # restore the orignal rcx before memory copy
|
||||
movq %r11, %rdi # restore the original rdi before memory copy
|
||||
|
||||
|
||||
sidt 0x50(%rsp)
|
||||
movq %cr0, %rax
|
||||
.set LSavedCrDelta, L_SavedCr0 - L_SavedCr4
|
||||
@@ -311,21 +311,21 @@ ASM_PFX(InternalAsmThunk16):
|
||||
.byte 0xff, 0x69 # jmp (_EntryPoint - L_SavedCr4)(%rcx)
|
||||
.set Ltemp1, _EntryPoint - L_SavedCr4
|
||||
.byte Ltemp1
|
||||
L_RetFromRealMode:
|
||||
L_RetFromRealMode:
|
||||
popfq
|
||||
lgdt 0x60(%rsp) # restore protected mode GDTR
|
||||
lidt 0x50(%rsp) # restore protected mode IDTR
|
||||
lea -IA32_REGS_SIZE(%rbp), %eax
|
||||
.byte 0x0f, 0xa9 # pop gs
|
||||
.byte 0x0f, 0xa1 # pop fs
|
||||
|
||||
|
||||
popq %rbx
|
||||
movl %ebx, %ss
|
||||
popq %rbx
|
||||
movl %ebx, %es
|
||||
popq %rbx
|
||||
movl %ebx, %ds
|
||||
|
||||
|
||||
popq %rdi
|
||||
popq %rsi
|
||||
popq %rbx
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
; 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
|
||||
@@ -240,14 +240,14 @@ BITS 64
|
||||
push rbx
|
||||
push rsi
|
||||
push rdi
|
||||
|
||||
|
||||
mov ebx, ds
|
||||
push rbx ; Save ds segment register on the stack
|
||||
mov ebx, es
|
||||
push rbx ; Save es segment register on the stack
|
||||
mov ebx, ss
|
||||
push rbx ; Save ss segment register on the stack
|
||||
|
||||
|
||||
push fs
|
||||
push gs
|
||||
mov rsi, rcx
|
||||
@@ -266,15 +266,15 @@ BITS 64
|
||||
shl eax, 12 ; segment address in high order 16 bits
|
||||
lea ax, [rdx + (_BackFromUserCode - ASM_PFX(m16Start))] ; offset address
|
||||
stosd ; [edi] <- return address of user code
|
||||
|
||||
|
||||
sgdt [rsp + 60h] ; save GDT stack in argument space
|
||||
movzx r10, word [rsp + 60h] ; r10 <- GDT limit
|
||||
movzx r10, word [rsp + 60h] ; r10 <- GDT limit
|
||||
lea r11, [rcx + (ASM_PFX(InternalAsmThunk16) - _BackFromUserCode.SavedCr4End) + 0xf]
|
||||
and r11, ~0xf ; r11 <- 16-byte aligned shadowed GDT table in real mode buffer
|
||||
|
||||
|
||||
mov [rcx + (SavedGdt - _BackFromUserCode.SavedCr4End)], r10w ; save the limit of shadowed GDT table
|
||||
mov [rcx + (SavedGdt - _BackFromUserCode.SavedCr4End) + 2], r11 ; save the base address of shadowed GDT table
|
||||
|
||||
|
||||
mov rsi, [rsp + 62h] ; rsi <- the original GDT base address
|
||||
xchg rcx, r10 ; save rcx to r10 and initialize rcx to be the limit of GDT table
|
||||
inc rcx ; rcx <- the size of memory to copy
|
||||
@@ -282,7 +282,7 @@ BITS 64
|
||||
rep movsb ; perform memory copy to shadow GDT table
|
||||
mov rcx, r10 ; restore the orignal rcx before memory copy
|
||||
mov rdi, r11 ; restore the original rdi before memory copy
|
||||
|
||||
|
||||
sidt [rsp + 50h] ; save IDT stack in argument space
|
||||
mov rax, cr0
|
||||
mov [rcx + (_BackFromUserCode.SavedCr0End - 4 - _BackFromUserCode.SavedCr4End)], eax
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
IA-32/x64 MSR functions.
|
||||
|
||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -196,8 +196,8 @@ AsmMsrBitFieldRead32 (
|
||||
Writes Value to a bit field in the lower 32-bits of a 64-bit MSR. The bit
|
||||
field is specified by the StartBit and the EndBit. All other bits in the
|
||||
destination MSR are preserved. The lower 32-bits of the MSR written is
|
||||
returned. The caller must either guarantee that Index and the data written
|
||||
is valid, or the caller must set up exception handlers to catch the exceptions.
|
||||
returned. The caller must either guarantee that Index and the data written
|
||||
is valid, or the caller must set up exception handlers to catch the exceptions.
|
||||
This function is only available on IA-32 and x64.
|
||||
|
||||
If StartBit is greater than 31, then ASSERT().
|
||||
@@ -420,7 +420,7 @@ AsmMsrAnd64 (
|
||||
}
|
||||
|
||||
/**
|
||||
Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise
|
||||
Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise
|
||||
OR, and writes the result back to the 64-bit MSR.
|
||||
|
||||
Reads the 64-bit MSR specified by Index, performs a bitwise AND between read
|
||||
@@ -489,8 +489,8 @@ AsmMsrBitFieldRead64 (
|
||||
|
||||
Writes Value to a bit field in a 64-bit MSR. The bit field is specified by
|
||||
the StartBit and the EndBit. All other bits in the destination MSR are
|
||||
preserved. The MSR written is returned. The caller must either guarantee
|
||||
that Index and the data written is valid, or the caller must set up exception
|
||||
preserved. The MSR written is returned. The caller must either guarantee
|
||||
that Index and the data written is valid, or the caller must set up exception
|
||||
handlers to catch the exceptions. This function is only available on IA-32 and x64.
|
||||
|
||||
If StartBit is greater than 63, then ASSERT().
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Real Mode Thunk Functions for IA32 and x64.
|
||||
|
||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -86,7 +86,7 @@ AsmGetThunk16Properties (
|
||||
Prepares all structures a code required to use AsmThunk16().
|
||||
|
||||
Prepares all structures and code required to use AsmThunk16().
|
||||
|
||||
|
||||
This interface is limited to be used in either physical mode or virtual modes with paging enabled where the
|
||||
virtual to physical mappings for ThunkContext.RealModeBuffer is mapped 1:1.
|
||||
|
||||
@@ -168,48 +168,48 @@ AsmPrepareThunk16 (
|
||||
AsmPrepareThunk16() must be called with ThunkContext before this function is used.
|
||||
This function must be called with interrupts disabled.
|
||||
|
||||
The register state from the RealModeState field of ThunkContext is restored just prior
|
||||
to calling the 16-bit real mode entry point. This includes the EFLAGS field of RealModeState,
|
||||
The register state from the RealModeState field of ThunkContext is restored just prior
|
||||
to calling the 16-bit real mode entry point. This includes the EFLAGS field of RealModeState,
|
||||
which is used to set the interrupt state when a 16-bit real mode entry point is called.
|
||||
Control is transferred to the 16-bit real mode entry point specified by the CS and Eip fields of RealModeState.
|
||||
The stack is initialized to the SS and ESP fields of RealModeState. Any parameters passed to
|
||||
the 16-bit real mode code must be populated by the caller at SS:ESP prior to calling this function.
|
||||
The stack is initialized to the SS and ESP fields of RealModeState. Any parameters passed to
|
||||
the 16-bit real mode code must be populated by the caller at SS:ESP prior to calling this function.
|
||||
The 16-bit real mode entry point is invoked with a 16-bit CALL FAR instruction,
|
||||
so when accessing stack contents, the 16-bit real mode code must account for the 16-bit segment
|
||||
and 16-bit offset of the return address that were pushed onto the stack. The 16-bit real mode entry
|
||||
point must exit with a RETF instruction. The register state is captured into RealModeState immediately
|
||||
so when accessing stack contents, the 16-bit real mode code must account for the 16-bit segment
|
||||
and 16-bit offset of the return address that were pushed onto the stack. The 16-bit real mode entry
|
||||
point must exit with a RETF instruction. The register state is captured into RealModeState immediately
|
||||
after the RETF instruction is executed.
|
||||
|
||||
If EFLAGS specifies interrupts enabled, or any of the 16-bit real mode code enables interrupts,
|
||||
or any of the 16-bit real mode code makes a SW interrupt, then the caller is responsible for making sure
|
||||
the IDT at address 0 is initialized to handle any HW or SW interrupts that may occur while in 16-bit real mode.
|
||||
|
||||
If EFLAGS specifies interrupts enabled, or any of the 16-bit real mode code enables interrupts,
|
||||
then the caller is responsible for making sure the 8259 PIC is in a state compatible with 16-bit real mode.
|
||||
|
||||
If EFLAGS specifies interrupts enabled, or any of the 16-bit real mode code enables interrupts,
|
||||
or any of the 16-bit real mode code makes a SW interrupt, then the caller is responsible for making sure
|
||||
the IDT at address 0 is initialized to handle any HW or SW interrupts that may occur while in 16-bit real mode.
|
||||
|
||||
If EFLAGS specifies interrupts enabled, or any of the 16-bit real mode code enables interrupts,
|
||||
then the caller is responsible for making sure the 8259 PIC is in a state compatible with 16-bit real mode.
|
||||
This includes the base vectors, the interrupt masks, and the edge/level trigger mode.
|
||||
|
||||
If THUNK_ATTRIBUTE_BIG_REAL_MODE is set in the ThunkAttributes field of ThunkContext, then the user code
|
||||
|
||||
If THUNK_ATTRIBUTE_BIG_REAL_MODE is set in the ThunkAttributes field of ThunkContext, then the user code
|
||||
is invoked in big real mode. Otherwise, the user code is invoked in 16-bit real mode with 64KB segment limits.
|
||||
|
||||
If neither THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 nor THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL are set in
|
||||
ThunkAttributes, then it is assumed that the user code did not enable the A20 mask, and no attempt is made to
|
||||
|
||||
If neither THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 nor THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL are set in
|
||||
ThunkAttributes, then it is assumed that the user code did not enable the A20 mask, and no attempt is made to
|
||||
disable the A20 mask.
|
||||
|
||||
If THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 is set and THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL is clear in
|
||||
ThunkAttributes, then attempt to use the INT 15 service to disable the A20 mask. If this INT 15 call fails,
|
||||
|
||||
If THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 is set and THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL is clear in
|
||||
ThunkAttributes, then attempt to use the INT 15 service to disable the A20 mask. If this INT 15 call fails,
|
||||
then attempt to disable the A20 mask by directly accessing the 8042 keyboard controller I/O ports.
|
||||
|
||||
If THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 is clear and THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL is set in
|
||||
|
||||
If THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 is clear and THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL is set in
|
||||
ThunkAttributes, then attempt to disable the A20 mask by directly accessing the 8042 keyboard controller I/O ports.
|
||||
|
||||
|
||||
If ThunkContext is NULL, then ASSERT().
|
||||
If AsmPrepareThunk16() was not previously called with ThunkContext, then ASSERT().
|
||||
If both THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 and THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL are set in
|
||||
If both THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 and THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL are set in
|
||||
ThunkAttributes, then ASSERT().
|
||||
|
||||
This interface is limited to be used in either physical mode or virtual modes with paging enabled where the
|
||||
virtual to physical mappings for ThunkContext.RealModeBuffer is mapped 1:1.
|
||||
|
||||
|
||||
@param ThunkContext A pointer to the context structure that describes the
|
||||
16-bit real mode code to call.
|
||||
|
||||
@@ -228,7 +228,7 @@ AsmThunk16 (
|
||||
ASSERT ((UINTN)ThunkContext->RealModeBuffer + m16Size <= 0x100000);
|
||||
ASSERT (((ThunkContext->ThunkAttributes & (THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 | THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL)) != \
|
||||
(THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 | THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL)));
|
||||
|
||||
|
||||
UpdatedRegs = InternalAsmThunk16 (
|
||||
ThunkContext->RealModeState,
|
||||
ThunkContext->RealModeBuffer
|
||||
@@ -250,7 +250,7 @@ AsmThunk16 (
|
||||
|
||||
This interface is limited to be used in either physical mode or virtual modes with paging enabled where the
|
||||
virtual to physical mappings for ThunkContext.RealModeBuffer is mapped 1:1.
|
||||
|
||||
|
||||
See AsmPrepareThunk16() and AsmThunk16() for the detailed description and ASSERT() conditions.
|
||||
|
||||
@param ThunkContext A pointer to the context structure that describes the
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# Base Memory Library implementation - no ASM.
|
||||
#
|
||||
# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -22,7 +22,7 @@
|
||||
FILE_GUID = fd44e603-002a-4b29-9f5f-529e815b6165
|
||||
MODULE_TYPE = BASE
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = BaseMemoryLib
|
||||
LIBRARY_CLASS = BaseMemoryLib
|
||||
|
||||
|
||||
#
|
||||
|
@@ -11,7 +11,7 @@
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -31,7 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
If all Length bytes of the two buffers are identical, then 0 is returned. Otherwise, the
|
||||
value returned is the first mismatched byte in SourceBuffer subtracted from the first
|
||||
mismatched byte in DestinationBuffer.
|
||||
|
||||
|
||||
If Length > 0 and DestinationBuffer is NULL, then ASSERT().
|
||||
If Length > 0 and SourceBuffer is NULL, then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
|
||||
@@ -44,7 +44,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
@return 0 All Length bytes of the two buffers are identical.
|
||||
@retval Non-zero The first mismatched byte in SourceBuffer subtracted from the first
|
||||
mismatched byte in DestinationBuffer.
|
||||
|
||||
|
||||
**/
|
||||
INTN
|
||||
EFIAPI
|
||||
|
@@ -2,7 +2,7 @@
|
||||
CopyMem() implementation.
|
||||
|
||||
The following BaseMemoryLib instances contain the same copy of this file:
|
||||
|
||||
|
||||
BaseMemoryLib
|
||||
BaseMemoryLibMmx
|
||||
BaseMemoryLibSse2
|
||||
@@ -12,7 +12,7 @@
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -31,7 +31,7 @@
|
||||
This function copies Length bytes from SourceBuffer to DestinationBuffer, and returns
|
||||
DestinationBuffer. The implementation must be reentrant, and it must handle the case
|
||||
where SourceBuffer overlaps DestinationBuffer.
|
||||
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Implementation of GUID functions.
|
||||
|
||||
The following BaseMemoryLib instances contain the same copy of this file:
|
||||
|
||||
|
||||
BaseMemoryLib
|
||||
BaseMemoryLibMmx
|
||||
BaseMemoryLibSse2
|
||||
@@ -12,7 +12,7 @@
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
This function copies the contents of the 128-bit GUID specified by SourceGuid to
|
||||
DestinationGuid, and returns DestinationGuid.
|
||||
|
||||
|
||||
If DestinationGuid is NULL, then ASSERT().
|
||||
If SourceGuid is NULL, then ASSERT().
|
||||
|
||||
@@ -63,7 +63,7 @@ CopyGuid (
|
||||
|
||||
This function compares Guid1 to Guid2. If the GUIDs are identical then TRUE is returned.
|
||||
If there are any bit differences in the two GUIDs, then FALSE is returned.
|
||||
|
||||
|
||||
If Guid1 is NULL, then ASSERT().
|
||||
If Guid2 is NULL, then ASSERT().
|
||||
|
||||
@@ -103,7 +103,7 @@ CompareGuid (
|
||||
GUID value that matches Guid. If a match is found, then a pointer to the matching
|
||||
GUID in the target buffer is returned. If no match is found, then NULL is returned.
|
||||
If Length is 0, then NULL is returned.
|
||||
|
||||
|
||||
If Length > 0 and Buffer is NULL, then ASSERT().
|
||||
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
|
||||
If Length is not aligned on a 128-bit boundary, then ASSERT().
|
||||
|
@@ -12,7 +12,7 @@
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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 @@
|
||||
address to the highest address for a 16-bit value that matches Value. If a match is found,
|
||||
then a pointer to the matching byte in the target buffer is returned. If no match is found,
|
||||
then NULL is returned. If Length is 0, then NULL is returned.
|
||||
|
||||
|
||||
If Length > 0 and Buffer is NULL, 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().
|
||||
|
@@ -11,7 +11,7 @@
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -32,7 +32,7 @@
|
||||
address to the highest address for a 32-bit value that matches Value. If a match is found,
|
||||
then a pointer to the matching byte in the target buffer is returned. If no match is found,
|
||||
then NULL is returned. If Length is 0, then NULL is returned.
|
||||
|
||||
|
||||
If Length > 0 and Buffer is NULL, 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().
|
||||
|
@@ -12,7 +12,7 @@
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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 @@
|
||||
address to the highest address for a 64-bit value that matches Value. If a match is found,
|
||||
then a pointer to the matching byte in the target buffer is returned. If no match is found,
|
||||
then NULL is returned. If Length is 0, then NULL is returned.
|
||||
|
||||
|
||||
If Length > 0 and Buffer is NULL, 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().
|
||||
|
@@ -12,7 +12,7 @@
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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 @@
|
||||
address to the highest address for an 8-bit value that matches Value. If a match is found,
|
||||
then a pointer to the matching byte in the target buffer is returned. If no match is found,
|
||||
then NULL is returned. If Length is 0, then NULL is returned.
|
||||
|
||||
|
||||
If Length > 0 and Buffer is NULL, then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@@ -57,19 +57,19 @@ ScanMem8 (
|
||||
}
|
||||
ASSERT (Buffer != NULL);
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
|
||||
|
||||
|
||||
return (VOID*)InternalMemScanMem8 (Buffer, Length, Value);
|
||||
}
|
||||
|
||||
/**
|
||||
Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
|
||||
Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
|
||||
UINTN sized value in the target buffer.
|
||||
|
||||
This function searches the target buffer specified by Buffer and Length from the lowest
|
||||
address to the highest address for a UINTN sized value that matches Value. If a match is found,
|
||||
then a pointer to the matching byte in the target buffer is returned. If no match is found,
|
||||
then NULL is returned. If Length is 0, then NULL is returned.
|
||||
|
||||
|
||||
If Length > 0 and Buffer is NULL, then ASSERT().
|
||||
If Buffer is not aligned on a UINTN boundary, then ASSERT().
|
||||
If Length is not aligned on a UINTN boundary, then ASSERT().
|
||||
|
@@ -12,7 +12,7 @@
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -29,7 +29,7 @@
|
||||
Fills a target buffer with a byte value, and returns the target buffer.
|
||||
|
||||
This function fills Length bytes of Buffer with Value, and returns Buffer.
|
||||
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param Buffer The memory to set.
|
||||
|
@@ -11,8 +11,8 @@
|
||||
BaseMemoryLibOptPei
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -29,7 +29,7 @@
|
||||
Fills a target buffer with zeros, and returns the target buffer.
|
||||
|
||||
This function fills Length bytes of Buffer with zeros, and returns Buffer.
|
||||
|
||||
|
||||
If Length > 0 and Buffer is NULL, then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
FILE_GUID = d458a654-f64c-49db-b8d1-3821306bf1f6
|
||||
MODULE_TYPE = BASE
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = BaseMemoryLib
|
||||
LIBRARY_CLASS = BaseMemoryLib
|
||||
|
||||
|
||||
#
|
||||
|
@@ -11,7 +11,7 @@
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -31,7 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
If all Length bytes of the two buffers are identical, then 0 is returned. Otherwise, the
|
||||
value returned is the first mismatched byte in SourceBuffer subtracted from the first
|
||||
mismatched byte in DestinationBuffer.
|
||||
|
||||
|
||||
If Length > 0 and DestinationBuffer is NULL, then ASSERT().
|
||||
If Length > 0 and SourceBuffer is NULL, then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
|
||||
@@ -44,7 +44,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
@return 0 All Length bytes of the two buffers are identical.
|
||||
@retval Non-zero The first mismatched byte in SourceBuffer subtracted from the first
|
||||
mismatched byte in DestinationBuffer.
|
||||
|
||||
|
||||
**/
|
||||
INTN
|
||||
EFIAPI
|
||||
|
@@ -2,7 +2,7 @@
|
||||
CopyMem() implementation.
|
||||
|
||||
The following BaseMemoryLib instances contain the same copy of this file:
|
||||
|
||||
|
||||
BaseMemoryLib
|
||||
BaseMemoryLibMmx
|
||||
BaseMemoryLibSse2
|
||||
@@ -12,7 +12,7 @@
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -31,7 +31,7 @@
|
||||
This function copies Length bytes from SourceBuffer to DestinationBuffer, and returns
|
||||
DestinationBuffer. The implementation must be reentrant, and it must handle the case
|
||||
where SourceBuffer overlaps DestinationBuffer.
|
||||
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Implementation of GUID functions.
|
||||
|
||||
The following BaseMemoryLib instances contain the same copy of this file:
|
||||
|
||||
|
||||
BaseMemoryLib
|
||||
BaseMemoryLibMmx
|
||||
BaseMemoryLibSse2
|
||||
@@ -12,7 +12,7 @@
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
This function copies the contents of the 128-bit GUID specified by SourceGuid to
|
||||
DestinationGuid, and returns DestinationGuid.
|
||||
|
||||
|
||||
If DestinationGuid is NULL, then ASSERT().
|
||||
If SourceGuid is NULL, then ASSERT().
|
||||
|
||||
@@ -63,7 +63,7 @@ CopyGuid (
|
||||
|
||||
This function compares Guid1 to Guid2. If the GUIDs are identical then TRUE is returned.
|
||||
If there are any bit differences in the two GUIDs, then FALSE is returned.
|
||||
|
||||
|
||||
If Guid1 is NULL, then ASSERT().
|
||||
If Guid2 is NULL, then ASSERT().
|
||||
|
||||
@@ -103,7 +103,7 @@ CompareGuid (
|
||||
GUID value that matches Guid. If a match is found, then a pointer to the matching
|
||||
GUID in the target buffer is returned. If no match is found, then NULL is returned.
|
||||
If Length is 0, then NULL is returned.
|
||||
|
||||
|
||||
If Length > 0 and Buffer is NULL, then ASSERT().
|
||||
If Buffer is not aligned on a 32-bit boundary, then ASSERT().
|
||||
If Length is not aligned on a 128-bit boundary, then ASSERT().
|
||||
|
@@ -12,7 +12,7 @@
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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 @@
|
||||
address to the highest address for a 16-bit value that matches Value. If a match is found,
|
||||
then a pointer to the matching byte in the target buffer is returned. If no match is found,
|
||||
then NULL is returned. If Length is 0, then NULL is returned.
|
||||
|
||||
|
||||
If Length > 0 and Buffer is NULL, 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().
|
||||
|
@@ -11,7 +11,7 @@
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -32,7 +32,7 @@
|
||||
address to the highest address for a 32-bit value that matches Value. If a match is found,
|
||||
then a pointer to the matching byte in the target buffer is returned. If no match is found,
|
||||
then NULL is returned. If Length is 0, then NULL is returned.
|
||||
|
||||
|
||||
If Length > 0 and Buffer is NULL, 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().
|
||||
|
@@ -12,7 +12,7 @@
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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 @@
|
||||
address to the highest address for a 64-bit value that matches Value. If a match is found,
|
||||
then a pointer to the matching byte in the target buffer is returned. If no match is found,
|
||||
then NULL is returned. If Length is 0, then NULL is returned.
|
||||
|
||||
|
||||
If Length > 0 and Buffer is NULL, 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().
|
||||
|
@@ -12,7 +12,7 @@
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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 @@
|
||||
address to the highest address for an 8-bit value that matches Value. If a match is found,
|
||||
then a pointer to the matching byte in the target buffer is returned. If no match is found,
|
||||
then NULL is returned. If Length is 0, then NULL is returned.
|
||||
|
||||
|
||||
If Length > 0 and Buffer is NULL, then ASSERT().
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@@ -57,19 +57,19 @@ ScanMem8 (
|
||||
}
|
||||
ASSERT (Buffer != NULL);
|
||||
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
|
||||
|
||||
|
||||
return (VOID*)InternalMemScanMem8 (Buffer, Length, Value);
|
||||
}
|
||||
|
||||
/**
|
||||
Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
|
||||
Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
|
||||
UINTN sized value in the target buffer.
|
||||
|
||||
This function searches the target buffer specified by Buffer and Length from the lowest
|
||||
address to the highest address for a UINTN sized value that matches Value. If a match is found,
|
||||
then a pointer to the matching byte in the target buffer is returned. If no match is found,
|
||||
then NULL is returned. If Length is 0, then NULL is returned.
|
||||
|
||||
|
||||
If Length > 0 and Buffer is NULL, then ASSERT().
|
||||
If Buffer is not aligned on a UINTN boundary, then ASSERT().
|
||||
If Length is not aligned on a UINTN boundary, then ASSERT().
|
||||
|
@@ -12,7 +12,7 @@
|
||||
PeiMemoryLib
|
||||
UefiMemoryLib
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -29,7 +29,7 @@
|
||||
Fills a target buffer with a byte value, and returns the target buffer.
|
||||
|
||||
This function fills Length bytes of Buffer with Value, and returns Buffer.
|
||||
|
||||
|
||||
If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
|
||||
|
||||
@param Buffer The memory to set.
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
@@ -46,13 +46,13 @@ ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
|
||||
ASM_PFX(InternalMemCompareMem):
|
||||
pushq %rsi
|
||||
pushq %rdi
|
||||
movq %rcx, %rsi
|
||||
movq %rdx, %rdi
|
||||
movq %r8, %rcx
|
||||
movq %rcx, %rsi
|
||||
movq %rdx, %rdi
|
||||
movq %r8, %rcx
|
||||
repe cmpsb
|
||||
movzbq -1(%rsi), %rax
|
||||
movzbq -1(%rdi), %rdx
|
||||
subq %rdx, %rax
|
||||
subq %rdx, %rax
|
||||
popq %rdi
|
||||
popq %rsi
|
||||
ret
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user