X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fefi_loader.h;h=0df482ee217cdd6b36cfb3a81f237e501315c514;hb=90b658b4cc9f6b9d50a80fac1fbc62bd6420a483;hp=48fbe7a214f1b8e9d4f6a6d33c40114e84b809b8;hpb=d7b181d57d0c7080facce755c4b9ff7a22436a48;p=u-boot diff --git a/include/efi_loader.h b/include/efi_loader.h index 48fbe7a214..0df482ee21 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -96,6 +96,18 @@ extern const efi_guid_t efi_guid_console_control; extern const efi_guid_t efi_guid_device_path; /* GUID of the EFI_DRIVER_BINDING_PROTOCOL */ extern const efi_guid_t efi_guid_driver_binding_protocol; +/* event group ExitBootServices() invoked */ +extern const efi_guid_t efi_guid_event_group_exit_boot_services; +/* event group SetVirtualAddressMap() invoked */ +extern const efi_guid_t efi_guid_event_group_virtual_address_change; +/* event group memory map changed */ +extern const efi_guid_t efi_guid_event_group_memory_map_change; +/* event group boot manager about to boot */ +extern const efi_guid_t efi_guid_event_group_ready_to_boot; +/* event group ResetSystem() invoked (before ExitBootServices) */ +extern const efi_guid_t efi_guid_event_group_reset_system; +/* GUID of the device tree table */ +extern const efi_guid_t efi_guid_fdt; extern const efi_guid_t efi_guid_loaded_image; extern const efi_guid_t efi_guid_device_path_to_text_protocol; extern const efi_guid_t efi_simple_file_system_protocol_guid; @@ -148,21 +160,25 @@ struct efi_object { /** * struct efi_event * + * @link: Link to list of all events * @type: Type of event, see efi_create_event * @notify_tpl: Task priority level of notifications - * @trigger_time: Period of the timer - * @trigger_next: Next time to trigger the timer * @nofify_function: Function to call when the event is triggered * @notify_context: Data to be passed to the notify function + * @group: Event group + * @trigger_time: Period of the timer + * @trigger_next: Next time to trigger the timer * @trigger_type: Type of timer, see efi_set_timer - * @queued: The notification function is queued - * @signaled: The event occurred. The event is in the signaled state. + * @is_queued: The notification function is queued + * @is_signaled: The event occurred. The event is in the signaled state. */ struct efi_event { + struct list_head link; uint32_t type; efi_uintn_t notify_tpl; void (EFIAPI *notify_function)(struct efi_event *event, void *context); void *notify_context; + const efi_guid_t *group; u64 trigger_next; u64 trigger_time; enum efi_timer_delay trigger_type; @@ -170,9 +186,10 @@ struct efi_event { bool is_signaled; }; - /* This list contains all UEFI objects we know of */ extern struct list_head efi_obj_list; +/* List of all events */ +extern struct list_head efi_events; /* Called by bootefi to make console interface available */ int efi_console_register(void); @@ -239,7 +256,8 @@ efi_status_t efi_create_event(uint32_t type, efi_uintn_t notify_tpl, void (EFIAPI *notify_function) ( struct efi_event *event, void *context), - void *notify_context, struct efi_event **event); + void *notify_context, efi_guid_t *group, + struct efi_event **event); /* Call this to set a timer */ efi_status_t efi_set_timer(struct efi_event *event, enum efi_timer_delay type, uint64_t trigger_time); @@ -350,7 +368,7 @@ static inline int guidcmp(const efi_guid_t *g1, const efi_guid_t *g2) /* Call this with mmio_ptr as the _pointer_ to a pointer to an MMIO region * to make it available at runtime */ -void efi_add_runtime_mmio(void *mmio_ptr, u64 len); +efi_status_t efi_add_runtime_mmio(void *mmio_ptr, u64 len); /* Boards may provide the functions below to implement RTS functionality */ @@ -358,12 +376,14 @@ void __efi_runtime EFIAPI efi_reset_system( enum efi_reset_type reset_type, efi_status_t reset_status, unsigned long data_size, void *reset_data); -void efi_reset_system_init(void); + +/* Architecture specific initialization of the EFI subsystem */ +efi_status_t efi_reset_system_init(void); efi_status_t __efi_runtime EFIAPI efi_get_time( struct efi_time *time, struct efi_time_cap *capabilities); -void efi_get_time_init(void); +efi_status_t efi_get_time_init(void); #ifdef CONFIG_CMD_BOOTEFI_SELFTEST /* @@ -392,7 +412,10 @@ void *efi_bootmgr_load(struct efi_device_path **device_path, /* Without CONFIG_EFI_LOADER we don't have a runtime section, stub it out */ #define __efi_runtime_data #define __efi_runtime -static inline void efi_add_runtime_mmio(void *mmio_ptr, u64 len) { } +static inline efi_status_t efi_add_runtime_mmio(void *mmio_ptr, u64 len) +{ + return EFI_SUCCESS; +} /* No loader configured, stub out EFI_ENTRY */ static inline void efi_restore_gd(void) { }