1 #ifndef __RUNTIME_SERVICE_H__
2 #define __RUNTIME_SERVICE_H__
3 
4 #include "types.h"
5 
6 typedef struct {
7   EfiTableHeader hdr;
8   EfiStatus (*get_time)(EfiTime* time, EfiTimeCapabilities* capabilities);
9   EfiStatus (*set_time)(EfiTime* time);
10   EfiStatus (*get_wakeup_time)(bool* enabled, bool* pending, EfiTime* time);
11   EfiStatus (*set_wakeup_time)(bool enable, EfiTime* time);
12   EfiStatus (*set_virtual_address_map)(size_t memory_map_size,
13                                        size_t descriptor_size,
14                                        uint32_t descriptor_version,
15                                        EfiMemoryDescriptor* virtual_map);
16   EfiStatus (*convert_pointer)(size_t debug_disposition, void** address);
17   EfiStatus (*get_variable)(const char16_t* variable_name,
18                             const EfiGuid* vendor_guid, uint32_t* attributes,
19                             size_t* data_size, void* data);
20   EfiStatus (*get_next_variable_name)(size_t* variable_name_size,
21                                       char16_t* variable_name,
22                                       EfiGuid* vendor_guid);
23   EfiStatus (*set_variable)(const char16_t* variable_name,
24                             const EfiGuid* vendor_guid, uint32_t attributes,
25                             size_t data_size, void* data);
26   EfiStatus (*get_next_high_monotonic_count)(uint32_t* high_count);
27   void (*reset_system)(EfiResetType reset_type, EfiStatus reset_status,
28                        size_t data_size, void* reset_data);
29   EfiStatus (*update_capsule)(EfiCapsuleHeader** capsule_header_array,
30                               size_t capsule_count,
31                               EfiPhysicalAddr scatter_gather_list);
32   EfiStatus (*query_capsule_capabilities)(
33       EfiCapsuleHeader** capsule_header_array, size_t capsule_count,
34       uint64_t* maximum_capsule_size, EfiResetType* reset_type);
35   EfiStatus (*query_variable_info)(uint32_t attributes,
36                                    uint64_t* maximum_variable_storage_size,
37                                    uint64_t* remaining_variable_storage_size,
38                                    uint64_t* maximum_variable_size);
39 } EfiRuntimeService;
40 
41 #endif  // __RUNTIME_SERVICE_H__