X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FCore%2FDxe%2FDxeMain.h;h=815a6b4bd844a452ace09c2e3932cfa03e3ecf2e;hb=1436aea4d5707e672672a11bda72be2c63c936c3;hp=b14be9a74d8ecf7fa5a49151245daa76c576f5b2;hpb=d0e92aad46706643469cf3ecc235a9cee5b52323;p=mirror_edk2.git
diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h b/MdeModulePkg/Core/Dxe/DxeMain.h
index b14be9a74d..815a6b4bd8 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain.h
+++ b/MdeModulePkg/Core/Dxe/DxeMain.h
@@ -2,22 +2,14 @@
The internal header file includes the common header files, defines
internal structure and functions used by DxeCore module.
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _DXE_MAIN_H_
#define _DXE_MAIN_H_
-
-
#include
#include
@@ -42,7 +34,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include
#include
#include
-#include
#include
#include
#include
@@ -53,6 +44,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include
#include
#include
+#include
#include
#include
#include
@@ -89,12 +81,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include
#include
#include
-#include
#include
#include
#include
-
//
// attributes for reserved memory before it is promoted to system memory
//
@@ -107,7 +97,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
#define EFI_MEMORY_PORT_IO 0x4000000000000000ULL
-
///
/// EFI_DEP_REPLACE_TRUE - Used to dynamically patch the dependency expression
/// to save time. A EFI_DEP_PUSH is evaluated one an
@@ -123,37 +112,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
///
#define DEPEX_STACK_SIZE_INCREMENT 0x1000
-#if defined (MDE_CPU_IPF)
-///
-/// For Itanium machines make the default allocations 8K aligned
-///
-#define EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT (EFI_PAGE_SIZE * 2)
-#define DEFAULT_PAGE_ALLOCATION (EFI_PAGE_SIZE * 2)
-
-#elif defined (MDE_CPU_AARCH64)
-///
-/// 64-bit ARM systems allow the OS to execute with 64 KB page size,
-/// so for improved interoperability with the firmware, align the
-/// runtime regions to 64 KB as well
-///
-#define EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT (SIZE_64KB)
-#define DEFAULT_PAGE_ALLOCATION (EFI_PAGE_SIZE)
-
-#else
-///
-/// For generic EFI machines make the default allocations 4K aligned
-///
-#define EFI_ACPI_RUNTIME_PAGE_ALLOCATION_ALIGNMENT (EFI_PAGE_SIZE)
-#define DEFAULT_PAGE_ALLOCATION (EFI_PAGE_SIZE)
-
-#endif
-
typedef struct {
- EFI_GUID *ProtocolGuid;
- VOID **Protocol;
- EFI_EVENT Event;
- VOID *Registration;
- BOOLEAN Present;
+ EFI_GUID *ProtocolGuid;
+ VOID **Protocol;
+ EFI_EVENT Event;
+ VOID *Registration;
+ BOOLEAN Present;
} EFI_CORE_PROTOCOL_NOTIFY_ENTRY;
//
@@ -162,171 +126,166 @@ typedef struct {
#define KNOWN_HANDLE_SIGNATURE SIGNATURE_32('k','n','o','w')
typedef struct {
- UINTN Signature;
- LIST_ENTRY Link; // mFvHandleList
- EFI_HANDLE Handle;
- EFI_GUID FvNameGuid;
+ UINTN Signature;
+ LIST_ENTRY Link; // mFvHandleList
+ EFI_HANDLE Handle;
+ EFI_GUID FvNameGuid;
} KNOWN_HANDLE;
-
-#define EFI_CORE_DRIVER_ENTRY_SIGNATURE SIGNATURE_32('d','r','v','r')
+#define EFI_CORE_DRIVER_ENTRY_SIGNATURE SIGNATURE_32('d','r','v','r')
typedef struct {
- UINTN Signature;
- LIST_ENTRY Link; // mDriverList
-
- LIST_ENTRY ScheduledLink; // mScheduledQueue
+ UINTN Signature;
+ LIST_ENTRY Link; // mDriverList
- EFI_HANDLE FvHandle;
- EFI_GUID FileName;
- EFI_DEVICE_PATH_PROTOCOL *FvFileDevicePath;
- EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
+ LIST_ENTRY ScheduledLink; // mScheduledQueue
- VOID *Depex;
- UINTN DepexSize;
+ EFI_HANDLE FvHandle;
+ EFI_GUID FileName;
+ EFI_DEVICE_PATH_PROTOCOL *FvFileDevicePath;
+ EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
- BOOLEAN Before;
- BOOLEAN After;
- EFI_GUID BeforeAfterGuid;
+ VOID *Depex;
+ UINTN DepexSize;
- BOOLEAN Dependent;
- BOOLEAN Unrequested;
- BOOLEAN Scheduled;
- BOOLEAN Untrusted;
- BOOLEAN Initialized;
- BOOLEAN DepexProtocolError;
+ BOOLEAN Before;
+ BOOLEAN After;
+ EFI_GUID BeforeAfterGuid;
- EFI_HANDLE ImageHandle;
- BOOLEAN IsFvImage;
+ BOOLEAN Dependent;
+ BOOLEAN Unrequested;
+ BOOLEAN Scheduled;
+ BOOLEAN Untrusted;
+ BOOLEAN Initialized;
+ BOOLEAN DepexProtocolError;
+ EFI_HANDLE ImageHandle;
+ BOOLEAN IsFvImage;
} EFI_CORE_DRIVER_ENTRY;
//
-//The data structure of GCD memory map entry
+// The data structure of GCD memory map entry
//
#define EFI_GCD_MAP_SIGNATURE SIGNATURE_32('g','c','d','m')
typedef struct {
- UINTN Signature;
- LIST_ENTRY Link;
- EFI_PHYSICAL_ADDRESS BaseAddress;
- UINT64 EndAddress;
- UINT64 Capabilities;
- UINT64 Attributes;
- EFI_GCD_MEMORY_TYPE GcdMemoryType;
- EFI_GCD_IO_TYPE GcdIoType;
- EFI_HANDLE ImageHandle;
- EFI_HANDLE DeviceHandle;
+ UINTN Signature;
+ LIST_ENTRY Link;
+ EFI_PHYSICAL_ADDRESS BaseAddress;
+ UINT64 EndAddress;
+ UINT64 Capabilities;
+ UINT64 Attributes;
+ EFI_GCD_MEMORY_TYPE GcdMemoryType;
+ EFI_GCD_IO_TYPE GcdIoType;
+ EFI_HANDLE ImageHandle;
+ EFI_HANDLE DeviceHandle;
} EFI_GCD_MAP_ENTRY;
-
-#define LOADED_IMAGE_PRIVATE_DATA_SIGNATURE SIGNATURE_32('l','d','r','i')
+#define LOADED_IMAGE_PRIVATE_DATA_SIGNATURE SIGNATURE_32('l','d','r','i')
typedef struct {
- UINTN Signature;
+ UINTN Signature;
/// Image handle
- EFI_HANDLE Handle;
+ EFI_HANDLE Handle;
/// Image type
- UINTN Type;
+ UINTN Type;
/// If entrypoint has been called
- BOOLEAN Started;
+ BOOLEAN Started;
/// The image's entry point
- EFI_IMAGE_ENTRY_POINT EntryPoint;
+ EFI_IMAGE_ENTRY_POINT EntryPoint;
/// loaded image protocol
- EFI_LOADED_IMAGE_PROTOCOL Info;
+ EFI_LOADED_IMAGE_PROTOCOL Info;
/// Location in memory
- EFI_PHYSICAL_ADDRESS ImageBasePage;
+ EFI_PHYSICAL_ADDRESS ImageBasePage;
/// Number of pages
- UINTN NumberOfPages;
+ UINTN NumberOfPages;
/// Original fixup data
- CHAR8 *FixupData;
+ CHAR8 *FixupData;
/// Tpl of started image
- EFI_TPL Tpl;
+ EFI_TPL Tpl;
/// Status returned by started image
- EFI_STATUS Status;
+ EFI_STATUS Status;
/// Size of ExitData from started image
- UINTN ExitDataSize;
+ UINTN ExitDataSize;
/// Pointer to exit data from started image
- VOID *ExitData;
+ VOID *ExitData;
/// Pointer to pool allocation for context save/restore
- VOID *JumpBuffer;
+ VOID *JumpBuffer;
/// Pointer to buffer for context save/restore
- BASE_LIBRARY_JUMP_BUFFER *JumpContext;
+ BASE_LIBRARY_JUMP_BUFFER *JumpContext;
/// Machine type from PE image
- UINT16 Machine;
- /// EBC Protocol pointer
- EFI_EBC_PROTOCOL *Ebc;
+ UINT16 Machine;
+ /// PE/COFF Image Emulator Protocol pointer
+ EDKII_PECOFF_IMAGE_EMULATOR_PROTOCOL *PeCoffEmu;
/// Runtime image list
- EFI_RUNTIME_IMAGE_ENTRY *RuntimeData;
+ EFI_RUNTIME_IMAGE_ENTRY *RuntimeData;
/// Pointer to Loaded Image Device Path Protocol
- EFI_DEVICE_PATH_PROTOCOL *LoadedImageDevicePath;
+ EFI_DEVICE_PATH_PROTOCOL *LoadedImageDevicePath;
/// PeCoffLoader ImageContext
- PE_COFF_LOADER_IMAGE_CONTEXT ImageContext;
+ PE_COFF_LOADER_IMAGE_CONTEXT ImageContext;
/// Status returned by LoadImage() service.
- EFI_STATUS LoadImageStatus;
+ EFI_STATUS LoadImageStatus;
} LOADED_IMAGE_PRIVATE_DATA;
#define LOADED_IMAGE_PRIVATE_DATA_FROM_THIS(a) \
CR(a, LOADED_IMAGE_PRIVATE_DATA, Info, LOADED_IMAGE_PRIVATE_DATA_SIGNATURE)
-#define IMAGE_PROPERTIES_RECORD_CODE_SECTION_SIGNATURE SIGNATURE_32 ('I','P','R','C')
+#define IMAGE_PROPERTIES_RECORD_CODE_SECTION_SIGNATURE SIGNATURE_32 ('I','P','R','C')
typedef struct {
- UINT32 Signature;
- LIST_ENTRY Link;
- EFI_PHYSICAL_ADDRESS CodeSegmentBase;
- UINT64 CodeSegmentSize;
+ UINT32 Signature;
+ LIST_ENTRY Link;
+ EFI_PHYSICAL_ADDRESS CodeSegmentBase;
+ UINT64 CodeSegmentSize;
} IMAGE_PROPERTIES_RECORD_CODE_SECTION;
-#define IMAGE_PROPERTIES_RECORD_SIGNATURE SIGNATURE_32 ('I','P','R','D')
+#define IMAGE_PROPERTIES_RECORD_SIGNATURE SIGNATURE_32 ('I','P','R','D')
typedef struct {
- UINT32 Signature;
- LIST_ENTRY Link;
- EFI_PHYSICAL_ADDRESS ImageBase;
- UINT64 ImageSize;
- UINTN CodeSegmentCount;
- LIST_ENTRY CodeSegmentList;
+ UINT32 Signature;
+ LIST_ENTRY Link;
+ EFI_PHYSICAL_ADDRESS ImageBase;
+ UINT64 ImageSize;
+ UINTN CodeSegmentCount;
+ LIST_ENTRY CodeSegmentList;
} IMAGE_PROPERTIES_RECORD;
//
// DXE Core Global Variables
//
-extern EFI_SYSTEM_TABLE *gDxeCoreST;
-extern EFI_RUNTIME_SERVICES *gDxeCoreRT;
-extern EFI_DXE_SERVICES *gDxeCoreDS;
-extern EFI_HANDLE gDxeCoreImageHandle;
+extern EFI_SYSTEM_TABLE *gDxeCoreST;
+extern EFI_RUNTIME_SERVICES *gDxeCoreRT;
+extern EFI_DXE_SERVICES *gDxeCoreDS;
+extern EFI_HANDLE gDxeCoreImageHandle;
-extern BOOLEAN gMemoryMapTerminated;
+extern BOOLEAN gMemoryMapTerminated;
-extern EFI_DECOMPRESS_PROTOCOL gEfiDecompress;
+extern EFI_DECOMPRESS_PROTOCOL gEfiDecompress;
-extern EFI_RUNTIME_ARCH_PROTOCOL *gRuntime;
-extern EFI_CPU_ARCH_PROTOCOL *gCpu;
-extern EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *gWatchdogTimer;
-extern EFI_METRONOME_ARCH_PROTOCOL *gMetronome;
-extern EFI_TIMER_ARCH_PROTOCOL *gTimer;
-extern EFI_SECURITY_ARCH_PROTOCOL *gSecurity;
-extern EFI_SECURITY2_ARCH_PROTOCOL *gSecurity2;
-extern EFI_BDS_ARCH_PROTOCOL *gBds;
-extern EFI_SMM_BASE2_PROTOCOL *gSmmBase2;
+extern EFI_RUNTIME_ARCH_PROTOCOL *gRuntime;
+extern EFI_CPU_ARCH_PROTOCOL *gCpu;
+extern EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *gWatchdogTimer;
+extern EFI_METRONOME_ARCH_PROTOCOL *gMetronome;
+extern EFI_TIMER_ARCH_PROTOCOL *gTimer;
+extern EFI_SECURITY_ARCH_PROTOCOL *gSecurity;
+extern EFI_SECURITY2_ARCH_PROTOCOL *gSecurity2;
+extern EFI_BDS_ARCH_PROTOCOL *gBds;
+extern EFI_SMM_BASE2_PROTOCOL *gSmmBase2;
-extern EFI_TPL gEfiCurrentTpl;
+extern EFI_TPL gEfiCurrentTpl;
-extern EFI_GUID *gDxeCoreFileName;
-extern EFI_LOADED_IMAGE_PROTOCOL *gDxeCoreLoadedImage;
+extern EFI_GUID *gDxeCoreFileName;
+extern EFI_LOADED_IMAGE_PROTOCOL *gDxeCoreLoadedImage;
-extern EFI_MEMORY_TYPE_INFORMATION gMemoryTypeInformation[EfiMaxMemoryType + 1];
+extern EFI_MEMORY_TYPE_INFORMATION gMemoryTypeInformation[EfiMaxMemoryType + 1];
-extern BOOLEAN gDispatcherRunning;
-extern EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate;
+extern BOOLEAN gDispatcherRunning;
+extern EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate;
-extern EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE gLoadModuleAtFixAddressConfigurationTable;
-extern BOOLEAN gLoadFixedAddressCodeMemoryReady;
+extern EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE gLoadModuleAtFixAddressConfigurationTable;
+extern BOOLEAN gLoadFixedAddressCodeMemoryReady;
//
// Service Initialization Functions
//
-
-
/**
Called to initialize the pool.
@@ -336,7 +295,6 @@ CoreInitializePool (
VOID
);
-
/**
Called to initialize the memory map and add descriptors to
the current descriptor list.
@@ -360,7 +318,6 @@ CoreAddMemoryDescriptor (
IN UINT64 Attribute
);
-
/**
Release memory lock on mGcdMemorySpaceLock.
@@ -370,7 +327,6 @@ CoreReleaseGcdMemoryLock (
VOID
);
-
/**
Acquire memory lock on mGcdMemorySpaceLock.
@@ -380,7 +336,6 @@ CoreAcquireGcdMemoryLock (
VOID
);
-
/**
External function. Initializes memory services based on the memory
descriptor HOBs. This function is responsible for priming the memory
@@ -403,8 +358,6 @@ CoreInitializeMemoryServices (
OUT UINT64 *MemoryLength
);
-
-
/**
External function. Initializes the GCD and memory services based on the memory
descriptor HOBs. This function is responsible for priming the GCD map and the
@@ -426,7 +379,6 @@ CoreInitializeGcdServices (
IN UINT64 MemoryLength
);
-
/**
Initializes "event" support.
@@ -438,7 +390,6 @@ CoreInitializeEventServices (
VOID
);
-
/**
Add the Image Services to EFI Boot Services Table and install the protocol
interfaces for this image.
@@ -450,10 +401,9 @@ CoreInitializeEventServices (
**/
EFI_STATUS
CoreInitializeImageServices (
- IN VOID *HobStart
+ IN VOID *HobStart
);
-
/**
Creates an event that is fired everytime a Protocol of a specific type is installed.
@@ -463,7 +413,6 @@ CoreNotifyOnProtocolInstallation (
VOID
);
-
/**
Return TRUE if all AP services are available.
@@ -476,7 +425,6 @@ CoreAllEfiServicesAvailable (
VOID
);
-
/**
Calcualte the 32-bit CRC in a EFI table using the service provided by the
gRuntime service.
@@ -486,10 +434,9 @@ CoreAllEfiServicesAvailable (
**/
VOID
CalculateEfiHdrCrc (
- IN OUT EFI_TABLE_HEADER *Hdr
+ IN OUT EFI_TABLE_HEADER *Hdr
);
-
/**
Called by the platform code to process a tick.
@@ -500,10 +447,9 @@ CalculateEfiHdrCrc (
VOID
EFIAPI
CoreTimerTick (
- IN UINT64 Duration
+ IN UINT64 Duration
);
-
/**
Initialize the dispatcher. Initialize the notification function that runs when
an FV2 protocol is added to the system.
@@ -514,7 +460,6 @@ CoreInitializeDispatcher (
VOID
);
-
/**
This is the POSTFIX version of the dependency evaluator. This code does
not need to handle Before or After, as it is not valid to call this
@@ -530,10 +475,9 @@ CoreInitializeDispatcher (
**/
BOOLEAN
CoreIsSchedulable (
- IN EFI_CORE_DRIVER_ENTRY *DriverEntry
+ IN EFI_CORE_DRIVER_ENTRY *DriverEntry
);
-
/**
Preprocess dependency expression and update DriverEntry to reflect the
state of Before, After, and SOR dependencies. If DriverEntry->Before
@@ -548,11 +492,9 @@ CoreIsSchedulable (
**/
EFI_STATUS
CorePreProcessDepex (
- IN EFI_CORE_DRIVER_ENTRY *DriverEntry
+ IN EFI_CORE_DRIVER_ENTRY *DriverEntry
);
-
-
/**
Terminates all boot services.
@@ -566,11 +508,10 @@ CorePreProcessDepex (
EFI_STATUS
EFIAPI
CoreExitBootServices (
- IN EFI_HANDLE ImageHandle,
- IN UINTN MapKey
+ IN EFI_HANDLE ImageHandle,
+ IN UINTN MapKey
);
-
/**
Make sure the memory map is following all the construction rules,
it is the last time to check memory map error before exit boot services.
@@ -584,10 +525,9 @@ CoreExitBootServices (
**/
EFI_STATUS
CoreTerminateMemoryMap (
- IN UINTN MapKey
+ IN UINTN MapKey
);
-
/**
Signals all events in the EventGroup.
@@ -596,11 +536,9 @@ CoreTerminateMemoryMap (
**/
VOID
CoreNotifySignalList (
- IN EFI_GUID *EventGroup
+ IN EFI_GUID *EventGroup
);
-
-
/**
Boot Service called to add, modify, or remove a system configuration table from
the EFI System Table.
@@ -619,12 +557,10 @@ CoreNotifySignalList (
EFI_STATUS
EFIAPI
CoreInstallConfigurationTable (
- IN EFI_GUID *Guid,
- IN VOID *Table
+ IN EFI_GUID *Guid,
+ IN VOID *Table
);
-
-
/**
Raise the task priority level to the new level.
High level is implemented by disabling processor interrupts.
@@ -637,11 +573,9 @@ CoreInstallConfigurationTable (
EFI_TPL
EFIAPI
CoreRaiseTpl (
- IN EFI_TPL NewTpl
+ IN EFI_TPL NewTpl
);
-
-
/**
Lowers the task priority to the previous value. If the new
priority unmasks events at a higher priority, they are dispatched.
@@ -652,11 +586,9 @@ CoreRaiseTpl (
VOID
EFIAPI
CoreRestoreTpl (
- IN EFI_TPL NewTpl
+ IN EFI_TPL NewTpl
);
-
-
/**
Introduces a fine-grained stall.
@@ -670,11 +602,9 @@ CoreRestoreTpl (
EFI_STATUS
EFIAPI
CoreStall (
- IN UINTN Microseconds
+ IN UINTN Microseconds
);
-
-
/**
Sets the system's watchdog timer.
@@ -700,14 +630,12 @@ CoreStall (
EFI_STATUS
EFIAPI
CoreSetWatchdogTimer (
- IN UINTN Timeout,
- IN UINT64 WatchdogCode,
- IN UINTN DataSize,
- IN CHAR16 *WatchdogData OPTIONAL
+ IN UINTN Timeout,
+ IN UINT64 WatchdogCode,
+ IN UINTN DataSize,
+ IN CHAR16 *WatchdogData OPTIONAL
);
-
-
/**
Wrapper function to CoreInstallProtocolInterfaceNotify. This is the public API which
Calls the private one which contains a BOOLEAN parameter for notifications
@@ -725,13 +653,12 @@ CoreSetWatchdogTimer (
EFI_STATUS
EFIAPI
CoreInstallProtocolInterface (
- 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
);
-
/**
Installs a protocol interface into the boot services environment.
@@ -751,15 +678,13 @@ CoreInstallProtocolInterface (
**/
EFI_STATUS
CoreInstallProtocolInterfaceNotify (
- 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
);
-
-
/**
Installs a list of protocol interface into the boot services environment.
This function calls InstallProtocolInterface() in a loop. If any error
@@ -784,12 +709,10 @@ CoreInstallProtocolInterfaceNotify (
EFI_STATUS
EFIAPI
CoreInstallMultipleProtocolInterfaces (
- IN OUT EFI_HANDLE *Handle,
+ IN OUT EFI_HANDLE *Handle,
...
);
-
-
/**
Uninstalls a list of protocol interface in the boot services environment.
This function calls UnisatllProtocolInterface() in a loop. This is
@@ -807,12 +730,10 @@ CoreInstallMultipleProtocolInterfaces (
EFI_STATUS
EFIAPI
CoreUninstallMultipleProtocolInterfaces (
- IN EFI_HANDLE Handle,
+ IN EFI_HANDLE Handle,
...
);
-
-
/**
Reinstall a protocol interface on a device handle. The OldInterface for Protocol is replaced by the NewInterface.
@@ -830,14 +751,12 @@ CoreUninstallMultipleProtocolInterfaces (
EFI_STATUS
EFIAPI
CoreReinstallProtocolInterface (
- IN EFI_HANDLE UserHandle,
- IN EFI_GUID *Protocol,
- IN VOID *OldInterface,
- IN VOID *NewInterface
+ IN EFI_HANDLE UserHandle,
+ IN EFI_GUID *Protocol,
+ IN VOID *OldInterface,
+ IN VOID *NewInterface
);
-
-
/**
Uninstalls all instances of a protocol:interfacer from a handle.
If the last protocol interface is remove from the handle, the
@@ -854,13 +773,11 @@ CoreReinstallProtocolInterface (
EFI_STATUS
EFIAPI
CoreUninstallProtocolInterface (
- IN EFI_HANDLE UserHandle,
- IN EFI_GUID *Protocol,
- IN VOID *Interface
+ IN EFI_HANDLE UserHandle,
+ IN EFI_GUID *Protocol,
+ IN VOID *Interface
);
-
-
/**
Queries a handle to determine if it supports a specified protocol.
@@ -875,13 +792,11 @@ CoreUninstallProtocolInterface (
EFI_STATUS
EFIAPI
CoreHandleProtocol (
- IN EFI_HANDLE UserHandle,
- IN EFI_GUID *Protocol,
- OUT VOID **Interface
+ IN EFI_HANDLE UserHandle,
+ IN EFI_GUID *Protocol,
+ OUT VOID **Interface
);
-
-
/**
Locates the installed protocol handler for the handle, and
invokes it to obtain the protocol interface. Usage information
@@ -905,16 +820,14 @@ CoreHandleProtocol (
EFI_STATUS
EFIAPI
CoreOpenProtocol (
- IN EFI_HANDLE UserHandle,
- IN EFI_GUID *Protocol,
- OUT VOID **Interface OPTIONAL,
- IN EFI_HANDLE ImageHandle,
- IN EFI_HANDLE ControllerHandle,
- IN UINT32 Attributes
+ IN EFI_HANDLE UserHandle,
+ IN EFI_GUID *Protocol,
+ OUT VOID **Interface OPTIONAL,
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_HANDLE ControllerHandle,
+ IN UINT32 Attributes
);
-
-
/**
Return information about Opened protocols in the system
@@ -929,14 +842,12 @@ CoreOpenProtocol (
EFI_STATUS
EFIAPI
CoreOpenProtocolInformation (
- IN EFI_HANDLE UserHandle,
- IN EFI_GUID *Protocol,
- OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,
- OUT UINTN *EntryCount
+ IN EFI_HANDLE UserHandle,
+ IN EFI_GUID *Protocol,
+ OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,
+ OUT UINTN *EntryCount
);
-
-
/**
Closes a protocol on a handle that was opened using OpenProtocol().
@@ -965,14 +876,12 @@ CoreOpenProtocolInformation (
EFI_STATUS
EFIAPI
CoreCloseProtocol (
- IN EFI_HANDLE UserHandle,
- IN EFI_GUID *Protocol,
- IN EFI_HANDLE AgentHandle,
- IN EFI_HANDLE ControllerHandle
+ IN EFI_HANDLE UserHandle,
+ IN EFI_GUID *Protocol,
+ IN EFI_HANDLE AgentHandle,
+ IN EFI_HANDLE ControllerHandle
);
-
-
/**
Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated
from pool.
@@ -999,13 +908,11 @@ CoreCloseProtocol (
EFI_STATUS
EFIAPI
CoreProtocolsPerHandle (
- IN EFI_HANDLE UserHandle,
- OUT EFI_GUID ***ProtocolBuffer,
- OUT UINTN *ProtocolBufferCount
+ IN EFI_HANDLE UserHandle,
+ OUT EFI_GUID ***ProtocolBuffer,
+ OUT UINTN *ProtocolBufferCount
);
-
-
/**
Add a new protocol notification record for the request protocol.
@@ -1022,12 +929,11 @@ CoreProtocolsPerHandle (
EFI_STATUS
EFIAPI
CoreRegisterProtocolNotify (
- IN EFI_GUID *Protocol,
- IN EFI_EVENT Event,
- OUT VOID **Registration
+ IN EFI_GUID *Protocol,
+ IN EFI_EVENT Event,
+ OUT VOID **Registration
);
-
/**
Removes all the events in the protocol database that match Event.
@@ -1039,10 +945,9 @@ CoreRegisterProtocolNotify (
**/
EFI_STATUS
CoreUnregisterProtocolNotify (
- IN EFI_EVENT Event
+ IN EFI_EVENT Event
);
-
/**
Locates the requested handle(s) and returns them in Buffer.
@@ -1064,15 +969,13 @@ CoreUnregisterProtocolNotify (
EFI_STATUS
EFIAPI
CoreLocateHandle (
- 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
);
-
-
/**
Locates the handle to a device on the device path that best matches the specified protocol.
@@ -1091,13 +994,11 @@ CoreLocateHandle (
EFI_STATUS
EFIAPI
CoreLocateDevicePath (
- IN EFI_GUID *Protocol,
- IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
- OUT EFI_HANDLE *Device
+ IN EFI_GUID *Protocol,
+ IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
+ OUT EFI_HANDLE *Device
);
-
-
/**
Function returns an array of handles that support the requested protocol
in a buffer allocated from pool. This is a version of CoreLocateHandle()
@@ -1123,15 +1024,13 @@ CoreLocateDevicePath (
EFI_STATUS
EFIAPI
CoreLocateHandleBuffer (
- IN EFI_LOCATE_SEARCH_TYPE SearchType,
- IN EFI_GUID *Protocol OPTIONAL,
- IN VOID *SearchKey OPTIONAL,
- IN OUT UINTN *NumberHandles,
- OUT EFI_HANDLE **Buffer
+ IN EFI_LOCATE_SEARCH_TYPE SearchType,
+ IN EFI_GUID *Protocol OPTIONAL,
+ IN VOID *SearchKey OPTIONAL,
+ IN OUT UINTN *NumberHandles,
+ OUT EFI_HANDLE **Buffer
);
-
-
/**
Return the first Protocol Interface that matches the Protocol GUID. If
Registration is passed in, return a Protocol Instance that was just add
@@ -1156,7 +1055,6 @@ CoreLocateProtocol (
OUT VOID **Interface
);
-
/**
return handle database key.
@@ -1169,7 +1067,6 @@ CoreGetHandleDatabaseKey (
VOID
);
-
/**
Go connect any handles that were created or modified while a image executed.
@@ -1182,8 +1079,6 @@ CoreConnectHandlesByKey (
UINT64 Key
);
-
-
/**
Connects one or more drivers to a controller.
@@ -1205,8 +1100,8 @@ CoreConnectHandlesByKey (
@retval EFI_NOT_FOUND 1) There are no EFI_DRIVER_BINDING_PROTOCOL instances
present in the system.
2) No drivers were connected to ControllerHandle.
- @retval EFI_SECURITY_VIOLATION
- The user has no permission to start UEFI device drivers on the device path
+ @retval EFI_SECURITY_VIOLATION
+ The user has no permission to start UEFI device drivers on the device path
associated with the ControllerHandle or specified by the RemainingDevicePath.
**/
@@ -1219,8 +1114,6 @@ CoreConnectController (
IN BOOLEAN Recursive
);
-
-
/**
Disonnects a controller from a driver
@@ -1261,8 +1154,6 @@ CoreDisconnectController (
IN EFI_HANDLE ChildHandle OPTIONAL
);
-
-
/**
Allocates pages from the memory map.
@@ -1284,9 +1175,9 @@ CoreDisconnectController (
EFI_STATUS
EFIAPI
CoreAllocatePages (
- 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
);
@@ -1304,8 +1195,8 @@ CoreAllocatePages (
EFI_STATUS
EFIAPI
CoreFreePages (
- IN EFI_PHYSICAL_ADDRESS Memory,
- IN UINTN NumberOfPages
+ IN EFI_PHYSICAL_ADDRESS Memory,
+ IN UINTN NumberOfPages
);
/**
@@ -1348,8 +1239,6 @@ CoreGetMemoryMap (
OUT UINT32 *DescriptorVersion
);
-
-
/**
Allocate pool of a particular type.
@@ -1404,7 +1293,7 @@ CoreInternalAllocatePool (
EFI_STATUS
EFIAPI
CoreFreePool (
- IN VOID *Buffer
+ IN VOID *Buffer
);
/**
@@ -1420,8 +1309,8 @@ CoreFreePool (
EFI_STATUS
EFIAPI
CoreInternalFreePool (
- IN VOID *Buffer,
- OUT EFI_MEMORY_TYPE *PoolType OPTIONAL
+ IN VOID *Buffer,
+ OUT EFI_MEMORY_TYPE *PoolType OPTIONAL
);
/**
@@ -1451,26 +1340,24 @@ CoreInternalFreePool (
@retval EFI_LOAD_ERROR Image was not loaded because the image format was corrupt or not
understood.
@retval EFI_DEVICE_ERROR Image was not loaded because the device returned a read error.
- @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the
+ @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the
image from being loaded. NULL is returned in *ImageHandle.
- @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a
- valid EFI_LOADED_IMAGE_PROTOCOL. However, the current
+ @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a
+ valid EFI_LOADED_IMAGE_PROTOCOL. However, the current
platform policy specifies that the image should not be started.
**/
EFI_STATUS
EFIAPI
CoreLoadImage (
- IN BOOLEAN BootPolicy,
- IN EFI_HANDLE ParentImageHandle,
- IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
- IN VOID *SourceBuffer OPTIONAL,
- IN UINTN SourceSize,
- OUT EFI_HANDLE *ImageHandle
+ IN BOOLEAN BootPolicy,
+ IN EFI_HANDLE ParentImageHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
+ IN VOID *SourceBuffer OPTIONAL,
+ IN UINTN SourceSize,
+ OUT EFI_HANDLE *ImageHandle
);
-
-
/**
Unloads an image.
@@ -1489,8 +1376,6 @@ CoreUnloadImage (
IN EFI_HANDLE ImageHandle
);
-
-
/**
Transfer control to a loaded image's entry point.
@@ -1518,8 +1403,6 @@ CoreStartImage (
OUT CHAR16 **ExitData OPTIONAL
);
-
-
/**
Terminates the currently loaded EFI image and returns control to boot services.
@@ -1552,8 +1435,6 @@ CoreExit (
IN CHAR16 *ExitData OPTIONAL
);
-
-
/**
Creates an event.
@@ -1575,15 +1456,13 @@ CoreExit (
EFI_STATUS
EFIAPI
CoreCreateEvent (
- IN UINT32 Type,
- IN EFI_TPL NotifyTpl,
- IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL
- IN VOID *NotifyContext, OPTIONAL
- OUT EFI_EVENT *Event
+ IN UINT32 Type,
+ IN EFI_TPL NotifyTpl,
+ IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL,
+ IN VOID *NotifyContext OPTIONAL,
+ OUT EFI_EVENT *Event
);
-
-
/**
Creates an event in a group.
@@ -1607,12 +1486,12 @@ CoreCreateEvent (
EFI_STATUS
EFIAPI
CoreCreateEventEx (
- IN UINT32 Type,
- IN EFI_TPL NotifyTpl,
- IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL
- IN CONST VOID *NotifyContext, OPTIONAL
- IN CONST EFI_GUID *EventGroup, OPTIONAL
- OUT EFI_EVENT *Event
+ IN UINT32 Type,
+ IN EFI_TPL NotifyTpl,
+ IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL,
+ IN CONST VOID *NotifyContext OPTIONAL,
+ IN CONST EFI_GUID *EventGroup OPTIONAL,
+ OUT EFI_EVENT *Event
);
/**
@@ -1638,12 +1517,12 @@ CoreCreateEventEx (
EFI_STATUS
EFIAPI
CoreCreateEventInternal (
- IN UINT32 Type,
- IN EFI_TPL NotifyTpl,
- IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL
- IN CONST VOID *NotifyContext, OPTIONAL
- IN CONST EFI_GUID *EventGroup, OPTIONAL
- OUT EFI_EVENT *Event
+ IN UINT32 Type,
+ IN EFI_TPL NotifyTpl,
+ IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL,
+ IN CONST VOID *NotifyContext OPTIONAL,
+ IN CONST EFI_GUID *EventGroup OPTIONAL,
+ OUT EFI_EVENT *Event
);
/**
@@ -1664,13 +1543,11 @@ CoreCreateEventInternal (
EFI_STATUS
EFIAPI
CoreSetTimer (
- IN EFI_EVENT UserEvent,
- IN EFI_TIMER_DELAY Type,
- IN UINT64 TriggerTime
+ IN EFI_EVENT UserEvent,
+ IN EFI_TIMER_DELAY Type,
+ IN UINT64 TriggerTime
);
-
-
/**
Signals the event. Queues the event to be notified if needed.
@@ -1683,11 +1560,9 @@ CoreSetTimer (
EFI_STATUS
EFIAPI
CoreSignalEvent (
- IN EFI_EVENT UserEvent
+ IN EFI_EVENT UserEvent
);
-
-
/**
Stops execution until an event is signaled.
@@ -1705,13 +1580,11 @@ CoreSignalEvent (
EFI_STATUS
EFIAPI
CoreWaitForEvent (
- IN UINTN NumberOfEvents,
- IN EFI_EVENT *UserEvents,
- OUT UINTN *UserIndex
+ IN UINTN NumberOfEvents,
+ IN EFI_EVENT *UserEvents,
+ OUT UINTN *UserIndex
);
-
-
/**
Closes an event and frees the event structure.
@@ -1724,11 +1597,9 @@ CoreWaitForEvent (
EFI_STATUS
EFIAPI
CoreCloseEvent (
- IN EFI_EVENT UserEvent
+ IN EFI_EVENT UserEvent
);
-
-
/**
Check the status of an event.
@@ -1742,10 +1613,9 @@ CoreCloseEvent (
EFI_STATUS
EFIAPI
CoreCheckEvent (
- IN EFI_EVENT UserEvent
+ IN EFI_EVENT UserEvent
);
-
/**
Adds reserved memory, system memory, or memory-mapped I/O resources to the
global coherency domain of the processor.
@@ -1767,7 +1637,6 @@ CoreAddMemorySpace (
IN UINT64 Capabilities
);
-
/**
Allocates nonexistent memory, reserved memory, system memory, or memorymapped
I/O resources from the global coherency domain of the processor.
@@ -1797,7 +1666,6 @@ CoreAllocateMemorySpace (
IN EFI_HANDLE DeviceHandle OPTIONAL
);
-
/**
Frees nonexistent memory, reserved memory, system memory, or memory-mapped
I/O resources from the global coherency domain of the processor.
@@ -1815,7 +1683,6 @@ CoreFreeMemorySpace (
IN UINT64 Length
);
-
/**
Removes reserved memory, system memory, or memory-mapped I/O resources from
the global coherency domain of the processor.
@@ -1833,7 +1700,6 @@ CoreRemoveMemorySpace (
IN UINT64 Length
);
-
/**
Retrieves the descriptor for a memory region containing a specified address.
@@ -1851,7 +1717,6 @@ CoreGetMemorySpaceDescriptor (
OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Descriptor
);
-
/**
Modifies the attributes for a memory region in the global coherency domain of the
processor.
@@ -1861,7 +1726,7 @@ CoreGetMemorySpaceDescriptor (
@param Attributes Specified attributes
@retval EFI_SUCCESS The attributes were set for the memory region.
- @retval EFI_INVALID_PARAMETER Length is zero.
+ @retval EFI_INVALID_PARAMETER Length is zero.
@retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory
resource range specified by BaseAddress and Length.
@retval EFI_UNSUPPORTED The bit mask of attributes is not support for the memory resource
@@ -1882,7 +1747,6 @@ CoreSetMemorySpaceAttributes (
IN UINT64 Attributes
);
-
/**
Modifies the capabilities for a memory region in the global coherency domain of the
processor.
@@ -1908,7 +1772,6 @@ CoreSetMemorySpaceCapabilities (
IN UINT64 Capabilities
);
-
/**
Returns a map of the memory resources in the global coherency domain of the
processor.
@@ -1928,7 +1791,6 @@ CoreGetMemorySpaceMap (
OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR **MemorySpaceMap
);
-
/**
Adds reserved I/O or I/O resources to the global coherency domain of the processor.
@@ -1948,7 +1810,6 @@ CoreAddIoSpace (
IN UINT64 Length
);
-
/**
Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency
domain of the processor.
@@ -1978,7 +1839,6 @@ CoreAllocateIoSpace (
IN EFI_HANDLE DeviceHandle OPTIONAL
);
-
/**
Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency
domain of the processor.
@@ -1996,7 +1856,6 @@ CoreFreeIoSpace (
IN UINT64 Length
);
-
/**
Removes reserved I/O or I/O resources from the global coherency domain of the
processor.
@@ -2014,7 +1873,6 @@ CoreRemoveIoSpace (
IN UINT64 Length
);
-
/**
Retrieves the descriptor for an I/O region containing a specified address.
@@ -2032,7 +1890,6 @@ CoreGetIoSpaceDescriptor (
OUT EFI_GCD_IO_SPACE_DESCRIPTOR *Descriptor
);
-
/**
Returns a map of the I/O resources in the global coherency domain of the processor.
@@ -2051,7 +1908,6 @@ CoreGetIoSpaceMap (
OUT EFI_GCD_IO_SPACE_DESCRIPTOR **IoSpaceMap
);
-
/**
This is the main Dispatcher for DXE and it exits when there are no more
drivers to run. Drain the mScheduledQueue and load and start a PE
@@ -2093,7 +1949,6 @@ CoreSchedule (
IN EFI_GUID *DriverName
);
-
/**
Convert a driver from the Untrused back to the Scheduled state.
@@ -2113,7 +1968,6 @@ CoreTrust (
IN EFI_GUID *DriverName
);
-
/**
This routine is the driver initialization entry point. It initializes the
libraries, and registers two notification functions. These notification
@@ -2128,11 +1982,10 @@ CoreTrust (
EFI_STATUS
EFIAPI
FwVolDriverInit (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
);
-
/**
Entry point of the section extraction code. Initializes an instance of the
section extraction interface and installs it on a new handle.
@@ -2147,11 +2000,10 @@ FwVolDriverInit (
EFI_STATUS
EFIAPI
InitializeSectionExtraction (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
);
-
/**
This DXE service routine is used to process a firmware volume. In
particular, it can be called by BDS to process a single firmware
@@ -2172,13 +2024,13 @@ InitializeSectionExtraction (
EFI_STATUS
EFIAPI
CoreProcessFirmwareVolume (
- IN VOID *FvHeader,
- IN UINTN Size,
- OUT EFI_HANDLE *FVProtocolHandle
+ IN VOID *FvHeader,
+ IN UINTN Size,
+ OUT EFI_HANDLE *FVProtocolHandle
);
//
-//Functions used during debug buils
+// Functions used during debug buils
//
/**
@@ -2191,7 +2043,6 @@ CoreDisplayMissingArchProtocols (
VOID
);
-
/**
Traverse the discovered list for any drivers that were discovered but not loaded
because the dependency experessions evaluated to false.
@@ -2202,21 +2053,6 @@ CoreDisplayDiscoveredNotDispatched (
VOID
);
-
-/**
- Place holder function until all the Boot Services and Runtime Services are
- available.
-
- @return EFI_NOT_AVAILABLE_YET
-
-**/
-EFI_STATUS
-EFIAPI
-CoreEfiNotAvailableYetArg0 (
- VOID
- );
-
-
/**
Place holder function until all the Boot Services and Runtime Services are
available.
@@ -2229,10 +2065,9 @@ CoreEfiNotAvailableYetArg0 (
EFI_STATUS
EFIAPI
CoreEfiNotAvailableYetArg1 (
- UINTN Arg1
+ UINTN Arg1
);
-
/**
Place holder function until all the Boot Services and Runtime Services are available.
@@ -2245,11 +2080,10 @@ CoreEfiNotAvailableYetArg1 (
EFI_STATUS
EFIAPI
CoreEfiNotAvailableYetArg2 (
- UINTN Arg1,
- UINTN Arg2
+ UINTN Arg1,
+ UINTN Arg2
);
-
/**
Place holder function until all the Boot Services and Runtime Services are available.
@@ -2263,12 +2097,11 @@ CoreEfiNotAvailableYetArg2 (
EFI_STATUS
EFIAPI
CoreEfiNotAvailableYetArg3 (
- UINTN Arg1,
- UINTN Arg2,
- UINTN Arg3
+ UINTN Arg1,
+ UINTN Arg2,
+ UINTN Arg3
);
-
/**
Place holder function until all the Boot Services and Runtime Services are available.
@@ -2283,13 +2116,12 @@ CoreEfiNotAvailableYetArg3 (
EFI_STATUS
EFIAPI
CoreEfiNotAvailableYetArg4 (
- UINTN Arg1,
- UINTN Arg2,
- UINTN Arg3,
- UINTN Arg4
+ UINTN Arg1,
+ UINTN Arg2,
+ UINTN Arg3,
+ UINTN Arg4
);
-
/**
Place holder function until all the Boot Services and Runtime Services are available.
@@ -2305,14 +2137,13 @@ CoreEfiNotAvailableYetArg4 (
EFI_STATUS
EFIAPI
CoreEfiNotAvailableYetArg5 (
- UINTN Arg1,
- UINTN Arg2,
- UINTN Arg3,
- UINTN Arg4,
- UINTN Arg5
+ UINTN Arg1,
+ UINTN Arg2,
+ UINTN Arg3,
+ UINTN Arg4,
+ UINTN Arg5
);
-
/**
Given a compressed source buffer, this function retrieves the size of the
uncompressed buffer and the size of the scratch buffer required to decompress
@@ -2355,14 +2186,13 @@ CoreEfiNotAvailableYetArg5 (
EFI_STATUS
EFIAPI
DxeMainUefiDecompressGetInfo (
- IN EFI_DECOMPRESS_PROTOCOL *This,
- IN VOID *Source,
- IN UINT32 SourceSize,
- OUT UINT32 *DestinationSize,
- OUT UINT32 *ScratchSize
+ IN EFI_DECOMPRESS_PROTOCOL *This,
+ IN VOID *Source,
+ IN UINT32 SourceSize,
+ OUT UINT32 *DestinationSize,
+ OUT UINT32 *ScratchSize
);
-
/**
Decompresses a compressed source buffer.
@@ -2400,13 +2230,13 @@ DxeMainUefiDecompressGetInfo (
EFI_STATUS
EFIAPI
DxeMainUefiDecompress (
- IN EFI_DECOMPRESS_PROTOCOL *This,
- IN VOID *Source,
- IN UINT32 SourceSize,
- IN OUT VOID *Destination,
- IN UINT32 DestinationSize,
- IN OUT VOID *Scratch,
- IN UINT32 ScratchSize
+ IN EFI_DECOMPRESS_PROTOCOL *This,
+ IN VOID *Source,
+ IN UINT32 SourceSize,
+ IN OUT VOID *Destination,
+ IN UINT32 DestinationSize,
+ IN OUT VOID *Scratch,
+ IN UINT32 ScratchSize
);
/**
@@ -2427,13 +2257,11 @@ DxeMainUefiDecompress (
EFI_STATUS
EFIAPI
OpenSectionStream (
- IN UINTN SectionStreamLength,
- IN VOID *SectionStream,
- OUT UINTN *SectionStreamHandle
+ IN UINTN SectionStreamLength,
+ IN VOID *SectionStream,
+ OUT UINTN *SectionStreamHandle
);
-
-
/**
SEP member function. Retrieves requested section from section stream.
@@ -2495,17 +2323,16 @@ OpenSectionStream (
EFI_STATUS
EFIAPI
GetSection (
- IN UINTN SectionStreamHandle,
- IN EFI_SECTION_TYPE *SectionType,
- IN EFI_GUID *SectionDefinitionGuid,
- IN UINTN SectionInstance,
- IN VOID **Buffer,
- IN OUT UINTN *BufferSize,
- OUT UINT32 *AuthenticationStatus,
- IN BOOLEAN IsFfs3Fv
+ IN UINTN SectionStreamHandle,
+ IN EFI_SECTION_TYPE *SectionType,
+ IN EFI_GUID *SectionDefinitionGuid,
+ IN UINTN SectionInstance,
+ IN VOID **Buffer,
+ IN OUT UINTN *BufferSize,
+ OUT UINT32 *AuthenticationStatus,
+ IN BOOLEAN IsFfs3Fv
);
-
/**
SEP member function. Deletes an existing section stream
@@ -2522,8 +2349,8 @@ GetSection (
EFI_STATUS
EFIAPI
CloseSectionStream (
- IN UINTN StreamHandleToClose,
- IN BOOLEAN FreeStreamBuffer
+ IN UINTN StreamHandleToClose,
+ IN BOOLEAN FreeStreamBuffer
);
/**
@@ -2542,7 +2369,6 @@ CoreInitializeDebugImageInfoTable (
VOID
);
-
/**
Update the CRC32 in the Debug Table.
Since the CRC32 service is made available by the Runtime driver, we have to
@@ -2556,7 +2382,6 @@ CoreUpdateDebugTableCrc32 (
VOID
);
-
/**
Adds a new DebugImageInfo structure to the DebugImageInfo Table. Re-Allocates
the table if it's not large enough to accomidate another entry.
@@ -2569,12 +2394,11 @@ CoreUpdateDebugTableCrc32 (
**/
VOID
CoreNewDebugImageInfoEntry (
- IN UINT32 ImageInfoType,
- IN EFI_LOADED_IMAGE_PROTOCOL *LoadedImage,
- IN EFI_HANDLE ImageHandle
+ IN UINT32 ImageInfoType,
+ IN EFI_LOADED_IMAGE_PROTOCOL *LoadedImage,
+ IN EFI_HANDLE ImageHandle
);
-
/**
Removes and frees an entry from the DebugImageInfo Table.
@@ -2583,10 +2407,9 @@ CoreNewDebugImageInfoEntry (
**/
VOID
CoreRemoveDebugImageInfoEntry (
- EFI_HANDLE ImageHandle
+ EFI_HANDLE ImageHandle
);
-
/**
This routine consumes FV hobs and produces instances of FW_VOL_BLOCK_PROTOCOL as appropriate.
@@ -2600,8 +2423,8 @@ CoreRemoveDebugImageInfoEntry (
EFI_STATUS
EFIAPI
FwVolBlockDriverInit (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
);
/**
@@ -2615,7 +2438,7 @@ FwVolBlockDriverInit (
**/
UINT32
GetFvbAuthenticationStatus (
- IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvbProtocol
+ IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvbProtocol
);
/**
@@ -2639,14 +2462,13 @@ GetFvbAuthenticationStatus (
**/
EFI_STATUS
ProduceFVBProtocolOnBuffer (
- IN EFI_PHYSICAL_ADDRESS BaseAddress,
- IN UINT64 Length,
- IN EFI_HANDLE ParentHandle,
- IN UINT32 AuthenticationStatus,
- OUT EFI_HANDLE *FvProtocol OPTIONAL
+ IN EFI_PHYSICAL_ADDRESS BaseAddress,
+ IN UINT64 Length,
+ IN EFI_HANDLE ParentHandle,
+ IN UINT32 AuthenticationStatus,
+ OUT EFI_HANDLE *FvProtocol OPTIONAL
);
-
/**
Raising to the task priority level of the mutual exclusion
lock, and then acquires ownership of the lock.
@@ -2661,7 +2483,6 @@ CoreAcquireLock (
IN EFI_LOCK *Lock
);
-
/**
Initialize a basic mutual exclusion lock. Each lock
provides mutual exclusion access at it's task priority
@@ -2680,7 +2501,6 @@ CoreAcquireLockOrFail (
IN EFI_LOCK *Lock
);
-
/**
Releases ownership of the mutual exclusion lock, and
restores the previous task priority level.
@@ -2696,7 +2516,7 @@ CoreReleaseLock (
);
/**
- Read data from Firmware Block by FVB protocol Read.
+ Read data from Firmware Block by FVB protocol Read.
The data may cross the multi block ranges.
@param Fvb The FW_VOL_BLOCK_PROTOCOL instance from which to read data.
@@ -2714,11 +2534,11 @@ CoreReleaseLock (
**/
EFI_STATUS
ReadFvbData (
- IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb,
- IN OUT EFI_LBA *StartLba,
- IN OUT UINTN *Offset,
- IN UINTN DataSize,
- OUT UINT8 *Data
+ IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb,
+ IN OUT EFI_LBA *StartLba,
+ IN OUT UINTN *Offset,
+ IN UINTN DataSize,
+ OUT UINT8 *Data
);
/**
@@ -2739,8 +2559,8 @@ ReadFvbData (
**/
EFI_STATUS
GetFwVolHeader (
- IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb,
- OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader
+ IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb,
+ OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader
);
/**
@@ -2754,7 +2574,7 @@ GetFwVolHeader (
**/
BOOLEAN
VerifyFvHeaderChecksum (
- IN EFI_FIRMWARE_VOLUME_HEADER *FvHeader
+ IN EFI_FIRMWARE_VOLUME_HEADER *FvHeader
);
/**
@@ -2765,7 +2585,7 @@ VerifyFvHeaderChecksum (
**/
VOID
MemoryProfileInit (
- IN VOID *HobStart
+ IN VOID *HobStart
);
/**
@@ -2860,15 +2680,6 @@ CoreUpdateMemoryAttributes (
IN UINT64 NewAttributes
);
-/**
- Initialize PropertiesTable support.
-**/
-VOID
-EFIAPI
-CoreInitializePropertiesTable (
- VOID
- );
-
/**
Initialize MemoryAttrubutesTable support.
**/
@@ -2894,7 +2705,7 @@ CoreInitializeMemoryProtection (
**/
VOID
InstallMemoryAttributesTableOnMemoryAllocation (
- IN EFI_MEMORY_TYPE MemoryType
+ IN EFI_MEMORY_TYPE MemoryType
);
/**
@@ -2925,8 +2736,8 @@ RemoveImageRecord (
**/
VOID
ProtectUefiImage (
- IN EFI_LOADED_IMAGE_PROTOCOL *LoadedImage,
- IN EFI_DEVICE_PATH_PROTOCOL *LoadedImageDevicePath
+ IN EFI_LOADED_IMAGE_PROTOCOL *LoadedImage,
+ IN EFI_DEVICE_PATH_PROTOCOL *LoadedImageDevicePath
);
/**
@@ -2937,8 +2748,8 @@ ProtectUefiImage (
**/
VOID
UnprotectUefiImage (
- IN EFI_LOADED_IMAGE_PROTOCOL *LoadedImage,
- IN EFI_DEVICE_PATH_PROTOCOL *LoadedImageDevicePath
+ IN EFI_LOADED_IMAGE_PROTOCOL *LoadedImage,
+ IN EFI_DEVICE_PATH_PROTOCOL *LoadedImageDevicePath
);
/**
@@ -2949,4 +2760,46 @@ MemoryProtectionExitBootServicesCallback (
VOID
);
+/**
+ Manage memory permission attributes on a memory range, according to the
+ configured DXE memory protection policy.
+
+ @param OldType The old memory type of the range
+ @param NewType The new memory type of the range
+ @param Memory The base address of the range
+ @param Length The size of the range (in bytes)
+
+ @return EFI_SUCCESS If the the CPU arch protocol is not installed yet
+ @return EFI_SUCCESS If no DXE memory protection policy has been configured
+ @return EFI_SUCCESS If OldType and NewType use the same permission attributes
+ @return other Return value of gCpu->SetMemoryAttributes()
+
+**/
+EFI_STATUS
+EFIAPI
+ApplyMemoryProtectionPolicy (
+ IN EFI_MEMORY_TYPE OldType,
+ IN EFI_MEMORY_TYPE NewType,
+ IN EFI_PHYSICAL_ADDRESS Memory,
+ IN UINT64 Length
+ );
+
+/**
+ Merge continous memory map entries whose have same attributes.
+
+ @param MemoryMap A pointer to the buffer in which firmware places
+ the current memory map.
+ @param MemoryMapSize A pointer to the size, in bytes, of the
+ MemoryMap buffer. On input, this is the size of
+ the current memory map. On output,
+ it is the size of new memory map after merge.
+ @param DescriptorSize Size, in bytes, of an individual EFI_MEMORY_DESCRIPTOR.
+**/
+VOID
+MergeMemoryMap (
+ IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap,
+ IN OUT UINTN *MemoryMapSize,
+ IN UINTN DescriptorSize
+ );
+
#endif