From patchwork Thu Oct 3 11:24:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 2982251 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 409089F288 for ; Thu, 3 Oct 2013 11:27:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 15051201ED for ; Thu, 3 Oct 2013 11:27:26 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 43197201E4 for ; Thu, 3 Oct 2013 11:27:21 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VRh3V-0003tI-Co; Thu, 03 Oct 2013 11:26:53 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VRh3M-0007na-Qz; Thu, 03 Oct 2013 11:26:44 +0000 Received: from mail-we0-f181.google.com ([74.125.82.181]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VRh3F-0007kL-F0 for linux-arm-kernel@lists.infradead.org; Thu, 03 Oct 2013 11:26:39 +0000 Received: by mail-we0-f181.google.com with SMTP id p61so2446609wes.40 for ; Thu, 03 Oct 2013 04:26:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hHpkW7xaBbPW9WDtrRdHmeKQ4opDCrKV163xk3PgRhk=; b=mZCRTl1e6UyqSQMFa8Ht4ZPOi2ERtofwr+QOtf2tK7I7Q5DdILwQh0K0xnoELGCZzS 8rbHRoaOX3pU6nuOE9cLRkMuceSj1Mr+VNS/lpEwYQB9VBsVXABE54mYeg75Vf40hnHP 74+eRLej3KIcihhBXi3fi5XA9ClWF6XvBF4a855/ISOvDCgDMNH5mQpZ2OnNyNWRHgqL h7UKGuLXWq18wNpf6mt2DzedLyI6SMHFJBX20iQwks0nt9vfPyl9qKtBoUgDCTeu60Ke 3Bue8fz7yYjXGyZvdcyKKZb/vSaE06/mVTC8WqM4eNAMKSlID/F4OhZGkTlrg3mDUh7W YYsQ== X-Gm-Message-State: ALoCoQkB3Hy5ciZlx+akucwqycqShqCYMzEqADXxgd1IZJq0gwY8Xlu7lH05k0z8Xnvt7ED0xbvI X-Received: by 10.180.160.165 with SMTP id xl5mr2015838wib.48.1380799573124; Thu, 03 Oct 2013 04:26:13 -0700 (PDT) Received: from mohikan.mushroom.smurfnet.nu (cpc4-cmbg17-2-0-cust71.5-4.cable.virginmedia.com. [86.14.224.72]) by mx.google.com with ESMTPSA id j5sm12851841wia.4.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Oct 2013 04:26:12 -0700 (PDT) From: Leif Lindholm To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/3] Documentation: arm: add UEFI support documentation Date: Thu, 3 Oct 2013 12:24:39 +0100 Message-Id: <1380799481-5470-2-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1380799481-5470-1-git-send-email-leif.lindholm@linaro.org> References: <1380799481-5470-1-git-send-email-leif.lindholm@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131003_072637_671457_B5A17C20 X-CRM114-Status: GOOD ( 13.96 ) X-Spam-Score: -2.6 (--) Cc: roy.franz@linaro.org, linux-efi@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Leif Lindholm , grant.likely@secretlab.ca, matt.fleming@intel.com, msalter@redhat.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch provides documentation of the [U]EFI runtime services and configuration features. Cc: linux-doc@vger.kernel.org Signed-off-by: Leif Lindholm Acked-by: Rob Landley --- Documentation/arm/00-INDEX | 3 +++ Documentation/arm/uefi.txt | 47 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 Documentation/arm/uefi.txt diff --git a/Documentation/arm/00-INDEX b/Documentation/arm/00-INDEX index 4978456..87e01d1 100644 --- a/Documentation/arm/00-INDEX +++ b/Documentation/arm/00-INDEX @@ -36,3 +36,6 @@ nwfpe/ - NWFPE floating point emulator documentation swp_emulation - SWP/SWPB emulation handler/logging description + +uefi.txt + - [U]EFI configuration and runtime services documentation diff --git a/Documentation/arm/uefi.txt b/Documentation/arm/uefi.txt new file mode 100644 index 0000000..e6e4d41 --- /dev/null +++ b/Documentation/arm/uefi.txt @@ -0,0 +1,47 @@ +UEFI, the Unified Extensible Firmware Interface is a speifcication +governing the behaviours of compatible firmware interfaces. It is +maintained by the UEFI Forum - http://www.uefi.org/. + +Since UEFI is an evolution of its predecessor 'EFI', the terms EFI and +UEFI are used somewhat interchangeably in this document and associated +source code. + +The implementation depends on receiving the UEFI runtime memory map and a +pointer to the System Table in a Flattened Device Tree - so is only available +with CONFIG_OF. + +It parses the FDT /chosen node for the following parameters: +- 'linux,efi-system-table': + Physical address of the system table. (required) + 64-bit value since an ARMv7 plattform may support LPAE, and to facilitate + code sharing with arm64. Top 32 bits will be ignored, since UEFI specification + mandates a 1:1 mapping of all RAM. +- 'linux,efi-mmap': + The EFI memory map as an embedded property. (required) + An array of type EFI_MEMORY_DESCRIPTOR as described by the UEFI + specification, current version described in Linux by efi_memory_desc_t. + The memory map is represented in little-endian, not DT, byte order. + This map needs to contain at least the regions to be preserved for runtime + services, but would normally just be the map retreieved by calling UEFI + GetMemoryMap() immediately before ExitBootServices(). +- 'linux,efi-mmap-desc-size': + Size of each descriptor in the memory map. (override default) +- 'linux,efi-mmap-desc-ver': + Memory descriptor format version. (override default) + +It also depends on early_memremap() to parse the UEFI configuration tables. + +For actually enabling [U]EFI support, enable: +- CONFIG_EFI=y +- CONFIG_EFI_VARS=y or m + +After the kernel has mapped the required regions into its address space, +a SetVirtualAddressMap() call is made into UEFI in order to update +relocations. This call must be performed with all the code in a 1:1 +mapping. This implementation achieves this by temporarily disabling the +MMU for the duration of this call. This can only be done safely: +- before secondary CPUs are brought online. +- after early_initcalls have completed, since it uses setup_mm_for_reboot(). + +For verbose debug messages, specify 'uefi_debug' on the kernel command +line.