From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Google-Smtp-Source: AG47ELudrQvsU8lcQkI31Ke09iw7b9rDUWmoec/a6hwnHofRDcFMkVLmF+4i7UybnM+f3MN1Pvm8VQ== 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 Cc: leif.lindholm@linaro.org, Ard Biesheuvel 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: [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: , X-List-Received-Date: Fri, 16 Mar 2018 16:07:08 -0000 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