From patchwork Wed Mar 27 20:51:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1067420 X-Patchwork-Delegate: xypron.glpk@gmx.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=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="alfrUR/e"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44V0YP0VS6z9sQt for ; Thu, 28 Mar 2019 07:52:08 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id EE329C21E75; Wed, 27 Mar 2019 20:52:03 +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, T_DKIM_INVALID 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 081D9C21DED; Wed, 27 Mar 2019 20:52:01 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5C9B2C21DED; Wed, 27 Mar 2019 20:52:00 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lists.denx.de (Postfix) with ESMTPS id 47C97C21DA1 for ; Wed, 27 Mar 2019 20:51:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1553719918; bh=L26qjuDfK1GGWSHMTSWdhuORT/GqbsoIbJa0RSYKR0c=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=alfrUR/ePZIXV1pyvm7gFkvqNI2GIKfbndHPBtM/x9pdcUX18dDGNH8A9DkoZm3wB TS8ws3gVEYjsqkl70f8MX71QdFdsMFKk2Qze3q8gFW1tpT6YvVO1Cpr9A56R2q+EPi YumhX/Ut6Z8vGS+fjMyjeBsjgEGlLo6l4B97IHlY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from LT02.fritz.box ([84.118.159.3]) by mail.gmx.com (mrgmx101 [212.227.17.174]) with ESMTPSA (Nemesis) id 0LyA2L-1gweoi37GH-015dPQ; Wed, 27 Mar 2019 21:51:57 +0100 From: Heinrich Schuchardt To: Alexander Graf Date: Wed, 27 Mar 2019 21:51:53 +0100 Message-Id: <20190327205153.27812-1-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:MDF0tVcXokyM1OjX3NKkcSaRnMj+wvSXz5wRhhHvysWkji1iNal x2KmqdD3JpQLuZNV4+Rex9q+rJy/tjMrZfqgDBwJI12IaOhmjpezO7MRS354ZAk0D75Xv23 +/RJtoMey3RDvyrbBXZgZZjDGFroD+CYB7SMpy9N/TiWMDjmt0rJheFfrqUD6FF7WJiFp1N hui5OZ5n5QOFzgBR9emwQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:JsZMc1KXEeU=:Upq7y9sd1ZZs6k5pKZ8wHU smU9TGtjz9sLx+6FPWAtTr6sVtefbgugJQUCfrs+x0qxYBLvyfiUjiHke2oLAfwvHru+l4BKj he48qzVwDjiC+90TaJsJMNV1Nw6vwbkqPRwXO05fWCxCtAQIuLvLaFmMSGKQ6zhKFvE0O1GYV pr5wH7n/JvsHrriKm7YPM2mMznTDV1XQzZu0TlyspMMD8XCjm1U8VuOlzb4qkX1H5CLbGPwvI BIdrj/1+B/3Y+m6NxtjLRMVtQziXKEHiW6m0O/fsZqy/fJIQdHPkDrHDvXJh86bU1N703j7Rf Wfoifg71PvPrfpgY/hyQpUj7G9Ei54gN5oBbLxsnCMiCkUKHC+/aTay4j+ZYvEoDgp6ei4AJQ eJnmGjRkRK1aEAi7Co8P06RGgUFCtlhtXFW3aJEWfBmhszeNMsIjelPhxEvqc8tpddWpppEk2 tTs1zTaMsa4HtKNvQDm60xD0QForGRD7R9eJ7v3sRErRLDes3kZWhDCD1fcp8reGR2OT/7WqS RSpMjH4/+Lj8LHbRoaw4mG/19o2mZYuAytYTBAnTextd7djF22w28rA1z/mV3I8uG9zzXECcW PUCXeGu0OZ2TWT/gQZr254PEjJ04fUIu1BMW5Red92swKqqhJpQcKnI5Vp/YGuHrdOC9NUmqG SPzssDMbzj7D3UhpXufaNKC2CrMvoj5KEECZUYxTr+zrjqmorEwP/AzaMcPny7FgBYrPohXCR Kirpn1K2l2wMKYneKGu8JQl0lqYw9D75yzAbgdXcz+08Za0GsWipH77ym5MAIh/iZTMA1TPnY DRSs4MsKfKDln0PDcpTfxwBcrFl45zAu1JxJZbKgpHPc10ntjqQLMn2M4PMfGaq6CjjLIxQhc u6VsG44lGj86USimBaEnh/m44oxrwGP3e3DmffRHUDvPAXCIm7WhZv1rQiQaOy Cc: u-boot@lists.denx.de, Heinrich Schuchardt Subject: [U-Boot] [PATCH 1/1] efi_loader: TODO for the EFI file protocol 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" We currently only support EFI_FILE_PROTOCOL_REVISION while UEFI specs 2.4 - 2.7 prescribe EFI_FILE_PROTOCOL_REVISION2. Add a todo. Add missing constants for the EFI file protocol revision. Signed-off-by: Heinrich Schuchardt --- doc/README.uefi | 3 +++ include/efi_api.h | 8 +++++++- lib/efi_loader/efi_file.c | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/doc/README.uefi b/doc/README.uefi index 0982fad92e..cda29cdcf7 100644 --- a/doc/README.uefi +++ b/doc/README.uefi @@ -329,6 +329,9 @@ This driver is only available if U-Boot is configured with * persistence * runtime support +* incompletely implemented protocols + * support version 0x00020000 of the EFI file protocol + ## Links * [1](http://uefi.org/specifications) diff --git a/include/efi_api.h b/include/efi_api.h index 63b703c951..407acacc81 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -1326,7 +1326,9 @@ struct efi_pxe { #define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID \ EFI_GUID(0x964e5b22, 0x6459, 0x11d2, \ 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b) -#define EFI_FILE_PROTOCOL_REVISION 0x00010000 +#define EFI_FILE_PROTOCOL_REVISION 0x00010000 +#define EFI_FILE_PROTOCOL_REVISION2 0x00020000 +#define EFI_FILE_PROTOCOL_LATEST_REVISION EFI_FILE_PROTOCOL_REVISION2 struct efi_file_handle { u64 rev; @@ -1350,6 +1352,10 @@ struct efi_file_handle { const efi_guid_t *info_type, efi_uintn_t buffer_size, void *buffer); efi_status_t (EFIAPI *flush)(struct efi_file_handle *file); + /* + * TODO: We currently only support EFI file protocol revision 0x00010000 + * while UEFI specs 2.4 - 2.7 prescribe revision 0x00020000. + */ }; #define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION 0x00010000 diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c index bc715218a1..f2843cad2d 100644 --- a/lib/efi_loader/efi_file.c +++ b/lib/efi_loader/efi_file.c @@ -628,6 +628,10 @@ static efi_status_t EFIAPI efi_file_flush(struct efi_file_handle *file) } static const struct efi_file_handle efi_file_handle_protocol = { + /* + * TODO: We currently only support EFI file protocol revision 0x00010000 + * while UEFI specs 2.4 - 2.7 prescribe revision 0x00020000. + */ .rev = EFI_FILE_PROTOCOL_REVISION, .open = efi_file_open, .close = efi_file_close,