[PATCH 0/4] arm: [U]EFI runtime services support

2013-06-25 Thread Leif Lindholm
services on ARM platforms, as well as the basic underlying EFI support. It also defines a mechanism by which the required information is passed from the bootloader to the kernel via FDT entries. This patchset depends on the previously submitted early_ioremap() patchset. Leif Lindholm (4

[PATCH 4/4] init: efi: arm: enable (U)EFI runtime services on arm

2013-06-25 Thread Leif Lindholm
Since the efi_set_virtual_address_map call has strict init ordering requirements, add an explicit hook in the required place. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- init/main.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/init/main.c b/init/main.c index 9484f4b

[PATCH 2/4] x86: efi: break efi_lookup_mapped_addr out to generic code

2013-06-25 Thread Leif Lindholm
efi_lookup_mapped_addr is a handy helper function for translating a physical address to the corresponding virtual one by scanning through memmap.map. This patch breaks it out into a new file for use elsewhere. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/x86/platform/efi/efi.c

[PATCH 1/4] Documentation: arm: [U]EFI runtime services

2013-06-25 Thread Leif Lindholm
This patch provides documentation of the [U]EFI runtime services and configuration features. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- Documentation/arm/00-INDEX |3 +++ Documentation/arm/uefi.txt | 39 +++ 2 files changed, 42 insertions

Re: [PATCH 1/4] Documentation: arm: [U]EFI runtime services

2013-06-26 Thread Leif Lindholm
On Wed, Jun 26, 2013 at 02:20:23PM +0100, Grant Likely wrote: On Wed, Jun 26, 2013 at 12:42 AM, Stephen Warren swar...@wwwdotorg.org wrote: the properties) should be part of a file in Documentation/devicetree/bindings/ (arm/uefi.txt?). What node are these properties expected to be

Re: [PATCH 2/4] x86: efi: break efi_lookup_mapped_addr out to generic code

2013-06-26 Thread Leif Lindholm
On Wed, Jun 26, 2013 at 02:32:17PM +0100, Matt Fleming wrote: On Tue, 25 Jun, at 07:11:01PM, Leif Lindholm wrote: efi_lookup_mapped_addr is a handy helper function for translating a physical address to the corresponding virtual one by scanning through memmap.map. This patch breaks

Re: [PATCH 3/4] arm: Add [U]EFI runtime services support

2013-06-26 Thread Leif Lindholm
table and stores it for potential later use by DMI. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/arm/Kconfig | 15 ++ arch/arm/include/asm/efi.h | 22 +++ arch/arm/kernel/Makefile |2 + arch/arm/kernel/efi.c | 456

Re: [PATCH 1/4] Documentation: arm: [U]EFI runtime services

2013-06-26 Thread Leif Lindholm
On Wed, Jun 26, 2013 at 12:32:30PM -0600, Stephen Warren wrote: What about ARMv8? Is the intention to have a separate definition for the UEFI bindings on ARMv8, so that compatibility isn't an issue? What if a future version of UEFI allows LPAE usage? It is unlikely that will happen on

[PATCH 0/4] Make commonly useful UEFI functions common

2013-07-30 Thread Leif Lindholm
the efi_lookup_mapped_addr() function out of x86 and places it in global efi.c, for shared use with future ARM patches. IA64 code compile tested only. Pardon the delay in getting this out - back to back conferences followed by a bad case of the man flu. Leif Lindholm (4): efi: provide a generic efi_config_init

[PATCH 3/4] efi: ia64: use common code for (U)EFI configuration scanning

2013-07-30 Thread Leif Lindholm
type of mapping anyway. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/ia64/include/asm/io.h |1 + arch/ia64/kernel/efi.c | 54 +--- 2 files changed, 12 insertions(+), 43 deletions(-) diff --git a/arch/ia64/include/asm/io.h b/arch

[PATCH 1/4] efi: provide a generic efi_config_init()

2013-07-30 Thread Leif Lindholm
in the series. Note: use of early_memremap() instead of early_ioremap() for better semantic match for ARM support. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- drivers/firmware/efi/efi.c | 106 include/linux/efi.h|7 +++ 2

[PATCH 2/4] efi: x86: use common code for (U)EFI configuration scanning

2013-07-30 Thread Leif Lindholm
This patch makes x86 use the new common code for EFI configuration table scanning. It also removes the local definition of the global efi data structure. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/x86/platform/efi/efi.c | 96 --- 1

Re: [PATCH 1/4] efi: provide a generic efi_config_init()

2013-07-30 Thread Leif Lindholm
On Tue, Jul 30, 2013 at 10:53:10AM -0700, Tony Luck wrote: On Tue, Jul 30, 2013 at 9:47 AM, Leif Lindholm leif.lindh...@linaro.org wrote: + /* +* Let's see what config tables the firmware passed to us. +*/ + config_tables = early_mememap(efi.systab-tables

[PATCH v2 0/5] Make commonly useful UEFI functions common

2013-08-02 Thread Leif Lindholm
the efi_lookup_mapped_addr() function out of x86 and places it in global efi.c, for shared use with future ARM patches. IA64 code compile tested only. Leif Lindholm (5): ia64: add early_memremap() alias for early_ioremap() efi: provide a generic efi_config_init() efi: x86: use common code for (U)EFI

[PATCH v2 3/5] efi: x86: use common code for (U)EFI configuration scanning

2013-08-02 Thread Leif Lindholm
This patch makes x86 use the new common code for configuration table scanning. It also removes the local definition of the global efi data structure. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/x86/platform/efi/efi.c | 96 --- 1 file

[PATCH v2 1/5] ia64: add early_memremap() alias for early_ioremap()

2013-08-02 Thread Leif Lindholm
early_ioremap() on IA64 chooses its mapping type based on the EFI memory map. This patch adds an alias early_memremap() to be used where the targeted location is memory rather than an i/o device. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/ia64/include/asm/io.h |1 + 1

[PATCH v2 2/5] efi: provide a generic efi_config_init()

2013-08-02 Thread Leif Lindholm
Common to (U)EFI support on all platforms is the global efi data structure, and the code that parses the System Table to locate addresses to populate that structure with. This patch adds both of these to the global EFI driver code. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org

[PATCH v2 5/5] efi: x86: make efi_lookup_mapped_addr() a common function

2013-08-02 Thread Leif Lindholm
efi_lookup_mapped_addr() is a handy utility for other platforms than x86. Move it from arch/x86 to drivers/firmware. Add memmap pointer to global efi structure, and initialise it on x86. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/x86/platform/efi/efi.c | 30

[PATCH v2 4/5] efi: ia64: use common code for (U)EFI configuration scanning

2013-08-02 Thread Leif Lindholm
This patch makes ia64 use the new common code for configuration table scanning. It also removes the local definition of the global efi data structure. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/ia64/kernel/efi.c | 54 ++-- 1 file

[PATCH v3 0/5] Make commonly useful UEFI functions common

2013-08-07 Thread Leif Lindholm
the efi_lookup_mapped_addr() function out of x86 and places it in global efi.c, for shared use with future ARM patches. IA64 code compile tested only. Leif Lindholm (5): ia64: add early_memremap() alias for early_ioremap() efi: provide a generic efi_config_init() efi: x86: use common code for (U)EFI

[PATCH v3 5/5] efi: x86: make efi_lookup_mapped_addr() a common function

2013-08-07 Thread Leif Lindholm
efi_lookup_mapped_addr() is a handy utility for other platforms than x86. Move it from arch/x86 to drivers/firmware. Add memmap pointer to global efi structure, and initialise it on x86. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/x86/platform/efi/efi.c | 30

[PATCH v3 4/5] efi: ia64: use common code for (U)EFI configuration scanning

2013-08-07 Thread Leif Lindholm
This patch makes ia64 use the new common code for configuration table scanning. It also removes the local definition of the global efi data structure. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Tony Luck tony.l...@intel.com --- arch/ia64/kernel/efi.c | 54

Re: [PATCH v3 2/5] efi: provide a generic efi_config_init()

2013-09-05 Thread Leif Lindholm
On Mon, Sep 02, 2013 at 10:29:02AM +0100, Matt Fleming wrote: This patch actually breaks git bisection, Urgh, sorry about that. /home/build/git/efi/arch/x86/platform/efi/efi.c:581:19: error: conflicting types for ‘efi_config_init’ In file included from

[PATCH v4 1/3] ia64: add early_memremap() alias for early_ioremap()

2013-09-05 Thread Leif Lindholm
early_ioremap() on IA64 chooses its mapping type based on the EFI memory map. This patch adds an alias early_memremap() to be used where the targeted location is memory rather than an i/o device. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Tony Luck tony.l...@intel.com

[PATCH v4 0/3] Make commonly useful UEFI functions common

2013-09-05 Thread Leif Lindholm
the efi_lookup_mapped_addr() function out of x86 and places it in global efi.c, for shared use with future ARM patches. IA64 code compile tested only. Leif Lindholm (3): ia64: add early_memremap() alias for early_ioremap() efi: x86: ia64: provide a generic efi_config_init() efi: x86: make

Re: [PATCH 02/11] efi: Remove EFI_PAGE_SHIFT and EFI_PAGE_SIZE

2013-09-21 Thread Leif Lindholm
On Sat, Sep 21, 2013 at 05:41:43PM +0200, Borislav Petkov wrote: On Sat, Sep 21, 2013 at 05:21:39PM +0200, Leif Lindholm wrote: It will probably not be a problem on the stub side, and it's not used in many places but it would break efi_lookup_mapped_address(), efi_range_is_wc

[PATCH v2 3/3] init: efi: arm: enable (U)EFI runtime services on arm

2013-10-03 Thread Leif Lindholm
Since the efi_set_virtual_address_map call has strict init ordering requirements, add an explicit hook in the required place. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- init/main.c |4 1 file changed, 4 insertions(+) diff --git a/init/main.c b/init/main.c index af310af

[PATCH v2 2/3] arm: Add [U]EFI runtime services support

2013-10-03 Thread Leif Lindholm
This patch implements basic support for UEFI runtime services in the ARM architecture - a requirement for using efibootmgr to read and update the system boot configuration. It uses the generic configuration table scanning to populate ACPI and SMBIOS pointers. Signed-off-by: Leif Lindholm

[PATCH v2 1/3] Documentation: arm: add UEFI support documentation

2013-10-03 Thread Leif Lindholm
This patch provides documentation of the [U]EFI runtime services and configuration features. Cc: linux-...@vger.kernel.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Rob Landley r...@landley.net --- Documentation/arm/00-INDEX |3 +++ Documentation/arm/uefi.txt | 47

[PATCH v2 0/3] arm: [U]EFI runtime services support

2013-10-03 Thread Leif Lindholm
patchsets. Changes from v1: - Updated FDT bindings, based on feedback. - Use common config table scanning and address lookup code. - Add dependency on !CPU_BIG_ENDIAN (for now). - Add proper efi_enabled() facility. - Documentation updates. Leif Lindholm (3): Documentation: arm: add UEFI support

Re: [PATCH v2 1/3] Documentation: arm: add UEFI support documentation

2013-10-03 Thread Leif Lindholm
On Thu, Oct 03, 2013 at 06:10:54PM +0100, Mark Rutland wrote: +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

Re: [PATCH v2 2/3] arm: Add [U]EFI runtime services support

2013-10-17 Thread Leif Lindholm
On Thu, Oct 17, 2013 at 03:07:39PM +0100, Matt Fleming wrote: +/* + * If you need to (temporarily) support buggy firmware. + */ +#define KEEP_BOOT_SERVICES_REGIONS Have you seen firmware that requires this? I'm just curious more than anything else. Not really. I _think_ I saw it on a

arm/arm64 UEFI boot protocol

2013-11-11 Thread Leif Lindholm
Hi all, We currently have a few sets of patches floating around, for UEFI runtime services, UEFI stub and GRUB support for Linux/UEFI on arm/arm64. The last version of Documentation/arm/uefi.txt I sent out raised a few questions with regards to the boot protocol between UEFI and Linux, and there

Re: arm/arm64 UEFI boot protocol

2013-11-12 Thread Leif Lindholm
On Wed, Nov 13, 2013 at 07:14:28AM +0900, Grant Likely wrote: In the interest of bike shedding, I would name the properties linux,uefi-mmap-start and linux,uefi-mmap-size, but otherwise it is fine by me. That makes sense to me, and makes for a prettier table :) Should you have a property for

[PATCH v3 2/3] arm: Add [U]EFI runtime services support

2013-11-28 Thread Leif Lindholm
bindings. - Preserve regions marked RESERVED (but don't map them). - Rename 'efi' - 'uefi' within this new port (leaving core code as is). Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/arm/Kconfig| 15 ++ arch/arm/include/asm/uefi.h | 22 ++ arch/arm/kernel/Makefile

[PATCH v3 3/3] init: efi: arm: enable (U)EFI runtime services on arm

2013-11-28 Thread Leif Lindholm
Since the efi_set_virtual_address_map call has strict init ordering requirements, add an explicit hook in the required place. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- init/main.c |4 1 file changed, 4 insertions(+) diff --git a/init/main.c b/init/main.c index febc511

[PATCH v3 0/3] (U)EFI runtime services for arm

2013-11-28 Thread Leif Lindholm
config table scanning and address lookup code. - Add dependency on !CPU_BIG_ENDIAN (for now). - Add proper efi_enabled() facility. - Documentation updates. Leif Lindholm (3): Documentation: arm: add UEFI support documentation arm: Add [U]EFI runtime services support init: efi: arm: enable (U)EFI

Re: [PATCH v3 2/3] arm: Add [U]EFI runtime services support

2013-11-29 Thread Leif Lindholm
Hi Will, Thanks for having a look. On Fri, Nov 29, 2013 at 04:10:16PM +, Will Deacon wrote: This patch implements basic support for UEFI runtime services in the ARM architecture - a requirement for using efibootmgr to read and update the system boot configuration. It uses the

Re: [PATCH v3 1/3] Documentation: arm: add UEFI support documentation

2013-12-02 Thread Leif Lindholm
On Mon, Dec 02, 2013 at 01:51:22PM -0600, Matt Sealey wrote: Here's where I think this whole thing falls down as being the weirdest possible implementation of this. It defies logic to put this information in the device tree /chosen node while also attempting to boot the kernel using an EFI

Re: [PATCH v3 1/3] Documentation: arm: add UEFI support documentation

2013-12-05 Thread Leif Lindholm
On Wed, Dec 04, 2013 at 03:06:47PM -0600, Matt Sealey wrote: By the time we get half-way through arm/kernel/head.S the cache and MMU has been turned off and on and off again by the decompressor, and after a large amount of guesswork and arbitrary restriction-based implementation, there's no

Re: [PATCH 1/3] arm64: add EFI stub

2013-12-06 Thread Leif Lindholm
On Fri, Dec 06, 2013 at 08:34:30AM -0500, Mark Salter wrote: Or just disable runtime services on the switch to big ending. Big endian should not disable the stub (but getting it to work could be a follow-up patch) The other problem with BE is that the PE/COFF masquerading is built into

Re: [PATCH v3 2/3] arm: Add [U]EFI runtime services support

2013-12-06 Thread Leif Lindholm
Hi Arnd, Thank you for your comments. On Fri, Dec 06, 2013 at 02:59:48AM +0100, Arnd Bergmann wrote: On Thursday 28 November 2013, Leif Lindholm wrote: @@ -898,6 +900,10 @@ void __init setup_arch(char **cmdline_p) sanity_check_meminfo(); arm_memblock_init(meminfo, mdesc

Re: [PATCH 3/3] arm64: add EFI runtime services

2013-12-09 Thread Leif Lindholm
Apologies for late feedback. On Fri, Nov 29, 2013 at 05:05:12PM -0500, Mark Salter wrote: diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c new file mode 100644 index 000..1bad8a7 --- /dev/null +++ b/arch/arm64/kernel/efi.c @@ -0,0 +1,507 @@ +/* + * Extensible Firmware

Re: [PATCH v5 02/14] efi: use early_memremap and early_memunmap

2013-12-11 Thread Leif Lindholm
On Wed, Dec 11, 2013 at 10:39:03AM +, Matt Fleming wrote: Leif, Mark, does this patch look OK for ARM? We'd need to introduce a new early_memunmap() function so that things still build, but that should be straight forward. You'd even be able to get rid of the asymmetry in uefi_init() where

[PATCH v4 1/5] arm: break part of __soft_restart out into separate function

2014-01-11 Thread Leif Lindholm
Certain operations can be considered mandatory for any piece of code preparing to switch off the MMU. Break this out into separate function dmap_prepare(). Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Suggested-by: Will Deacon will.dea...@arm.com --- arch/arm/include/asm/idmap.h |1

[PATCH v4 0/5] arm: add UEFI runtime services support

2014-01-11 Thread Leif Lindholm
(but don't map them). - Rename 'efi' - 'uefi' within this new port (leaving core code as is). Leif Lindholm (5): arm: break part of __soft_restart out into separate function arm: add new asm macro update_sctlr Documentation: arm: add UEFI support documentation arm: Add [U]EFI runtime services

[PATCH v4 2/5] arm: add new asm macro update_sctlr

2014-01-11 Thread Leif Lindholm
A new macro for setting/clearing bits in the SCTLR. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Suggested-by: Will Deacon will.dea...@arm.com --- arch/arm/include/asm/assembler.h | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm/include/asm/assembler.h b

[PATCH v4 5/5] init: efi: arm: enable (U)EFI runtime services on arm

2014-01-11 Thread Leif Lindholm
Since the efi_set_virtual_address_map call has strict init ordering requirements, add an explicit hook in the required place. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Grant Likely grant.lik...@linaro.org --- init/main.c |4 1 file changed, 4 insertions(+) diff

[PATCH v4 4/5] arm: Add [U]EFI runtime services support

2014-01-11 Thread Leif Lindholm
This patch implements basic support for UEFI runtime services in the ARM architecture - a requirement for using efibootmgr to read and update the system boot configuration. It uses the generic configuration table scanning to populate ACPI and SMBIOS pointers. Signed-off-by: Leif Lindholm

[PATCH v4 3/5] Documentation: arm: add UEFI support documentation

2014-01-11 Thread Leif Lindholm
This patch provides documentation of the [U]EFI runtime service and configuration features for the arm architecture. Cc: Rob Landley r...@landley.net Cc: linux-...@vger.kernel.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Grant Likely grant.lik...@linaro.org

Re: [PATCH v4 5/5] init: efi: arm: enable (U)EFI runtime services on arm

2014-01-13 Thread Leif Lindholm
On Mon, Jan 13, 2014 at 07:29:06PM +0100, Arnd Bergmann wrote: On Saturday 11 January 2014, Leif Lindholm wrote: diff --git a/init/main.c b/init/main.c index febc511..1331829 100644 --- a/init/main.c +++ b/init/main.c @@ -905,6 +905,10 @@ static noinline void __init kernel_init_freeable

Re: [PATCH v4 4/5] arm: Add [U]EFI runtime services support

2014-01-13 Thread Leif Lindholm
On Mon, Jan 13, 2014 at 07:43:09PM +0100, Arnd Bergmann wrote: This patch implements basic support for UEFI runtime services in the ARM architecture - a requirement for using efibootmgr to read and update the system boot configuration. It uses the generic configuration table scanning to

Re: [PATCH v4 4/5] arm: Add [U]EFI runtime services support

2014-01-14 Thread Leif Lindholm
On Tue, Jan 14, 2014 at 07:52:32AM +0100, Arnd Bergmann wrote: It uses the generic configuration table scanning to populate ACPI and SMBIOS pointers. As far as I'm concerned there are no plans to have ACPI support on ARM32, so I wonder what the code to populate the ACPI tables is

Re: [PATCH v4 2/5] arm: add new asm macro update_sctlr

2014-01-29 Thread Leif Lindholm
On Wed, Jan 22, 2014 at 11:20:55AM +, Will Deacon wrote: +#ifdef CONFIG_CPU_CP15 +/* Macro for setting/clearing bits in sctlr */ + .macro update_sctlr, set:req, clear:req, tmp:req, tmp2:req + mrc p15, 0, \tmp, c1, c0, 0 + ldr \tmp2, =\set + orr \tmp, \tmp, \tmp2

Re: [PATCH v4 2/5] arm: add new asm macro update_sctlr

2014-02-03 Thread Leif Lindholm
On Mon, Feb 03, 2014 at 04:57:18PM +, Will Deacon wrote: mov[tw]: why? Then we end up battling different available immediate fields in A32/T32 instruction sets and v5/v6/v7 architecture versions. I was making the assumption that UEFI was going to be v7 only... is this not true?

[PATCH 20/22] Improve cmdline conversion

2014-02-05 Thread Leif Lindholm
From: H. Peter Anvin h...@zytor.com Improve the conversion of the UTF-16 EFI command line to UTF-8 for passing to the kernel. Signed-off-by: Roy Franz roy.fr...@linaro.org Signed-off-by: H. Peter Anvin h...@zytor.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/x86/boot

[PATCH 00/22] arm/arm64: UEFI stubs + runtime services

2014-02-05 Thread Leif Lindholm
: ignore dtb= when UEFI SecureBoot is enabled H. Peter Anvin (1): Improve cmdline conversion Leif Lindholm (6): arm: break part of __soft_restart out into separate function arm: add new asm macro update_sctlr Documentation: arm: add UEFI support documentation arm: Add [U]EFI runtime

[PATCH 21/22] arm: efistub: ignore dtb= when UEFI SecureBoot is enabled

2014-02-05 Thread Leif Lindholm
From: Ard Biesheuvel ard.biesheu...@linaro.org Loading unauthenticated FDT blobs directly from storage is a security hazard, so this should only be allowed when running with UEFI Secure Boot disabled. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org Signed-off-by: Leif Lindholm leif.lindh

[PATCH 15/22] lib: add fdt_empty_tree.c

2014-02-05 Thread Leif Lindholm
From: Mark Salter msal...@redhat.com CONFIG_LIBFDT support does not include fdt_empty_tree.c which is needed by arm64 EFI stub. Add it to libfdt_files. Signed-off-by: Mark Salter msal...@redhat.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- lib/Makefile |3 ++- lib

[PATCH 22/22] arm: update boot/compressed/.gitignore

2014-02-05 Thread Leif Lindholm
Add bswapsdi2.S, fdt_empty_tree.c and fdt_sw.c to ignore list. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/arm/boot/compressed/.gitignore |3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/boot/compressed/.gitignore b/arch/arm/boot/compressed/.gitignore index

[PATCH 10/22] Add EFI stub for ARM

2014-02-05 Thread Leif Lindholm
is not used by the zImage interface. Signed-off-by: Roy Franz roy.fr...@linaro.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Grant Likely grant.lik...@linaro.org --- arch/arm/Kconfig | 11 +++ arch/arm/boot/compressed/Makefile | 17 - arch/arm/boot

[PATCH 11/22] Disable stack protection for decompressor/stub

2014-02-05 Thread Leif Lindholm
decompressor/stub is also built with -fno-stack-protector. Signed-off-by: Roy Franz roy.fr...@linaro.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/arm/boot/compressed/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/compressed/Makefile

[PATCH 16/22] arm64: Add function to create identity mappings

2014-02-05 Thread Leif Lindholm
but this is not sufficient for UEFI. This patch adds a create_id_mapping() function which reuses the core code of the existing create_mapping(). Signed-off-by: Mark Salter msal...@redhat.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/arm64/include/asm/mmu.h |2 ++ arch/arm64/mm/mmu.c

[PATCH 14/22] init: efi: arm: enable (U)EFI runtime services on arm

2014-02-05 Thread Leif Lindholm
Since the efi_set_virtual_address_map call has strict init ordering requirements, add an explicit hook in the required place. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Grant Likely grant.lik...@linaro.org --- init/main.c |4 1 file changed, 4 insertions(+) diff

[PATCH 09/22] Add shared arm/arm64 EFI stub

2014-02-05 Thread Leif Lindholm
...@linaro.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- drivers/firmware/efi/arm-stub.c | 145 +++ drivers/firmware/efi/fdt.c | 31 +++-- 2 files changed, 171 insertions(+), 5 deletions(-) create mode 100644 drivers/firmware/efi/arm

[PATCH 08/22] Add strstr to compressed string.c for ARM.

2014-02-05 Thread Leif Lindholm
, with the implementation copied from the arch/x86/boot/string.c file used by the x86 decompressor. Signed-off-by: Roy Franz roy.fr...@linaro.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Reviewed-by: Grant Likely grant.lik...@linaro.org --- arch/arm/boot/compressed/string.c | 21

[PATCH 17/22] arm64: add EFI stub

2014-02-05 Thread Leif Lindholm
Biesheuvel. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org Signed-off-by: Mark Salter msal...@redhat.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/arm64/Kconfig| 10 arch/arm64/kernel/Makefile|3 ++ arch/arm64/kernel/efi-entry.S | 93

[PATCH 05/22] Add shared printk wrapper for consistent prefixing

2014-02-05 Thread Leif Lindholm
From: Roy Franz roy.fr...@linaro.org Add a wrapper for printk to standardize the prefix for informational and error messages from the EFI stub. Signed-off-by: Roy Franz roy.fr...@linaro.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c | 25

[PATCH 04/22] efi-stub.txt updates for ARM

2014-02-05 Thread Leif Lindholm
From: Roy Franz roy.fr...@linaro.org Update efi-stub.txt documentation to be more general and not x86 specific. Add ARM only dtb= command line option description. Signed-off-by: Roy Franz roy.fr...@linaro.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Grant Likely grant.lik

[PATCH 13/22] arm: Add [U]EFI runtime services support

2014-02-05 Thread Leif Lindholm
bindings. - Preserve regions marked RESERVED (but don't map them). - Rename 'efi' - 'uefi' within this new port (leaving core code as is). Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Reviewed-by: Grant Likely grant.lik...@linaro.org --- arch/arm/Kconfig| 16 ++ arch/arm/include

[PATCH 07/22] Add shared FDT related functions for ARM/ARM64

2014-02-05 Thread Leif Lindholm
#ifdefs in efi-stub-helper.c. Signed-off-by: Roy Franz roy.fr...@linaro.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Grant Likely grant.lik...@linaro.org --- drivers/firmware/efi/fdt.c | 247 include/linux/efi.h|3

[PATCH v2 00/14] UEFI support for arm(64)

2014-03-13 Thread Leif Lindholm
. Peter Anvin (1): efi: x86: Improve cmdline conversion Leif Lindholm (2): efi: delete stray ARM ifdef doc: arm: add UEFI support documentation Mark Salter (7): efi: create memory map iteration helper lib: add fdt_empty_tree.c efi: add helper function to get UEFI params from FDT

[PATCH v2 04/15] lib: add fdt_empty_tree.c

2014-03-13 Thread Leif Lindholm
From: Mark Salter msal...@redhat.com CONFIG_LIBFDT support does not include fdt_empty_tree.c which is needed by arm64 EFI stub. Add it to libfdt_files. Signed-off-by: Mark Salter msal...@redhat.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- lib/Makefile |3 ++- lib

[PATCH v2 15/15] efi/arm64: ignore dtb= when UEFI SecureBoot is enabled

2014-03-13 Thread Leif Lindholm
From: Ard Biesheuvel ard.biesheu...@linaro.org Loading unauthenticated FDT blobs directly from storage is a security hazard, so this should only be allowed when running with UEFI Secure Boot disabled. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org Signed-off-by: Leif Lindholm leif.lindh

[PATCH v2 12/15] doc: arm64: add description of EFI stub support

2014-03-13 Thread Leif Lindholm
From: Mark Salter msal...@redhat.com Add explanation of arm64 EFI stub and kernel image header changes needed to masquerade as a PE/COFF application. Signed-off-by: Mark Salter msal...@redhat.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Grant Likely grant.lik...@linaro.org

[PATCH v2 14/15] doc: arm: add UEFI support documentation

2014-03-13 Thread Leif Lindholm
This patch provides documentation of the [U]EFI runtime service and configuration features for the arm architecture. Cc: Rob Landley r...@landley.net Cc: linux-...@vger.kernel.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Grant Likely grant.lik...@linaro.org

[PATCH v2 08/15] efi: Add get_dram_base() helper function

2014-03-13 Thread Leif Lindholm
From: Roy Franz roy.fr...@linaro.org Add the get_dram_base() function, shared by arm/arm64. Signed-off-by: Roy Franz roy.fr...@linaro.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c | 30 ++ 1 file changed, 30

[PATCH v2 13/15] arm64: add EFI runtime services

2014-03-13 Thread Leif Lindholm
...@redhat.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/arm64/Kconfig | 16 ++ arch/arm64/include/asm/efi.h | 14 ++ arch/arm64/kernel/Makefile |1 + arch/arm64/kernel/efi.c | 465 ++ arch/arm64/kernel/setup.c|5

[PATCH v2 09/15] efi: Add shared FDT related functions for ARM/ARM64

2014-03-13 Thread Leif Lindholm
#ifdefs in efi-stub-helper.c. Signed-off-by: Roy Franz roy.fr...@linaro.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Grant Likely grant.lik...@linaro.org --- drivers/firmware/efi/fdt.c | 268 include/linux/efi.h|3

[PATCH v2 03/15] efi: create memory map iteration helper

2014-03-13 Thread Leif Lindholm
in the future. Signed-off-by: Mark Salter msal...@redhat.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- include/linux/efi.h |6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/efi.h b/include/linux/efi.h index 64d532c..a3276da 100644 --- a/include/linux/efi.h

[PATCH v2 05/15] efi: add helper function to get UEFI params from FDT

2014-03-13 Thread Leif Lindholm
CONFIG_UEFI_PARAMS_FROM_FDT. Signed-off-by: Mark Salter msal...@redhat.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- drivers/firmware/efi/Kconfig |7 drivers/firmware/efi/efi.c | 79 ++ include/linux/efi.h |9 + 3 files changed, 95

[PATCH v2 07/15] efi: Add shared printk wrapper for consistent prefixing

2014-03-13 Thread Leif Lindholm
From: Roy Franz roy.fr...@linaro.org Add a wrapper for printk to standardize the prefix for informational and error messages from the EFI stub. Signed-off-by: Roy Franz roy.fr...@linaro.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c | 25

[PATCH v2 02/15] efi: x86: Improve cmdline conversion

2014-03-13 Thread Leif Lindholm
From: H. Peter Anvin h...@zytor.com Improve the conversion of the UTF-16 EFI command line to UTF-8 for passing to the kernel. Signed-off-by: Roy Franz roy.fr...@linaro.org Signed-off-by: H. Peter Anvin h...@zytor.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/x86/boot

[PATCH 3/5] efi: x86: Improve cmdline conversion

2014-04-04 Thread Leif Lindholm
From: H. Peter Anvin h...@zytor.com Improve the conversion of the UTF-16 EFI command line to UTF-8 for passing to the kernel. Signed-off-by: Roy Franz roy.fr...@linaro.org Signed-off-by: H. Peter Anvin h...@zytor.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/x86/boot

[PATCH 2/5] efi: create memory map iteration helper

2014-04-04 Thread Leif Lindholm
in the future. Signed-off-by: Mark Salter msal...@redhat.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- include/linux/efi.h |6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/efi.h b/include/linux/efi.h index 6c100ff..82d0abb 100644 --- a/include/linux/efi.h

[PATCH 5/5] efi: Add get_dram_base() helper function

2014-04-04 Thread Leif Lindholm
From: Roy Franz roy.fr...@linaro.org Add the get_dram_base() function, shared by arm/arm64. Signed-off-by: Roy Franz roy.fr...@linaro.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c | 30 ++ 1 file changed, 30

[PATCH v3 00/10] arm64: UEFI support

2014-04-04 Thread Leif Lindholm
they are interdependent. - EFI_DEVICE_TREE_GUID renamed DEVICE_TREE_GUID. - Minor cleanups. Ard Biesheuvel (1): efi/arm64: ignore dtb= when UEFI SecureBoot is enabled Leif Lindholm (1): doc: arm: add UEFI support documentation Mark Salter (6): lib: add fdt_empty_tree.c efi: add helper function to get

[PATCH v3 10/10] efi/arm64: ignore dtb= when UEFI SecureBoot is enabled

2014-04-04 Thread Leif Lindholm
From: Ard Biesheuvel ard.biesheu...@linaro.org Loading unauthenticated FDT blobs directly from storage is a security hazard, so this should only be allowed when running with UEFI Secure Boot disabled. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org Signed-off-by: Leif Lindholm leif.lindh

[PATCH v3 07/10] doc: arm64: add description of EFI stub support

2014-04-04 Thread Leif Lindholm
From: Mark Salter msal...@redhat.com Add explanation of arm64 EFI stub and kernel image header changes needed to masquerade as a PE/COFF application. Signed-off-by: Mark Salter msal...@redhat.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Grant Likely grant.lik...@linaro.org

[PATCH v3 09/10] doc: arm: add UEFI support documentation

2014-04-04 Thread Leif Lindholm
This patch provides documentation of the [U]EFI runtime service and configuration features for the arm architecture. Cc: Rob Landley r...@landley.net Cc: linux-...@vger.kernel.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Grant Likely grant.lik...@linaro.org

[PATCH v3 06/10] arm64: efi: add EFI stub

2014-04-04 Thread Leif Lindholm
Biesheuvel. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org Signed-off-by: Mark Salter msal...@redhat.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Cc: Catalin Marinas catalin.mari...@arm.com Cc: Matt Fleming matt.flem...@intel.com --- arch/arm64/Kconfig | 14

[PATCH v3 01/10] lib: add fdt_empty_tree.c

2014-04-04 Thread Leif Lindholm
From: Mark Salter msal...@redhat.com CONFIG_LIBFDT support does not include fdt_empty_tree.c which is needed by arm64 EFI stub. Add it to libfdt_files. Signed-off-by: Mark Salter msal...@redhat.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Cc: Andrew Morton a...@linux-foundation.org

[PATCH v2 08/10] arm64: efi: add EFI stub

2014-04-25 Thread Leif Lindholm
in PE/COFF header for signed images] Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/arm64/Kconfig |5 +- arch/arm64/kernel/Makefile |4 +- arch/arm64/kernel/efi-entry.S | 109 + arch

[PATCH v2 10/10] efi/arm64: ignore dtb= when UEFI SecureBoot is enabled

2014-04-25 Thread Leif Lindholm
From: Ard Biesheuvel ard.biesheu...@linaro.org Loading unauthenticated FDT blobs directly from storage is a security hazard, so this should only be allowed when running with UEFI Secure Boot disabled. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org Signed-off-by: Leif Lindholm leif.lindh

[PATCH v2 05/10] efi: Add shared FDT related functions for ARM/ARM64

2014-04-25 Thread Leif Lindholm
#ifdefs in efi-stub-helper.c. Signed-off-by: Roy Franz roy.fr...@linaro.org [ Fixed memory node deletion code. ] Signed-off-by: Mark Rutland mark.rutl...@arm.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Grant Likely grant.lik...@linaro.org --- drivers/firmware/efi/fdt.c

[PATCH v2 02/10] doc: efi-stub.txt updates for ARM

2014-04-25 Thread Leif Lindholm
From: Roy Franz roy.fr...@linaro.org Update efi-stub.txt documentation to be more general and not x86 specific. Add ARM only dtb= command line option description. Signed-off-by: Roy Franz roy.fr...@linaro.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Grant Likely grant.lik

[PATCH v2 01/10] lib: add fdt_empty_tree.c

2014-04-25 Thread Leif Lindholm
From: Mark Salter msal...@redhat.com CONFIG_LIBFDT support does not include fdt_empty_tree.c which is needed by arm64 EFI stub. Add it to libfdt_files. Signed-off-by: Mark Salter msal...@redhat.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- lib/Makefile |3 ++- lib

[PATCH v2 00/10] arm64: UEFI support

2014-04-25 Thread Leif Lindholm
image area. - CONFIG_EFI_STUB merged into CONFIG_EFI since they are interdependent. - EFI_DEVICE_TREE_GUID renamed DEVICE_TREE_GUID. - Minor cleanups. Ard Biesheuvel (1): efi/arm64: ignore dtb= when UEFI SecureBoot is enabled Leif Lindholm (1): doc: arm: add UEFI support documentation Mark

Re: EFI_STUB fails to boot non-EFI on arm64

2014-05-23 Thread Leif Lindholm
but the code still assumes the kernel was started as an EFI app. Have you guys tested these patches properly? Apparently not sufficuently... Sorry about that. Fix appended: From 98433920394730d835f0061474832909c0740f29 Mon Sep 17 00:00:00 2001 From: Leif Lindholm leif.lindh...@linaro.org Date

Re: EFI_STUB fails to boot non-EFI on arm64

2014-05-23 Thread Leif Lindholm
:00:00 2001 From: Leif Lindholm leif.lindh...@linaro.org Date: Fri, 23 May 2014 15:50:51 +0100 Subject: [PATCH] efi: fdt: Drop error messages for non-error case Change fdt_find_uefi_params() to only write error messages if actual error encountered, rather than if no UEFI information is encountered

  1   2   >