From patchwork Mon Jun 24 05:31:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1121071 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="GAvihemc"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45XJ0J2jGwz9s5c for ; Mon, 24 Jun 2019 15:35:12 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 17ED3C21F74; Mon, 24 Jun 2019 05:33:24 +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 6D3A0C21F76; Mon, 24 Jun 2019 05:31:51 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 63AE9C21EFD; Mon, 24 Jun 2019 05:31:46 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lists.denx.de (Postfix) with ESMTPS id DE993C21EFC for ; Mon, 24 Jun 2019 05:31:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1561354304; bh=v9E1Se4mLjnY3YtN/EdxYTkR2TcNMzVtYu29/xMdz/A=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=GAvihemcU9OMqJWrpQFSIA/EG4IMrBuyD9xhv915BRrOrva+a9fF9ncMosogej/GQ eQmTXqJfqfoFWiiDOSotHe4hpbK1ZlfiWVSoF8cUHzf7l9vTKpQjMijpqI/jYi/hfN Ml4mJOfRFxdSgVwOyagXhePWOkK8567E8dY0YYQY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from LT02.fritz.box ([84.118.159.3]) by mail.gmx.com (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MNKlu-1hvBsI06Ty-00OprW; Mon, 24 Jun 2019 07:31:44 +0200 From: Heinrich Schuchardt To: Alexander Graf Date: Mon, 24 Jun 2019 07:31:12 +0200 Message-Id: <20190624053116.18669-12-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190624053116.18669-1-xypron.glpk@gmx.de> References: <20190624053116.18669-1-xypron.glpk@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:pRt9d1MT9yRiRWx+S6DlNGXuQ5xV1jeBMRYaje/FxM9inRv4LTe EjOY2iNIR/04IM2lRiJPNkpUwI47deJeR51piOl9N+ypomEu+3Wi5S1UkbxkjlanTShw9wM aCx1jZ2YySIzXRz2gJjDpXoTTgteS55saa/nik2bfidlWk85DLIxJaMKXeH0UTmHZ8frihE Hw3SbS7Nn0CJBKXAFy/yA== X-UI-Out-Filterresults: notjunk:1; V03:K0:byYIi3Rv/QQ=:9bIxFPp22Tdvfssjtqc3rs XnB1DZ+C+L0A/JGLH8hZ1Rsyjbsbu5eh408hNyAMLexRQpJjgKp0S7j+leXqRyNFR2V/7zU8Q oHAnb+14L6N5n2ZJgrO0ZYI6wlxFlfzK37YFTb7pU9Trgv33PopmF17pyInUH6ckA6GDJ5cLD MZQ8o8xXmFDK0T02ucIyzukudZNZA3ZWQ+LcYrKFCGChCTQEBnCecCe3CosfovLtZbGVwfosR gVY7OSlDJpuwPP743ZKcC2Td7gKLGfe3EylGcnhvQo2FV3XTmemjWJvnsDWwS0X9J/Qj72RmY SuwPfP3bk6/tohfYS804HQBgJ3dO4tzp4edy0y1TrGHL6VilNhFUaoJfxtZkCphnWlfPcOplq GfQt+c9AakNUJsY7mTF6fzpUWp3KCP/SGO91GgbF0pg2fGKClc3AoRkNzT8zwIWH78CCaB0/S /PYVXuFlEKqqiKdI70JeaDbVxZ5l+ItnjnkWdioAFJoIlCL0hlpdHBZY+BzJNY4jON1DCd685 GDmBLzvtsXsu2gt/RoCveKBbUI5OfrNwl850+D3A23gLI3AUrQO5CZtS0Z5Z7dwRtJPyQF/18 VQ5wVuHDbbQTBowpZe6PLYXulvSFaAI3EqHSJ1pLd13waory4ivTj0QjIvEaopBADR+FFwGA4 rTBQPzt7JABtOXnl1z+4RTVe9IruP7vCIZRTaLscO3tgRZVHkfpy5jhqx96yhjiDmUdnEuNbS vI8Ya9r70+8hu63FH5OieJvcXManSdq8JV6CVqrWS3n1faqrMwL4yihx+4hrIrCTYsyfKOG5+ 7qpfimlrYUILzpxHynXAotc6NT8KOzxchqwVNaQl0LqyktD0lYv9Ga4Zakkd+wRvw8CN+yRJi Xxd06AgKtZ8wUAfzUoZE7wvSLE53MZomOtGmG/+K4GCoWVquer55LSWC+ZtzWv0ScsiMNLes8 fkJTOiI4k5pFTct6EzMadDJ8A1fGeTyQ= Cc: u-boot@lists.denx.de, Heinrich Schuchardt Subject: [U-Boot] [PATCH 3/7] efi_loader: initialization of variable services 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" Provide an initialization routine for variable services. Signed-off-by: Heinrich Schuchardt --- include/efi_loader.h | 2 ++ lib/efi_loader/efi_setup.c | 6 ++++++ lib/efi_loader/efi_variable.c | 10 ++++++++++ 3 files changed, 18 insertions(+) -- 2.20.1 diff --git a/include/efi_loader.h b/include/efi_loader.h index de1e67fd40..d30c4e8ef3 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -325,6 +325,8 @@ extern struct list_head efi_register_notify_events; /* Initialize efi execution environment */ efi_status_t efi_init_obj_list(void); +/* Initialize variable services */ +efi_status_t efi_init_variables(void); /* Called by bootefi to initialize root node */ efi_status_t efi_root_node_register(void); /* Called by bootefi to initialize runtime */ diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c index a3f59506d8..d73a3dd706 100644 --- a/lib/efi_loader/efi_setup.c +++ b/lib/efi_loader/efi_setup.c @@ -108,6 +108,12 @@ efi_status_t efi_init_obj_list(void) /* On ARM switch from EL3 or secure mode to EL2 or non-secure mode */ switch_to_non_secure_mode(); #ifndef CONFIG_EFI_VARIABLES_NULL + + /* Initialize variable services */ + ret = efi_init_variables(); + if (ret != EFI_SUCCESS) + goto out; + /* Define supported languages */ ret = efi_init_platform_lang(); if (ret != EFI_SUCCESS) diff --git a/lib/efi_loader/efi_variable.c b/lib/efi_loader/efi_variable.c index f71dc29ee9..6210425f5e 100644 --- a/lib/efi_loader/efi_variable.c +++ b/lib/efi_loader/efi_variable.c @@ -547,3 +547,13 @@ efi_status_t __efi_runtime EFIAPI efi_query_variable_info( { return EFI_UNSUPPORTED; } + +/** + * efi_init_variables() - initialize variable services + * + * Return: status code + */ +efi_status_t efi_init_variables(void) +{ + return EFI_SUCCESS; +}