+\r
+/**\r
+ An empty function to pass error checking of CreateEventEx ().\r
+\r
+ @param Event Event whose notification function is being invoked.\r
+ @param Context Pointer to the notification function's context,\r
+ which is implementation-dependent.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+CoreEmptyCallbackFunction (\r
+ IN EFI_EVENT Event,\r
+ IN VOID *Context\r
+ );\r
+\r
+/**\r
+ Read data from Firmware Block by FVB protocol Read. \r
+ The data may cross the multi block ranges.\r
+\r
+ @param Fvb The FW_VOL_BLOCK_PROTOCOL instance from which to read data.\r
+ @param StartLba Pointer to StartLba.\r
+ On input, the start logical block index from which to read.\r
+ On output,the end logical block index after reading.\r
+ @param Offset Pointer to Offset\r
+ On input, offset into the block at which to begin reading.\r
+ On output, offset into the end block after reading.\r
+ @param DataSize Size of data to be read.\r
+ @param Data Pointer to Buffer that the data will be read into.\r
+\r
+ @retval EFI_SUCCESS Successfully read data from firmware block.\r
+ @retval others\r
+**/\r
+EFI_STATUS\r
+ReadFvbData (\r
+ IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb,\r
+ IN OUT EFI_LBA *StartLba,\r
+ IN OUT UINTN *Offset,\r
+ IN UINTN DataSize,\r
+ OUT UINT8 *Data\r
+ );\r
+\r
+/**\r
+ Given the supplied FW_VOL_BLOCK_PROTOCOL, allocate a buffer for output and\r
+ copy the real length volume header into it.\r
+\r
+ @param Fvb The FW_VOL_BLOCK_PROTOCOL instance from which to\r
+ read the volume header\r
+ @param FwVolHeader Pointer to pointer to allocated buffer in which\r
+ the volume header is returned.\r
+\r
+ @retval EFI_OUT_OF_RESOURCES No enough buffer could be allocated.\r
+ @retval EFI_SUCCESS Successfully read volume header to the allocated\r
+ buffer.\r
+ @retval EFI_INVALID_PARAMETER The FV Header signature is not as expected or\r
+ the file system could not be understood.\r
+\r
+**/\r
+EFI_STATUS\r
+GetFwVolHeader (\r
+ IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb,\r
+ OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader\r
+ );\r
+\r
+/**\r
+ Verify checksum of the firmware volume header.\r
+\r
+ @param FvHeader Points to the firmware volume header to be checked\r
+\r
+ @retval TRUE Checksum verification passed\r
+ @retval FALSE Checksum verification failed\r
+\r
+**/\r
+BOOLEAN\r
+VerifyFvHeaderChecksum (\r
+ IN EFI_FIRMWARE_VOLUME_HEADER *FvHeader\r
+ );\r
+\r
+/**\r
+ Initialize memory profile.\r
+\r
+ @param HobStart The start address of the HOB.\r
+\r
+**/\r
+VOID\r
+MemoryProfileInit (\r
+ IN VOID *HobStart\r
+ );\r
+\r
+/**\r
+ Install memory profile protocol.\r
+\r
+**/\r
+VOID\r
+MemoryProfileInstallProtocol (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ Register image to memory profile.\r
+\r
+ @param DriverEntry Image info.\r
+ @param FileType Image file type.\r
+\r
+ @retval TRUE Register success.\r
+ @retval FALSE Register fail.\r
+\r
+**/\r
+BOOLEAN\r
+RegisterMemoryProfileImage (\r
+ IN LOADED_IMAGE_PRIVATE_DATA *DriverEntry,\r
+ IN EFI_FV_FILETYPE FileType\r
+ );\r
+\r
+/**\r
+ Unregister image from memory profile.\r
+\r
+ @param DriverEntry Image info.\r
+\r
+ @retval TRUE Unregister success.\r
+ @retval FALSE Unregister fail.\r
+\r
+**/\r
+BOOLEAN\r
+UnregisterMemoryProfileImage (\r
+ IN LOADED_IMAGE_PRIVATE_DATA *DriverEntry\r
+ );\r
+\r
+/**\r
+ Update memory profile information.\r
+\r
+ @param CallerAddress Address of caller who call Allocate or Free.\r
+ @param Action This Allocate or Free action.\r
+ @param MemoryType Memory type.\r
+ @param Size Buffer size.\r
+ @param Buffer Buffer address.\r
+\r
+ @retval TRUE Profile udpate success.\r
+ @retval FALSE Profile update fail.\r
+\r
+**/\r
+BOOLEAN\r
+CoreUpdateProfile (\r
+ IN EFI_PHYSICAL_ADDRESS CallerAddress,\r
+ IN MEMORY_PROFILE_ACTION Action,\r
+ IN EFI_MEMORY_TYPE MemoryType, // Valid for AllocatePages/AllocatePool\r
+ IN UINTN Size, // Valid for AllocatePages/FreePages/AllocatePool\r
+ IN VOID *Buffer\r
+ );\r
+\r