From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (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 B84C5821ED for ; Thu, 2 Mar 2017 08:15:16 -0800 (PST) Received: by mail-wm0-x236.google.com with SMTP id t193so16229972wmt.1 for ; Thu, 02 Mar 2017 08:15:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=30hAkUh7CdgknxSw104heNk9kYKEBgKR1h8VexbH8UE=; b=OwrB082xhcRn4j7FRww+lQJEHEMi4FxEc9MSDZGSI+iBoSyvQykQrkU5QdEPnOuL18 ykks/BousxH2sAQxBva/FlaD2BxynYhzjMaldSjli6LEDgkRxv1cbwMomGqKuW8FONKB g3oqKstFt9KRTtDJigA9tdVQEaMbvs+HQUQ/Q= 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=30hAkUh7CdgknxSw104heNk9kYKEBgKR1h8VexbH8UE=; b=XpZwQ2lpMtGEDOZjnb9pVwhWefdnAbORjhEV9wKC44fd0VYZb/gAN6e8EBLHUq11O+ +4iGoas7QGeI63gIx9oK2xmWAqQFOmCersB0cC5srNqD4qvkFT1AGGVTC6Y9nEyuvXVh NP0hg1W1xwGN8OBUkTf3drSVSolfkhoxJNLBoxoccSC4UXsMuHpGxgIEkXBf6ScIVlXs nCMrnwGbDxZxhQG5HHCZuKh+3YY1jShkX+oXHgCXa7Qi2bnin6I2yAoA+rv8vhQgs47i 5l4k5aBtZdSMdCjafjjJJeXb5zqil5vok+NhJtj1RVMntJHtKdyjtNloVUK7nI1YpFYB TQmQ== X-Gm-Message-State: AMke39nVBkFoDvk9hfGt0IdqTE6vIYtzP8Y83lhukyAWHILL32YIfGTg0HWCoTyjk55gwpU/ X-Received: by 10.28.30.79 with SMTP id e76mr8701826wme.96.1488471315102; Thu, 02 Mar 2017 08:15:15 -0800 (PST) Received: from localhost.localdomain ([105.147.1.203]) by smtp.gmail.com with ESMTPSA id n13sm11412650wra.17.2017.03.02.08.15.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Mar 2017 08:15:14 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com, leif.lindholm@linaro.org Cc: jiewen.yao@intel.com, Ard Biesheuvel Date: Thu, 2 Mar 2017 16:15:01 +0000 Message-Id: <1488471305-23752-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [PATCH 0/4] ArmVirtPkg: implement basic capsule support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Mar 2017 16:15:17 -0000 This wires up the existing basic support for capsules left in memory by the OS across a warm reset. This involves wiring up the PEI phase modules to preserve the capsule images before releasing the memory for normal consumption, and some tweaks to the boot mode and BDS platform routines. As proposed, this allows capsules to be used as a pstore backend, which keeps the pstore payload in memory rather than in EFI variables. For example, something like this is supported when the prerequisite Linux patches have been merged (which are currently under review) - modprobe capsule-pstore - echo 1 > /sys/module/kernel/parameters/panic - echo c > /proc/sysrq-trigger - system reboot... - ls -l /sys/fs/pstore/ -r--r--r-- 1 root root 4386 Feb 12 00:31 console-efi-capsule-0 -r--r--r-- 1 root root 9065 Feb 12 00:29 dmesg-efi-capsule-6250071391647825921 -r--r--r-- 1 root root 9073 Feb 12 00:29 dmesg-efi-capsule-6250071391647825922 -r--r--r-- 1 root root 9096 Feb 12 00:29 dmesg-efi-capsule-6250071391647825923 -r--r--r-- 1 root root 9073 Feb 12 00:29 dmesg-efi-capsule-6250071391647825924 -r--r--r-- 1 root root 9048 Feb 12 00:29 dmesg-efi-capsule-6250071391647825925 Updating the firmware image in NOR flash in this way should be feasible as well, but this is something that builds on top of this basic capsule support, and involves ESRT and FMP, which have far too few vowels for me to explain what they entail. Ard Biesheuvel (4): ArmVirtPkg/ArmVirtPlatformLib: base boot mode on capsule presence ArmVirtPkg/ArmVirtMemoryInitPeiLib: check for capsules before memory init ArmVirtPkg/PlatformBootManagerLib: process pending capsules ArmVirtPkg/ArmVirtQemu: enable basic capsule support ArmVirtPkg/ArmVirtQemu.dsc | 7 ++- ArmVirtPkg/ArmVirtQemu.fdf | 2 + ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c | 60 +++++++++++++++++++- ArmVirtPkg/Library/ArmVirtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.inf | 9 ++- ArmVirtPkg/Library/ArmVirtPlatformLib/ArmVirtPlatformLib.inf | 5 +- ArmVirtPkg/Library/ArmVirtPlatformLib/Virt.c | 4 ++ ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c | 17 ++++++ ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 2 + 8 files changed, 101 insertions(+), 5 deletions(-) -- 2.7.4