Lines Matching refs:op

40 #define efi_data(op)	(op.u.efi_runtime_call)  argument
44 struct xen_platform_op op = INIT_EFI_OP(get_time); in xen_efi_get_time() local
46 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_get_time()
50 BUILD_BUG_ON(sizeof(*tm) != sizeof(efi_data(op).u.get_time.time)); in xen_efi_get_time()
51 memcpy(tm, &efi_data(op).u.get_time.time, sizeof(*tm)); in xen_efi_get_time()
55 tc->resolution = efi_data(op).u.get_time.resolution; in xen_efi_get_time()
56 tc->accuracy = efi_data(op).u.get_time.accuracy; in xen_efi_get_time()
57 tc->sets_to_zero = !!(efi_data(op).misc & in xen_efi_get_time()
61 return efi_data(op).status; in xen_efi_get_time()
67 struct xen_platform_op op = INIT_EFI_OP(set_time); in xen_efi_set_time() local
69 BUILD_BUG_ON(sizeof(*tm) != sizeof(efi_data(op).u.set_time)); in xen_efi_set_time()
70 memcpy(&efi_data(op).u.set_time, tm, sizeof(*tm)); in xen_efi_set_time()
72 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_set_time()
75 return efi_data(op).status; in xen_efi_set_time()
82 struct xen_platform_op op = INIT_EFI_OP(get_wakeup_time); in xen_efi_get_wakeup_time() local
84 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_get_wakeup_time()
88 BUILD_BUG_ON(sizeof(*tm) != sizeof(efi_data(op).u.get_wakeup_time)); in xen_efi_get_wakeup_time()
89 memcpy(tm, &efi_data(op).u.get_wakeup_time, sizeof(*tm)); in xen_efi_get_wakeup_time()
93 *enabled = !!(efi_data(op).misc & XEN_EFI_GET_WAKEUP_TIME_ENABLED); in xen_efi_get_wakeup_time()
96 *pending = !!(efi_data(op).misc & XEN_EFI_GET_WAKEUP_TIME_PENDING); in xen_efi_get_wakeup_time()
98 return efi_data(op).status; in xen_efi_get_wakeup_time()
104 struct xen_platform_op op = INIT_EFI_OP(set_wakeup_time); in xen_efi_set_wakeup_time() local
106 BUILD_BUG_ON(sizeof(*tm) != sizeof(efi_data(op).u.set_wakeup_time)); in xen_efi_set_wakeup_time()
108 efi_data(op).misc = XEN_EFI_SET_WAKEUP_TIME_ENABLE; in xen_efi_set_wakeup_time()
110 memcpy(&efi_data(op).u.set_wakeup_time, tm, sizeof(*tm)); in xen_efi_set_wakeup_time()
112 efi_data(op).misc |= XEN_EFI_SET_WAKEUP_TIME_ENABLE_ONLY; in xen_efi_set_wakeup_time()
114 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_set_wakeup_time()
117 return efi_data(op).status; in xen_efi_set_wakeup_time()
125 struct xen_platform_op op = INIT_EFI_OP(get_variable); in xen_efi_get_variable() local
127 set_xen_guest_handle(efi_data(op).u.get_variable.name, name); in xen_efi_get_variable()
129 sizeof(efi_data(op).u.get_variable.vendor_guid)); in xen_efi_get_variable()
130 memcpy(&efi_data(op).u.get_variable.vendor_guid, vendor, sizeof(*vendor)); in xen_efi_get_variable()
131 efi_data(op).u.get_variable.size = *data_size; in xen_efi_get_variable()
132 set_xen_guest_handle(efi_data(op).u.get_variable.data, data); in xen_efi_get_variable()
134 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_get_variable()
137 *data_size = efi_data(op).u.get_variable.size; in xen_efi_get_variable()
139 *attr = efi_data(op).misc; in xen_efi_get_variable()
141 return efi_data(op).status; in xen_efi_get_variable()
149 struct xen_platform_op op = INIT_EFI_OP(get_next_variable_name); in xen_efi_get_next_variable() local
151 efi_data(op).u.get_next_variable_name.size = *name_size; in xen_efi_get_next_variable()
152 set_xen_guest_handle(efi_data(op).u.get_next_variable_name.name, name); in xen_efi_get_next_variable()
154 sizeof(efi_data(op).u.get_next_variable_name.vendor_guid)); in xen_efi_get_next_variable()
155 memcpy(&efi_data(op).u.get_next_variable_name.vendor_guid, vendor, in xen_efi_get_next_variable()
158 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_get_next_variable()
161 *name_size = efi_data(op).u.get_next_variable_name.size; in xen_efi_get_next_variable()
162 memcpy(vendor, &efi_data(op).u.get_next_variable_name.vendor_guid, in xen_efi_get_next_variable()
165 return efi_data(op).status; in xen_efi_get_next_variable()
173 struct xen_platform_op op = INIT_EFI_OP(set_variable); in xen_efi_set_variable() local
175 set_xen_guest_handle(efi_data(op).u.set_variable.name, name); in xen_efi_set_variable()
176 efi_data(op).misc = attr; in xen_efi_set_variable()
178 sizeof(efi_data(op).u.set_variable.vendor_guid)); in xen_efi_set_variable()
179 memcpy(&efi_data(op).u.set_variable.vendor_guid, vendor, sizeof(*vendor)); in xen_efi_set_variable()
180 efi_data(op).u.set_variable.size = data_size; in xen_efi_set_variable()
181 set_xen_guest_handle(efi_data(op).u.set_variable.data, data); in xen_efi_set_variable()
183 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_set_variable()
186 return efi_data(op).status; in xen_efi_set_variable()
194 struct xen_platform_op op = INIT_EFI_OP(query_variable_info); in xen_efi_query_variable_info() local
199 efi_data(op).u.query_variable_info.attr = attr; in xen_efi_query_variable_info()
201 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_query_variable_info()
204 *storage_space = efi_data(op).u.query_variable_info.max_store_size; in xen_efi_query_variable_info()
205 *remaining_space = efi_data(op).u.query_variable_info.remain_store_size; in xen_efi_query_variable_info()
206 *max_variable_size = efi_data(op).u.query_variable_info.max_size; in xen_efi_query_variable_info()
208 return efi_data(op).status; in xen_efi_query_variable_info()
214 struct xen_platform_op op = INIT_EFI_OP(get_next_high_monotonic_count); in xen_efi_get_next_high_mono_count() local
216 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_get_next_high_mono_count()
219 *count = efi_data(op).misc; in xen_efi_get_next_high_mono_count()
221 return efi_data(op).status; in xen_efi_get_next_high_mono_count()
228 struct xen_platform_op op = INIT_EFI_OP(update_capsule); in xen_efi_update_capsule() local
233 set_xen_guest_handle(efi_data(op).u.update_capsule.capsule_header_array, in xen_efi_update_capsule()
235 efi_data(op).u.update_capsule.capsule_count = count; in xen_efi_update_capsule()
236 efi_data(op).u.update_capsule.sg_list = sg_list; in xen_efi_update_capsule()
238 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_update_capsule()
241 return efi_data(op).status; in xen_efi_update_capsule()
249 struct xen_platform_op op = INIT_EFI_OP(query_capsule_capabilities); in xen_efi_query_capsule_caps() local
254 set_xen_guest_handle(efi_data(op).u.query_capsule_capabilities.capsule_header_array, in xen_efi_query_capsule_caps()
256 efi_data(op).u.query_capsule_capabilities.capsule_count = count; in xen_efi_query_capsule_caps()
258 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_query_capsule_caps()
261 *max_size = efi_data(op).u.query_capsule_capabilities.max_capsule_size; in xen_efi_query_capsule_caps()
262 *reset_type = efi_data(op).u.query_capsule_capabilities.reset_type; in xen_efi_query_capsule_caps()
264 return efi_data(op).status; in xen_efi_query_capsule_caps()