]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Universal/Runtime/RuntimeDxe/Runtime.h
3803a9daddc939a11d01614b01e1b6500c531100
[mirror_edk2.git] / EdkModulePkg / Universal / Runtime / RuntimeDxe / Runtime.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 Runtime.h
15
16 Abstract:
17
18 Runtime Architectural Protocol as defined in the DXE CIS
19
20 This code is used to produce the EFI runtime virtual switch over
21
22 --*/
23
24 #ifndef _RUNTIME_H_
25 #define _RUNTIME_H_
26
27 //
28 // Data structures
29 //
30 typedef struct {
31 LIST_ENTRY Link;
32 BOOLEAN Valid;
33 EFI_PHYSICAL_ADDRESS ImageBase;
34 UINTN ImageSize; // In no. of pages
35 VOID *RelocationData;
36 } RUNTIME_IMAGE_RELOCATION_DATA;
37
38 typedef struct {
39 LIST_ENTRY Link;
40 IN UINT32 Type;
41 IN EFI_TPL NotifyTpl;
42 IN EFI_EVENT_NOTIFY NotifyFunction;
43 IN VOID *NotifyContext;
44 IN EFI_EVENT Event;
45 } RUNTIME_NOTIFY_EVENT_DATA;
46
47 //
48 // Function Prototypes
49 //
50 VOID
51 RelocatePeImageForRuntime (
52 RUNTIME_IMAGE_RELOCATION_DATA *Image
53 )
54 ;
55
56 EFI_STATUS
57 PeHotRelocateImageEx (
58 IN UINT16 *Reloc,
59 IN OUT CHAR8 *Fixup,
60 IN OUT CHAR8 **FixupData,
61 IN UINT64 Adjust
62 )
63 ;
64
65 EFI_STATUS
66 EFIAPI
67 RuntimeDriverCalculateCrc32 (
68 IN VOID *Data,
69 IN UINTN DataSize,
70 OUT UINT32 *CrcOut
71 )
72 ;
73
74 EFI_STATUS
75 EFIAPI
76 RuntimeDriverRegisterImage (
77 IN EFI_RUNTIME_ARCH_PROTOCOL *This,
78 IN EFI_PHYSICAL_ADDRESS ImageBase,
79 IN UINTN ImageSize,
80 IN VOID *RelocationData
81 )
82 ;
83
84 EFI_STATUS
85 EFIAPI
86 RuntimeDriverRegisterEvent (
87 IN EFI_RUNTIME_ARCH_PROTOCOL *This,
88 IN UINT32 Type,
89 IN EFI_TPL NotifyTpl,
90 IN EFI_EVENT_NOTIFY NotifyFunction,
91 IN VOID *NotifyContext,
92 IN EFI_EVENT *Event
93 )
94 ;
95
96 EFI_STATUS
97 EFIAPI
98 RuntimeDriverConvertPointer (
99 IN UINTN DebugDisposition,
100 IN OUT VOID **ConvertAddress
101 )
102 ;
103
104 VOID
105 RuntimeDriverInitializeCrc32Table (
106 VOID
107 )
108 ;
109
110 EFI_STATUS
111 EFIAPI
112 RuntimeDriverInitialize (
113 IN EFI_HANDLE ImageHandle,
114 IN EFI_SYSTEM_TABLE *SystemTable
115 )
116 ;
117
118
119 //
120 // Cache Flush Routine.
121 //
122 EFI_STATUS
123 FlushCpuCache (
124 IN EFI_PHYSICAL_ADDRESS Start,
125 IN UINT64 Length
126 )
127 ;
128
129 #endif