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