From patchwork Sun Oct 15 09:54:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 115880 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2548209qgn; Sun, 15 Oct 2017 02:55:15 -0700 (PDT) X-Received: by 10.159.229.136 with SMTP id az8mr4660716plb.133.1508061314975; Sun, 15 Oct 2017 02:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508061314; cv=none; d=google.com; s=arc-20160816; b=mmReJlioijJbF5AG4zrV3ZEJvNxBbxN4jMQL/9Pa2Zi6iyk9Vk4MvT3yG+EpX9eg3b flEZ+MWSJLu6H3ns8yFH3j8jTSHmLerfr/LdYDUNOfwubvAa60Dj5mlNzfSJQfXIEt0C uszOBlcwfUmWy22bNscMuNm2W0MbEhrKx1QDN7yU60hheNSr0W4TgxFNlML2DXfd7q/m 95nflS8JE8xLTsTPrhjzgUZSvKTCdDpqNq6O6N0QMFd89FYZkMWDo6FOPf195w670Emd e3CTNbbummIfHeSjsOIXz3ObONfQYVQhu6r7Fnw+uCQD3Ef2oFv8Wj9t1L6XiRBWWbjF SG9w== 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=V+x2FJAO6AG3g6vPm/NWM4AWTWcqh0abECJ2TjaAbR0=; b=JF/+Fw+uRxEmEe4ex56vJt03e6J35uDbf9xJCX+aFFHPRckasCZuq3/ReaS0Ziw4Si nPMluTdsXbJaSPJKh8X11N9wsSkTyV7ptE1n8JdlSGrID/toILbgBWSxmYZXOa24VSsK zV/8uDJCSoWow+P0qDjqqCDbzOTO30jsvjOURR5ZR/J9/LkERQps9FNqM7HPsELZ0wOQ 6uWIp7I7+JE7CF1pa2c62N4LhsTKJSV2jyh9XzobAh210dqrVzhBo6SKhQLO3yuWXYjQ y83VKqfokBkQvx7zHZC82AHJIKA+rF8Y0KnB5JCr6kIuq2pTrCPaZ8El7w+/A3NLiQJn 7tDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Gb/f/QdA; 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 m7si3060185plt.61.2017.10.15.02.55.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Oct 2017 02:55:14 -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=Gb/f/QdA; 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 E89BF202E610E; Sun, 15 Oct 2017 02:51:39 -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::22b; helo=mail-wm0-x22b.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (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 1BD2021C8EFB5 for ; Sun, 15 Oct 2017 02:51:37 -0700 (PDT) Received: by mail-wm0-x22b.google.com with SMTP id 196so909683wma.1 for ; Sun, 15 Oct 2017 02:55: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; bh=8raLt37AuVaub7ninChtLhTyMAwcpBef0q+ILcKQisQ=; b=Gb/f/QdAEWZGB6gNnTv4kutiZurOmjOqATJqX2UB6cNSLd7E5BlyKrtTLyymJahB4R FawpYjcYMGdenFVlTyhqRWzCZWnrGvde0wV9qqE8ZF5eC9KOz2FOQJZhHoBYv5dPdI6k ZDcFbDAIjrA9b+AqO4HnfQxwTCALe3LfCjKpw= 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=8raLt37AuVaub7ninChtLhTyMAwcpBef0q+ILcKQisQ=; b=Mtxs2GdqrdUrj+9T48XcGWLf4q6T9xpOcVrPmVa3bj0YeQ0FCbZqhMWF3KYW99bbjR X4W22y6jL2ztVSBtne77U9ocudS+7zfjqphPpvf30EisQqcmEGBFEkyuHM3PA0i+Q+id 1A4quGStTMkFZWeKhatt8CsCjSVXiarNU2W4uRqJHJdH2aQ+saN14mJS4Ngh5GBIT2fs 2qRVQuk/WC/xnUDW4Ra2vSFHtN/ihGufLruuf9JYnFpSqeLoAd9m2HpmnvHI7UYVOHmo yWLlkAd1/mxMrhndCHpBkPcG7cXXNAI0Zyvy+GiipNhZOFsUUWW7ltK+Nsh4u4MxhrZt eKqA== X-Gm-Message-State: AMCzsaW+as9S+r2DdQqwqpYZF3CaShJjYBC3GbE8kXfJ9mu9bey3Ucd9 b0yKMykvn8vm0wQGmzlNPAVRtTNrfIk= X-Google-Smtp-Source: ABhQp+QKM45lvY2pO/YbV/1PSilQYvMy9Wu4UogmjVuXkmBXvxUD28W5dwLrZ1yVeyJEq8l/qUixUA== X-Received: by 10.28.211.66 with SMTP id k63mr4761492wmg.33.1508061309715; Sun, 15 Oct 2017 02:55:09 -0700 (PDT) Received: from localhost.localdomain ([154.146.29.151]) by smtp.gmail.com with ESMTPSA id 25sm3938943wrv.8.2017.10.15.02.55.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Oct 2017 02:55:08 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Sun, 15 Oct 2017 10:54:48 +0100 Message-Id: <20171015095453.4420-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [PATCH 0/5] Platform/AMD/Overdrive: implement capsule support + some fixes X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alan@softiron.co.uk, Ard Biesheuvel , leif.lindholm@linaro.org, naresh.bhat@linaro.org MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" This implements signed capsule update for AMD overdrive. Due to the lack of support for warm reboot in the secure firmware, this only works from the boot environment, not from the OS. To update, build CapsuleApp [from MdeModulePkg] and issue the following command FS0:> CapsuleApp STYXFIRMWAREUPDATECAPSULEFMPPKCS7.Cap The update itself takes a minute or so, without producing any output. >From the OS, fwupdate -l [as root] will give output like {d34b3d29-0085-4ab3-8be8-84188cc50489} version 1 can be updated to any version above 0 but note that we will need to fix fwupdate to support non-persistent capsules. The signing key is simply the test key from the EDK2 repo. Patches #1 .. #3 are some unrelated fixes/improvements. Patch #4 implements the PlatformFlashAccessLib instance that can be shared across Styx platforms. Patch #5 wires up all the bits and pieces for Overdrive. Doing the same for the other Styx platforms is trivial, but should use different GUIDs to prevent the capsules from being applied to the wrong platform. Ard Biesheuvel (5): Platform/AMD/Overdrive: remove StatusCodeLib references Silicon/AMD/Styx: update SMMU id to MMU-401 Silicon/Amd/Styx: fix flasher support Silicon/AMD/Styx: add PlatformFlashAccessLib implementation Platforms/AMD/Overdrive: add signed capsule update support Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 45 ++++--- Platform/AMD/OverdriveBoard/OverdriveBoard.fdf | 83 +++++++++++++ Platform/AMD/OverdriveBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptor.aslc | 80 ++++++++++++ Platform/AMD/OverdriveBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf | 46 +++++++ Platform/AMD/OverdriveBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptorPei.c | 68 +++++++++++ Platform/AMD/OverdriveBoard/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini | 25 ++++ Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc | 2 +- Silicon/AMD/Styx/AcpiTables/Iort.c | 2 +- Silicon/AMD/Styx/Applications/StyxFlashUefi/StyxFlashUefi.inf | 2 +- Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c | 128 ++++++++++++++++++++ Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.inf | 47 +++++++ 11 files changed, 511 insertions(+), 17 deletions(-) create mode 100644 Platform/AMD/OverdriveBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptor.aslc create mode 100644 Platform/AMD/OverdriveBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf create mode 100644 Platform/AMD/OverdriveBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptorPei.c create mode 100644 Platform/AMD/OverdriveBoard/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini create mode 100644 Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.c create mode 100644 Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.inf -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel