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

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

2014-02-05 Thread Leif Lindholm
This is a combined set of patches for the arm and arm64 kernel support for UEFI firmware. The set depends on the following prerequisite sets: - Laura Abbott's 'Remove ARM meminfo' - Matt Fleming's 'Move facility flags to struct efi' - Mark Salter's 'Generic fixmap' - Mark Salter's 'Generic

[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

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

[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
From: Roy Franz roy.fr...@linaro.org This patch adds EFI stub support for the ARM Linux kernel. The EFI stub operates similarly to the x86 stub: it is a shim between the EFI firmware and the normal zImage entry point, and sets up the environment that the zImage is expecting. This includes

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

2014-02-05 Thread Leif Lindholm
From: Roy Franz roy.fr...@linaro.org The ARM decompressor/EFI stub do not implement the functions (__stack_chk_guard_setup, etc) that are required for support of stack protection. The actual enablement of stack protection is controlled by heuristics in GCC, which the code added for the EFI stub

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

2014-02-05 Thread Leif Lindholm
From: Mark Salter msal...@redhat.com At boot time, before switching to a virtual UEFI memory map, firmware expects UEFI memory and IO regions to be identity mapped whenever kernel makes runtime services calls. The exisitng early boot code creates an identity map of kernel text/data but this is

[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
From: Roy Franz roy.fr...@linaro.org This patch adds the EFI stub entry point that is shared by the arm/arm64 architectures. Each arch will implement the handle_kernel_image() function that handles the arch specific load address and boot protocol requirements. Signed-off-by: Roy Franz

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

2014-02-05 Thread Leif Lindholm
From: Roy Franz roy.fr...@linaro.org The shared efi-stub-helper.c functions require a strstr implementation. The EFI stub is part of the decompressor, so it does not use the kernel strstr() implementation. This patch adds a strstr() implementation to the string.c file for the decompressor, with

[PATCH 17/22] arm64: add EFI stub

2014-02-05 Thread Leif Lindholm
From: Mark Salter msal...@redhat.com This patch adds PE/COFF header fields to the start of the Image so that it appears as an EFI application to EFI firmware. An EFI stub is included to allow direct booting of the kernel Image. Support in the COFF header for signed images was provided by Ard

[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

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

2014-02-05 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. Changes since v2: - Updated FDT

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

2014-02-05 Thread Leif Lindholm
From: Roy Franz roy.fr...@linaro.org Both ARM and ARM64 stubs will update the device tree that they pass to the kernel. In both cases they primarily need to add the same UEFI related information, so the function can be shared. Create a new FDT related file for this to avoid use of architecture

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

2014-02-05 Thread Joe Perches
On Wed, 2014-02-05 at 17:03 +, Leif Lindholm wrote: 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. trivia: diff --git a/drivers/firmware/efi/efi-stub-helper.c

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

2014-02-05 Thread Ard Biesheuvel
On 5 February 2014 18:04, Leif Lindholm leif.lindh...@linaro.org wrote: 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

Re: [PATCH 02/22] arm: add new asm macro update_sctlr

2014-02-05 Thread Will Deacon
On Wed, Feb 05, 2014 at 05:03:53PM +, Leif Lindholm wrote: 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 |

Re: [BUG] Linux 3.14 fails to boot with new EFI changes

2014-02-05 Thread Alex Thorlton
On Fri, Jan 31, 2014 at 03:23:18PM +0100, Borislav Petkov wrote: And now my question: How can I reliably find out which region contains that uv_systab.function call? I need it so that I can map it in the EFI page table and you can continue to call that function and you can get back to

Re: [BUG] Linux 3.14 fails to boot with new EFI changes

2014-02-05 Thread Borislav Petkov
On Wed, Feb 05, 2014 at 03:45:36PM -0600, Alex Thorlton wrote: While working on an answer to this question, I ran across another issue on some newer hardware, that looks like it's definitely related to this problem, and might be the root cause. When booting on a UV2 we die in