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