summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Core/Dxe/Mem/Imem.h
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Core/Dxe/Mem/Imem.h')
-rw-r--r--MdeModulePkg/Core/Dxe/Mem/Imem.h66
1 files changed, 28 insertions, 38 deletions
diff --git a/MdeModulePkg/Core/Dxe/Mem/Imem.h b/MdeModulePkg/Core/Dxe/Mem/Imem.h
index 090f3f089f..2f0bf2bf63 100644
--- a/MdeModulePkg/Core/Dxe/Mem/Imem.h
+++ b/MdeModulePkg/Core/Dxe/Mem/Imem.h
@@ -20,34 +20,33 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
// | 0x80000000..0xFFFFFFFF - OS reserved |
// +---------------------------------------------------+
//
-#define MEMORY_TYPE_OS_RESERVED_MIN 0x80000000
-#define MEMORY_TYPE_OS_RESERVED_MAX 0xFFFFFFFF
-#define MEMORY_TYPE_OEM_RESERVED_MIN 0x70000000
-#define MEMORY_TYPE_OEM_RESERVED_MAX 0x7FFFFFFF
+#define MEMORY_TYPE_OS_RESERVED_MIN 0x80000000
+#define MEMORY_TYPE_OS_RESERVED_MAX 0xFFFFFFFF
+#define MEMORY_TYPE_OEM_RESERVED_MIN 0x70000000
+#define MEMORY_TYPE_OEM_RESERVED_MAX 0x7FFFFFFF
//
// MEMORY_MAP_ENTRY
//
-#define MEMORY_MAP_SIGNATURE SIGNATURE_32('m','m','a','p')
+#define MEMORY_MAP_SIGNATURE SIGNATURE_32('m','m','a','p')
typedef struct {
- UINTN Signature;
- LIST_ENTRY Link;
- BOOLEAN FromPages;
+ UINTN Signature;
+ LIST_ENTRY Link;
+ BOOLEAN FromPages;
- EFI_MEMORY_TYPE Type;
- UINT64 Start;
- UINT64 End;
+ EFI_MEMORY_TYPE Type;
+ UINT64 Start;
+ UINT64 End;
- UINT64 VirtualStart;
- UINT64 Attribute;
+ UINT64 VirtualStart;
+ UINT64 Attribute;
} MEMORY_MAP;
//
// Internal prototypes
//
-
/**
Internal function. Used by the pool functions to allocate pages
to back pool allocation requests.
@@ -62,14 +61,12 @@ typedef struct {
**/
VOID *
CoreAllocatePoolPages (
- IN EFI_MEMORY_TYPE PoolType,
- IN UINTN NumberOfPages,
- IN UINTN Alignment,
- IN BOOLEAN NeedGuard
+ IN EFI_MEMORY_TYPE PoolType,
+ IN UINTN NumberOfPages,
+ IN UINTN Alignment,
+ IN BOOLEAN NeedGuard
);
-
-
/**
Internal function. Frees pool pages allocated via AllocatePoolPages ()
@@ -79,12 +76,10 @@ CoreAllocatePoolPages (
**/
VOID
CoreFreePoolPages (
- IN EFI_PHYSICAL_ADDRESS Memory,
- IN UINTN NumberOfPages
+ IN EFI_PHYSICAL_ADDRESS Memory,
+ IN UINTN NumberOfPages
);
-
-
/**
Internal function to allocate pool of a particular type.
Caller must have the memory lock held
@@ -103,8 +98,6 @@ CoreAllocatePoolI (
IN BOOLEAN NeedGuard
);
-
-
/**
Internal function to free a pool entry.
Caller must have the memory lock held
@@ -118,12 +111,10 @@ CoreAllocatePoolI (
**/
EFI_STATUS
CoreFreePoolI (
- IN VOID *Buffer,
- OUT EFI_MEMORY_TYPE *PoolType OPTIONAL
+ IN VOID *Buffer,
+ OUT EFI_MEMORY_TYPE *PoolType OPTIONAL
);
-
-
/**
Enter critical section by gaining lock on gMemoryLock.
@@ -133,7 +124,6 @@ CoreAcquireMemoryLock (
VOID
);
-
/**
Exit critical section by releasing lock on gMemoryLock.
@@ -165,18 +155,18 @@ CoreReleaseMemoryLock (
EFI_STATUS
EFIAPI
CoreInternalAllocatePages (
- IN EFI_ALLOCATE_TYPE Type,
- IN EFI_MEMORY_TYPE MemoryType,
- IN UINTN NumberOfPages,
+ IN EFI_ALLOCATE_TYPE Type,
+ IN EFI_MEMORY_TYPE MemoryType,
+ IN UINTN NumberOfPages,
IN OUT EFI_PHYSICAL_ADDRESS *Memory,
- IN BOOLEAN NeedGuard
+ IN BOOLEAN NeedGuard
);
//
// Internal Global data
//
-extern EFI_LOCK gMemoryLock;
-extern LIST_ENTRY gMemoryMap;
-extern LIST_ENTRY mGcdMemorySpaceMap;
+extern EFI_LOCK gMemoryLock;
+extern LIST_ENTRY gMemoryMap;
+extern LIST_ENTRY mGcdMemorySpaceMap;
#endif