X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FCore%2FDxe%2FMisc%2FDebugImageInfo.c;h=e318b4239f4f9e5f9dc4debd13cc02cbd9984b42;hp=90e5738532acce6884139a8025ac38ca73c1d575;hb=162ed594438ab8d39f89b43e6d645ca24e1e1e65;hpb=dc2e539a344115537c1d3883ba96eaade345827b diff --git a/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c b/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c index 90e5738532..e318b4239f 100644 --- a/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c +++ b/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c @@ -26,30 +26,22 @@ static EFI_DEBUG_IMAGE_INFO_TABLE_HEADER mDebugInfoTableHeader = { static EFI_SYSTEM_TABLE_POINTER *mDebugTable = NULL; -VOID -CoreInitializeDebugImageInfoTable ( - VOID - ) -/*++ - -Routine Description: +/** Creates and initializes the DebugImageInfo Table. Also creates the configuration table and registers it into the system table. -Arguments: - None - -Returns: - NA - -Notes: - This function allocates memory, frees it, and then allocates memory at an - address within the initial allocation. Since this function is called early - in DXE core initialization (before drivers are dispatched), this should not - be a problem. + Note: + This function allocates memory, frees it, and then allocates memory at an + address within the initial allocation. Since this function is called early + in DXE core initialization (before drivers are dispatched), this should not + be a problem. ---*/ +**/ +VOID +CoreInitializeDebugImageInfoTable ( + VOID + ) { EFI_STATUS Status; EFI_PHYSICAL_ADDRESS Mem; @@ -97,56 +89,42 @@ Notes: ASSERT_EFI_ERROR (Status); } -VOID -CoreUpdateDebugTableCrc32 ( - VOID - ) -/*++ - -Routine Description: +/** Update the CRC32 in the Debug Table. Since the CRC32 service is made available by the Runtime driver, we have to wait for the Runtime Driver to be installed before the CRC32 can be computed. This function is called elsewhere by the core when the runtime architectural protocol is produced. -Arguments: - None - -Returns: - NA - ---*/ +**/ +VOID +CoreUpdateDebugTableCrc32 ( + VOID + ) { ASSERT(mDebugTable != NULL); mDebugTable->Crc32 = 0; gDxeCoreBS->CalculateCrc32 ((VOID *)mDebugTable, sizeof (EFI_SYSTEM_TABLE_POINTER), &mDebugTable->Crc32); } + +/** + Adds a new DebugImageInfo structure to the DebugImageInfo Table. Re-Allocates + the table if it's not large enough to accomidate another entry. + + @param ImageInfoType type of debug image information + @param LoadedImage pointer to the loaded image protocol for the image being + loaded + @param ImageHandle image handle for the image being loaded + +**/ VOID CoreNewDebugImageInfoEntry ( IN UINT32 ImageInfoType, IN EFI_LOADED_IMAGE_PROTOCOL *LoadedImage, IN EFI_HANDLE ImageHandle ) -/*++ - -Routine Description: - - Adds a new DebugImageInfo structure to the DebugImageInfo Table. Re-Allocates - the table if it's not large enough to accomidate another entry. - -Arguments: - - ImageInfoType - type of debug image information - LoadedImage - pointer to the loaded image protocol for the image being loaded - ImageHandle - image handle for the image being loaded - -Returns: - NA - ---*/ { EFI_DEBUG_IMAGE_INFO *Table; EFI_DEBUG_IMAGE_INFO *NewTable; @@ -211,25 +189,17 @@ Returns: } -VOID -CoreRemoveDebugImageInfoEntry ( - EFI_HANDLE ImageHandle - ) -/*++ - -Routine Description: +/** Removes and frees an entry from the DebugImageInfo Table. -Arguments: - - ImageHandle - image handle for the image being unloaded - -Returns: - - NA + @param ImageHandle image handle for the image being unloaded ---*/ +**/ +VOID +CoreRemoveDebugImageInfoEntry ( + EFI_HANDLE ImageHandle + ) { EFI_DEBUG_IMAGE_INFO *Table; UINTN Index; @@ -252,3 +222,4 @@ Returns: mDebugInfoTableHeader.UpdateStatus &= ~EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS; } +