From patchwork Sun Dec 17 15:43:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 849637 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3z07nP72kkz9sR8 for ; Mon, 18 Dec 2017 02:46:33 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id AB9F1C21FFE; Sun, 17 Dec 2017 15:45:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B234BC21F78; Sun, 17 Dec 2017 15:44:56 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 48847C21EF1; Sun, 17 Dec 2017 15:44:55 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lists.denx.de (Postfix) with ESMTPS id E8B33C21D56 for ; Sun, 17 Dec 2017 15:44:54 +0000 (UTC) Received: from workstation4.fritz.box ([94.114.42.150]) by mail.gmx.com (mrgmx103 [212.227.17.174]) with ESMTPSA (Nemesis) id 0MUYiV-1eZECl0BPf-00RKiS; Sun, 17 Dec 2017 16:44:52 +0100 From: Heinrich Schuchardt To: Alexander Graf Date: Sun, 17 Dec 2017 16:43:26 +0100 Message-Id: <20171217154342.15469-1-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.14.2 X-Provags-ID: V03:K0:/wWEG8RWJEagCmy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QtPp OHjw7zKnbYLMRYI/phNrY9Qj/zsvQ== Cc: u-boot@lists.denx.de, Heinrich Schuchardt Subject: [U-Boot] [PATCH 00/16] efi_loader: implement driver management X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This series implements the OpenProtocolInformation, ConnectController, and DisconnectController boot services. The EFI application creating a new device will call ConnectController to request the installation of all necessary drivers. Before deleting the device it will call DisconectController to remove all child controllers and to detach the driver. E.g. iPXE may be used to connect an iSCSI target. It then creates a handle by installing the EFI_BLOCK_IO_PROTOCOL. It calls ConnectController and expects U-Boot to create the partition handles and to provide the EFI_SIMPLE_FILE_SYSTEM_PROTOCOL. (The driver connecting to the EFI_BLOCK_IO_PROTOCOL is not yet implemented in U-Boot.) A self test is provided for the driver management. The bootefi selftest now creates colored output. Two bug fixes are included. To complete the implementation of the EFI boot services the following future work is needed: * manage events in a linked list (see Rob's proposal) * implement ReinstallProtocol and RegisterProtocolNotify Heinrich Schuchardt (16): efi_selftest: colored test output efi_loader: simplify efi_remove_all_protocols efi_selftest: do not try to close device path protocol efi_loader: list of open protocol infos efi_loader: open_info in OpenProtocol efi_loader: open_info in CloseProtocol efi_loader: implement OpenProtocolInformation efi_loader: debug output installed device path efi_loader: implement ConnectController efi_loader: fix signature of efi_disconnect_controller efi_loader: implement DisconnectController efi_loader: disconnect controllers in UninstallProtocol efi_selftest: remove todo in manage protocols efi_selftest: remove todo in device path test efi_selftest: test for (Dis)ConnectController efi_loader: consistently use efi_handle_t for handles cmd/bootefi.c | 10 +- include/efi_api.h | 48 +- include/efi_loader.h | 31 +- include/efi_selftest.h | 27 +- lib/efi_loader/efi_boottime.c | 757 +++++++++++++++++++++--- lib/efi_loader/efi_console.c | 6 +- lib/efi_selftest/Makefile | 1 + lib/efi_selftest/efi_selftest.c | 25 +- lib/efi_selftest/efi_selftest_console.c | 13 +- lib/efi_selftest/efi_selftest_controllers.c | 385 ++++++++++++ lib/efi_selftest/efi_selftest_devicepath.c | 48 +- lib/efi_selftest/efi_selftest_manageprotocols.c | 22 +- 12 files changed, 1209 insertions(+), 164 deletions(-) create mode 100644 lib/efi_selftest/efi_selftest_controllers.c