From patchwork Tue Jun 25 18:11:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 2778381 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D80D6C0AB1 for ; Tue, 25 Jun 2013 18:07:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B027420386 for ; Tue, 25 Jun 2013 18:07:57 +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 3148B20384 for ; Tue, 25 Jun 2013 18:07:56 +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 1UrXe2-0004DX-3j; Tue, 25 Jun 2013 18:07:10 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UrXdt-0007oW-Cv; Tue, 25 Jun 2013 18:07:01 +0000 Received: from mail-wg0-x233.google.com ([2a00:1450:400c:c00::233]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UrXdZ-0007kS-71 for linux-arm-kernel@lists.infradead.org; Tue, 25 Jun 2013 18:06:42 +0000 Received: by mail-wg0-f51.google.com with SMTP id e11so9723500wgh.30 for ; Tue, 25 Jun 2013 11:06:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=pkrf5Qd/59Jm726TW6UT44t25ChBMxCMm3xIRltLSFo=; b=hGsZP5XoR9rZhbACcOlUMGQoYmQ5rZsSlojmMtMO9Pe+6zLT6mHESK5RgLZ2OBW/UJ sG6HVUrYUAqhu/dvlfBbDc1ADZGEC0Hrk/feQ3cnSOq00wjaHTMtRkICjt4NjJFWkvRC Qsa5nrbdk5jY/KO9ORL93uXt9mX621k+QKB8OVPQVVU6A/a4PGCJHWAzFhqrugeshjII BBS5jMdO27jv71wKsitY2Pefg6U2yKm5pj3qyn1n5ZHBYxB+y3mnGHhb6t9VgZVXR0gR DEfVSspr2ZuUdzxUe81t7HbbbJijRFknFy1ySowatv6tDvlONjXgOSUAB3CD9Mrhe8bP zJBw== X-Received: by 10.194.123.69 with SMTP id ly5mr183278wjb.29.1372183579454; Tue, 25 Jun 2013 11:06:19 -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 j20sm4989952wie.7.2013.06.25.11.06.17 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Jun 2013 11:06:18 -0700 (PDT) From: Leif Lindholm To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/4] Documentation: arm: [U]EFI runtime services Date: Tue, 25 Jun 2013 19:11:00 +0100 Message-Id: <1372183863-11333-2-git-send-email-leif.lindholm@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1372183863-11333-1-git-send-email-leif.lindholm@linaro.org> References: <1372183863-11333-1-git-send-email-leif.lindholm@linaro.org> X-Gm-Message-State: ALoCoQnAMfvHe5hQ46ZTh5bEZIn7f1wOlCUy1QzfbcDtlTXME30nOpvdG6ne1nE0MkRyBtOddWot X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130625_140641_408740_86B26622 X-CRM114-Status: GOOD ( 11.98 ) X-Spam-Score: -1.9 (-) Cc: linux-efi@vger.kernel.org, patches@linaro.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Leif Lindholm , matt.fleming@intel.com, tglx@linutronix.de, hpa@linux.intel.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=-5.5 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. Signed-off-by: Leif Lindholm --- Documentation/arm/00-INDEX | 3 +++ Documentation/arm/uefi.txt | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 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..5c48271 --- /dev/null +++ b/Documentation/arm/uefi.txt @@ -0,0 +1,39 @@ +The nomenclature EFI and UEFI are used interchangeably in this document. + +The implementation depends on receiving pointers to the UEFI memory map +and System Table in a Flattened Device Tree - so is only available with +CONFIG_OF. + +It (early) parses the FDT for the following parameters: +- 'efi-system-table': + Physical address of the system table. (required) +- 'efi-runtime-mmap': + Physical address of an EFI memory map, containing at least + the regions to be preserved. (required) +- 'efi-runtime-mmap-size': + Size in bytes of the provided memory map. (required) +- 'efi-mmap-desc-size': + Size of each descriptor in the memory map. (override default) +- 'efi-mmap-desc-ver': + Memory descriptor format version. (override default) + +Since UEFI firmware on ARM systems are required to use a 1:1 memory map +even on LPAE-capable systems, the above fields are 32-bit regardless. + +It also depends on early_ioremap to parse the memory map and preserve +the regions required for runtime services. + +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, sinze it uses setup_mm_for_reboot(). + +For verbose debug messages, specify 'uefi_debug' on the kernel command +line.