From patchwork Thu Jun 7 11:32:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 137882 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1974997lji; Thu, 7 Jun 2018 04:32:13 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLy1zmWymmr6V4di+B+Musml7DcCteGDFNkAvRYpdErmRqX3u7Prvqc12JI+lsotEhqkcZr X-Received: by 2002:a17:902:581:: with SMTP id f1-v6mr1679154plf.48.1528371133219; Thu, 07 Jun 2018 04:32:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528371133; cv=none; d=google.com; s=arc-20160816; b=QxM2VXFL/iaOSHbRU2MNKeCDHg8Op8KlRDd2d2LpPbg9He55CUJ77EVt5dzMhdryFD fbI/YrePkHjiOs9Clb6Eee8mXqoaQZtoMFo9CtyI/OqzL3JzyTqlCI4UgsdvdGU97wh4 u2aEszkqF7J0n0XiB30HHOvLX3qdDHasmwKHMSvrgkRwpwOyWu08SxM7nFAz30zRIV/2 lDQ9WOdNukua2yUS9BI1Itvqfg5NNyxZErafmd1DPtKfPGsXVdml081X1wzzKyRAXEC+ +qOQPRZ9xkBhA42plYE5+3IbwCYTaEUgQyLHWqZIMfOTMfujyrIzlA3W+QiLYtNQ6l4X CeZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=36TnJ9cELASZCNUfOWGcC5AO85ZaNXbsoB9t4Gi1+TA=; b=NZh3iJn6EyuIFHErhvAKvcGsQJxB13DzzJ+fXXlYgtuEXmTyrgaHX07gVSDPsj/S8d 3OuTkItk3Z7WqQ39QnDyCt1Y+RkKunrSeUjCU1ZHPq1REwR1E+lgQ8O4erOWxHtmhFVR i3nuVzw3RoCuokns+eXVcS9MiY1VXkEyH6VF+k04yxxf1hoFXV2hcGSfg0ZTDZi8kzrO uLkjrvzGHumysnQaRhUh2Y2M6cYsrdeFyn8TdUcsUE4gh8q2O6LM5d5b1w4AbQia6Rss Xz/DmWtOsOO0OGzMWsJN5revCq9jcBfQyenrLwHkYezstmiBIL89rkmuAOqkaR2fitxM pg8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=HXV0CEju; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id v7-v6si52202219plp.304.2018.06.07.04.32.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 04:32:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=HXV0CEju; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A501E21164F00; Thu, 7 Jun 2018 04:32:12 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::242; helo=mail-wm0-x242.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CB6DF21161217 for ; Thu, 7 Jun 2018 04:32:10 -0700 (PDT) Received: by mail-wm0-x242.google.com with SMTP id v131-v6so18211178wma.1 for ; Thu, 07 Jun 2018 04:32:10 -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; bh=p9ojmxeDWfzoxlQ+t7R0aQYTNk1pQ17U9/DMxd9kIUA=; b=HXV0CEjuPuePysuy1Y8f46qai/h+Mdco6+ZOAxxRncaBU+3DqFRcYBSfMD3bGCC968 6f4eH+IncR3MwmutiNvybwlJkaZc+xixcjVT6+NB72qk5TI7nQIFKImZgGU/k9Yf2Jk0 DLgAREC/sQMkZIFX0po2Vf6FDsmNmq79sx0W0= 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; bh=p9ojmxeDWfzoxlQ+t7R0aQYTNk1pQ17U9/DMxd9kIUA=; b=dWHXRyo5k33QURvxzPKjt5NAs3NBWZBCkYn91vd2KWPT5ly/jcYFTi7cKeMWx6TSu1 UUq/gMeUZVcQRPK55g8Ka4m9SoywiifHS1m+KPCt8yvJUR8w4X+MIsk0isve5n8rGWth VLYk9tAgKzUD9YCfNrbRXqV4VSXeZuUig4jyUFjBde40CxuOpGblQ0EmI0At0krBdhsF kHny+RGZoHoTO3r7BcdPh5y8srA+wHShD9ZK1dvB4kLxF7uP4hBHWzskJ/W0QpaXeTAU gKjAonzA6BP8EZlTuQhEitLmwJiaHW4tt1MbQs5daxgBgJNvO9ZfFjCG+CysGwd7rVKN DAjQ== X-Gm-Message-State: APt69E3zJ8sRdMSKRmXzCW+uhEx1UzJtyvu1FNkqTCjJ/0pHDpcja7Tm zOEwEdIikzogUaOUdk+mlNCM1lxwVTo= X-Received: by 2002:a1c:5d4f:: with SMTP id r76-v6mr1417766wmb.93.1528371129118; Thu, 07 Jun 2018 04:32:09 -0700 (PDT) Received: from dogfood.home ([2a01:cb1d:112:6f00:88ff:8f90:37f1:db91]) by smtp.gmail.com with ESMTPSA id p3-v6sm39109483wrn.31.2018.06.07.04.32.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 04:32:08 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 7 Jun 2018 13:32:01 +0200 Message-Id: <20180607113203.27606-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180607113203.27606-1-ard.biesheuvel@linaro.org> References: <20180607113203.27606-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms 1/3] Platform/Socionext/DeveloperBox: add support for persistent capsules X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: michael.d.kinney@intel.com, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Add support for PersistAcrossReset capsules, by setting the associated PCD, and by enabling the warm reboot implementation that reenters PEI with interrupts, caches and MMU disabled. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc index 300e3fd656a5..1476257acce1 100644 --- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc @@ -226,11 +226,8 @@ [PcdsFeatureFlag] gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport|FALSE - # - # This requires support in ARM Trusted Firmware and SCP for warm reset, - # so disable for now - # - gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|FALSE + gArmTokenSpaceGuid.PcdArmReenterPeiForCapsuleWarmReboot|TRUE + gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|TRUE # needed for NFIT tables installed by RamDiskDxe gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE From patchwork Thu Jun 7 11:32:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 137884 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1975051lji; Thu, 7 Jun 2018 04:32:16 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLmXccsv1fknbvlBYR5Nu2oFYxIn9Luccit15efnxVnNBMqN1wJ/Lh9IrlPnhP4BzvecD/h X-Received: by 2002:a63:b812:: with SMTP id p18-v6mr1303088pge.11.1528371135870; Thu, 07 Jun 2018 04:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528371135; cv=none; d=google.com; s=arc-20160816; b=lrPnaYUnd5IP9ynk1+eNlN+pfouNj0U6IqhM9styVE7qYdV8CMb5QDeqw2368xMtbQ 9QGWbDgXF+AcuTTegHbnN1C2FGR8vlhJd9dX92NlEcv72Oz0h80U9DpsAPDYlqokt1Cb F1HOIRkc+a+1cTUzqxhGqNbYMHyJDJelt8bTWnLGBLr6uCxMkyvKzFReZzqdvEmVFw2g HjGPMdcRL/YV7T9XGsHTTrbzhRK6KUkBt9dy/nJXDQtXjAp0DNY1mf6NmpOC9bibmWk2 +UqhJjVlk6AkwgmIbE6006GZ7gzTCigGO+uuPqUbzexujYWn5LbUmpT9nnv61/TJBgvL k7Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=gvvSVp3CcTkvJIWGUrlm+gWxE4x2Fh74tCuslsi4Yyo=; b=WYk6x8rDBeZ4U2LIM4beviSEJRC69JsJLf9jlcuMe0BcxL2aJoRVznHL0oOrqPC1R3 t4wWiXrvjeB63A1WXmQx9xzaZyr0pG4PkOfnj/NOkwqVwG+oZbhRpyz2tI9vHRJz/v4K o4GEmV1FpfQLd7EMt883wtMzlntSQcKsp6PRCQk/1E5dpXbQ0uj1mcfPgg/n9IpcHNTK U/nAdPUcGyFHDDuWDAAKIm8eKW44oBz3wk64ZU3dO2jOweZNvrfZ7IhpNwLn7AlGZLMw GyfboHi7ydN3hzCkssK7hPjjgsNWyDEryg95dDMJBh8JN6/vyRkhr40Q4YsrlyyZP47U scTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=JnhwR1aY; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id l30-v6si53749467plg.420.2018.06.07.04.32.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 04:32:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=JnhwR1aY; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id CC2C92117922F; Thu, 7 Jun 2018 04:32:13 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::241; helo=mail-wm0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1D4A321164C5D for ; Thu, 7 Jun 2018 04:32:12 -0700 (PDT) Received: by mail-wm0-x241.google.com with SMTP id o13-v6so17156835wmf.4 for ; Thu, 07 Jun 2018 04:32:11 -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; bh=s1Kog8CudRibXrc0GUZDkDwMtskUAvVSGNg0qJwbsV8=; b=JnhwR1aYWdmlzxUD76a2a4oo42+asvZZVqgDS1bBSLgAp5STc/7S7tKYtyVe3qUryU bE0s5wulPWyPRkm9dTMNurCT09TWpjWJxUQcl3pzUfqVkLIo03cS5EzoboPyujB3Gy0s bcLeTGUdP1+MHTONVDS2BqooLlkNV/npcHLn4= 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; bh=s1Kog8CudRibXrc0GUZDkDwMtskUAvVSGNg0qJwbsV8=; b=IkwfxaeC53M+sE+6CBoL/oDZlj/hNYcmalYGfifmG2gm3bWLJgPGsFIddJGy6exwQv M8hemsh3DrDSj1I/EF52veIleYqU+XEWI7z+5LgXOUIoqR+VGWxJyydmkDTvqVxwaWW3 AXceXZinau3XZ/6j3rvMShrmSa2t/wf4Gpq2qewZtDmnDyj4g3E/eD6ITanOVxkkg13+ sgF9xJ/i/g20u9iAvUkUUdGSRohNnWpRmQseMjK9fBaIvCm5HJnb0eGnwcWWQjf27SDR 7hN6Yw11+MgtAy1cgjKk4ZtR8AP01EZdOz+0t0/UEjwvIfP7OhpXYNEbbeS7IlWH43gE v53A== X-Gm-Message-State: APt69E1zhnhWDo8XMu4dee7ojTPqvYr1GiH8IOr64gwiwEDYq8pEwdMT KWCULdf3dwvA6oaEiE9gioPExvq1Uqg= X-Received: by 2002:a1c:6f5a:: with SMTP id k87-v6mr1266915wmc.142.1528371130409; Thu, 07 Jun 2018 04:32:10 -0700 (PDT) Received: from dogfood.home ([2a01:cb1d:112:6f00:88ff:8f90:37f1:db91]) by smtp.gmail.com with ESMTPSA id p3-v6sm39109483wrn.31.2018.06.07.04.32.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 04:32:09 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 7 Jun 2018 13:32:02 +0200 Message-Id: <20180607113203.27606-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180607113203.27606-1-ard.biesheuvel@linaro.org> References: <20180607113203.27606-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms 2/3] Platform/Socionext/DeveloperBox: switch to PersistAcrossReset capsules X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: michael.d.kinney@intel.com, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Switch to the more common flavor of firmware update capsules that are only staged by the UpdateCapsule() service, and dispatched and processed after a warm reboot. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Platform/Socionext/DeveloperBox/DeveloperBox.fdf | 1 + 1 file changed, 1 insertion(+) -- 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf index f3618fd1d50a..b3e0b4a9fe1b 100644 --- a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf @@ -381,6 +381,7 @@ [Capsule.SynQuacerFirmwareUpdateCapsuleFmpPkcs7] CAPSULE_GUID = 6dcbd5ed-e82d-4c44-bda1-7194199ad92a # gEfiFmpCapsuleGuid CAPSULE_HEADER_SIZE = 0x20 CAPSULE_HEADER_INIT_VERSION = 0x1 +CAPSULE_FLAGS = PersistAcrossReset,InitiateReset FMP_PAYLOAD = FmpPayloadSystemFirmwarePkcs7 From patchwork Thu Jun 7 11:32:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 137885 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1975104lji; Thu, 7 Jun 2018 04:32:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJXgMzCMLtuCPyM9i8XEch/+TTb0HWkX9YPb6fJViwwpfmMmDsmdzXzgwQZgCaDmNBYMtdB X-Received: by 2002:a17:902:274a:: with SMTP id j10-v6mr1650190plg.393.1528371138685; Thu, 07 Jun 2018 04:32:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528371138; cv=none; d=google.com; s=arc-20160816; b=YfE/IApZfRvXOyQavsKjPQDGX9hpVAAlf/aR5kqF7YjB0mDbFMWq3vthGQo89jYGx8 oHumy1P/AaqMXDVSVxXeURUs0YnlhXvNyzVkuWgRx9IJZ3b2EevAtzB75nRSN8KRKp2D EDglHF9uP5QVKEA5PF+bSF3aeN7nDHwA6V+PMblHPX6t13ZpGJ6JQyQGqRKU39fX7fr5 eFV1eGOnKFljEJlq9akpD1qcCLJzq9rLXOxaIaON+Nl9/G7urcWPPsmANdxEUvYpZyhS UEgBYNTESKg5AzGH0JRQ4j7z+gC8NWuok1FSdAE9JgTgGx5LpLEuWrs3rOFj3AEERIBX 4Q6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=8sPG5s9g1Rn4uCYsIylHXz2T7h2sw2ZPYxm/b/hkl5Y=; b=jDB6xsaW1ZtS/tC9c/xOtSLzT+q4vNTqP4j6ugOzuttSwUmF2hVskApdwWbuf2oKv1 29HQkDRHENHTw/2sJKH+rOrriG6HBFqpkzJWD8L8OvoT8b8wrJp06tnElNgpmkXCT7nk UutCQK4waVMQxqSTD6gquflYGZ6IF7JV91Qx2nYNhKuiD6vtXUdJWfXKAF0r8pHn9z// eTTbj73FMxSxfNWwOlhABGYmshuVqvBNXOcWch7Amo28uutCyRZoyUWKYkCP4rzjG961 Yw6dB7gmX8Qus/0NGrJ8M7KrChuAlAz6lGPax0MGZQ3FfMLk3jDHeYMo6rI+1n6VmJpu 5seQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DFPT4d9s; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id d26-v6si13118843pge.330.2018.06.07.04.32.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 04:32:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DFPT4d9s; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id F19B821188469; Thu, 7 Jun 2018 04:32:14 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::22e; helo=mail-wm0-x22e.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3D4F221164C72 for ; Thu, 7 Jun 2018 04:32:13 -0700 (PDT) Received: by mail-wm0-x22e.google.com with SMTP id 69-v6so5129660wmf.3 for ; Thu, 07 Jun 2018 04:32:13 -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; bh=PKwnXOnjHl+iKijjTbK8tkfogQXcu040lMuMV7fvQy8=; b=DFPT4d9sai7vOnVwei3LsdzY8qAumeV8cHTpq+QNX4qvmTqlysR/WrdU0znJZjjcjf UDbvGYpy29IH6xdprmezxUDU5YSiawnUl+p7QRlpECcr7zifjIFoP0aGUYyTanWSGcwc TKrsjDNVy9Kv7eBV069hB1wyYqY4C2f6kyVAA= 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; bh=PKwnXOnjHl+iKijjTbK8tkfogQXcu040lMuMV7fvQy8=; b=mg8jOgv7WunThUk8G8ucCN626VjTeKmrIyHKNEuk9GWckzb56+VfxLHbC1aKgMBE+q sKI12Wx3WCmxL21Gm5DEn99JJAMMKl1h2SWeJz0JCNxdr9hyXrK9iEei1HIcwrNud8c9 aI05Q0+vQj1FIfOVQ6IZ72azEP38vzFKWGYVy/Jzapk2t+ShpM+GurIRfrLpn3S9enFu 1UXHjz+e0GIpeGENYHCkJtnHjwyjl1F/B9hFznuG9sGHWpl2q1UoA+mhAg5ObQe8PSNZ ej/y2dNhxoLlXAEMspQyzolvOSm95eDTopCVe9SlYR6DiOtt1+PHs+OO941vM6Mf7gD1 giAQ== X-Gm-Message-State: APt69E3Rf/9znFyXsrcgbrhS5rY1EtsVPVaBce6DmrWoVndDQyrNv84m D9eiO6Yn3OYiwPY1MW7a6wim2vqP8PE= X-Received: by 2002:a1c:afc3:: with SMTP id y186-v6mr1274982wme.87.1528371131528; Thu, 07 Jun 2018 04:32:11 -0700 (PDT) Received: from dogfood.home ([2a01:cb1d:112:6f00:88ff:8f90:37f1:db91]) by smtp.gmail.com with ESMTPSA id p3-v6sm39109483wrn.31.2018.06.07.04.32.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 04:32:10 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 7 Jun 2018 13:32:03 +0200 Message-Id: <20180607113203.27606-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180607113203.27606-1-ard.biesheuvel@linaro.org> References: <20180607113203.27606-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms 3/3] Silicon/SynQuacerPlatformFlashAccessLib: replace progress indication X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: michael.d.kinney@intel.com, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Replace the home cooked progress indication with calls into the new (*Progress)() argument to PerformFlashWriteWithProgress(), which allows the flash access routine to report progress via a platform provided callback. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c | 1 + Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c | 44 ++++++-------------- Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf | 1 - 3 files changed, 14 insertions(+), 32 deletions(-) -- 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm diff --git a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c index 38f1830b5c2e..c5e46dcd4ddf 100644 --- a/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c +++ b/Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c @@ -72,6 +72,7 @@ PerformFlashWriteWithProgress ( { EFI_STATUS Status; AMD_ISCP_DXE_PROTOCOL *IscpDxeProtocol; + UINTN Remaining; if (FlashAddressType != FlashAddressTypeRelativeAddress) { DEBUG ((DEBUG_ERROR, "%a: only FlashAddressTypeRelativeAddress supported\n", diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c index 48d385993b38..ebb6ce189aa5 100644 --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -195,17 +194,7 @@ PerformFlashWriteWithProgress ( EFI_LBA Lba; EFI_PHYSICAL_ADDRESS FvbBaseAddress; UINTN NumBytes; - EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION Black; - EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION White; - UINTN Resolution; - UINTN CurrentProgress; - BOOLEAN HaveBootGraphics; - - Black.Raw = 0x00000000; - White.Raw = 0x00FFFFFF; - - Status = BootLogoEnableLogo (); - HaveBootGraphics = !EFI_ERROR (Status); + UINTN Remaining; if (FlashAddressType != FlashAddressTypeAbsoluteAddress) { DEBUG ((DEBUG_ERROR, "%a: only FlashAddressTypeAbsoluteAddress supported\n", @@ -274,14 +263,8 @@ PerformFlashWriteWithProgress ( return Status; } - if (HaveBootGraphics) { - Resolution = (BlockSize * 100) / Length + 1; - CurrentProgress = 0; - - Status = BootLogoUpdateProgress (White.Pixel, Black.Pixel, - L"Updating firmware - please wait", Black.Pixel, 100, 0); - } else { - Print (L"Updating firmware - please wait "); + if (Progress == NULL) { + Print (L"\n\nUpdating firmware - please wait "); } // @@ -298,7 +281,8 @@ PerformFlashWriteWithProgress ( return Status; } - while (Length > 0) { + Remaining = Length; + while (Remaining > 0) { // // Write the new data // @@ -315,20 +299,18 @@ PerformFlashWriteWithProgress ( } } - if (HaveBootGraphics) { - Status = BootLogoUpdateProgress (White.Pixel, Black.Pixel, - L"Updating firmware - please wait", White.Pixel, - CurrentProgress + Resolution, CurrentProgress); - CurrentProgress += Resolution; + Buffer += BlockSize; + Remaining -= BlockSize; + Lba++; + + if (Progress != NULL) { + Progress (EndPercentage - + (Remaining * (EndPercentage - StartPercentage)) / Length); } else { Print (L"."); } - - Buffer += BlockSize; - Length -= BlockSize; - Lba++; } - if (!HaveBootGraphics) { + if (Progress == NULL) { Print (L"\n"); } diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf index 4dfa11372a38..6ca34ada1d03 100644 --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.inf @@ -33,7 +33,6 @@ [Protocols] [LibraryClasses] BaseMemoryLib - BootLogoLib DebugLib DxeServicesTableLib UefiBootServicesTableLib