From patchwork Sun Jul 30 14:11:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 795365 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 3xL4JL2nxcz9sDB for ; Mon, 31 Jul 2017 00:11:30 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 32477C2218B; Sun, 30 Jul 2017 14:11:25 +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 D998CC21F60; Sun, 30 Jul 2017 14:11:22 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 609A8C21F60; Sun, 30 Jul 2017 14:11:22 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lists.denx.de (Postfix) with ESMTPS id 08276C21EC2 for ; Sun, 30 Jul 2017 14:11:22 +0000 (UTC) Received: from localhost.localdomain ([84.118.154.110]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M04uG-1dpuTc00S4-00uF6d; Sun, 30 Jul 2017 16:11:20 +0200 From: Heinrich Schuchardt To: Alexander Graf Date: Sun, 30 Jul 2017 16:11:10 +0200 Message-Id: <20170730141110.1375-1-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.13.2 X-Provags-ID: V03:K0:oUcFX5dkocQZaHadJFzGwnX6/XbpeO+8JNBFduXhUXiDhUCAQMO IK0O0mysG8APT8PKmvuRj2dMKDuProXjVdPTZ3H/sAl4WP8k1dhbl/EINrLcv3itBzCfRSB ABWJUhmM+Z8lyWwOOVZRNFMgNEkM3KplKtu+M2VnxSj/qHUcprezOImYbeCvGmV57r7hfuO CZQfK1rzoFTLbBOOMCY3g== X-UI-Out-Filterresults: notjunk:1; V01:K0:dRSpWMZoVw4=:+U+nTXVkoDrY3OyTDUR6mH AYGyO2be7Ix+9gC0025HkInrRcca9MiX923E9+cNbF847aK7iUfj+G9CT2T0rFnf7hDIidAJE L/Dmk3iq9FLsQXwP9wm2TsorUcLAGrK3GZ9nJ+mTalDD7xgc3e7HWhuk1oUtdMMjzP+UKT48N xQzN64Eis2p6DiEi2t5QpZfme/fhYLJXfpO99Rji+dS1181n3xqfCr0y7VT77aRCKfsui2hqA F9V88kGduq5eaSwaJQnnxpnACQw1IT6XpT1a/YzugXc4SWD5UJXBz1ciJkayuerX1bCs/fOGl rjQtjUOqxB5iN2kU2u8ZNQOj8GeRYKXRygen4kiRhe97y5uuYzXWJfPQ90sJA8XNjd9TlLg0k +c46RMnmPdC1ZZc6Ut/PmZlCW0WZ1aFnq9kR3qLmkmEE9Icr/DNipTFoIHxyiPizfMe4Qdfgu qbDv+m89oP1QshBkNYaISfZbzpQODWNNUPccPyqIg5Kolnxlz0H4+c723bPqmIcdMUTGD6hNC JPYjsaagcdwPEvH5viHznNzGG7M1RN4PjuGTpoSejX4hanXD3ZteQl3cSkWCnl1CrGWkBsr+T /bVHjZDsTVPPu8VczGg9oTwM72/ZjZf/FSHvzvYKRXSn7v4OBzqVM+zrgqaCEEigh04DcgUDN s7J54oPq0fbj4eKGAxZplCmL9I0K902nyyhPylq4SZ/iGyHoCRb5wb8aOKlVg2fLK6G4CDfDv TQPFQvYDEcC1EBLhj28060ZQOWJ6nU+50JIuvua+dfL6/VvmAGzG029HqkjE0LT6mZ6ax8Zrl Mt1chaDKlciB486PxRY/Ky4M34VuQ== Cc: u-boot@lists.denx.de, Heinrich Schuchardt Subject: [U-Boot] [PATCH 1/1] 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 OpenProtol it is necessary to know the protocol interface GUID. Let's write a debug message. Signed-off-by: Heinrich Schuchardt --- 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 fb91d72afd..a08dfa26f9 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 c29a9b0ad0..2a58c29998 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -1314,6 +1314,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: