X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FCore%2FDxe%2FDxeMain.h;h=7ec82388a3f9f05fc0aa9c60b7f7b5ed9068b62a;hp=5668c1f2d64837c50fdca2a9ff64e825e2a9c38c;hb=9917def3294bac4d14cd86ba382652aa41c6c1d6;hpb=7eb927db3e25afdda1a5c5458c54bb79afc5bc8f diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h b/MdeModulePkg/Core/Dxe/DxeMain.h index 5668c1f2d6..7ec82388a3 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.h +++ b/MdeModulePkg/Core/Dxe/DxeMain.h @@ -2,7 +2,7 @@ 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.
+Copyright (c) 2006 - 2018, 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 @@ -123,31 +123,6 @@ 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; @@ -223,43 +198,43 @@ typedef struct { typedef struct { 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; + UINT16 Machine; /// EBC Protocol pointer - EFI_EBC_PROTOCOL *Ebc; + EFI_EBC_PROTOCOL *Ebc; /// 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; } LOADED_IMAGE_PRIVATE_DATA; @@ -1205,8 +1180,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. **/ @@ -1451,10 +1426,10 @@ 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. **/ @@ -1861,7 +1836,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 @@ -2696,7 +2671,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. @@ -2973,4 +2948,22 @@ ApplyMemoryProtectionPolicy ( 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