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::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 Cc: leif.lindholm@linaro.org, alan@softiron.co.uk, naresh.bhat@linaro.org, Ard Biesheuvel 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: [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: , X-List-Received-Date: Sun, 15 Oct 2017 09:51:38 -0000 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