From patchwork Sat Aug 5 16:58:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 798272 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 3xPqmJ1qPxz9t1K for ; Sun, 6 Aug 2017 03:00:16 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id EF539C21D82; Sat, 5 Aug 2017 17:00:12 +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, RCVD_IN_MSPIKE_H2 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 9A4F4C21C62; Sat, 5 Aug 2017 17:00:10 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D369DC21DD4; Sat, 5 Aug 2017 17:00:08 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lists.denx.de (Postfix) with ESMTPS id 786B3C21C2B for ; Sat, 5 Aug 2017 17:00:08 +0000 (UTC) Received: from workstation4.fritz.box ([84.118.154.110]) by mail.gmx.com (mrgmx101 [212.227.17.174]) with ESMTPSA (Nemesis) id 0LlHsg-1d49uj27d8-00b3UE; Sat, 05 Aug 2017 19:00:07 +0200 From: Heinrich Schuchardt To: Alexander Graf Date: Sat, 5 Aug 2017 18:58:49 +0200 Message-Id: <20170805165851.23461-2-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170805165851.23461-1-xypron.glpk@gmx.de> References: <20170805165851.23461-1-xypron.glpk@gmx.de> X-Provags-ID: V03:K0:O3e2kJSSBcKNnARo6v48Ws6WNg0V0kDMpEgKpTdnlknssHTU4NK t+3o8LU09PKKwI27UFBVQ5/F/OB/qAYWXtsF9KJ9bwmaEWkmgK8/yTA89RacX1SlTJauvcH NmFCxbscP3EKuxT29eaF+ZOqplQ0TndMuET3caDCNdRSDfoBpgD60ZWOhxUNwEhttYZBOvS v+Pdb8uxBXpEWfG/TrM4Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:O9ejrPaOdBs=:U0jHOAB+JyllNdfi28TgYj Xmvk6hKB+H98E4gE0ZUu1iLTNtim01JpoP452AQZgIHNzb93cAaNWSugEb11dL4EADwZHCbo9 3Ewmk32Z7ZST4s37yx2G73esCvpDLERuHoRxlMk/xk7Pdi2VRD+qQ6mRO1npZS9ZmQrYGrkAv 6xlXPZZleP/y1cTrBZ33XpDRn5DJ+bQf47EG5rbQ2D2tjGux1flOwuwZ6uRh5sHM3IzO8y6+t RDA8H2c5BM3XrNKGa3fmOZ0wgWhXFejg904YP5aaHb4NmrPqBDk8sDqO4Ot8kWmBNTNMARIUb 9TF/tEzziFSTiHStnW3puZe6y5Kvz5P0hD0uTxvv1pVHGVcwUG5dbXtvHHW6QPTG9cQw0Tl7L jil+dGCucHdQylYXMHlkdieuj6r6FgKX+XKPX9OSFbPJH29D7zHimkicC3t/NqSbqnT9fwyJX JhLKYJFnx0mm4W4i0mQOOIV0u1O3SvU0joce712QLmIbV/2NuDzK+1ppoQN+y/0ghhgPL5Te7 x2aSkij2aWM0ydtOp7Y565WoYoI5lAKgbHURstKndV4EK/V22ZmYNCHIDj/CZYVEs9wYtoMAq GbKmFQyIamqNcAT7LMt0aNGVACUG81dSKHCPDncCw0MaKDfvilR0pN3iDq1moJNBoLmJXcMSd B4zmaCrnGhr0WGJjoU6bYkXz/0DVlwErmCsf1QHfeq7rtuW8agu3SQ03r1EVn5EJ/+GjX0T16 LfdMTYNlniiSY7Fkd3bZJvFP0AZD3uNgDmooyhtUponhCUXf5hXBtGgX2ueqt8f935JaU9Hnt mFmUoU7QsaIYoSg645M7uNUmgJjlw== Cc: u-boot@lists.denx.de, Heinrich Schuchardt Subject: [U-Boot] [PATCH v2 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. Signed-off-by: Heinrich Schuchardt Reviewed-by: Rob Clark --- 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: