Lines Matching refs:handle

503 void efi_add_handle(efi_handle_t handle)  in efi_add_handle()  argument
505 if (!handle) in efi_add_handle()
507 INIT_LIST_HEAD(&handle->protocols); in efi_add_handle()
508 list_add_tail(&handle->link, &efi_obj_list); in efi_add_handle()
517 efi_status_t efi_create_handle(efi_handle_t *handle) in efi_create_handle() argument
526 *handle = obj; in efi_create_handle()
539 efi_status_t efi_search_protocol(const efi_handle_t handle, in efi_search_protocol() argument
546 if (!handle || !protocol_guid) in efi_search_protocol()
548 efiobj = efi_search_obj(handle); in efi_search_protocol()
572 efi_status_t efi_remove_protocol(const efi_handle_t handle, in efi_remove_protocol() argument
579 ret = efi_search_protocol(handle, protocol, &handler); in efi_remove_protocol()
595 static efi_status_t efi_remove_all_protocols(const efi_handle_t handle) in efi_remove_all_protocols() argument
601 efiobj = efi_search_obj(handle); in efi_remove_all_protocols()
607 ret = efi_remove_protocol(handle, &protocol->guid, in efi_remove_all_protocols()
620 void efi_delete_handle(efi_handle_t handle) in efi_delete_handle() argument
624 ret = efi_remove_all_protocols(handle); in efi_delete_handle()
626 log_err("Can't remove invalid handle %p\n", handle); in efi_delete_handle()
630 list_del(&handle->link); in efi_delete_handle()
631 free(handle); in efi_delete_handle()
1066 struct efi_object *efi_search_obj(const efi_handle_t handle) in efi_search_obj() argument
1070 if (!handle) in efi_search_obj()
1074 if (efiobj == handle) in efi_search_obj()
1123 efi_status_t efi_add_protocol(const efi_handle_t handle, in efi_add_protocol() argument
1132 efiobj = efi_search_obj(handle); in efi_add_protocol()
1135 ret = efi_search_protocol(handle, protocol, NULL); in efi_add_protocol()
1157 notif->handle = handle; in efi_add_protocol()
1185 efi_handle_t *handle, const efi_guid_t *protocol, in efi_install_protocol_interface() argument
1190 EFI_ENTRY("%p, %pUs, %d, %p", handle, protocol, protocol_interface_type, in efi_install_protocol_interface()
1193 if (!handle || !protocol || in efi_install_protocol_interface()
1200 if (!*handle) { in efi_install_protocol_interface()
1201 r = efi_create_handle(handle); in efi_install_protocol_interface()
1204 EFI_PRINT("new handle %p\n", *handle); in efi_install_protocol_interface()
1206 EFI_PRINT("handle %p\n", *handle); in efi_install_protocol_interface()
1209 r = efi_add_protocol(*handle, protocol, protocol_interface); in efi_install_protocol_interface()
1225 static efi_status_t efi_get_drivers(efi_handle_t handle, in efi_get_drivers() argument
1236 list_for_each_entry(handler, &handle->protocols, link) { in efi_get_drivers()
1258 list_for_each_entry(handler, &handle->protocols, link) { in efi_get_drivers()
1297 (efi_handle_t handle, in efi_disconnect_all_drivers() argument
1305 ret = efi_get_drivers(handle, protocol, &number_of_drivers, in efi_disconnect_all_drivers()
1314 handle, in efi_disconnect_all_drivers()
1336 (efi_handle_t handle, const efi_guid_t *protocol, in efi_uninstall_protocol() argument
1346 efiobj = efi_search_obj(handle); in efi_uninstall_protocol()
1352 r = efi_search_protocol(handle, protocol, &handler); in efi_uninstall_protocol()
1369 r = efi_remove_protocol(handle, protocol, protocol_interface); in efi_uninstall_protocol()
1388 (efi_handle_t handle, const efi_guid_t *protocol, in efi_uninstall_protocol_interface() argument
1393 EFI_ENTRY("%p, %pUs, %p", handle, protocol, protocol_interface); in efi_uninstall_protocol_interface()
1395 ret = efi_uninstall_protocol(handle, protocol, protocol_interface); in efi_uninstall_protocol_interface()
1400 if (list_empty(&handle->protocols)) { in efi_uninstall_protocol_interface()
1401 list_del(&handle->link); in efi_uninstall_protocol_interface()
1402 free(handle); in efi_uninstall_protocol_interface()
1464 const efi_guid_t *protocol, efi_handle_t handle) in efi_search() argument
1472 ret = efi_search_protocol(handle, protocol, NULL); in efi_search()
1523 struct efi_protocol_notification *handle = NULL; in efi_locate_handle() local
1549 handle = list_first_entry(&event->handles, in efi_locate_handle()
1552 efiobj = handle->handle; in efi_locate_handle()
1580 list_del(&handle->link); in efi_locate_handle()
2304 efi_status_t efi_close_protocol(efi_handle_t handle, const efi_guid_t *protocol, in efi_close_protocol() argument
2316 ret = efi_search_protocol(handle, protocol, &handler); in efi_close_protocol()
2347 efi_close_protocol_ext(efi_handle_t handle, const efi_guid_t *protocol, in efi_close_protocol_ext() argument
2353 EFI_ENTRY("%p, %pUs, %p, %p", handle, protocol, agent_handle, in efi_close_protocol_ext()
2356 ret = efi_close_protocol(handle, protocol, in efi_close_protocol_ext()
2378 efi_handle_t handle, const efi_guid_t *protocol, in efi_open_protocol_information() argument
2388 EFI_ENTRY("%p, %pUs, %p, %p", handle, protocol, entry_buffer, in efi_open_protocol_information()
2396 r = efi_search_protocol(handle, protocol, &handler); in efi_open_protocol_information()
2441 efi_handle_t handle, efi_guid_t ***protocol_buffer, in efi_protocols_per_handle() argument
2449 EFI_ENTRY("%p, %p, %p", handle, protocol_buffer, in efi_protocols_per_handle()
2452 if (!handle || !protocol_buffer || !protocol_buffer_count) in efi_protocols_per_handle()
2458 efiobj = efi_search_obj(handle); in efi_protocols_per_handle()
2581 struct efi_protocol_notification *handle; in efi_locate_protocol() local
2596 handle = list_first_entry(&event->handles, in efi_locate_protocol()
2599 efiobj = handle->handle; in efi_locate_protocol()
2600 list_del(&handle->link); in efi_locate_protocol()
2601 free(handle); in efi_locate_protocol()
2632 efi_install_multiple_protocol_interfaces_int(efi_handle_t *handle, in efi_install_multiple_protocol_interfaces_int() argument
2642 if (!handle) in efi_install_multiple_protocol_interfaces_int()
2665 ret = EFI_CALL(efi_install_protocol_interface(handle, protocol, in efi_install_multiple_protocol_interfaces_int()
2679 EFI_CALL(efi_uninstall_protocol_interface(*handle, protocol, in efi_install_multiple_protocol_interfaces_int()
2704 efi_install_multiple_protocol_interfaces(efi_handle_t *handle, ...) in efi_install_multiple_protocol_interfaces() argument
2709 efi_va_start(argptr, handle); in efi_install_multiple_protocol_interfaces()
2710 ret = efi_install_multiple_protocol_interfaces_int(handle, argptr); in efi_install_multiple_protocol_interfaces()
2730 efi_install_multiple_protocol_interfaces_ext(efi_handle_t *handle, ...) in efi_install_multiple_protocol_interfaces_ext() argument
2732 EFI_ENTRY("%p", handle); in efi_install_multiple_protocol_interfaces_ext()
2736 efi_va_start(argptr, handle); in efi_install_multiple_protocol_interfaces_ext()
2737 ret = efi_install_multiple_protocol_interfaces_int(handle, argptr); in efi_install_multiple_protocol_interfaces_ext()
2755 efi_uninstall_multiple_protocol_interfaces_int(efi_handle_t handle, in efi_uninstall_multiple_protocol_interfaces_int() argument
2764 if (!handle) in efi_uninstall_multiple_protocol_interfaces_int()
2773 ret = efi_uninstall_protocol(handle, protocol, in efi_uninstall_multiple_protocol_interfaces_int()
2781 if (list_empty(&handle->protocols)) { in efi_uninstall_multiple_protocol_interfaces_int()
2782 list_del(&handle->link); in efi_uninstall_multiple_protocol_interfaces_int()
2783 free(handle); in efi_uninstall_multiple_protocol_interfaces_int()
2792 EFI_CALL(efi_install_protocol_interface(&handle, protocol, in efi_uninstall_multiple_protocol_interfaces_int()
2825 efi_uninstall_multiple_protocol_interfaces(efi_handle_t handle, ...) in efi_uninstall_multiple_protocol_interfaces() argument
2830 efi_va_start(argptr, handle); in efi_uninstall_multiple_protocol_interfaces()
2831 ret = efi_uninstall_multiple_protocol_interfaces_int(handle, argptr); in efi_uninstall_multiple_protocol_interfaces()
2851 efi_uninstall_multiple_protocol_interfaces_ext(efi_handle_t handle, ...) in efi_uninstall_multiple_protocol_interfaces_ext() argument
2853 EFI_ENTRY("%p", handle); in efi_uninstall_multiple_protocol_interfaces_ext()
2857 efi_va_start(argptr, handle); in efi_uninstall_multiple_protocol_interfaces_ext()
2858 ret = efi_uninstall_multiple_protocol_interfaces_int(handle, argptr); in efi_uninstall_multiple_protocol_interfaces_ext()
3058 (efi_handle_t handle, const efi_guid_t *protocol, in efi_open_protocol() argument
3065 EFI_ENTRY("%p, %pUs, %p, %p, %p, 0x%x", handle, protocol, in efi_open_protocol()
3069 if (!handle || !protocol || in efi_open_protocol()
3081 if (controller_handle == handle) in efi_open_protocol()
3099 r = efi_search_protocol(handle, protocol, &handler); in efi_open_protocol()
3473 efi_status_t EFIAPI efi_handle_protocol(efi_handle_t handle, in efi_handle_protocol() argument
3477 return efi_open_protocol(handle, protocol, protocol_interface, efi_root, in efi_handle_protocol()
3676 efi_handle_t handle, const efi_guid_t *protocol, in efi_reinstall_protocol_interface() argument
3681 EFI_ENTRY("%p, %pUs, %p, %p", handle, protocol, old_interface, in efi_reinstall_protocol_interface()
3685 ret = efi_uninstall_protocol(handle, protocol, old_interface); in efi_reinstall_protocol_interface()
3690 ret = efi_add_protocol(handle, protocol, new_interface); in efi_reinstall_protocol_interface()
3702 EFI_CALL(efi_connect_controller(handle, NULL, NULL, true)); in efi_reinstall_protocol_interface()