From patchwork Fri Nov 29 22:05:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Salter X-Patchwork-Id: 21901 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f71.google.com (mail-pb0-f71.google.com [209.85.160.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EF07D24011 for ; Fri, 29 Nov 2013 22:05:33 +0000 (UTC) Received: by mail-pb0-f71.google.com with SMTP id uo5sf27057219pbc.6 for ; Fri, 29 Nov 2013 14:05:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=PIVKqAXgKagKFy/FRQa0PbTu/5u44oROvYODYubd1bg=; b=mvBODI0T7ULIf1q5tGXpsPqpYa+E65i5sEuwodR+cD45ze86ud18SxXi1yZGkVKBCv obQrxBRbYufVa6SNuscbwbrGd8v1ZHLBtO14g662eOST2m81ltspRkyIo02u9Y/FsXIH HGd7ltHRckhOcu/fBTptOE0QqeBd1yhvWKqfqhC73FOK8tedJhLJwHMMgi+EbvwE6jy+ PEyxDd2JX60zPQyqgh7TN+c32WTW8iXeLJ7gQ+VRObNThD+B6mgLc85YxZfWoseEfOvr BW/BbTWcGd6OiHJ8/5PDwM6X/hRSY+EXck8O3ooXuGbI0Cp44OKsrc9sVoY2BmzCBeU/ tSoA== X-Gm-Message-State: ALoCoQl8nddl4Cr3v9oiVlqQJf2bqDqMxnqYDn63k2i4JS3KeKnn3NFuAvacSmeyUwoPJ0AcD+H9 X-Received: by 10.66.51.33 with SMTP id h1mr19067982pao.30.1385762733202; Fri, 29 Nov 2013 14:05:33 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.131.162 with SMTP id on2ls3957551qeb.73.gmail; Fri, 29 Nov 2013 14:05:33 -0800 (PST) X-Received: by 10.52.186.228 with SMTP id fn4mr2520276vdc.34.1385762733086; Fri, 29 Nov 2013 14:05:33 -0800 (PST) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id z15si25301114vce.147.2013.11.29.14.05.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 29 Nov 2013 14:05:33 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id hv10so6782883vcb.8 for ; Fri, 29 Nov 2013 14:05:33 -0800 (PST) X-Received: by 10.220.113.143 with SMTP id a15mr2847033vcq.38.1385762733003; Fri, 29 Nov 2013 14:05:33 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp121536vcz; Fri, 29 Nov 2013 14:05:32 -0800 (PST) X-Received: by 10.42.82.196 with SMTP id e4mr3108596icl.58.1385762731151; Fri, 29 Nov 2013 14:05:31 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTP id b7si31297356icq.7.2013.11.29.14.05.30 for ; Fri, 29 Nov 2013 14:05:31 -0800 (PST) Received-SPF: pass (google.com: domain of msalter@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rATM5NOr028934 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 29 Nov 2013 17:05:23 -0500 Received: from deneb.redhat.com (ovpn-113-148.phx2.redhat.com [10.3.113.148]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rATM5JjM005904; Fri, 29 Nov 2013 17:05:22 -0500 From: Mark Salter To: linux-kernel@vger.kernel.org Cc: patches@linaro.org, Mark Salter , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, matt.fleming@intel.com, linux-efi@vger.kernel.org, linux-doc@vger.kernel.org, Rob Landley , Leif Lindholm , roy.franz@linaro.org Subject: [PATCH 2/3] doc: arm64: add description of EFI stub support Date: Fri, 29 Nov 2013 17:05:11 -0500 Message-Id: <1385762712-17043-3-git-send-email-msalter@redhat.com> In-Reply-To: <1385762712-17043-1-git-send-email-msalter@redhat.com> References: <1385762712-17043-1-git-send-email-msalter@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: msalter@redhat.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Mark Salter CC: Catalin Marinas CC: Will Deacon CC: linux-arm-kernel@lists.infradead.org CC: matt.fleming@intel.com CC: linux-efi@vger.kernel.org CC: linux-doc@vger.kernel.org CC: Rob Landley CC: Leif Lindholm CC: roy.franz@linaro.org Acked-by: Grant Likely --- Documentation/arm64/booting.txt | 4 ++++ Documentation/efi-stub.txt | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt index a9691cc..aa95d38c 100644 --- a/Documentation/arm64/booting.txt +++ b/Documentation/arm64/booting.txt @@ -85,6 +85,10 @@ The decompressed kernel image contains a 64-byte header as follows: Header notes: - code0/code1 are responsible for branching to stext. +- when booting through EFI, code0/code1 are initially skipped. + res5 is an offset to the PE header and the PE header has the EFI + entry point (efi_stub_entry). When the stub has done its work, it + jumps to code0 to resume the normal boot process. The image must be placed at the specified offset (currently 0x80000) from the start of the system RAM and called there. The start of the diff --git a/Documentation/efi-stub.txt b/Documentation/efi-stub.txt index 19e897c..c2a4b11 100644 --- a/Documentation/efi-stub.txt +++ b/Documentation/efi-stub.txt @@ -12,6 +12,11 @@ arch/arm/boot/compressed/efi-header.S and arch/arm/boot/compressed/efi-stub.c. EFI stub code that is shared between architectures is in drivers/firmware/efi/efi-stub-helper.c. +For arm64, there is no compressed kernel support, so the Image itself +masquerades as a PE/COFF image and the EFI stub is linked into the +kernel. The arm64 EFI stub lives in arch/arm64/kernel/efi-entry.S +and arch/arm64/kernel/efi-stub.c. + By using the EFI boot stub it's possible to boot a Linux kernel without the use of a conventional EFI boot loader, such as grub or elilo. Since the EFI boot stub performs the jobs of a boot loader, in @@ -28,7 +33,8 @@ the extension the EFI firmware loader will refuse to execute it. It's not possible to execute bzImage.efi from the usual Linux file systems because EFI firmware doesn't have support for them. For ARM the arch/arm/boot/zImage should be copied to the system partition, and it -may not need to be renamed. +may not need to be renamed. Similarly for arm64, arch/arm64/boot/Image +should be copied but not necessarily renamed. **** Passing kernel parameters from the EFI shell @@ -72,7 +78,7 @@ is passed to bzImage.efi. **** The "dtb=" option -For the ARM architecture, we also need to be able to provide a device +For ARM and arm64 architecture, we also need to be able to provide a device tree to the kernel. This is done with the "dtb=" command line option, and is process in the same manner as the "initrd=" option that is described above.