]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/RuntimeDxe/Runtime.h
Clean up Runtime for Doxygen comments requirement.
[mirror_edk2.git] / MdeModulePkg / Core / RuntimeDxe / Runtime.h
1 /** @file
2 Runtime Architectural Protocol as defined in the DXE CIS.
3
4 Copyright (c) 2006, Intel Corporation. <BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13
14 Module Name:
15
16 Runtime.h
17
18 Abstract:
19
20 This code is used to produce the EFI runtime architectural protocol.
21
22 **/
23
24 #ifndef _RUNTIME_H_
25 #define _RUNTIME_H_
26
27 #include <PiDxe.h>
28 #include <Protocol/LoadedImage.h>
29 #include <Protocol/Runtime.h>
30 #include <Library/BaseLib.h>
31 #include <Library/UefiDriverEntryPoint.h>
32 #include <Library/DebugLib.h>
33 #include <Library/ReportStatusCodeLib.h>
34 #include <Library/BaseMemoryLib.h>
35 #include <Library/UefiRuntimeServicesTableLib.h>
36 #include <Library/UefiBootServicesTableLib.h>
37 #include <Library/CacheMaintenanceLib.h>
38 #include <Library/PeCoffLib.h>
39 #include <Library/PcdLib.h>
40
41
42 //
43 // Function Prototypes
44 //
45 /**
46
47 Calculate CRC32 for target data
48
49
50 @param Data The target data.
51 @param DataSize The target data size.
52 @param CrcOut The CRC32 for target data.
53
54 @retval EFI_SUCCESS The CRC32 for target data is calculated successfully.
55 @retval EFI_INVALID_PARAMETER Some parameter is not valid, so the CRC32 is not
56 calculated.
57
58 **/
59 EFI_STATUS
60 EFIAPI
61 RuntimeDriverCalculateCrc32 (
62 IN VOID *Data,
63 IN UINTN DataSize,
64 OUT UINT32 *CrcOut
65 )
66 ;
67
68 /**
69
70 Determines the new virtual address that is to be used on subsequent memory accesses.
71
72
73 @param DebugDisposition Supplies type information for the pointer being converted.
74 @param ConvertAddress A pointer to a pointer that is to be fixed to be the value needed
75 for the new virtual address mappings being applied.
76
77 @retval EFI_SUCCESS The pointer pointed to by Address was modified.
78 @retval EFI_NOT_FOUND The pointer pointed to by Address was not found to be part
79 of the current memory map. This is normally fatal.
80 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
81
82 **/
83 EFI_STATUS
84 EFIAPI
85 RuntimeDriverConvertPointer (
86 IN UINTN DebugDisposition,
87 IN OUT VOID **ConvertAddress
88 )
89 ;
90
91 /**
92
93 Changes the runtime addressing mode of EFI firmware from physical to virtual.
94
95
96 @param MemoryMapSize The size in bytes of VirtualMap.
97 @param DescriptorSize The size in bytes of an entry in the VirtualMap.
98 @param DescriptorVersion The version of the structure entries in VirtualMap.
99 @param VirtualMap An array of memory descriptors which contain new virtual
100 address mapping information for all runtime ranges.
101
102 @retval EFI_SUCCESS The virtual address map has been applied.
103 @retval EFI_UNSUPPORTED EFI firmware is not at runtime, or the EFI firmware is already in
104 virtual address mapped mode.
105 @retval EFI_INVALID_PARAMETER DescriptorSize or DescriptorVersion is invalid.
106 @retval EFI_NO_MAPPING A virtual address was not supplied for a range in the memory
107 map that requires a mapping.
108 @retval EFI_NOT_FOUND A virtual address was supplied for an address that is not found
109 in the memory map.
110
111 **/
112 EFI_STATUS
113 EFIAPI
114 RuntimeDriverSetVirtualAddressMap (
115 IN UINTN MemoryMapSize,
116 IN UINTN DescriptorSize,
117 IN UINT32 DescriptorVersion,
118 IN EFI_MEMORY_DESCRIPTOR *VirtualMap
119 )
120 ;
121
122 /**
123
124 Initialize CRC32 table.
125
126 **/
127 VOID
128 RuntimeDriverInitializeCrc32Table (
129 VOID
130 )
131 ;
132
133 /**
134
135 Install Runtime AP. This code includes the EfiRuntimeLib, but it only
136 functions at RT in physical mode.
137
138
139 @param ImageHandle Image handle of this driver.
140 @param SystemTable Pointer to the EFI System Table.
141
142 @retval EFI_SUCEESS Runtime Driver Architectural Protocol Installed
143 @return Other value if gBS->InstallMultipleProtocolInterfaces fails. Check
144 gBS->InstallMultipleProtocolInterfaces for details.
145
146 **/
147 EFI_STATUS
148 EFIAPI
149 RuntimeDriverInitialize (
150 IN EFI_HANDLE ImageHandle,
151 IN EFI_SYSTEM_TABLE *SystemTable
152 )
153 ;
154
155 #endif