]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Universal/Runtime/RuntimeDxe/Runtime.h
Initial import.
[mirror_edk2.git] / EdkModulePkg / Universal / Runtime / RuntimeDxe / Runtime.h
CommitLineData
878ddf1f 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 Runtime.h\r
15\r
16Abstract:\r
17\r
18 Runtime Architectural Protocol as defined in the DXE CIS\r
19\r
20 This code is used to produce the EFI runtime virtual switch over\r
21\r
22--*/\r
23\r
24#ifndef _RUNTIME_H_\r
25#define _RUNTIME_H_\r
26\r
27//\r
28// Data structures\r
29//\r
30typedef struct {\r
31 LIST_ENTRY Link;\r
32 BOOLEAN Valid;\r
33 EFI_PHYSICAL_ADDRESS ImageBase;\r
34 UINTN ImageSize; // In no. of pages\r
35 VOID *RelocationData;\r
36} RUNTIME_IMAGE_RELOCATION_DATA;\r
37\r
38typedef struct {\r
39 LIST_ENTRY Link;\r
40 IN UINT32 Type;\r
41 IN EFI_TPL NotifyTpl;\r
42 IN EFI_EVENT_NOTIFY NotifyFunction;\r
43 IN VOID *NotifyContext;\r
44 IN EFI_EVENT Event;\r
45} RUNTIME_NOTIFY_EVENT_DATA;\r
46\r
47//\r
48// Function Prototypes\r
49//\r
50VOID\r
51RelocatePeImageForRuntime (\r
52 RUNTIME_IMAGE_RELOCATION_DATA *Image\r
53 )\r
54;\r
55\r
56EFI_STATUS\r
57PeHotRelocateImageEx (\r
58 IN UINT16 *Reloc,\r
59 IN OUT CHAR8 *Fixup,\r
60 IN OUT CHAR8 **FixupData,\r
61 IN UINT64 Adjust\r
62 )\r
63;\r
64\r
65EFI_STATUS\r
66EFIAPI\r
67RuntimeDriverCalculateCrc32 (\r
68 IN VOID *Data,\r
69 IN UINTN DataSize,\r
70 OUT UINT32 *CrcOut\r
71 )\r
72;\r
73\r
74EFI_STATUS\r
75EFIAPI\r
76RuntimeDriverRegisterImage (\r
77 IN EFI_RUNTIME_ARCH_PROTOCOL *This,\r
78 IN EFI_PHYSICAL_ADDRESS ImageBase,\r
79 IN UINTN ImageSize,\r
80 IN VOID *RelocationData\r
81 )\r
82;\r
83\r
84EFI_STATUS\r
85EFIAPI\r
86RuntimeDriverRegisterEvent (\r
87 IN EFI_RUNTIME_ARCH_PROTOCOL *This,\r
88 IN UINT32 Type,\r
89 IN EFI_TPL NotifyTpl,\r
90 IN EFI_EVENT_NOTIFY NotifyFunction,\r
91 IN VOID *NotifyContext,\r
92 IN EFI_EVENT *Event\r
93 )\r
94;\r
95\r
96EFI_STATUS\r
97EFIAPI\r
98RuntimeDriverConvertPointer (\r
99 IN UINTN DebugDisposition,\r
100 IN OUT VOID **ConvertAddress\r
101 )\r
102;\r
103\r
104VOID\r
105RuntimeDriverInitializeCrc32Table (\r
106 VOID\r
107 )\r
108;\r
109\r
110EFI_STATUS\r
111EFIAPI\r
112RuntimeDriverInitialize (\r
113 IN EFI_HANDLE ImageHandle,\r
114 IN EFI_SYSTEM_TABLE *SystemTable\r
115 )\r
116;\r
117\r
118\r
119//\r
120// Cache Flush Routine.\r
121//\r
122EFI_STATUS\r
123FlushCpuCache (\r
124 IN EFI_PHYSICAL_ADDRESS Start,\r
125 IN UINT64 Length\r
126 )\r
127;\r
128\r
129#endif\r