From patchwork Sat Aug 5 20:32:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 798303 X-Patchwork-Delegate: agraf@suse.de 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 3xPwXJ30rbz9sNc for ; Sun, 6 Aug 2017 06:35:12 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 150B2C21EE5; Sat, 5 Aug 2017 20:34:50 +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.7 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_LOW 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 EDD6EC21EF2; Sat, 5 Aug 2017 20:34:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9F9ACC21D82; Sat, 5 Aug 2017 20:34:31 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lists.denx.de (Postfix) with ESMTPS id 3014FC21D82 for ; Sat, 5 Aug 2017 20:34:31 +0000 (UTC) Received: from workstation4.fritz.box ([84.118.154.110]) by mail.gmx.com (mrgmx103 [212.227.17.174]) with ESMTPSA (Nemesis) id 0M4o41-1dSU8p1VpF-00yxNW; Sat, 05 Aug 2017 22:34:30 +0200 From: Heinrich Schuchardt To: Alexander Graf Date: Sat, 5 Aug 2017 22:32:28 +0200 Message-Id: <20170805203230.19796-2-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170805203230.19796-1-xypron.glpk@gmx.de> References: <20170805203230.19796-1-xypron.glpk@gmx.de> X-Provags-ID: V03:K0:7e040dgVISLqbI8qLoPJbEQ7ZKRSD8NcPbxTRBhxIlzQG2aOqZw XoliiTD8Qbf5o37m8/TUjB0yipY1khLpMn0Ww8OKfzYgdKQ01++2TDl3ktDufmvGagFfjoI e0mqrQSBrA6vc2Zv9qc2Ap8NgYMKu+dl8Xw+NdjklV/XpWpga2s8l5jCx4ysBfFhGl/EWBW qHpbI2nLGTuri5QAuWqQQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:5t1XZN87HPM=:DxIKZBsAC5xoKdYXjeACfJ Lx8b7b/n8AJKjdmqvcmp3H+yaFdzkZ+D3JXFh+EgVcNW4X8q52Vnz3Xjwnx2PbSWPT6dWg3Ga oM2x2TcJ4FO8oZTQ5WNysLe6mas6ey6KhSnZf56uIREh8y0dP7fq0gLjnk9f41Q850MEA6bFh RKBtik1zRVFGQ3JuwWk1KoSmYXPDeVfeiVlvJ9pJBDT+XfnS6WhVa+/ZAHXiLlnuQUP9oVxeN 9Fkb56Q1F11kbjC83wWHR82UhEYNgVQKSMLCMPgSav5SLrYkJjxIRCj2sqBcsy5DXqm58Cohg /kPIFNk5yYOLbEAA00OZNZNExB8FW2xJD2kU6acLZj+snjPqL1CB0AGU8Q9zoXnv/g7xeoZx0 yknHgEfZ4ET1ZkACFiFpO1XnQAQmqwEDrXc117fW7q5sPOgCWjXwmnLFxYvs7C7tL6EGCFpFv GMlfZwnVzJV5fz46SP5VDitpgNn3+tgBrlTxV15zN+aAmRXXCqu2Egzgxec7TYM1BAhaz0n6t kzyzuo5KCRgVpJsN6tv9+W6pbWvLhecDnLOBZbgpvec6DhsJ3HM6/YD1RD7ePvyq7VoyIGxx4 KOrYctQZa2s8eXqhEESLkIqe1bbDWb9UJe5SdmDhVDJuYy6afnHCatDlh/twn/+qNtSjOP2G8 /8QCCg0RbVdT8Q07T+Qr1TpT/ziJvsrmv7ww/ykYNgTfN5Jv/U197keh3YPwG+4uzSYdUChDM vI9YX9/XgCzj8SCfrdlmR+bT+/wDhqqlHhm4opkcoPvCBJyinz69QLFjLKQmoM3hohymVFVNw 6O3aN2KrbxaW9h3znVCFHGfzQjZLQ== Cc: u-boot@lists.denx.de, Heinrich Schuchardt Subject: [U-Boot] [PATCH v3 1/3] efi_loader: write protocol GUID in OpenProtocol 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" To understand what happens in OpenProtocol it is necessary to know the protocol interface GUID. Let's write a debug message. Using uuid_guid_get_str would be quite clumsy for this purpose. This would involve evaluating _DEBUG which probably should not be used outside common.h. Cc: Rob Clark Signed-off-by: Heinrich Schuchardt --- v3: reference uuid_guid_get_str v2: fix typo in commit message --- include/efi_loader.h | 14 ++++++++++++++ lib/efi_loader/efi_boottime.c | 2 ++ 2 files changed, 16 insertions(+) diff --git a/include/efi_loader.h b/include/efi_loader.h index 037cc7c543..553c615f11 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -51,6 +51,20 @@ const char *__efi_nesting_dec(void); debug("%sEFI: Return From: %s\n", __efi_nesting_dec(), #exp); \ } while(0) +/* + * Write GUID + */ +#define EFI_PRINT_GUID(txt, guid) ({ \ + debug("EFI: %s %02x%02x%02x%02x-%02x%02x-%02x%02x-" \ + "%02x%02x%02x%02x%02x%02x%02x%02x\n", \ + txt, ((u8 *)guid)[3], \ + ((u8 *)guid)[2], ((u8 *)guid)[1], ((u8 *)guid)[0], \ + ((u8 *)guid)[5], ((u8 *)guid)[4], ((u8 *)guid)[7], \ + ((u8 *)guid)[6], ((u8 *)guid)[8], ((u8 *)guid)[9], \ + ((u8 *)guid)[10], ((u8 *)guid)[11], ((u8 *)guid)[12], \ + ((u8 *)guid)[13], ((u8 *)guid)[14], ((u8 *)guid)[15]); \ + }) + extern struct efi_runtime_services efi_runtime_services; extern struct efi_system_table systab; diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index fb05c9e093..ebb557abb2 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -1138,6 +1138,8 @@ static efi_status_t EFIAPI efi_open_protocol( goto out; } + EFI_PRINT_GUID("protocol:", protocol); + switch (attributes) { case EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL: case EFI_OPEN_PROTOCOL_GET_PROTOCOL: