+CoreUpdateProfile (\r
+ IN EFI_PHYSICAL_ADDRESS CallerAddress,\r
+ IN MEMORY_PROFILE_ACTION Action,\r
+ IN EFI_MEMORY_TYPE MemoryType,\r
+ IN UINTN Size, // Valid for AllocatePages/FreePages/AllocatePool\r
+ IN VOID *Buffer,\r
+ IN CHAR8 *ActionString OPTIONAL\r
+ );\r
+\r
+/**\r
+ Internal function. Converts a memory range to use new attributes.\r
+\r
+ @param Start The first address of the range Must be page\r
+ aligned\r
+ @param NumberOfPages The number of pages to convert\r
+ @param NewAttributes The new attributes value for the range.\r
+\r
+**/\r
+VOID\r
+CoreUpdateMemoryAttributes (\r
+ IN EFI_PHYSICAL_ADDRESS Start,\r
+ IN UINT64 NumberOfPages,\r
+ IN UINT64 NewAttributes\r
+ );\r
+\r
+/**\r
+ Initialize PropertiesTable support.\r
+**/\r
+VOID\r
+EFIAPI\r
+CoreInitializePropertiesTable (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ Initialize MemoryAttrubutesTable support.\r
+**/\r
+VOID\r
+EFIAPI\r
+CoreInitializeMemoryAttributesTable (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ Initialize Memory Protection support.\r
+**/\r
+VOID\r
+EFIAPI\r
+CoreInitializeMemoryProtection (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ Install MemoryAttributesTable on memory allocation.\r
+\r
+ @param[in] MemoryType EFI memory type.\r
+**/\r
+VOID\r
+InstallMemoryAttributesTableOnMemoryAllocation (\r
+ IN EFI_MEMORY_TYPE MemoryType\r
+ );\r
+\r
+/**\r
+ Insert image record.\r
+\r
+ @param RuntimeImage Runtime image information\r
+**/\r
+VOID\r
+InsertImageRecord (\r
+ IN EFI_RUNTIME_IMAGE_ENTRY *RuntimeImage\r
+ );\r
+\r
+/**\r
+ Remove Image record.\r
+\r
+ @param RuntimeImage Runtime image information\r
+**/\r
+VOID\r
+RemoveImageRecord (\r
+ IN EFI_RUNTIME_IMAGE_ENTRY *RuntimeImage\r
+ );\r
+\r
+/**\r
+ Protect UEFI image.\r
+\r
+ @param[in] LoadedImage The loaded image protocol\r
+ @param[in] LoadedImageDevicePath The loaded image device path protocol\r
+**/\r
+VOID\r
+ProtectUefiImage (\r
+ IN EFI_LOADED_IMAGE_PROTOCOL *LoadedImage,\r
+ IN EFI_DEVICE_PATH_PROTOCOL *LoadedImageDevicePath\r
+ );\r
+\r
+/**\r
+ Unprotect UEFI image.\r
+\r
+ @param[in] LoadedImage The loaded image protocol\r
+ @param[in] LoadedImageDevicePath The loaded image device path protocol\r
+**/\r
+VOID\r
+UnprotectUefiImage (\r
+ IN EFI_LOADED_IMAGE_PROTOCOL *LoadedImage,\r
+ IN EFI_DEVICE_PATH_PROTOCOL *LoadedImageDevicePath\r
+ );\r
+\r
+/**\r
+ ExitBootServices Callback function for memory protection.\r
+**/\r
+VOID\r
+MemoryProtectionExitBootServicesCallback (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ Manage memory permission attributes on a memory range, according to the\r
+ configured DXE memory protection policy.\r
+\r
+ @param OldType The old memory type of the range\r
+ @param NewType The new memory type of the range\r
+ @param Memory The base address of the range\r
+ @param Length The size of the range (in bytes)\r
+\r
+ @return EFI_SUCCESS If the the CPU arch protocol is not installed yet\r
+ @return EFI_SUCCESS If no DXE memory protection policy has been configured\r
+ @return EFI_SUCCESS If OldType and NewType use the same permission attributes\r
+ @return other Return value of gCpu->SetMemoryAttributes()\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+ApplyMemoryProtectionPolicy (\r
+ IN EFI_MEMORY_TYPE OldType,\r
+ IN EFI_MEMORY_TYPE NewType,\r
+ IN EFI_PHYSICAL_ADDRESS Memory,\r
+ IN UINT64 Length\r
+ );\r
+\r
+/**\r
+ Merge continous memory map entries whose have same attributes.\r
+\r
+ @param MemoryMap A pointer to the buffer in which firmware places\r
+ the current memory map.\r
+ @param MemoryMapSize A pointer to the size, in bytes, of the\r
+ MemoryMap buffer. On input, this is the size of\r
+ the current memory map. On output,\r
+ it is the size of new memory map after merge.\r
+ @param DescriptorSize Size, in bytes, of an individual EFI_MEMORY_DESCRIPTOR.\r
+**/\r
+VOID\r
+MergeMemoryMap (\r
+ IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap,\r
+ IN OUT UINTN *MemoryMapSize,\r
+ IN UINTN DescriptorSize\r