1. Sync definition of EFI_DEBUG_IMAGE_INFO with UEFI spec
[mirror_edk2.git] / EdkModulePkg / Core / Dxe / DebugImageInfo.h
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 DebugImageInfo.h
15
16 Abstract:
17
18 Support functions for managing debug image info table when loading and unloading
19 images.
20
21 --*/
22
23 #ifndef __DEBUG_IMAGE_INFO_H__
24 #define __DEBUG_IMAGE_INFO_H__
25
26 #define FOUR_MEG_PAGES 0x400
27 #define FOUR_MEG_MASK ((FOUR_MEG_PAGES * EFI_PAGE_SIZE) - 1)
28
29 #define EFI_DEBUG_TABLE_ENTRY_SIZE (sizeof (VOID *))
30
31 VOID
32 CoreInitializeDebugImageInfoTable (
33 VOID
34 )
35 /*++
36
37 Routine Description:
38
39 Creates and initializes the DebugImageInfo Table. Also creates the configuration
40 table and registers it into the system table.
41
42 Arguments:
43 None
44
45 Returns:
46 NA
47
48 Notes:
49 This function allocates memory, frees it, and then allocates memory at an
50 address within the initial allocation. Since this function is called early
51 in DXE core initialization (before drivers are dispatched), this should not
52 be a problem.
53
54 --*/
55 ;
56
57 VOID
58 CoreUpdateDebugTableCrc32 (
59 VOID
60 )
61 /*++
62
63 Routine Description:
64
65 Update the CRC32 in the Debug Table.
66 Since the CRC32 service is made available by the Runtime driver, we have to
67 wait for the Runtime Driver to be installed before the CRC32 can be computed.
68 This function is called elsewhere by the core when the runtime architectural
69 protocol is produced.
70
71 Arguments:
72 None
73
74 Returns:
75 NA
76
77 --*/
78 ;
79
80 VOID
81 CoreNewDebugImageInfoEntry (
82 UINT32 ImageInfoType,
83 EFI_LOADED_IMAGE_PROTOCOL *LoadedImage,
84 EFI_HANDLE ImageHandle
85 )
86 /*++
87
88 Routine Description:
89
90 Adds a new DebugImageInfo structure to the DebugImageInfo Table. Re-Allocates
91 the table if it's not large enough to accomidate another entry.
92
93 Arguments:
94
95 ImageInfoType - type of debug image information
96 LoadedImage - pointer to the loaded image protocol for the image being loaded
97 ImageHandle - image handle for the image being loaded
98
99 Returns:
100 NA
101
102 --*/
103 ;
104
105 VOID
106 CoreRemoveDebugImageInfoEntry (
107 EFI_HANDLE ImageHandle
108 )
109 /*++
110
111 Routine Description:
112
113 Removes and frees an entry from the DebugImageInfo Table.
114
115 Arguments:
116
117 ImageHandle - image handle for the image being unloaded
118
119 Returns:
120
121 NA
122
123 --*/
124 ;
125
126 #endif