From patchwork Fri Sep 21 16:32:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 147302 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1023627ljw; Fri, 21 Sep 2018 09:32:51 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbck5TyCNS8j3rva/UTaSFgFlqhhoQ55UqMTxHMHmFjQTGQn6yEmlOGLGk3QjsrDO8XfnsR X-Received: by 2002:a63:7f06:: with SMTP id a6-v6mr42342590pgd.296.1537547571447; Fri, 21 Sep 2018 09:32:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537547571; cv=none; d=google.com; s=arc-20160816; b=Jvm41LNGMDgSnAFVw6KjgEjfSLjCV77WVGAtYY9FQRLEtk2sj4oNbhtNAbO6RpUv3Q ImzANYF4KhOzqC4rE8QQ+XZaG2oiJT8A2gGqm04UYH51qFyBPC8J/qdHXK73WpBlBsMx KA5GJ7JyK6LcDBmCkrCFzLGI80z8aMT4SzOPmTHlf3+sDnkZoYPLCR0i7XiSZh8ZcEc+ 1xKHQUxmaPNG3lDq2jX8bTYKDsaBhE4ZBafJqriXnUZoOsElE+Vj/FQHNUaSdrK0OGHe NAoECVEuwZbCBvWI9I8lARVyIPDIqc7xQQOhR4XqYiVgZhwdS0Ki/Dcs+bpYhrTlLbWq gHEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=4qkNDnNHn4yJVUmrvjGFSqQebbzeviQe5LdMukwecsk=; b=aBEFCtXtiltsZeIQrqX7KigpmGb1RqqI6gR8wR16N9uJ9MLpV5OXEscmq3+P+KVLD+ UJHM30VHzj0dkcrwblrLUCrwA8oOyYXD43YGgHxHLLcpbCPDTpNzVMc4JhHVteUa2TCs tOgXORYtAkmNwehX5jaVBKVUwe1RxMGZoQ83tt5MU/eLo5AxIOAEuEAZFSe8x/FuhCq/ oeBf41nocnvd+BSuszJ0M8mnspcEfbDOUwNwOc4l1rLtEfa+5a990xHDimARhuNjGgwe dALlaY+6/57192aHcCHyOcGm3mECM1sq/IaBEhNMKL+f26u6Mk7BSWUFVIV5coWm6sdO mKvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="CrqTdNk/"; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c31-v6si26024953pgl.126.2018.09.21.09.32.51; Fri, 21 Sep 2018 09:32:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="CrqTdNk/"; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728149AbeIUWW2 (ORCPT + 3 others); Fri, 21 Sep 2018 18:22:28 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:45080 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390767AbeIUWW2 (ORCPT ); Fri, 21 Sep 2018 18:22:28 -0400 Received: by mail-pf1-f196.google.com with SMTP id i26-v6so6197192pfo.12 for ; Fri, 21 Sep 2018 09:32:49 -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=4qkNDnNHn4yJVUmrvjGFSqQebbzeviQe5LdMukwecsk=; b=CrqTdNk/8zj1dPfhmB1br3qvwORtEkd/ZxgOjjRwqs+/UjfpxmBY/J39i3cqs/CkKt l5P6Dbw3F6UgKQe6uAoVaQjUAa7t8JnbCXGjs9ldhEL2F2BPFHmx66TeM14HI2jxKVg8 z0Q/KvJgL77Fbb/lIhX3qudVv/sgidSXK75Es= 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=4qkNDnNHn4yJVUmrvjGFSqQebbzeviQe5LdMukwecsk=; b=lwnsCeDOB4iUHSMXg+dCK0zmKNHgrkDazXrpi5lz4TCyqVvbSrCUimK11aI005Xu3C t4w4cnoiriW9wLq2om3fXqBpORIY3rDUAFUFoRunfdJ2M/HJNWp/ztH3dSI+E+FIWDMB PlHpwZExbkmTElvN8x1ImrojPdRl5jCDc+VtG2rDO7KDDLIJc+GIrlYH2j0e+wcfKhtW yJEKh7g8RyJ/Q18JBwFgXzINOkvvia19bkEWiIj49Ei3IdAAiFKnJO5ZnBkagqK+kHWU KKjkRxdQ8Sgog00HF7/vbJrKZCUxJMIB2pdt2TiTidvX5SSSmH5H1JZE1tMrxoLzzl3/ VWDA== X-Gm-Message-State: APzg51Dl1WxpMpK96QQdlajVjEKP5XjOSaSjnLXB2GYDwLSYW7u5wVZG eeRt9MjobhxBtzNYuop+/P8VF/EfFC0= X-Received: by 2002:a62:198e:: with SMTP id 136-v6mr47387814pfz.103.1537547569134; Fri, 21 Sep 2018 09:32:49 -0700 (PDT) Received: from localhost.localdomain ([209.121.128.187]) by smtp.gmail.com with ESMTPSA id y4-v6sm39313996pfn.123.2018.09.21.09.32.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Sep 2018 09:32:48 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: Ard Biesheuvel , Jeremy Linton , Marc Zyngier Subject: [PATCH 0/3] efi: add support for persistent memory reservations Date: Fri, 21 Sep 2018 09:32:43 -0700 Message-Id: <20180921163246.16632-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org Add support for persistent memory reservations across kexec reboot on EFI systems by introducing a Linux-specific UEFI configuration table that points to a linked list in memory that can be augmented by each successive kexec kernel to describe regions in memory that the subsequent kernel should treat as reserved. The specific use case for this feature is GICv3 ARM systems that are not able to disable DMA access to LPI tables, meaning we have to reserve them and make the next kernel reuse the existing tables rather than allocating them from scratch. Cc: Jeremy Linton Cc: Marc Zyngier Ard Biesheuvel (3): efi: honour memory reservations passed via a linux specific config table efi/arm: libstub: add a root memreserve config table efi: add API to reserve memory persistently across kexec reboot drivers/firmware/efi/efi.c | 59 +++++++++++++++++++- drivers/firmware/efi/libstub/arm-stub.c | 27 +++++++++ include/linux/efi.h | 9 +++ 3 files changed, 94 insertions(+), 1 deletion(-) -- 2.17.1 Tested-by: Jeremy Linton