]>
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 | |
022c6d45 | 19 | #define FOUR_MEG_PAGES 0x400\r |
28a00297 | 20 | #define FOUR_MEG_MASK ((FOUR_MEG_PAGES * EFI_PAGE_SIZE) - 1)\r |
21 | \r | |
22 | #define EFI_DEBUG_TABLE_ENTRY_SIZE (sizeof (VOID *))\r | |
23 | \r | |
28a00297 | 24 | \r |
162ed594 | 25 | /**\r |
28a00297 | 26 | Creates and initializes the DebugImageInfo Table. Also creates the configuration\r |
27 | table and registers it into the system table.\r | |
28 | \r | |
162ed594 | 29 | Note:\r |
30 | This function allocates memory, frees it, and then allocates memory at an\r | |
31 | address within the initial allocation. Since this function is called early\r | |
32 | in DXE core initialization (before drivers are dispatched), this should not\r | |
33 | be a problem.\r | |
28a00297 | 34 | \r |
162ed594 | 35 | **/\r |
28a00297 | 36 | VOID\r |
162ed594 | 37 | CoreInitializeDebugImageInfoTable (\r |
28a00297 | 38 | VOID\r |
23c98c94 | 39 | );\r |
28a00297 | 40 | \r |
28a00297 | 41 | \r |
162ed594 | 42 | /**\r |
28a00297 | 43 | Update the CRC32 in the Debug Table.\r |
44 | Since the CRC32 service is made available by the Runtime driver, we have to\r | |
45 | wait for the Runtime Driver to be installed before the CRC32 can be computed.\r | |
46 | This function is called elsewhere by the core when the runtime architectural\r | |
47 | protocol is produced.\r | |
48 | \r | |
162ed594 | 49 | **/\r |
50 | VOID\r | |
51 | CoreUpdateDebugTableCrc32 (\r | |
52 | VOID\r | |
23c98c94 | 53 | );\r |
28a00297 | 54 | \r |
28a00297 | 55 | \r |
162ed594 | 56 | /**\r |
57 | Adds a new DebugImageInfo structure to the DebugImageInfo Table. Re-Allocates\r | |
58 | the table if it's not large enough to accomidate another entry.\r | |
59 | \r | |
022c6d45 | 60 | @param ImageInfoType type of debug image information\r |
61 | @param LoadedImage pointer to the loaded image protocol for the image being\r | |
62 | loaded\r | |
162ed594 | 63 | @param ImageHandle image handle for the image being loaded\r |
28a00297 | 64 | \r |
162ed594 | 65 | **/\r |
28a00297 | 66 | VOID\r |
67 | CoreNewDebugImageInfoEntry (\r | |
23c98c94 | 68 | IN UINT32 ImageInfoType,\r |
69 | IN EFI_LOADED_IMAGE_PROTOCOL *LoadedImage,\r | |
70 | IN EFI_HANDLE ImageHandle\r | |
71 | );\r | |
28a00297 | 72 | \r |
28a00297 | 73 | \r |
162ed594 | 74 | /**\r |
75 | Removes and frees an entry from the DebugImageInfo Table.\r | |
28a00297 | 76 | \r |
162ed594 | 77 | @param ImageHandle image handle for the image being unloaded\r |
28a00297 | 78 | \r |
162ed594 | 79 | **/\r |
28a00297 | 80 | VOID\r |
81 | CoreRemoveDebugImageInfoEntry (\r | |
82 | EFI_HANDLE ImageHandle\r | |
23c98c94 | 83 | );\r |
28a00297 | 84 | \r |
85 | #endif\r |