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

2014-02-03 Thread Leif Lindholm
On Mon, Feb 03, 2014 at 10:34:15AM +, Will Deacon wrote: On Thu, Jan 30, 2014 at 01:12:47PM +, Leif Lindholm wrote: Oh, that's neat - thanks! Well, given that, I can think of two less horrible options: 1) .macro update_sctlr, tmp:req, set=, clear= mrc p15, 0

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:00:51PM +, Will Deacon wrote: With the two call sites in uefi_phys.S as: ldr r5, =(CR_M) update_sctlrr12, , r5 and ldr r4, =(CR_I | CR_C | CR_M) update_sctlrr12, r4 These ldr= could

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?

Re: [PATCHv2 2/2] arm: Get rid of meminfo

2014-02-05 Thread Leif Lindholm
-by: Laura Abbott lau...@codeaurora.org On VExpress TC2: Tested-by: Leif Lindholm leif.lindh...@linaro.org (Applies also to 1/2, of course.) -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

[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 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 19/22] arm64: add EFI runtime services

2014-02-05 Thread Leif Lindholm
...@redhat.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/arm64/Kconfig | 16 ++ arch/arm64/include/asm/efi.h | 12 ++ arch/arm64/kernel/Makefile |1 + arch/arm64/kernel/efi.c | 462 ++ arch/arm64/kernel/setup.c|3

[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 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 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 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 18/22] doc: arm64: add description of EFI stub support

2014-02-05 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 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 12/22] Documentation: arm: add UEFI support documentation

2014-02-05 Thread Leif Lindholm
This patch provides documentation of the [U]EFI runtime service and configuration features for the arm architecture. Changes since v1/v2: - Complete rewrite. - New FDT bindings. Cc: Rob Landley r...@landley.net Cc: linux-...@vger.kernel.org Signed-off-by: Leif Lindholm leif.lindh...@linaro.org

[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 06/22] Add helper functions used by arm/arm64

2014-02-05 Thread Leif Lindholm
From: Roy Franz roy.fr...@linaro.org Add the get_dram_base() function and efi_call_physN() macros that are 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 | 63

[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 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 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 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 01/22] arm: break part of __soft_restart out into separate function

2014-02-05 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 idmap_prepare(). Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Suggested-by: Will Deacon will.dea...@arm.com Acked-by: Will Deacon will.dea

[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 03/22] efi: add helper function to get UEFI params from FDT

2014-02-05 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 02/22] arm: add new asm macro update_sctlr

2014-02-05 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 Cc: Will Deacon will.dea...@arm.com --- arch/arm/include/asm/assembler.h | 14 ++ 1 file changed, 14 insertions(+) diff --git

[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 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 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

Re: [PATCH V6 6/8] Add EFI stub for ARM

2014-01-15 Thread Leif Lindholm
On Tue, Jan 14, 2014 at 06:16:58PM -0800, Roy Franz wrote: + .align 3 +pe_header: + .ascii PE + .short 0 + +coff_header: + .short 0x01c2 @ ARM or Thumb Could you explain why you are using 0x1c2 (Thumb) here and not 0x1c0 (ARM)

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-01-30 Thread Leif Lindholm
On Wed, Jan 29, 2014 at 03:58:44PM -0500, Mark Salter wrote: (i.e. conditionalise on whether an optional parameter was provided), so my attempt of refactoring actually ends up using an additional register: Register parameters are just strings, so how about this: .macro foo

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

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

2013-12-13 Thread Leif Lindholm
On Wed, Dec 11, 2013 at 10:17:58AM -0500, Mark Salter wrote: Anyway, I posted a patch to create a generic early_ioremap implementation using generic bits of the x86 code: https://lkml.org/lkml/2013/11/27/621 So maybe Dave's patch 1/14 should be part of that series or get rebased on top

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 v2 00/10] arm64: UEFI support

2014-04-29 Thread Leif Lindholm
On Tue, Apr 29, 2014 at 04:27:07PM +0100, Matt Fleming wrote: I'm wondering if it would be better to organize it into a separate topic branch. We can still take it through tip, if you want, but it would be better than putting it all into one tree. Sure, that makes sense. I'll do that.

[PATCH 0/5] Non-ARM-specific EFI patches needed for ARM ports

2014-04-04 Thread Leif Lindholm
This is the set of patches from the arm/arm64 UEFI support that are not in fact architecture specific. This set depends on other EFI patches already in linux-next. H. Peter Anvin (1): efi: x86: Improve cmdline conversion Leif Lindholm (1): efi: efi-stub-helper cleanup Mark Salter (1): efi

[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 4/5] efi: Add shared printk wrapper for consistent prefixing

2014-04-04 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 | 13

[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 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 1/5] efi: efi-stub-helper cleanup

2014-04-04 Thread Leif Lindholm
not always pick this up. Initialize to NULL to remove the resulting warning. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/firmware/efi/efi-stub

[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 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 08/10] arm64: add EFI runtime services

2014-04-04 Thread Leif Lindholm
...@redhat.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Cc: Catalin Marinas catalin.mari...@arm.com --- arch/arm64/Kconfig |7 + arch/arm64/include/asm/efi.h | 14 ++ arch/arm64/kernel/Makefile |2 +- arch/arm64/kernel/efi.c | 469

[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 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 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 05/10] efi: Add shared FDT related functions for ARM/ARM64

2014-04-04 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 Cc: Matt Fleming matt.flem...@intel.com --- drivers/firmware/efi/fdt.c | 269

[PATCH v3 04/10] arm64: Add function to create identity mappings

2014-04-04 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 Cc: Catalin Marinas catalin.mari...@arm.com --- arch/arm64/include

[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 v3 03/10] efi: add helper function to get UEFI params from FDT

2014-04-04 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 Cc: Matt Fleming matt.flem...@intel.com --- drivers/firmware/efi/Kconfig |7 drivers/firmware/efi/efi.c | 79 ++ include/linux/efi.h

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

2014-04-04 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

Re: [PATCH 0/3] of: dts: enable memory@0 quirk for PPC32 only

2014-04-23 Thread Leif Lindholm
On Wed, Apr 23, 2014 at 02:15:08PM +0100, Grant Likely wrote: The reason for me doing that is because we (including you) agreed at the discussion held during LCU13 that this was the safest way of preventing mischief like userland trying to read information from /proc/device-tree... I'm

Re: [PATCH 3/3] of: Handle memory@0 node on PPC32 only

2014-04-24 Thread Leif Lindholm
On Wed, Apr 23, 2014 at 02:10:58PM +0100, Grant Likely wrote: Does anyone have a LongTrail DT to hand, and if so does the root have a compatible string? From grepping through the kernel I could only find a model string (IBM,LongTrail). Actually, on LongTrail this can be removed from the

[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

[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 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 06/10] arm64: add EFI runtime services

2014-04-25 Thread Leif Lindholm
-off-by: Mark Rutland mark.rutl...@arm.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/arm64/Kconfig | 15 ++ arch/arm64/include/asm/efi.h | 14 ++ arch/arm64/kernel/Makefile |1 + arch/arm64/kernel/efi.c | 466

[PATCH v2 07/10] doc: arm: add UEFI support documentation

2014-04-25 Thread Leif Lindholm
This patch provides documentation of the [U]EFI runtime service and configuration features for the arm architecture. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Grant Likely grant.lik...@linaro.org --- Documentation/arm/00-INDEX |2 ++ Documentation/arm/uefi.txt | 64

[PATCH v2 09/10] doc: arm64: add description of EFI stub support

2014-04-25 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 04/10] arm64: Add function to create identity mappings

2014-04-25 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 [ Fixed error message formatting (%pa). ] Signed-off-by: Mark Rutland mark.rutl...@arm.com Signed-off-by: Leif Lindholm

[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 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 03/10] efi: add helper function to get UEFI params from FDT

2014-04-25 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 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

Re: [PATCH 0/3] of: dts: enable memory@0 quirk for PPC32 only

2014-04-18 Thread Leif Lindholm
On Thu, Apr 17, 2014 at 07:43:13PM -0500, Rob Herring wrote: On Thu, Apr 17, 2014 at 12:41 PM, Leif Lindholm leif.lindh...@linaro.org wrote: drivers/of/fdt.c contains a workaround for a missing memory type entry on longtrail firmware. Make that quirk PPC32 only, and while at it - fix up

Re: [PATCH 3/3] of: Handle memory@0 node on PPC32 only

2014-04-18 Thread Leif Lindholm
Hi Geert, On Fri, Apr 18, 2014 at 10:04:15AM +0200, Geert Uytterhoeven wrote: On Thu, Apr 17, 2014 at 7:42 PM, Leif Lindholm leif.lindh...@linaro.org wrote: In order to deal with an firmware bug on a specific ppc32 platform (longtrail), early_init_dt_scan_memory() looks for a node called

Re: [PATCH 0/3] of: dts: enable memory@0 quirk for PPC32 only

2014-04-18 Thread Leif Lindholm
On Fri, Apr 18, 2014 at 10:37:58AM -0500, Rob Herring wrote: But why do you need this? Apart from the current code permitting recreating a 15+ year old firmware bug into completely new platform ports? I would prefer to see a WARN_ON(!IS_ENABLED(CONFIG_PPC32)); added here. In addition

Re: [PATCH 0/3] of: dts: enable memory@0 quirk for PPC32 only

2014-04-18 Thread Leif Lindholm
On Fri, Apr 18, 2014 at 04:28:17PM -0500, Rob Herring wrote: Apart from the current code permitting recreating a 15+ year old firmware bug into completely new platform ports? I would prefer to see a WARN_ON(!IS_ENABLED(CONFIG_PPC32)); added here. In addition to, or instead of, the

Re: [PATCH 0/3] of: dts: enable memory@0 quirk for PPC32 only

2014-04-22 Thread Leif Lindholm
On Tue, Apr 22, 2014 at 02:08:29PM +0100, Grant Likely wrote: I would prefer to see a WARN_ON(!IS_ENABLED(CONFIG_PPC32)); added here. I completely agree. OK. So do we keep this around on unaffected architectures in perpetuity? Or can there be some cut-off date when the majority of

[PATCH 0/3] of: dts: enable memory@0 quirk for PPC32 only

2014-04-17 Thread Leif Lindholm
-kernel@vger.kernel.org Cc: Mark Rutland mark.rutl...@arm.com Leif Lindholm (3): arm: dts: add device_type=memory for ste-ccu8540 mips: dts: add device_type=memory where missing of: Handle memory@0 node on PPC32 only arch/arm/boot/dts/ste-ccu8540.dts |1 + arch/mips/lantiq/dts

[PATCH 1/3] arm: dts: add device_type=memory for ste-ccu8540

2014-04-17 Thread Leif Lindholm
The current .dts for ste-ccu8540 lacks a 'device_type = memory' for its memory node, relying on an old ppc quirk in order to discover its memory. Add this, to permit that quirk to be made ppc only. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Cc: linux-arm-ker...@lists.infradead.org Cc

[PATCH 2/3] mips: dts: add device_type=memory where missing

2014-04-17 Thread Leif Lindholm
A few platforms lack a 'device_type = memory' for their memory nodes, relying on an old ppc quirk in order to discover its memory. Add this, to permit that quirk to be made ppc only. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Cc: linux-m...@linux-mips.org Cc: devicet...@vger.kernel.org

[PATCH 3/3] of: Handle memory@0 node on PPC32 only

2014-04-17 Thread Leif Lindholm
In order to deal with an firmware bug on a specific ppc32 platform (longtrail), early_init_dt_scan_memory() looks for a node called memory@0 on all platforms. Restrict this quirk to ppc32 kernels only. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Cc: linuxppc-...@lists.ozlabs.org Cc

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

2013-06-27 Thread Leif Lindholm
On Thu, Jun 27, 2013 at 02:32:19AM +0100, Matthew Garrett wrote: On Wed, Jun 26, 2013 at 07:38:19AM -0700, James Bottomley wrote: The fixed virtual address scheme currently being looked at for x86_64 to make SetVirtualAddressMap() kexec invariant doesn't work on 32 bit because the address

Re: [PATCH 0/2] arm: add early_ioremap() support

2013-06-27 Thread Leif Lindholm
On Thu, Jun 27, 2013 at 10:47:21AM +0200, Arnd Bergmann wrote: No, the purpose is just like for x86 - do early parsing of things like the UEFI system and configuration tables, DMI and ACPI, in order to populate global structs and stuff. But are those tables actually in MMIO registers? I

Re: [GIT PULL] EFI urgent fix

2014-06-20 Thread Leif Lindholm
On Fri, Jun 20, 2014 at 10:28:48AM +0100, Catalin Marinas wrote: On Fri, Jun 20, 2014 at 10:00:08AM +0100, Matt Fleming wrote: Please pull the following compiler warning fix. Sorry, I've been pretty slow in getting this pull request sent. Multiple people have reported hitting it and I've

Re: [GIT PULL] EFI urgent fix

2014-06-20 Thread Leif Lindholm
On Fri, Jun 20, 2014 at 02:49:38PM +0100, Matt Fleming wrote: On Fri, 20 Jun, at 02:39:19PM, Leif Lindholm wrote: I did post an alternative patch for one half of this a week before anyone else, but that one seems to have been ignored, even by gmane: http://www.spinics.net/lists/linux-efi

Re: [PATCH 1/2] UEFI arm64: add noefi boot param

2014-08-06 Thread Leif Lindholm
On Wed, Aug 06, 2014 at 04:38:25PM +0800, Dave Young wrote: Adding a noefi boot param like in X86 to disable efi runtime services support. This will be useful for debugging uefi problems. Also it will be useful for later kexec/kdump work. Kexec on uefi support in X86 depends on a fixed vm

Re: [PATCH 1/2] UEFI arm64: add noefi boot param

2014-08-06 Thread Leif Lindholm
On Wed, Aug 06, 2014 at 02:20:21PM +0100, Matt Fleming wrote: Since this is really turning an x86-specific feature into a generic one, could it be moved to core code? Maybe an efi.mask, reusing the efi_enabled defines, with an efi_disabled macro? Why the new efi_disabled() and

Re: [PATCH 1/2] UEFI arm64: add noefi boot param

2014-08-06 Thread Leif Lindholm
On Wed, Aug 06, 2014 at 03:18:14PM +0100, Matt Fleming wrote: On Wed, 06 Aug, at 04:10:45PM, Ard Biesheuvel wrote: Shouldn't we clear the bit here if we failed to enable runtime services for some reason? Other code may test the bit assuming that it signifies that runtime services have

Re: [PATCH 1/8] arm: use generic fixmap.h

2014-08-07 Thread Leif Lindholm
Apart from that, verified with early_ioremap/UEFI patches on TC2. Tested-by: Leif Lindholm leif.lindh...@linaro.org -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: [PATCH 3/8] arm: mm: reduce fixmap kmap from 32 to 16 CPUS

2014-08-08 Thread Leif Lindholm
On Thu, Aug 07, 2014 at 05:18:44PM -0500, Rob Herring wrote: On Thu, Aug 7, 2014 at 10:01 AM, Kees Cook keesc...@chromium.org wrote: More room is needed in the fixmap range for non-kmap fixmap entries. This reduces the kmap range from 32 to 16 CPUs. Do you want this merged or just doing

[PATCH] of: support passing console options with stdout-path

2014-11-24 Thread Leif Lindholm
-by: Leif Lindholm leif.lindh...@linaro.org --- drivers/of/base.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 3823edf..89c6b33 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -37,6 +37,7 @@ EXPORT_SYMBOL

Re: [PATCH] of: support passing console options with stdout-path

2014-11-24 Thread Leif Lindholm
On Tue, Nov 25, 2014 at 12:00:16AM +0100, Andrew Lunn wrote: On Mon, Nov 24, 2014 at 10:23:58PM +, Leif Lindholm wrote: Support specifying console options (like with console=ttyXN,options) by appending them to the stdout-path property after a separating ':'. Example: stdout

Re: [GIT PULL] x86 fixes

2014-09-23 Thread Leif Lindholm
CONFIG_EFI_STUB=y. For arm64: Tested-by: Leif Lindholm leif.lindh...@linaro.org --- From 8054c405f0acc8ecb74b7e29675a1e6894afedb0 Mon Sep 17 00:00:00 2001 From: Matt Fleming matt.flem...@intel.com Date: Tue, 23 Sep 2014 10:37:43 +0100 Subject: [PATCH] Revert efi/x86: efistub: Move shared

Re: [PATCH] of: support passing console options with stdout-path

2014-11-25 Thread Leif Lindholm
On Tue, Nov 25, 2014 at 10:35:04AM +, Mark Rutland wrote: On Mon, Nov 24, 2014 at 10:23:58PM +, Leif Lindholm wrote: Support specifying console options (like with console=ttyXN,options) by appending them to the stdout-path property after a separating ':'. Example: stdout

Re: [PATCH] of: support passing console options with stdout-path

2014-11-25 Thread Leif Lindholm
aef87fd958902afe881720286d525e10997462b8 Mon Sep 17 00:00:00 2001 From: Leif Lindholm leif.lindh...@linaro.org Date: Mon, 24 Nov 2014 22:23:58 + Subject: [PATCH] of: support passing console options with stdout-path Support specifying console options (like with console=ttyXN,options) by appending them to the stdout-path

Re: [PATCH] of: support passing console options with stdout-path

2014-11-25 Thread Leif Lindholm
On Tue, Nov 25, 2014 at 02:58:54PM +, Grant Likely wrote: + len = strchrnul(path, ':') - path; + for_each_property_of_node(of_aliases, pp) { if (strlen(pp-name) == len !strncmp(pp-name, path, len)) { np =

[PATCH v2 0/2] of: support passing console options with stdout-path

2014-11-26 Thread Leif Lindholm
, as it maintains existing whitespace errors. Changes since v1: - Change interface of of_get_node_by_path() to take an additional argument, and update all of its callers to keep working. - Rework original patch to use this interface. Leif Lindholm (2): of: add optional options parameter

[PATCH v2 1/2] of: add optional options parameter to of_find_node_by_path()

2014-11-26 Thread Leif Lindholm
) + of_find_node_by_path(E1, NULL) drivers/of/resolver.c manually updated, since spatch fails to parse it correctly. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/arm/kernel/devtree.c |2 +- arch/arm/mach-bcm/kona_smp.c|2 +- arch/arm/mach-imx/clk.c

[PATCH v2 2/2] of: support passing console options with stdout-path

2014-11-26 Thread Leif Lindholm
Support specifying console options (like with console=ttyXN,options) by appending them to the stdout-path property after a separating ':'. Example: stdout-path = uart0:115200; Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- drivers/of/base.c |5 +++-- 1 file changed, 3

Re: [PATCH v2 1/2] of: add optional options parameter to of_find_node_by_path()

2014-11-26 Thread Leif Lindholm
On Wed, Nov 26, 2014 at 09:06:33PM +, Grant Likely wrote: On Wed, Nov 26, 2014 at 5:40 PM, Leif Lindholm leif.lindh...@linaro.org wrote: Update of_find_node_by_path(): 1) Ignore any part of the path beyond and including the ':' separator. 2) Set the new provided pointer argument

[RFC] fs: make efivarfs a pseudo filesystem, built by default with EFI

2014-12-18 Thread Leif Lindholm
, over the legacy efivars interface, also build it by default as a module if CONFIG_EFI. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- fs/Kconfig | 2 +- fs/efivarfs/Kconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/Kconfig b/fs/Kconfig index

[RFC PATCH] make CONFIG_STRICT_DEVMEM a core non-debug feature

2014-11-04 Thread Leif Lindholm
Most, but not all, architectures supporting CONFIG_STRICT_DEVMEM treat it as a debug feature - although its function is pretty much the opposite of debug. This patch deletes all architecture-specific config options and moves the option to core code, as a non-debug option. Signed-off-by: Leif

Re: [RFC PATCH] make CONFIG_STRICT_DEVMEM a core non-debug feature

2014-11-04 Thread Leif Lindholm
On Tue, Nov 04, 2014 at 10:43:00AM -0800, Kees Cook wrote: diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index efefd12..39f7817 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -6,6 +6,22 @@ menu Character devices source drivers/tty/Kconfig +config

Re: [RFC PATCH] make CONFIG_STRICT_DEVMEM a core non-debug feature

2014-11-04 Thread Leif Lindholm
On Tue, Nov 04, 2014 at 12:02:32PM -0800, Kees Cook wrote: I considered doing that, but didn't want to risk listing too many details of one architecture, and too few of others. Well, the others only say memory mapped peripherals, so that's what I was suggesting adding the x86 language: it

Re: [PATCH v2 2/2] of: support passing console options with stdout-path

2014-11-27 Thread Leif Lindholm
+, Leif Lindholm wrote: Support specifying console options (like with console=ttyXN,options) by appending them to the stdout-path property after a separating ':'. Example: stdout-path = uart0:115200; Hi Leif This should be documented somewhere under

[PATCH v3 2/3] of: add optional options parameter to of_find_node_by_path()

2014-11-27 Thread Leif Lindholm
and including the ':' separator. 3) Set the new provided pointer argument to the beginning of the string following the ':' separator. 4: Add tests. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- drivers/of/base.c | 21 + drivers/of/selftest.c | 12

<    1   2   3   4   5   >