From patchwork Fri Mar 16 16:13:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 131930 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp939718ljb; Fri, 16 Mar 2018 09:13:36 -0700 (PDT) X-Google-Smtp-Source: AG47ELtKouN4eaLPYR0JL242OoEKP3ICWQZ/RnU+OUgkKFYTHYIZBqOLeJo6JXUvsbUALyYlaKAT X-Received: by 10.98.204.12 with SMTP id a12mr1351751pfg.3.1521216815969; Fri, 16 Mar 2018 09:13:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521216815; cv=none; d=google.com; s=arc-20160816; b=g2+bDFfF7o+hRri0HsOynV1EYS5ExaBr+q6sjBCawCC77+AKP8JxFm84mxdeu8ArTb otAupOgXzqw1OJ/iE4O9wUbl/PZF9+fJ7nWGyv5N5Tba8vRvm8i/svcf7hkg5M7fXt/B F8z+iYChfS+4D6Z2bXkPrwTignqfvhnswrKwSXTHnI7bl4215kVd6dI+S5P4kR2Eoxdg UPJ/vvYEjDuSaRdtyTQJf+/NbXx2ztzob8L2au6k2qh8BUqT1/hTFwPxi/OwjGjrMpGx 554EEEsi3WLJouS1SGM9QM1LCbQ7Qwx0zjol/Y1LocOAfE8XgDSwz/L5AWn7le5EMUuv D9tA== 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:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=a8Oh1Jm0EJg+/VAfIYjOVSjdCWKz5Sj9quZjmvvqEzQ=; b=iQzQ6Wak5t9AUn4w6T9roYJIDZbOZok5yIemxVaGucI1C6wcgnDaWzWP4MeLUhKKVO 6xumcNWrhRJEzNEVPlBXCe2IJb5s9++345KmYFZsHPWP1+C118t8Iok7K3SM9KtjqB3N kJe1KPaNLVydbX3DveaqteFZCxUnjDRG124oyLq/KUmwUE761ATbk8wiyslIgCXRtlji KJS4F4sA0hwND+wFKfTa5J7++tlRLPB33hBD2D+0lCTtTTKFmg011CPz3L45j5oQjxOY W09wDhCpT99ErSuudYpAMv7dPjGEtqbofbAgo7A7+3eF9a176z6L9r/GaZMEtHSkbJGV hUOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=NQ/6d9X9; 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 v10si5124133pgs.164.2018.03.16.09.13.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 09:13:35 -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=NQ/6d9X9; 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 F2CBF2095609A; Fri, 16 Mar 2018 09:07:09 -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::233; helo=mail-wm0-x233.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (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 B460420954B86 for ; Fri, 16 Mar 2018 09:07:07 -0700 (PDT) Received: by mail-wm0-x233.google.com with SMTP id h76so4015244wme.4 for ; Fri, 16 Mar 2018 09:13:32 -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; bh=PpGaualzrPaHUxGnO0D9lWhmQlDxNFt/r4MoB9dAUII=; b=NQ/6d9X9tEiNjhYGWWEi+94N2PIy9f4qq0HhfnlMEIwv9uBDD6rTTvfuRyS/ynvkQe Ywmvd1Nmxq5pEy2GGXIYJdP3rFsEn+P5fowu2sZ5uXx3IuMeu6qX9HQC4AB5T0fHSxt8 cq9RZyHbIfWcSbt20/chAl9j+M7wNoU6nca1o= 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; bh=PpGaualzrPaHUxGnO0D9lWhmQlDxNFt/r4MoB9dAUII=; b=btK0AS05O34gG8sq2K53L0Zvv7mcCbH0Zis6jIsrJMApW38QyGZu4HV70Qn+34M0H/ z8XEydCYiX+DPt1mcLZyxo613OvA/Y/uakna2yv0tOMbDQx2EhAt71Xfav/ApIjwBm8U Nj7B2XaMw/Sp5CPa9XRO/N3lE8kPmS6qyml/1/6CMUecYiGbSqsIYi2ANxN2MdN3l+6X jdBo7nBJyKyNg3NrRcO2+vjWx/ojUxTXFY3W8ei9GtnGnI0jkKbmR3BDAM+zcCWQ4lvg LyxZzqlMRIlw3MwZsQaCNSxg+x63LZXld8EJSBv7bLUnpfZLdwQktRyA3R0SYZp1QsQ9 i43Q== X-Gm-Message-State: AElRT7GtZmrorv0XyA5KQU04uq9/9L0QFp4nua+/u2keVdxAzQdEqwjG o+IzEk5Cndn1ROFHikDzcYzxyAc+nmc= X-Received: by 10.28.214.2 with SMTP id n2mr2086058wmg.130.1521216809815; Fri, 16 Mar 2018 09:13:29 -0700 (PDT) Received: from localhost.localdomain ([105.142.191.63]) by smtp.gmail.com with ESMTPSA id n8sm7876242wrf.12.2018.03.16.09.13.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 09:13:28 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 16 Mar 2018 16:13:16 +0000 Message-Id: <20180316161322.6756-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.15.1 Subject: [edk2] [RFC PATCH edk2-platforms 0/6] expand capsule to include SCP firmware X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Now that the NOR flash layout has been updated to split the actual SCP firmware from the startup code and the builtin flasher, we can add the SCP image to the capsule update to make it field upgradeable. This involves some rather nasty plumbing, since making changes to capsule update installable via capsule update requires some additional care. Patch #1 fixes a bug in the FVB handling code of the flash access library. Patch #2 addresses an issue where we accidentally started to dereference arbitrary data as an FV header by incorporating the secure firmware binary into the flash device. Patch #3 is an optimization that speeds up flashing of sparse capsules. Patch #4 adds a PCD that holds the minimum firmware version that is allowed by a platform. We will use this to ensure that systems using the new layout cannot be flashed using older capsules, which is unlikely to work in any case, but not guaranteed to fail in a harmless manner. Patch #5 is a temporary hack we will need to use to build capsules that allow upgrading from the old layout to the new layout Patch #6 implements the new layout, and adds support to set the minimum version on the build command line. Ard Biesheuvel (6): Silicon/SynQuacerPlatformFlashAccessLib: fix return value on no FVB found Silicon/SynQuacerPlatformFlashAccessLib: don't dereference FVB header fields Silicon/SynQuacerPlatformFlashAccessLib: skip empty blocks Silicon/SynQuacer: make lowest supported f/w version PCD configurable TEMPORARY Platform/Socionext/DeveloperBox: add SCP firmware image to capsule Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 3 ++ Platform/Socionext/DeveloperBox/DeveloperBox.fdf | 15 ++++--- Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf | 2 + Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc | 2 +- Platform/Socionext/DeveloperBox/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini | 4 +- Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c | 46 ++++++++++++++++---- Silicon/Socionext/SynQuacer/SynQuacer.dec | 3 ++ 7 files changed, 58 insertions(+), 17 deletions(-) -- 2.15.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm