From patchwork Wed Apr 24 06:30:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1089959 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=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="bEih4pju"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44pr7t03Swz9s4V for ; Wed, 24 Apr 2019 16:31:53 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id AA448C21E7E; Wed, 24 Apr 2019 06:31:40 +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=RCVD_IN_MSPIKE_H2, 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 9AFFAC21C57; Wed, 24 Apr 2019 06:31:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C9995C21E1E; Wed, 24 Apr 2019 06:31:35 +0000 (UTC) Received: from mail-yb1-f193.google.com (mail-yb1-f193.google.com [209.85.219.193]) by lists.denx.de (Postfix) with ESMTPS id D0000C21E39 for ; Wed, 24 Apr 2019 06:31:34 +0000 (UTC) Received: by mail-yb1-f193.google.com with SMTP id x71so6695605ybe.6 for ; Tue, 23 Apr 2019 23:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=es8Yoox1rl3DztkD0Jyj40pDh5cGSgfYNKTDUAZscnI=; b=bEih4pju9AbxBhkz3Ggdebtpp483108G+TjIWp7dGQdRWWnXtbFiwezRNeCqqsh43b YTqHQVSfbJXJEKaCUuaH29U1P/m2Wli14uJiiY4V7uM228cCkBppOJys3X+hLhm8blpZ X1rI/6HatFTxfXbEf/EC4WlJAFxqXqudU0GoqRIIQDDrJavlOffc2HINuPTv8rVFJtoQ UfNyua713D+zLodGo5y/kXEvNR++CzFBTNX0r6GNB2GL1V1rbNQRR0Hdl+1Ergi97LwW hQtlh1gDNdUNKu6AVraRwvjCCKDgL2dw+/4BOhJ+XwdHHje7gJ/7eZVE6+hJAkzGXAT6 drhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=es8Yoox1rl3DztkD0Jyj40pDh5cGSgfYNKTDUAZscnI=; b=AqMUA9r+ZmTHOAFSf6gq8TMbqnHyrztvK5T/cT9dfWi+PM9x3T36RLONF6lQOYtsqi kWovuCiFuh//0oq3gJwPf7qkgZRi/Dn3rY7H/U8AEcFEPHl3TOAFC0b22C6fzLr8W8gW Nm8H54DxpFSQF9W5pFlYPOOSyykbFSyePfEXSpzBI5Zf18t3vM9QUZC/svL4e6U7U4MO U2xfjzCCjiStyCwKa8Ad+jIgzzccW9Q1Tt/6Uk6G+CwYunGn+vMRwNnT/L6Z1v7fNheF Erryzy+7V7ZyDQI/vlKP2GjP/MwjeEQm5l0DQd8/ahgIKz+VoJMTei//jtxIZKZHKhSz Qy+A== X-Gm-Message-State: APjAAAUW9dna/eIJBu+PWH1MDzOM78MhN6ZYQh9Q3WWU8rLa8aR13w6/ XIa8xWeRCJ8vF/UjwZVbH0QQtg== X-Google-Smtp-Source: APXvYqzszCtyY7grEg6tTzkRHCKfNfs/D1CnfN6XVqpCujLog94Kvv5jytWm1+OsBeQpP5hzfPUl3Q== X-Received: by 2002:a25:2451:: with SMTP id k78mr19860767ybk.126.1556087493474; Tue, 23 Apr 2019 23:31:33 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id x66sm3613704ywg.47.2019.04.23.23.31.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Apr 2019 23:31:33 -0700 (PDT) From: AKASHI Takahiro To: trini@konsulko.com, xypron.glpk@gmx.de, agraf@csgraf.de Date: Wed, 24 Apr 2019 15:30:38 +0900 Message-Id: <20190424063045.14443-5-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190424063045.14443-1-takahiro.akashi@linaro.org> References: <20190424063045.14443-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 04/11] efi_loader: set OsIndicationsSupported at init 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" UEFI variable should be installed using well-defined API. Currently we don't support much, but the value fo OsIndicationsSupported will be updated once some features are added in the future. Signed-off-by: AKASHI Takahiro --- cmd/bootefi.c | 4 ---- lib/efi_loader/efi_setup.c | 9 +++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/cmd/bootefi.c b/cmd/bootefi.c index efaa548be4d8..b93d8c6a32cd 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -303,10 +303,6 @@ static efi_status_t do_bootefi_exec(efi_handle_t handle) if (ret != EFI_SUCCESS) return ret; - /* we don't support much: */ - env_set("efi_8be4df61-93ca-11d2-aa0d-00e098032b8c_OsIndicationsSupported", - "{ro,boot}(blob)0000000000000000"); - /* Call our payload! */ ret = EFI_CALL(efi_start_image(handle, NULL, NULL)); diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c index 7d67a5506335..05d8d754f4c7 100644 --- a/lib/efi_loader/efi_setup.c +++ b/lib/efi_loader/efi_setup.c @@ -89,6 +89,7 @@ out: */ efi_status_t efi_init_obj_list(void) { + u64 val = 0; efi_status_t ret = EFI_SUCCESS; /* Initialize once only */ @@ -100,6 +101,14 @@ efi_status_t efi_init_obj_list(void) if (ret != EFI_SUCCESS) goto out; + ret = EFI_CALL(efi_set_variable(L"OsIndicationsSupported", + &efi_global_variable_guid, + EFI_VARIABLE_BOOTSERVICE_ACCESS | + EFI_VARIABLE_RUNTIME_ACCESS, + sizeof(val), &val)); + if (ret != EFI_SUCCESS) + goto out; + /* Initialize system table */ ret = efi_initialize_system_table(); if (ret != EFI_SUCCESS)