Lines Matching refs:handle

498 void efi_add_handle(efi_handle_t handle)  in efi_add_handle()  argument
500 if (!handle) in efi_add_handle()
502 INIT_LIST_HEAD(&handle->protocols); in efi_add_handle()
503 list_add_tail(&handle->link, &efi_obj_list); in efi_add_handle()
512 efi_status_t efi_create_handle(efi_handle_t *handle) in efi_create_handle() argument
521 *handle = obj; in efi_create_handle()
534 efi_status_t efi_search_protocol(const efi_handle_t handle, in efi_search_protocol() argument
541 if (!handle || !protocol_guid) in efi_search_protocol()
543 efiobj = efi_search_obj(handle); in efi_search_protocol()
567 efi_status_t efi_remove_protocol(const efi_handle_t handle, in efi_remove_protocol() argument
574 ret = efi_search_protocol(handle, protocol, &handler); in efi_remove_protocol()
590 efi_status_t efi_remove_all_protocols(const efi_handle_t handle) in efi_remove_all_protocols() argument
596 efiobj = efi_search_obj(handle); in efi_remove_all_protocols()
602 ret = efi_remove_protocol(handle, protocol->guid, in efi_remove_all_protocols()
615 void efi_delete_handle(efi_handle_t handle) in efi_delete_handle() argument
617 if (!handle) in efi_delete_handle()
619 efi_remove_all_protocols(handle); in efi_delete_handle()
620 list_del(&handle->link); in efi_delete_handle()
621 free(handle); in efi_delete_handle()
1054 struct efi_object *efi_search_obj(const efi_handle_t handle) in efi_search_obj() argument
1058 if (!handle) in efi_search_obj()
1062 if (efiobj == handle) in efi_search_obj()
1111 efi_status_t efi_add_protocol(const efi_handle_t handle, in efi_add_protocol() argument
1120 efiobj = efi_search_obj(handle); in efi_add_protocol()
1123 ret = efi_search_protocol(handle, protocol, NULL); in efi_add_protocol()
1145 notif->handle = handle; in efi_add_protocol()
1173 efi_handle_t *handle, const efi_guid_t *protocol, in efi_install_protocol_interface() argument
1178 EFI_ENTRY("%p, %pUl, %d, %p", handle, protocol, protocol_interface_type, in efi_install_protocol_interface()
1181 if (!handle || !protocol || in efi_install_protocol_interface()
1188 if (!*handle) { in efi_install_protocol_interface()
1189 r = efi_create_handle(handle); in efi_install_protocol_interface()
1192 EFI_PRINT("new handle %p\n", *handle); in efi_install_protocol_interface()
1194 EFI_PRINT("handle %p\n", *handle); in efi_install_protocol_interface()
1197 r = efi_add_protocol(*handle, protocol, protocol_interface); in efi_install_protocol_interface()
1213 static efi_status_t efi_get_drivers(efi_handle_t handle, in efi_get_drivers() argument
1224 list_for_each_entry(handler, &handle->protocols, link) { in efi_get_drivers()
1246 list_for_each_entry(handler, &handle->protocols, link) { in efi_get_drivers()
1285 (efi_handle_t handle, in efi_disconnect_all_drivers() argument
1293 ret = efi_get_drivers(handle, protocol, &number_of_drivers, in efi_disconnect_all_drivers()
1302 handle, in efi_disconnect_all_drivers()
1324 (efi_handle_t handle, const efi_guid_t *protocol, in efi_uninstall_protocol() argument
1334 efiobj = efi_search_obj(handle); in efi_uninstall_protocol()
1340 r = efi_search_protocol(handle, protocol, &handler); in efi_uninstall_protocol()
1357 r = efi_remove_protocol(handle, protocol, protocol_interface); in efi_uninstall_protocol()
1376 (efi_handle_t handle, const efi_guid_t *protocol, in efi_uninstall_protocol_interface() argument
1381 EFI_ENTRY("%p, %pUl, %p", handle, protocol, protocol_interface); in efi_uninstall_protocol_interface()
1383 ret = efi_uninstall_protocol(handle, protocol, protocol_interface); in efi_uninstall_protocol_interface()
1388 if (list_empty(&handle->protocols)) { in efi_uninstall_protocol_interface()
1389 list_del(&handle->link); in efi_uninstall_protocol_interface()
1390 free(handle); in efi_uninstall_protocol_interface()
1453 const efi_guid_t *protocol, efi_handle_t handle) in efi_search() argument
1461 ret = efi_search_protocol(handle, protocol, NULL); in efi_search()
1512 struct efi_protocol_notification *handle = NULL; in efi_locate_handle() local
1538 handle = list_first_entry(&event->handles, in efi_locate_handle()
1541 efiobj = handle->handle; in efi_locate_handle()
1569 list_del(&handle->link); in efi_locate_handle()
2292 efi_status_t EFIAPI efi_close_protocol(efi_handle_t handle, in efi_close_protocol() argument
2302 EFI_ENTRY("%p, %pUl, %p, %p", handle, protocol, agent_handle, in efi_close_protocol()
2310 r = efi_search_protocol(handle, protocol, &handler); in efi_close_protocol()
2342 efi_handle_t handle, const efi_guid_t *protocol, in efi_open_protocol_information() argument
2352 EFI_ENTRY("%p, %pUl, %p, %p", handle, protocol, entry_buffer, in efi_open_protocol_information()
2360 r = efi_search_protocol(handle, protocol, &handler); in efi_open_protocol_information()
2405 efi_handle_t handle, efi_guid_t ***protocol_buffer, in efi_protocols_per_handle() argument
2413 EFI_ENTRY("%p, %p, %p", handle, protocol_buffer, in efi_protocols_per_handle()
2416 if (!handle || !protocol_buffer || !protocol_buffer_count) in efi_protocols_per_handle()
2422 efiobj = efi_search_obj(handle); in efi_protocols_per_handle()
2533 struct efi_protocol_notification *handle; in efi_locate_protocol() local
2548 handle = list_first_entry(&event->handles, in efi_locate_protocol()
2551 efiobj = handle->handle; in efi_locate_protocol()
2552 list_del(&handle->link); in efi_locate_protocol()
2553 free(handle); in efi_locate_protocol()
2587 (efi_handle_t *handle, ...) in efi_install_multiple_protocol_interfaces() argument
2589 EFI_ENTRY("%p", handle); in efi_install_multiple_protocol_interfaces()
2598 if (!handle) in efi_install_multiple_protocol_interfaces()
2601 efi_va_start(argptr, handle); in efi_install_multiple_protocol_interfaces()
2622 handle, protocol, in efi_install_multiple_protocol_interfaces()
2634 efi_va_start(argptr, handle); in efi_install_multiple_protocol_interfaces()
2638 EFI_CALL(efi_uninstall_protocol_interface(*handle, protocol, in efi_install_multiple_protocol_interfaces()
2661 efi_handle_t handle, ...) in efi_uninstall_multiple_protocol_interfaces() argument
2663 EFI_ENTRY("%p", handle); in efi_uninstall_multiple_protocol_interfaces()
2671 if (!handle) in efi_uninstall_multiple_protocol_interfaces()
2674 efi_va_start(argptr, handle); in efi_uninstall_multiple_protocol_interfaces()
2680 r = efi_uninstall_protocol(handle, protocol, in efi_uninstall_multiple_protocol_interfaces()
2689 if (list_empty(&handle->protocols)) { in efi_uninstall_multiple_protocol_interfaces()
2690 list_del(&handle->link); in efi_uninstall_multiple_protocol_interfaces()
2691 free(handle); in efi_uninstall_multiple_protocol_interfaces()
2697 efi_va_start(argptr, handle); in efi_uninstall_multiple_protocol_interfaces()
2701 EFI_CALL(efi_install_protocol_interface(&handle, protocol, in efi_uninstall_multiple_protocol_interfaces()
2906 (efi_handle_t handle, const efi_guid_t *protocol, in efi_open_protocol() argument
2913 EFI_ENTRY("%p, %pUl, %p, %p, %p, 0x%x", handle, protocol, in efi_open_protocol()
2917 if (!handle || !protocol || in efi_open_protocol()
2929 if (controller_handle == handle) in efi_open_protocol()
2947 r = efi_search_protocol(handle, protocol, &handler); in efi_open_protocol()
3299 efi_status_t EFIAPI efi_handle_protocol(efi_handle_t handle, in efi_handle_protocol() argument
3303 return efi_open_protocol(handle, protocol, protocol_interface, efi_root, in efi_handle_protocol()
3502 efi_handle_t handle, const efi_guid_t *protocol, in efi_reinstall_protocol_interface() argument
3507 EFI_ENTRY("%p, %pUl, %p, %p", handle, protocol, old_interface, in efi_reinstall_protocol_interface()
3511 ret = efi_uninstall_protocol(handle, protocol, old_interface); in efi_reinstall_protocol_interface()
3516 ret = efi_add_protocol(handle, protocol, new_interface); in efi_reinstall_protocol_interface()
3528 EFI_CALL(efi_connect_controller(handle, NULL, NULL, true)); in efi_reinstall_protocol_interface()