]>
Commit | Line | Data |
---|---|---|
23c98c94 | 1 | /** @file\r |
504214c4 LG |
2 | Support functions for managing debug image info table when loading and unloading\r |
3 | images.\r | |
4 | \r | |
23c98c94 | 5 | Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r |
6 | All rights reserved. This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
28a00297 | 13 | \r |
504214c4 | 14 | **/\r |
28a00297 | 15 | \r |
16 | #ifndef __DEBUG_IMAGE_INFO_H__\r | |
17 | #define __DEBUG_IMAGE_INFO_H__\r | |
18 | \r | |
19e14fc9 | 19 | #define FOUR_MEG_ALIGNMENT 0x400000\r |
28a00297 | 20 | \r |
21 | #define EFI_DEBUG_TABLE_ENTRY_SIZE (sizeof (VOID *))\r | |
22 | \r | |
28a00297 | 23 | \r |
162ed594 | 24 | /**\r |
28a00297 | 25 | Creates and initializes the DebugImageInfo Table. Also creates the configuration\r |
26 | table and registers it into the system table.\r | |
27 | \r | |
162ed594 | 28 | Note:\r |
29 | This function allocates memory, frees it, and then allocates memory at an\r | |
30 | address within the initial allocation. Since this function is called early\r | |
31 | in DXE core initialization (before drivers are dispatched), this should not\r | |
32 | be a problem.\r | |
28a00297 | 33 | \r |
162ed594 | 34 | **/\r |
28a00297 | 35 | VOID\r |
162ed594 | 36 | CoreInitializeDebugImageInfoTable (\r |
28a00297 | 37 | VOID\r |
23c98c94 | 38 | );\r |
28a00297 | 39 | \r |
28a00297 | 40 | \r |
162ed594 | 41 | /**\r |
28a00297 | 42 | Update the CRC32 in the Debug Table.\r |
43 | Since the CRC32 service is made available by the Runtime driver, we have to\r | |
44 | wait for the Runtime Driver to be installed before the CRC32 can be computed.\r | |
45 | This function is called elsewhere by the core when the runtime architectural\r | |
46 | protocol is produced.\r | |
47 | \r | |
162ed594 | 48 | **/\r |
49 | VOID\r | |
50 | CoreUpdateDebugTableCrc32 (\r | |
51 | VOID\r | |
23c98c94 | 52 | );\r |
28a00297 | 53 | \r |
28a00297 | 54 | \r |
162ed594 | 55 | /**\r |
56 | Adds a new DebugImageInfo structure to the DebugImageInfo Table. Re-Allocates\r | |
57 | the table if it's not large enough to accomidate another entry.\r | |
58 | \r | |
022c6d45 | 59 | @param ImageInfoType type of debug image information\r |
60 | @param LoadedImage pointer to the loaded image protocol for the image being\r | |
61 | loaded\r | |
162ed594 | 62 | @param ImageHandle image handle for the image being loaded\r |
28a00297 | 63 | \r |
162ed594 | 64 | **/\r |
28a00297 | 65 | VOID\r |
66 | CoreNewDebugImageInfoEntry (\r | |
23c98c94 | 67 | IN UINT32 ImageInfoType,\r |
68 | IN EFI_LOADED_IMAGE_PROTOCOL *LoadedImage,\r | |
69 | IN EFI_HANDLE ImageHandle\r | |
70 | );\r | |
28a00297 | 71 | \r |
28a00297 | 72 | \r |
162ed594 | 73 | /**\r |
74 | Removes and frees an entry from the DebugImageInfo Table.\r | |
28a00297 | 75 | \r |
162ed594 | 76 | @param ImageHandle image handle for the image being unloaded\r |
28a00297 | 77 | \r |
162ed594 | 78 | **/\r |
28a00297 | 79 | VOID\r |
80 | CoreRemoveDebugImageInfoEntry (\r | |
81 | EFI_HANDLE ImageHandle\r | |
23c98c94 | 82 | );\r |
28a00297 | 83 | \r |
84 | #endif\r |