40
40
41
41
#define efi_data (op ) (op.u.efi_runtime_call)
42
42
43
- efi_status_t xen_efi_get_time (efi_time_t * tm , efi_time_cap_t * tc )
43
+ static efi_status_t xen_efi_get_time (efi_time_t * tm , efi_time_cap_t * tc )
44
44
{
45
45
struct xen_platform_op op = INIT_EFI_OP (get_time );
46
46
@@ -61,9 +61,8 @@ efi_status_t xen_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc)
61
61
62
62
return efi_data (op ).status ;
63
63
}
64
- EXPORT_SYMBOL_GPL (xen_efi_get_time );
65
64
66
- efi_status_t xen_efi_set_time (efi_time_t * tm )
65
+ static efi_status_t xen_efi_set_time (efi_time_t * tm )
67
66
{
68
67
struct xen_platform_op op = INIT_EFI_OP (set_time );
69
68
@@ -75,10 +74,10 @@ efi_status_t xen_efi_set_time(efi_time_t *tm)
75
74
76
75
return efi_data (op ).status ;
77
76
}
78
- EXPORT_SYMBOL_GPL (xen_efi_set_time );
79
77
80
- efi_status_t xen_efi_get_wakeup_time (efi_bool_t * enabled , efi_bool_t * pending ,
81
- efi_time_t * tm )
78
+ static efi_status_t xen_efi_get_wakeup_time (efi_bool_t * enabled ,
79
+ efi_bool_t * pending ,
80
+ efi_time_t * tm )
82
81
{
83
82
struct xen_platform_op op = INIT_EFI_OP (get_wakeup_time );
84
83
@@ -98,9 +97,8 @@ efi_status_t xen_efi_get_wakeup_time(efi_bool_t *enabled, efi_bool_t *pending,
98
97
99
98
return efi_data (op ).status ;
100
99
}
101
- EXPORT_SYMBOL_GPL (xen_efi_get_wakeup_time );
102
100
103
- efi_status_t xen_efi_set_wakeup_time (efi_bool_t enabled , efi_time_t * tm )
101
+ static efi_status_t xen_efi_set_wakeup_time (efi_bool_t enabled , efi_time_t * tm )
104
102
{
105
103
struct xen_platform_op op = INIT_EFI_OP (set_wakeup_time );
106
104
@@ -117,11 +115,10 @@ efi_status_t xen_efi_set_wakeup_time(efi_bool_t enabled, efi_time_t *tm)
117
115
118
116
return efi_data (op ).status ;
119
117
}
120
- EXPORT_SYMBOL_GPL (xen_efi_set_wakeup_time );
121
118
122
- efi_status_t xen_efi_get_variable (efi_char16_t * name , efi_guid_t * vendor ,
123
- u32 * attr , unsigned long * data_size ,
124
- void * data )
119
+ static efi_status_t xen_efi_get_variable (efi_char16_t * name , efi_guid_t * vendor ,
120
+ u32 * attr , unsigned long * data_size ,
121
+ void * data )
125
122
{
126
123
struct xen_platform_op op = INIT_EFI_OP (get_variable );
127
124
@@ -141,11 +138,10 @@ efi_status_t xen_efi_get_variable(efi_char16_t *name, efi_guid_t *vendor,
141
138
142
139
return efi_data (op ).status ;
143
140
}
144
- EXPORT_SYMBOL_GPL (xen_efi_get_variable );
145
141
146
- efi_status_t xen_efi_get_next_variable (unsigned long * name_size ,
147
- efi_char16_t * name ,
148
- efi_guid_t * vendor )
142
+ static efi_status_t xen_efi_get_next_variable (unsigned long * name_size ,
143
+ efi_char16_t * name ,
144
+ efi_guid_t * vendor )
149
145
{
150
146
struct xen_platform_op op = INIT_EFI_OP (get_next_variable_name );
151
147
@@ -165,11 +161,10 @@ efi_status_t xen_efi_get_next_variable(unsigned long *name_size,
165
161
166
162
return efi_data (op ).status ;
167
163
}
168
- EXPORT_SYMBOL_GPL (xen_efi_get_next_variable );
169
164
170
- efi_status_t xen_efi_set_variable (efi_char16_t * name , efi_guid_t * vendor ,
171
- u32 attr , unsigned long data_size ,
172
- void * data )
165
+ static efi_status_t xen_efi_set_variable (efi_char16_t * name , efi_guid_t * vendor ,
166
+ u32 attr , unsigned long data_size ,
167
+ void * data )
173
168
{
174
169
struct xen_platform_op op = INIT_EFI_OP (set_variable );
175
170
@@ -186,11 +181,10 @@ efi_status_t xen_efi_set_variable(efi_char16_t *name, efi_guid_t *vendor,
186
181
187
182
return efi_data (op ).status ;
188
183
}
189
- EXPORT_SYMBOL_GPL (xen_efi_set_variable );
190
184
191
- efi_status_t xen_efi_query_variable_info (u32 attr , u64 * storage_space ,
192
- u64 * remaining_space ,
193
- u64 * max_variable_size )
185
+ static efi_status_t xen_efi_query_variable_info (u32 attr , u64 * storage_space ,
186
+ u64 * remaining_space ,
187
+ u64 * max_variable_size )
194
188
{
195
189
struct xen_platform_op op = INIT_EFI_OP (query_variable_info );
196
190
@@ -208,9 +202,8 @@ efi_status_t xen_efi_query_variable_info(u32 attr, u64 *storage_space,
208
202
209
203
return efi_data (op ).status ;
210
204
}
211
- EXPORT_SYMBOL_GPL (xen_efi_query_variable_info );
212
205
213
- efi_status_t xen_efi_get_next_high_mono_count (u32 * count )
206
+ static efi_status_t xen_efi_get_next_high_mono_count (u32 * count )
214
207
{
215
208
struct xen_platform_op op = INIT_EFI_OP (get_next_high_monotonic_count );
216
209
@@ -221,10 +214,9 @@ efi_status_t xen_efi_get_next_high_mono_count(u32 *count)
221
214
222
215
return efi_data (op ).status ;
223
216
}
224
- EXPORT_SYMBOL_GPL (xen_efi_get_next_high_mono_count );
225
217
226
- efi_status_t xen_efi_update_capsule (efi_capsule_header_t * * capsules ,
227
- unsigned long count , unsigned long sg_list )
218
+ static efi_status_t xen_efi_update_capsule (efi_capsule_header_t * * capsules ,
219
+ unsigned long count , unsigned long sg_list )
228
220
{
229
221
struct xen_platform_op op = INIT_EFI_OP (update_capsule );
230
222
@@ -241,11 +233,9 @@ efi_status_t xen_efi_update_capsule(efi_capsule_header_t **capsules,
241
233
242
234
return efi_data (op ).status ;
243
235
}
244
- EXPORT_SYMBOL_GPL (xen_efi_update_capsule );
245
236
246
- efi_status_t xen_efi_query_capsule_caps (efi_capsule_header_t * * capsules ,
247
- unsigned long count , u64 * max_size ,
248
- int * reset_type )
237
+ static efi_status_t xen_efi_query_capsule_caps (efi_capsule_header_t * * capsules ,
238
+ unsigned long count , u64 * max_size , int * reset_type )
249
239
{
250
240
struct xen_platform_op op = INIT_EFI_OP (query_capsule_capabilities );
251
241
@@ -264,10 +254,9 @@ efi_status_t xen_efi_query_capsule_caps(efi_capsule_header_t **capsules,
264
254
265
255
return efi_data (op ).status ;
266
256
}
267
- EXPORT_SYMBOL_GPL (xen_efi_query_capsule_caps );
268
257
269
- void xen_efi_reset_system (int reset_type , efi_status_t status ,
270
- unsigned long data_size , efi_char16_t * data )
258
+ static void xen_efi_reset_system (int reset_type , efi_status_t status ,
259
+ unsigned long data_size , efi_char16_t * data )
271
260
{
272
261
switch (reset_type ) {
273
262
case EFI_RESET_COLD :
@@ -281,4 +270,25 @@ void xen_efi_reset_system(int reset_type, efi_status_t status,
281
270
BUG ();
282
271
}
283
272
}
284
- EXPORT_SYMBOL_GPL (xen_efi_reset_system );
273
+
274
+ /*
275
+ * Set XEN EFI runtime services function pointers. Other fields of struct efi,
276
+ * e.g. efi.systab, will be set like normal EFI.
277
+ */
278
+ void __init xen_efi_runtime_setup (void )
279
+ {
280
+ efi .get_time = xen_efi_get_time ;
281
+ efi .set_time = xen_efi_set_time ;
282
+ efi .get_wakeup_time = xen_efi_get_wakeup_time ;
283
+ efi .set_wakeup_time = xen_efi_set_wakeup_time ;
284
+ efi .get_variable = xen_efi_get_variable ;
285
+ efi .get_next_variable = xen_efi_get_next_variable ;
286
+ efi .set_variable = xen_efi_set_variable ;
287
+ efi .set_variable_nonblocking = xen_efi_set_variable ;
288
+ efi .query_variable_info = xen_efi_query_variable_info ;
289
+ efi .query_variable_info_nonblocking = xen_efi_query_variable_info ;
290
+ efi .update_capsule = xen_efi_update_capsule ;
291
+ efi .query_capsule_caps = xen_efi_query_capsule_caps ;
292
+ efi .get_next_high_mono_count = xen_efi_get_next_high_mono_count ;
293
+ efi .reset_system = xen_efi_reset_system ;
294
+ }
0 commit comments