From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::244; helo=mail-io0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) (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 E9385210F6249 for ; Fri, 15 Jun 2018 09:19:32 -0700 (PDT) Received: by mail-io0-x244.google.com with SMTP id f1-v6so11197703ioh.6 for ; Fri, 15 Jun 2018 09:19:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Tov6cEe+9euTZIVl6lenl4e/l3Xob9ImgN4x8hkPdkY=; b=B8cv10kwpW8nkhD0D9QZecJ79LmcVY3PMVaf0KiqDZcsfR2qPB2kgokHzvv8NfyccX FlHIO3GS2hAS539+jW0xp1oJMR89bF+WpAI/ofjqNLaZJJHby8fK5r4YEctUnk8qYz5h eh9iyCzj3c637WS4dOWzWv+R+YmiVtSj8bQ5U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Tov6cEe+9euTZIVl6lenl4e/l3Xob9ImgN4x8hkPdkY=; b=JFOkeHVH8yU9uocJwQbSEg/SLtK2CucM1pQUVGJH6nl7M6SApYfZpwu9gTX1NUXrOw RVTP1RlsQW6EbGoBiluBQ4g5YxKBXz3k1MqjfxlVZ6QpZft01MRj2hDs88OslmUKktkz nWRxBxNA0/Lqmu0j6JoUepgSa2+xG97vQedUqi9C3A9XIjprZboHQegNC3o8l+9qbLLB GDuB/sDj5i4VfltcZbq1ckwndyBHLxvHVeAirjuMCoFIbx7qjC/IUA8hIhtwd/rG9QIb /ciu73OzuSRfON3quX3KPelXfrRjRF82RLkpIJH3V+/qyH7Tf8bL60NIl1n1TNH6WN8t 4qiQ== X-Gm-Message-State: APt69E1dConsYqGp6TtdfpdkheTa25S85785o0MlpVNo/CaHPplsaNUr lfcpa4ocULkG01KesLfG+KWOf/nUXSIqi6CnT5P1H/vLijE= X-Google-Smtp-Source: ADUXVKIAB5NxQ2O20R16F6FTd2YCFp/iTR9iajHNZ6jayWaiISBbTALhsOGXz7AlpetmoYzL4Hy+RcuOpOPpPinpV0E= X-Received: by 2002:a6b:520d:: with SMTP id g13-v6mr2196952iob.60.1529079571646; Fri, 15 Jun 2018 09:19:31 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:bbc7:0:0:0:0:0 with HTTP; Fri, 15 Jun 2018 09:19:31 -0700 (PDT) In-Reply-To: <20180613080901.7156-1-ard.biesheuvel@linaro.org> References: <20180613080901.7156-1-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Fri, 15 Jun 2018 18:19:31 +0200 Message-ID: To: "edk2-devel@lists.01.org" Cc: Leif Lindholm , "Zeng, Star" , "Yao, Jiewen" , "Kinney, Michael D" , Ard Biesheuvel Subject: Re: [PATCH v4 0/4] MdeModulePkg ArmPkg: support for persistent capsules and progress reporting 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: , X-List-Received-Date: Fri, 15 Jun 2018 16:19:33 -0000 Content-Type: text/plain; charset="UTF-8" On 13 June 2018 at 10:08, Ard Biesheuvel wrote: > This is the delta of code required to implement PersistAcrossReset on ARM > systems, and to wire up the capsule handling routines in a way that makes > the new progress reporting code do something meaningful on such platforms. > > Changes since v3: > - let both UpdateCapsule() and QueryCapsuleCapabilities() return EFI_UNSUPPORTED > when called at OS runtime on an ARM system > - reset the system unconditionally after having processed any capsules (#3) > - re-add Leif's ack (#3) > > Changes since v2: > - move cache handling from CapsulePei to CapsuleRuntimeDxe, and make it ARM only > - drop patch to change ProcessCapsules() logic in DxeCapsuleLibFmp; instead, > the platform BDS code is modified to perform the ProcessCapsuleImage() > call directly > > Changes since v1: > - incorporate Star's feedback (#1, #2) > - add Leif's ack (#4) > > Patch #1 ensures that the capsule data which is preserved in DRAM across > a reboot is written back to main memory before attempting to access it > with the caches off. > > Patch #2 updates DxeCapsuleLibFmp so it does not pass down the progress > indication callback if its own attempt to invoke it has already failed. > > Patch #3 updates ArmPkg's generic PlatformBootManagerLib implementation > to only call ProcessCapsules() after the [potentially non-trusted] > console is up and running, to ensure that firmware update progress can > be reported to the user. > > Patch #4 modifies ArmSmcPsciResetSystemLib to emulate a proper warm reboot > by reentering PEI with interrupts, MMU and caches enabled. This works > around the lack of an architected warm reboot in most current implementations. > (The PSCI spec does cover warm reboot, but it was added recently and most > secure firmware implementations haven't caught up yet) > > Ard Biesheuvel (4): > MdeModulePkg/CapsuleRuntimeDxe: clean the capsule payload to DRAM > MdeModulePkg/DxeCapsuleLibFmp: pass progress callback only if it works > ArmPkg/PlatformBootManagerLib: call ProcessCapsules() only once > ArmPkg/ArmSmcPsciResetSystemLib: implement fallback for warm reboot > Pushed as 488aab257f70..dde2dd64f070 Thanks all > ArmPkg/ArmPkg.dec | 4 + > .../ArmSmcPsciResetSystemLib.c | 21 ++++- > .../ArmSmcPsciResetSystemLib.inf | 9 ++ > .../PlatformBootManagerLib/PlatformBm.c | 86 +++++++++++++------ > .../PlatformBootManagerLib.inf | 1 + > .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 13 ++- > .../CapsuleRuntimeDxe/Arm/CapsuleReset.c | 77 +++++++++++++++++ > .../CapsuleRuntimeDxe/CapsuleReset.c | 51 +++++++++++ > .../CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf | 14 ++- > .../CapsuleRuntimeDxe/CapsuleService.c | 33 ++----- > .../CapsuleRuntimeDxe/CapsuleService.h | 73 ++++++++++++++++ > 11 files changed, 321 insertions(+), 61 deletions(-) > create mode 100644 MdeModulePkg/Universal/CapsuleRuntimeDxe/Arm/CapsuleReset.c > create mode 100644 MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleReset.c > create mode 100644 MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h > > -- > 2.17.1 >