-/** @file \r
-\r
- The file contains the GCD related services in the EFI Boot Services Table.\r
+/** @file\r
+ The file contains the GCD related services in the EFI Boot Services Table.\r
The GCD services are used to manage the memory and I/O regions that \r
are accessible to the CPU that is executing the DXE core.\r
\r
-Copyright (c) 2006 - 2008, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
**/\r
\r
Acquire memory lock on mGcdIoSpaceLock.\r
\r
**/\r
-STATIC\r
VOID\r
CoreAcquireGcdIoLock (\r
VOID\r
Release memory lock on mGcdIoSpaceLock.\r
\r
**/\r
-STATIC\r
VOID\r
CoreReleaseGcdIoLock (\r
VOID\r
@return A 64 bit value is the aligned to the value nearest Value with an alignment by Alignment.\r
\r
**/\r
-STATIC\r
UINT64\r
AlignValue (\r
IN UINT64 Value,\r
@return A 64 bit value is the aligned to the value nearest Value with an alignment by Alignment.\r
\r
**/\r
-STATIC\r
UINT64\r
PageAlignAddress (\r
IN UINT64 Value\r
@return A 64 bit value is the aligned to the value nearest Value with an alignment by Alignment.\r
\r
**/\r
-STATIC\r
UINT64\r
PageAlignLength (\r
IN UINT64 Value\r
@retval EFI_SUCCESS Both entries successfully allocated.\r
\r
**/\r
-STATIC\r
EFI_STATUS\r
CoreAllocateGcdMapEntry (\r
IN OUT EFI_GCD_MAP_ENTRY **TopEntry,\r
@retval EFI_SUCCESS The new range was inserted into the linked list\r
\r
**/\r
-STATIC\r
EFI_STATUS\r
CoreInsertGcdMapEntry (\r
IN LIST_ENTRY *Link,\r
@retval EFI_UNSUPPORTED These adjacent regions could not merge.\r
\r
**/\r
-STATIC\r
EFI_STATUS\r
CoreMergeGcdMapEntry (\r
IN LIST_ENTRY *Link,\r
@retval EFI_SUCCESS GCD map successfully cleaned up.\r
\r
**/\r
-STATIC\r
EFI_STATUS\r
CoreCleanupGcdMapEntry (\r
IN EFI_GCD_MAP_ENTRY *TopEntry,\r
@retval EFI_NOT_FOUND Not found.\r
\r
**/\r
-STATIC\r
EFI_STATUS\r
CoreSearchGcdMapEntry (\r
IN EFI_PHYSICAL_ADDRESS BaseAddress,\r
@return The count.\r
\r
**/\r
-STATIC\r
UINTN\r
CoreCountGcdMapEntry (\r
IN LIST_ENTRY *Map\r
@return The enum value of memory attribute.\r
\r
**/\r
-STATIC\r
UINT64\r
ConverToCpuArchAttributes (\r
UINT64 Attributes\r
- ) \r
+ )\r
{\r
if ( (Attributes & EFI_MEMORY_UC) == EFI_MEMORY_UC) {\r
return EFI_MEMORY_UC;\r
@retval EFI_OUT_OF_RESOURCES No buffer could be allocated.\r
\r
**/\r
-STATIC\r
EFI_STATUS\r
CoreConvertSpace (\r
IN UINTN Operation,\r
space.\r
\r
**/\r
-STATIC\r
EFI_STATUS\r
CoreAllocateSpaceCheckEntry (\r
IN UINTN Operation,\r
@retval EFI_SUCCESS Space successfully allocated.\r
\r
**/\r
-STATIC\r
EFI_STATUS\r
CoreAllocateSpace (\r
IN UINTN Operation,\r
@retval EFI_SUCCESS Successfully add a segment of memory space.\r
\r
**/\r
-STATIC\r
EFI_STATUS\r
CoreInternalAddMemorySpace (\r
IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r
@param Entry According to this entry\r
\r
**/\r
-STATIC\r
VOID\r
BuildMemoryDescriptor (\r
IN OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Descriptor,\r
@param Entry According to this entry\r
\r
**/\r
-STATIC\r
VOID\r
BuildIoDescriptor (\r
IN EFI_GCD_IO_SPACE_DESCRIPTOR *Descriptor,\r
@return The capabilities mask for an EFI Memory Descriptor.\r
\r
**/\r
-STATIC\r
UINT64\r
CoreConvertResourceDescriptorHobAttributesToCapabilities (\r
EFI_GCD_MEMORY_TYPE GcdMemoryType,\r