Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/efi.h
| Show First 20 Lines • Show All 248 Lines • ▼ Show 20 Lines | struct efi_ops { | ||||
| */ | */ | ||||
| int (*rt_ok)(void); | int (*rt_ok)(void); | ||||
| int (*get_table)(struct uuid *, void **); | int (*get_table)(struct uuid *, void **); | ||||
| int (*copy_table)(struct uuid *, void **, size_t, size_t *); | int (*copy_table)(struct uuid *, void **, size_t, size_t *); | ||||
| int (*get_time)(struct efi_tm *); | int (*get_time)(struct efi_tm *); | ||||
| int (*get_time_capabilities)(struct efi_tmcap *); | int (*get_time_capabilities)(struct efi_tmcap *); | ||||
| int (*reset_system)(enum efi_reset); | int (*reset_system)(enum efi_reset); | ||||
| int (*set_time)(struct efi_tm *); | int (*set_time)(struct efi_tm *); | ||||
| int (*get_waketime)(uint8_t *enabled, uint8_t *pending, | |||||
| struct efi_tm *tm); | |||||
| int (*set_waketime)(uint8_t enable, struct efi_tm *tm); | |||||
| int (*var_get)(uint16_t *, struct uuid *, uint32_t *, size_t *, | int (*var_get)(uint16_t *, struct uuid *, uint32_t *, size_t *, | ||||
| void *); | void *); | ||||
| int (*var_nextname)(size_t *, uint16_t *, struct uuid *); | int (*var_nextname)(size_t *, uint16_t *, struct uuid *); | ||||
| int (*var_set)(uint16_t *, struct uuid *, uint32_t, size_t, void *); | int (*var_set)(uint16_t *, struct uuid *, uint32_t, size_t, void *); | ||||
| }; | }; | ||||
| extern const struct efi_ops *active_efi_ops; | extern const struct efi_ops *active_efi_ops; | ||||
| /* Public MI EFI functions */ | /* Public MI EFI functions */ | ||||
| ▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static inline int efi_set_time(struct efi_tm *tm) | static inline int efi_set_time(struct efi_tm *tm) | ||||
| { | { | ||||
| if (active_efi_ops->set_time == NULL) | if (active_efi_ops->set_time == NULL) | ||||
| return (ENXIO); | return (ENXIO); | ||||
| return (active_efi_ops->set_time(tm)); | return (active_efi_ops->set_time(tm)); | ||||
| } | |||||
| static inline int efi_get_waketime(uint8_t *enabled, uint8_t *pending, | |||||
| struct efi_tm *tm) | |||||
| { | |||||
| if (active_efi_ops->get_waketime == NULL) | |||||
| return (ENXIO); | |||||
| return (active_efi_ops->get_waketime(enabled, pending, tm)); | |||||
| } | } | ||||
| static inline int efi_set_waketime(uint8_t enable, struct efi_tm *tm) | |||||
| { | |||||
| if (active_efi_ops->set_waketime == NULL) | |||||
| return (ENXIO); | |||||
| return (active_efi_ops->set_waketime(enable, tm)); | |||||
| } | |||||
| static inline int efi_var_get(uint16_t *name, struct uuid *vendor, | static inline int efi_var_get(uint16_t *name, struct uuid *vendor, | ||||
| uint32_t *attrib, size_t *datasize, void *data) | uint32_t *attrib, size_t *datasize, void *data) | ||||
| { | { | ||||
| if (active_efi_ops->var_get == NULL) | if (active_efi_ops->var_get == NULL) | ||||
| return (ENXIO); | return (ENXIO); | ||||
| return (active_efi_ops->var_get(name, vendor, attrib, datasize, data)); | return (active_efi_ops->var_get(name, vendor, attrib, datasize, data)); | ||||
| } | } | ||||
| Show All 24 Lines | |||||