MdeModulePkg: Apply uncrustify changes

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the MdeModulePkg package

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
Michael Kubacki
2021-12-05 14:54:02 -08:00
committed by mergify[bot]
parent 7c7184e201
commit 1436aea4d5
994 changed files with 107608 additions and 101311 deletions

View File

@@ -62,10 +62,10 @@
// Used to build a table of SMI Handlers that the SMM Core registers
//
typedef struct {
EFI_SMM_HANDLER_ENTRY_POINT2 Handler;
EFI_GUID *HandlerType;
EFI_HANDLE DispatchHandle;
BOOLEAN UnRegister;
EFI_SMM_HANDLER_ENTRY_POINT2 Handler;
EFI_GUID *HandlerType;
EFI_HANDLE DispatchHandle;
BOOLEAN UnRegister;
} SMM_CORE_SMI_HANDLERS;
//
@@ -74,89 +74,89 @@ typedef struct {
#define SMI_ENTRY_SIGNATURE SIGNATURE_32('s','m','i','e')
typedef struct {
UINTN Signature;
LIST_ENTRY AllEntries; // All entries
typedef struct {
UINTN Signature;
LIST_ENTRY AllEntries; // All entries
EFI_GUID HandlerType; // Type of interrupt
LIST_ENTRY SmiHandlers; // All handlers
EFI_GUID HandlerType; // Type of interrupt
LIST_ENTRY SmiHandlers; // All handlers
} SMI_ENTRY;
#define SMI_HANDLER_SIGNATURE SIGNATURE_32('s','m','i','h')
typedef struct {
UINTN Signature;
LIST_ENTRY Link; // Link on SMI_ENTRY.SmiHandlers
EFI_SMM_HANDLER_ENTRY_POINT2 Handler; // The smm handler's entry point
UINTN CallerAddr; // The address of caller who register the SMI handler.
SMI_ENTRY *SmiEntry;
VOID *Context; // for profile
UINTN ContextSize; // for profile
typedef struct {
UINTN Signature;
LIST_ENTRY Link; // Link on SMI_ENTRY.SmiHandlers
EFI_SMM_HANDLER_ENTRY_POINT2 Handler; // The smm handler's entry point
UINTN CallerAddr; // The address of caller who register the SMI handler.
SMI_ENTRY *SmiEntry;
VOID *Context; // for profile
UINTN ContextSize; // for profile
} SMI_HANDLER;
//
// Structure for recording the state of an SMM Driver
//
#define EFI_SMM_DRIVER_ENTRY_SIGNATURE SIGNATURE_32('s', 'd','r','v')
#define EFI_SMM_DRIVER_ENTRY_SIGNATURE SIGNATURE_32('s', 'd','r','v')
typedef struct {
UINTN Signature;
LIST_ENTRY Link; // mDriverList
UINTN Signature;
LIST_ENTRY Link; // mDriverList
LIST_ENTRY ScheduledLink; // mScheduledQueue
LIST_ENTRY ScheduledLink; // mScheduledQueue
EFI_HANDLE FvHandle;
EFI_GUID FileName;
EFI_DEVICE_PATH_PROTOCOL *FvFileDevicePath;
EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
EFI_HANDLE FvHandle;
EFI_GUID FileName;
EFI_DEVICE_PATH_PROTOCOL *FvFileDevicePath;
EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
VOID *Depex;
UINTN DepexSize;
VOID *Depex;
UINTN DepexSize;
BOOLEAN Before;
BOOLEAN After;
EFI_GUID BeforeAfterGuid;
BOOLEAN Before;
BOOLEAN After;
EFI_GUID BeforeAfterGuid;
BOOLEAN Dependent;
BOOLEAN Scheduled;
BOOLEAN Initialized;
BOOLEAN DepexProtocolError;
BOOLEAN Dependent;
BOOLEAN Scheduled;
BOOLEAN Initialized;
BOOLEAN DepexProtocolError;
EFI_HANDLE ImageHandle;
EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
EFI_HANDLE ImageHandle;
EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
//
// Image EntryPoint in SMRAM
//
PHYSICAL_ADDRESS ImageEntryPoint;
PHYSICAL_ADDRESS ImageEntryPoint;
//
// Image Buffer in SMRAM
//
PHYSICAL_ADDRESS ImageBuffer;
PHYSICAL_ADDRESS ImageBuffer;
//
// Image Page Number
//
UINTN NumberOfPage;
EFI_HANDLE SmmImageHandle;
EFI_LOADED_IMAGE_PROTOCOL SmmLoadedImage;
UINTN NumberOfPage;
EFI_HANDLE SmmImageHandle;
EFI_LOADED_IMAGE_PROTOCOL SmmLoadedImage;
} EFI_SMM_DRIVER_ENTRY;
#define EFI_HANDLE_SIGNATURE SIGNATURE_32('s','h','d','l')
#define EFI_HANDLE_SIGNATURE SIGNATURE_32('s','h','d','l')
///
/// IHANDLE - contains a list of protocol handles
///
typedef struct {
UINTN Signature;
UINTN Signature;
/// All handles list of IHANDLE
LIST_ENTRY AllHandles;
LIST_ENTRY AllHandles;
/// List of PROTOCOL_INTERFACE's for this handle
LIST_ENTRY Protocols;
UINTN LocateRequest;
LIST_ENTRY Protocols;
UINTN LocateRequest;
} IHANDLE;
#define ASSERT_IS_HANDLE(a) ASSERT((a)->Signature == EFI_HANDLE_SIGNATURE)
#define PROTOCOL_ENTRY_SIGNATURE SIGNATURE_32('s','p','t','e')
#define PROTOCOL_ENTRY_SIGNATURE SIGNATURE_32('s','p','t','e')
///
/// PROTOCOL_ENTRY - each different protocol has 1 entry in the protocol
@@ -164,15 +164,15 @@ typedef struct {
/// with a list of registered notifies.
///
typedef struct {
UINTN Signature;
UINTN Signature;
/// Link Entry inserted to mProtocolDatabase
LIST_ENTRY AllEntries;
LIST_ENTRY AllEntries;
/// ID of the protocol
EFI_GUID ProtocolID;
EFI_GUID ProtocolID;
/// All protocol interfaces
LIST_ENTRY Protocols;
LIST_ENTRY Protocols;
/// Registered notification handlers
LIST_ENTRY Notify;
LIST_ENTRY Notify;
} PROTOCOL_ENTRY;
#define PROTOCOL_INTERFACE_SIGNATURE SIGNATURE_32('s','p','i','f')
@@ -182,33 +182,33 @@ typedef struct {
/// with a protocol interface structure
///
typedef struct {
UINTN Signature;
UINTN Signature;
/// Link on IHANDLE.Protocols
LIST_ENTRY Link;
LIST_ENTRY Link;
/// Back pointer
IHANDLE *Handle;
IHANDLE *Handle;
/// Link on PROTOCOL_ENTRY.Protocols
LIST_ENTRY ByProtocol;
LIST_ENTRY ByProtocol;
/// The protocol ID
PROTOCOL_ENTRY *Protocol;
PROTOCOL_ENTRY *Protocol;
/// The interface value
VOID *Interface;
VOID *Interface;
} PROTOCOL_INTERFACE;
#define PROTOCOL_NOTIFY_SIGNATURE SIGNATURE_32('s','p','t','n')
#define PROTOCOL_NOTIFY_SIGNATURE SIGNATURE_32('s','p','t','n')
///
/// PROTOCOL_NOTIFY - used for each register notification for a protocol
///
typedef struct {
UINTN Signature;
PROTOCOL_ENTRY *Protocol;
UINTN Signature;
PROTOCOL_ENTRY *Protocol;
/// All notifications for this protocol
LIST_ENTRY Link;
LIST_ENTRY Link;
/// Notification function
EFI_SMM_NOTIFY_FN Function;
EFI_SMM_NOTIFY_FN Function;
/// Last position notified
LIST_ENTRY *Position;
LIST_ENTRY *Position;
} PROTOCOL_NOTIFY;
//
@@ -253,9 +253,9 @@ EFI_STATUS
EFIAPI
SmmInstallConfigurationTable (
IN CONST EFI_SMM_SYSTEM_TABLE2 *SystemTable,
IN CONST EFI_GUID *Guid,
IN VOID *Table,
IN UINTN TableSize
IN CONST EFI_GUID *Guid,
IN VOID *Table,
IN UINTN TableSize
);
/**
@@ -275,10 +275,10 @@ SmmInstallConfigurationTable (
EFI_STATUS
EFIAPI
SmmInstallProtocolInterface (
IN OUT EFI_HANDLE *UserHandle,
IN EFI_GUID *Protocol,
IN EFI_INTERFACE_TYPE InterfaceType,
IN VOID *Interface
IN OUT EFI_HANDLE *UserHandle,
IN EFI_GUID *Protocol,
IN EFI_INTERFACE_TYPE InterfaceType,
IN VOID *Interface
);
/**
@@ -300,10 +300,10 @@ SmmInstallProtocolInterface (
EFI_STATUS
EFIAPI
SmmAllocatePages (
IN EFI_ALLOCATE_TYPE Type,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN NumberOfPages,
OUT EFI_PHYSICAL_ADDRESS *Memory
IN EFI_ALLOCATE_TYPE Type,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN NumberOfPages,
OUT EFI_PHYSICAL_ADDRESS *Memory
);
/**
@@ -326,11 +326,11 @@ SmmAllocatePages (
EFI_STATUS
EFIAPI
SmmInternalAllocatePages (
IN EFI_ALLOCATE_TYPE Type,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN NumberOfPages,
OUT EFI_PHYSICAL_ADDRESS *Memory,
IN BOOLEAN NeedGuard
IN EFI_ALLOCATE_TYPE Type,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN NumberOfPages,
OUT EFI_PHYSICAL_ADDRESS *Memory,
IN BOOLEAN NeedGuard
);
/**
@@ -347,8 +347,8 @@ SmmInternalAllocatePages (
EFI_STATUS
EFIAPI
SmmFreePages (
IN EFI_PHYSICAL_ADDRESS Memory,
IN UINTN NumberOfPages
IN EFI_PHYSICAL_ADDRESS Memory,
IN UINTN NumberOfPages
);
/**
@@ -367,9 +367,9 @@ SmmFreePages (
EFI_STATUS
EFIAPI
SmmInternalFreePages (
IN EFI_PHYSICAL_ADDRESS Memory,
IN UINTN NumberOfPages,
IN BOOLEAN IsGuarded
IN EFI_PHYSICAL_ADDRESS Memory,
IN UINTN NumberOfPages,
IN BOOLEAN IsGuarded
);
/**
@@ -388,9 +388,9 @@ SmmInternalFreePages (
EFI_STATUS
EFIAPI
SmmAllocatePool (
IN EFI_MEMORY_TYPE PoolType,
IN UINTN Size,
OUT VOID **Buffer
IN EFI_MEMORY_TYPE PoolType,
IN UINTN Size,
OUT VOID **Buffer
);
/**
@@ -409,9 +409,9 @@ SmmAllocatePool (
EFI_STATUS
EFIAPI
SmmInternalAllocatePool (
IN EFI_MEMORY_TYPE PoolType,
IN UINTN Size,
OUT VOID **Buffer
IN EFI_MEMORY_TYPE PoolType,
IN UINTN Size,
OUT VOID **Buffer
);
/**
@@ -426,7 +426,7 @@ SmmInternalAllocatePool (
EFI_STATUS
EFIAPI
SmmFreePool (
IN VOID *Buffer
IN VOID *Buffer
);
/**
@@ -441,7 +441,7 @@ SmmFreePool (
EFI_STATUS
EFIAPI
SmmInternalFreePool (
IN VOID *Buffer
IN VOID *Buffer
);
/**
@@ -463,11 +463,11 @@ SmmInternalFreePool (
**/
EFI_STATUS
SmmInstallProtocolInterfaceNotify (
IN OUT EFI_HANDLE *UserHandle,
IN EFI_GUID *Protocol,
IN EFI_INTERFACE_TYPE InterfaceType,
IN VOID *Interface,
IN BOOLEAN Notify
IN OUT EFI_HANDLE *UserHandle,
IN EFI_GUID *Protocol,
IN EFI_INTERFACE_TYPE InterfaceType,
IN VOID *Interface,
IN BOOLEAN Notify
);
/**
@@ -486,9 +486,9 @@ SmmInstallProtocolInterfaceNotify (
EFI_STATUS
EFIAPI
SmmUninstallProtocolInterface (
IN EFI_HANDLE UserHandle,
IN EFI_GUID *Protocol,
IN VOID *Interface
IN EFI_HANDLE UserHandle,
IN EFI_GUID *Protocol,
IN VOID *Interface
);
/**
@@ -505,9 +505,9 @@ SmmUninstallProtocolInterface (
EFI_STATUS
EFIAPI
SmmHandleProtocol (
IN EFI_HANDLE UserHandle,
IN EFI_GUID *Protocol,
OUT VOID **Interface
IN EFI_HANDLE UserHandle,
IN EFI_GUID *Protocol,
OUT VOID **Interface
);
/**
@@ -526,9 +526,9 @@ SmmHandleProtocol (
EFI_STATUS
EFIAPI
SmmRegisterProtocolNotify (
IN CONST EFI_GUID *Protocol,
IN EFI_SMM_NOTIFY_FN Function,
OUT VOID **Registration
IN CONST EFI_GUID *Protocol,
IN EFI_SMM_NOTIFY_FN Function,
OUT VOID **Registration
);
/**
@@ -552,11 +552,11 @@ SmmRegisterProtocolNotify (
EFI_STATUS
EFIAPI
SmmLocateHandle (
IN EFI_LOCATE_SEARCH_TYPE SearchType,
IN EFI_GUID *Protocol OPTIONAL,
IN VOID *SearchKey OPTIONAL,
IN OUT UINTN *BufferSize,
OUT EFI_HANDLE *Buffer
IN EFI_LOCATE_SEARCH_TYPE SearchType,
IN EFI_GUID *Protocol OPTIONAL,
IN VOID *SearchKey OPTIONAL,
IN OUT UINTN *BufferSize,
OUT EFI_HANDLE *Buffer
);
/**
@@ -632,10 +632,10 @@ SmmLocateHandleBuffer (
EFI_STATUS
EFIAPI
SmiManage (
IN CONST EFI_GUID *HandlerType,
IN CONST VOID *Context OPTIONAL,
IN OUT VOID *CommBuffer OPTIONAL,
IN OUT UINTN *CommBufferSize OPTIONAL
IN CONST EFI_GUID *HandlerType,
IN CONST VOID *Context OPTIONAL,
IN OUT VOID *CommBuffer OPTIONAL,
IN OUT UINTN *CommBufferSize OPTIONAL
);
/**
@@ -652,9 +652,9 @@ SmiManage (
EFI_STATUS
EFIAPI
SmiHandlerRegister (
IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
IN CONST EFI_GUID *HandlerType OPTIONAL,
OUT EFI_HANDLE *DispatchHandle
IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
IN CONST EFI_GUID *HandlerType OPTIONAL,
OUT EFI_HANDLE *DispatchHandle
);
/**
@@ -669,7 +669,7 @@ SmiHandlerRegister (
EFI_STATUS
EFIAPI
SmiHandlerUnRegister (
IN EFI_HANDLE DispatchHandle
IN EFI_HANDLE DispatchHandle
);
/**
@@ -688,10 +688,10 @@ SmiHandlerUnRegister (
EFI_STATUS
EFIAPI
SmmDriverDispatchHandler (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *Context OPTIONAL,
IN OUT VOID *CommBuffer OPTIONAL,
IN OUT UINTN *CommBufferSize OPTIONAL
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *Context OPTIONAL,
IN OUT VOID *CommBuffer OPTIONAL,
IN OUT UINTN *CommBufferSize OPTIONAL
);
/**
@@ -710,10 +710,10 @@ SmmDriverDispatchHandler (
EFI_STATUS
EFIAPI
SmmLegacyBootHandler (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *Context OPTIONAL,
IN OUT VOID *CommBuffer OPTIONAL,
IN OUT UINTN *CommBufferSize OPTIONAL
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *Context OPTIONAL,
IN OUT VOID *CommBuffer OPTIONAL,
IN OUT UINTN *CommBufferSize OPTIONAL
);
/**
@@ -732,10 +732,10 @@ SmmLegacyBootHandler (
EFI_STATUS
EFIAPI
SmmReadyToLockHandler (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *Context OPTIONAL,
IN OUT VOID *CommBuffer OPTIONAL,
IN OUT UINTN *CommBufferSize OPTIONAL
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *Context OPTIONAL,
IN OUT VOID *CommBuffer OPTIONAL,
IN OUT UINTN *CommBufferSize OPTIONAL
);
/**
@@ -754,10 +754,10 @@ SmmReadyToLockHandler (
EFI_STATUS
EFIAPI
SmmEndOfDxeHandler (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *Context OPTIONAL,
IN OUT VOID *CommBuffer OPTIONAL,
IN OUT UINTN *CommBufferSize OPTIONAL
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *Context OPTIONAL,
IN OUT VOID *CommBuffer OPTIONAL,
IN OUT UINTN *CommBufferSize OPTIONAL
);
/**
@@ -776,10 +776,10 @@ SmmEndOfDxeHandler (
EFI_STATUS
EFIAPI
SmmExitBootServicesHandler (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *Context OPTIONAL,
IN OUT VOID *CommBuffer OPTIONAL,
IN OUT UINTN *CommBufferSize OPTIONAL
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *Context OPTIONAL,
IN OUT VOID *CommBuffer OPTIONAL,
IN OUT UINTN *CommBufferSize OPTIONAL
);
/**
@@ -798,10 +798,10 @@ SmmExitBootServicesHandler (
EFI_STATUS
EFIAPI
SmmReadyToBootHandler (
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *Context OPTIONAL,
IN OUT VOID *CommBuffer OPTIONAL,
IN OUT UINTN *CommBufferSize OPTIONAL
IN EFI_HANDLE DispatchHandle,
IN CONST VOID *Context OPTIONAL,
IN OUT VOID *CommBuffer OPTIONAL,
IN OUT UINTN *CommBufferSize OPTIONAL
);
/**
@@ -865,15 +865,15 @@ SmmEndOfS3ResumeHandler (
EFI_STATUS
EFIAPI
SmmEfiNotAvailableYetArg5 (
UINTN Arg1,
UINTN Arg2,
UINTN Arg3,
UINTN Arg4,
UINTN Arg5
UINTN Arg1,
UINTN Arg2,
UINTN Arg3,
UINTN Arg4,
UINTN Arg5
);
//
//Functions used during debug builds
// Functions used during debug builds
//
/**
@@ -897,10 +897,10 @@ SmmDisplayDiscoveredNotDispatched (
**/
VOID
SmmAddMemoryRegion (
IN EFI_PHYSICAL_ADDRESS MemBase,
IN UINT64 MemLength,
IN EFI_MEMORY_TYPE Type,
IN UINT64 Attributes
IN EFI_PHYSICAL_ADDRESS MemBase,
IN UINT64 MemLength,
IN EFI_MEMORY_TYPE Type,
IN UINT64 Attributes
);
/**
@@ -914,8 +914,8 @@ SmmAddMemoryRegion (
**/
PROTOCOL_ENTRY *
SmmFindProtocolEntry (
IN EFI_GUID *Protocol,
IN BOOLEAN Create
IN EFI_GUID *Protocol,
IN BOOLEAN Create
);
/**
@@ -926,7 +926,7 @@ SmmFindProtocolEntry (
**/
VOID
SmmNotifyProtocol (
IN PROTOCOL_INTERFACE *Prot
IN PROTOCOL_INTERFACE *Prot
);
/**
@@ -943,9 +943,9 @@ SmmNotifyProtocol (
**/
PROTOCOL_INTERFACE *
SmmFindProtocolInterface (
IN IHANDLE *Handle,
IN EFI_GUID *Protocol,
IN VOID *Interface
IN IHANDLE *Handle,
IN EFI_GUID *Protocol,
IN VOID *Interface
);
/**
@@ -960,9 +960,9 @@ SmmFindProtocolInterface (
**/
PROTOCOL_INTERFACE *
SmmRemoveInterfaceFromProtocol (
IN IHANDLE *Handle,
IN EFI_GUID *Protocol,
IN VOID *Interface
IN IHANDLE *Handle,
IN EFI_GUID *Protocol,
IN VOID *Interface
);
/**
@@ -979,7 +979,7 @@ SmmRemoveInterfaceFromProtocol (
**/
BOOLEAN
SmmIsSchedulable (
IN EFI_SMM_DRIVER_ENTRY *DriverEntry
IN EFI_SMM_DRIVER_ENTRY *DriverEntry
);
//
@@ -1018,8 +1018,8 @@ SmramProfileInstallProtocol (
**/
EFI_STATUS
RegisterSmramProfileImage (
IN EFI_SMM_DRIVER_ENTRY *DriverEntry,
IN BOOLEAN RegisterToDxe
IN EFI_SMM_DRIVER_ENTRY *DriverEntry,
IN BOOLEAN RegisterToDxe
);
/**
@@ -1036,8 +1036,8 @@ RegisterSmramProfileImage (
**/
EFI_STATUS
UnregisterSmramProfileImage (
IN EFI_SMM_DRIVER_ENTRY *DriverEntry,
IN BOOLEAN UnregisterToDxe
IN EFI_SMM_DRIVER_ENTRY *DriverEntry,
IN BOOLEAN UnregisterToDxe
);
/**
@@ -1171,12 +1171,12 @@ SmmCoreInitializeSmiHandlerProfile (
EFI_STATUS
EFIAPI
SmiHandlerProfileRegisterHandler (
IN SMI_HANDLER_PROFILE_PROTOCOL *This,
IN EFI_GUID *HandlerGuid,
IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
IN PHYSICAL_ADDRESS CallerAddress,
IN VOID *Context OPTIONAL,
IN UINTN ContextSize OPTIONAL
IN SMI_HANDLER_PROFILE_PROTOCOL *This,
IN EFI_GUID *HandlerGuid,
IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
IN PHYSICAL_ADDRESS CallerAddress,
IN VOID *Context OPTIONAL,
IN UINTN ContextSize OPTIONAL
);
/**
@@ -1199,17 +1199,17 @@ SmiHandlerProfileRegisterHandler (
EFI_STATUS
EFIAPI
SmiHandlerProfileUnregisterHandler (
IN SMI_HANDLER_PROFILE_PROTOCOL *This,
IN EFI_GUID *HandlerGuid,
IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
IN VOID *Context OPTIONAL,
IN UINTN ContextSize OPTIONAL
IN SMI_HANDLER_PROFILE_PROTOCOL *This,
IN EFI_GUID *HandlerGuid,
IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
IN VOID *Context OPTIONAL,
IN UINTN ContextSize OPTIONAL
);
extern UINTN mFullSmramRangeCount;
extern EFI_SMRAM_DESCRIPTOR *mFullSmramRanges;
extern UINTN mFullSmramRangeCount;
extern EFI_SMRAM_DESCRIPTOR *mFullSmramRanges;
extern EFI_SMM_DRIVER_ENTRY *mSmmCoreDriverEntry;
extern EFI_SMM_DRIVER_ENTRY *mSmmCoreDriverEntry;
extern EFI_LOADED_IMAGE_PROTOCOL *mSmmCoreLoadedImage;
@@ -1218,8 +1218,8 @@ extern EFI_LOADED_IMAGE_PROTOCOL *mSmmCoreLoadedImage;
//
typedef struct {
LIST_ENTRY Link;
UINTN NumberOfPages;
LIST_ENTRY Link;
UINTN NumberOfPages;
} FREE_PAGE_LIST;
extern LIST_ENTRY mSmmMemoryMap;
@@ -1245,31 +1245,31 @@ extern LIST_ENTRY mSmmMemoryMap;
//
#define MAX_POOL_INDEX (MAX_POOL_SHIFT - MIN_POOL_SHIFT + 1)
#define POOL_HEAD_SIGNATURE SIGNATURE_32('s','p','h','d')
#define POOL_HEAD_SIGNATURE SIGNATURE_32('s','p','h','d')
typedef struct {
UINT32 Signature;
BOOLEAN Available;
EFI_MEMORY_TYPE Type;
UINTN Size;
UINT32 Signature;
BOOLEAN Available;
EFI_MEMORY_TYPE Type;
UINTN Size;
} POOL_HEADER;
#define POOL_TAIL_SIGNATURE SIGNATURE_32('s','p','t','l')
#define POOL_TAIL_SIGNATURE SIGNATURE_32('s','p','t','l')
typedef struct {
UINT32 Signature;
UINT32 Reserved;
UINTN Size;
UINT32 Signature;
UINT32 Reserved;
UINTN Size;
} POOL_TAIL;
#define POOL_OVERHEAD (sizeof(POOL_HEADER) + sizeof(POOL_TAIL))
#define POOL_OVERHEAD (sizeof(POOL_HEADER) + sizeof(POOL_TAIL))
#define HEAD_TO_TAIL(a) \
((POOL_TAIL *) (((CHAR8 *) (a)) + (a)->Size - sizeof(POOL_TAIL)));
typedef struct {
POOL_HEADER Header;
LIST_ENTRY Link;
POOL_HEADER Header;
LIST_ENTRY Link;
} FREE_POOL_HEADER;
typedef enum {
@@ -1292,9 +1292,9 @@ extern LIST_ENTRY mSmmPoolLists[SmmPoolTypeMax][MAX_POOL_INDEX];
**/
UINTN
InternalAllocPagesOnOneNode (
IN OUT FREE_PAGE_LIST *Pages,
IN UINTN NumberOfPages,
IN UINTN MaxAddress
IN OUT FREE_PAGE_LIST *Pages,
IN UINTN NumberOfPages,
IN UINTN MaxAddress
);
/**