Lines Matching refs:op

42 #define efi_data(op)	(op.u.efi_runtime_call)  argument
46 struct xen_platform_op op = INIT_EFI_OP(get_time); in xen_efi_get_time() local
48 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_get_time()
52 BUILD_BUG_ON(sizeof(*tm) != sizeof(efi_data(op).u.get_time.time)); in xen_efi_get_time()
53 memcpy(tm, &efi_data(op).u.get_time.time, sizeof(*tm)); in xen_efi_get_time()
57 tc->resolution = efi_data(op).u.get_time.resolution; in xen_efi_get_time()
58 tc->accuracy = efi_data(op).u.get_time.accuracy; in xen_efi_get_time()
59 tc->sets_to_zero = !!(efi_data(op).misc & in xen_efi_get_time()
63 return efi_data(op).status; in xen_efi_get_time()
68 struct xen_platform_op op = INIT_EFI_OP(set_time); in xen_efi_set_time() local
70 BUILD_BUG_ON(sizeof(*tm) != sizeof(efi_data(op).u.set_time)); in xen_efi_set_time()
71 memcpy(&efi_data(op).u.set_time, tm, sizeof(*tm)); in xen_efi_set_time()
73 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_set_time()
76 return efi_data(op).status; in xen_efi_set_time()
83 struct xen_platform_op op = INIT_EFI_OP(get_wakeup_time); in xen_efi_get_wakeup_time() local
85 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_get_wakeup_time()
89 BUILD_BUG_ON(sizeof(*tm) != sizeof(efi_data(op).u.get_wakeup_time)); in xen_efi_get_wakeup_time()
90 memcpy(tm, &efi_data(op).u.get_wakeup_time, sizeof(*tm)); in xen_efi_get_wakeup_time()
94 *enabled = !!(efi_data(op).misc & XEN_EFI_GET_WAKEUP_TIME_ENABLED); in xen_efi_get_wakeup_time()
97 *pending = !!(efi_data(op).misc & XEN_EFI_GET_WAKEUP_TIME_PENDING); in xen_efi_get_wakeup_time()
99 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()
124 struct xen_platform_op op = INIT_EFI_OP(get_variable); in xen_efi_get_variable() local
126 set_xen_guest_handle(efi_data(op).u.get_variable.name, name); in xen_efi_get_variable()
128 sizeof(efi_data(op).u.get_variable.vendor_guid)); in xen_efi_get_variable()
129 memcpy(&efi_data(op).u.get_variable.vendor_guid, vendor, sizeof(*vendor)); in xen_efi_get_variable()
130 efi_data(op).u.get_variable.size = *data_size; in xen_efi_get_variable()
131 set_xen_guest_handle(efi_data(op).u.get_variable.data, data); in xen_efi_get_variable()
133 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_get_variable()
136 *data_size = efi_data(op).u.get_variable.size; in xen_efi_get_variable()
138 *attr = efi_data(op).misc; in xen_efi_get_variable()
140 return efi_data(op).status; in xen_efi_get_variable()
147 struct xen_platform_op op = INIT_EFI_OP(get_next_variable_name); in xen_efi_get_next_variable() local
149 efi_data(op).u.get_next_variable_name.size = *name_size; in xen_efi_get_next_variable()
150 set_xen_guest_handle(efi_data(op).u.get_next_variable_name.name, name); in xen_efi_get_next_variable()
152 sizeof(efi_data(op).u.get_next_variable_name.vendor_guid)); in xen_efi_get_next_variable()
153 memcpy(&efi_data(op).u.get_next_variable_name.vendor_guid, vendor, in xen_efi_get_next_variable()
156 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_get_next_variable()
159 *name_size = efi_data(op).u.get_next_variable_name.size; in xen_efi_get_next_variable()
160 memcpy(vendor, &efi_data(op).u.get_next_variable_name.vendor_guid, in xen_efi_get_next_variable()
163 return efi_data(op).status; in xen_efi_get_next_variable()
170 struct xen_platform_op op = INIT_EFI_OP(set_variable); in xen_efi_set_variable() local
172 set_xen_guest_handle(efi_data(op).u.set_variable.name, name); in xen_efi_set_variable()
173 efi_data(op).misc = attr; in xen_efi_set_variable()
175 sizeof(efi_data(op).u.set_variable.vendor_guid)); in xen_efi_set_variable()
176 memcpy(&efi_data(op).u.set_variable.vendor_guid, vendor, sizeof(*vendor)); in xen_efi_set_variable()
177 efi_data(op).u.set_variable.size = data_size; in xen_efi_set_variable()
178 set_xen_guest_handle(efi_data(op).u.set_variable.data, data); in xen_efi_set_variable()
180 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_set_variable()
183 return efi_data(op).status; in xen_efi_set_variable()
190 struct xen_platform_op op = INIT_EFI_OP(query_variable_info); in xen_efi_query_variable_info() local
195 efi_data(op).u.query_variable_info.attr = attr; in xen_efi_query_variable_info()
197 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_query_variable_info()
200 *storage_space = efi_data(op).u.query_variable_info.max_store_size; in xen_efi_query_variable_info()
201 *remaining_space = efi_data(op).u.query_variable_info.remain_store_size; in xen_efi_query_variable_info()
202 *max_variable_size = efi_data(op).u.query_variable_info.max_size; in xen_efi_query_variable_info()
204 return efi_data(op).status; in xen_efi_query_variable_info()
209 struct xen_platform_op op = INIT_EFI_OP(get_next_high_monotonic_count); in xen_efi_get_next_high_mono_count() local
211 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_get_next_high_mono_count()
214 *count = efi_data(op).misc; in xen_efi_get_next_high_mono_count()
216 return efi_data(op).status; in xen_efi_get_next_high_mono_count()
222 struct xen_platform_op op = INIT_EFI_OP(update_capsule); in xen_efi_update_capsule() local
227 set_xen_guest_handle(efi_data(op).u.update_capsule.capsule_header_array, in xen_efi_update_capsule()
229 efi_data(op).u.update_capsule.capsule_count = count; in xen_efi_update_capsule()
230 efi_data(op).u.update_capsule.sg_list = sg_list; in xen_efi_update_capsule()
232 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_update_capsule()
235 return efi_data(op).status; in xen_efi_update_capsule()
241 struct xen_platform_op op = INIT_EFI_OP(query_capsule_capabilities); in xen_efi_query_capsule_caps() local
246 set_xen_guest_handle(efi_data(op).u.query_capsule_capabilities.capsule_header_array, in xen_efi_query_capsule_caps()
248 efi_data(op).u.query_capsule_capabilities.capsule_count = count; in xen_efi_query_capsule_caps()
250 if (HYPERVISOR_platform_op(&op) < 0) in xen_efi_query_capsule_caps()
253 *max_size = efi_data(op).u.query_capsule_capabilities.max_capsule_size; in xen_efi_query_capsule_caps()
254 *reset_type = efi_data(op).u.query_capsule_capabilities.reset_type; in xen_efi_query_capsule_caps()
256 return efi_data(op).status; in xen_efi_query_capsule_caps()
301 struct xen_platform_op op; in efi_mem_desc_lookup() local
302 union xenpf_efi_info *info = &op.u.firmware_info.u.efi_info; in efi_mem_desc_lookup()
308 op = (struct xen_platform_op) { in efi_mem_desc_lookup()
318 rc = HYPERVISOR_platform_op(&op); in efi_mem_desc_lookup()