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 efi_enter_v

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

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 wrote: > From: Ard Biesheuvel > > 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 > Signed-off-by: Leif Lindholm

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 > Suggested-by: Will Deacon > Cc: Will Deacon > --- > arch/arm/include/asm/assembler.h | 14 ++ > 1 file changed, 14 insertions(+)

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 > > 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 > b/drivers/firmware/efi/efi-stub-helper.c []

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

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

2014-02-05 Thread Leif Lindholm
From: Roy Franz 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 #ifdefs in efi-stub-h

[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 Suggested-by: Will Deacon Acked-by: Will Deacon --- arch/arm/include/asm/idmap.h |1 + arch/arm/kernel/p

[PATCH 03/22] efi: add helper function to get UEFI params from FDT

2014-02-05 Thread Leif Lindholm
From: Mark Salter ARM and ARM64 architectures use the device tree to pass UEFI parameters from stub to kernel. These parameters are things known to the stub but not discoverable by the kernel after the stub calls ExitBootSerives(). There is a helper function in: drivers/firmware/efi/fdt.c wh

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

2014-02-05 Thread Leif Lindholm
From: Roy Franz Add a wrapper for printk to standardize the prefix for informational and error messages from the EFI stub. Signed-off-by: Roy Franz Signed-off-by: Leif Lindholm --- drivers/firmware/efi/efi-stub-helper.c | 25 ++--- 1 file changed, 14 insertions(+), 11 de

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

2014-02-05 Thread Leif Lindholm
From: Roy Franz 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 Signed-off-by: Leif Lindholm Acked-by: Grant Likely --- Documentation/efi-stub.txt | 27 --- 1 f

[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 Suggested-by: Will Deacon Cc: Will Deacon --- arch/arm/include/asm/assembler.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assemble

[PATCH 06/22] Add helper functions used by arm/arm64

2014-02-05 Thread Leif Lindholm
From: Roy Franz Add the get_dram_base() function and efi_call_physN() macros that are shared by arm/arm64. Signed-off-by: Roy Franz Signed-off-by: Leif Lindholm --- drivers/firmware/efi/efi-stub-helper.c | 63 +--- 1 file changed, 50 insertions(+), 13 deletions(-

[PATCH 17/22] arm64: add EFI stub

2014-02-05 Thread Leif Lindholm
From: Mark Salter 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 Biesheuvel. Signed-off

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

2014-02-05 Thread Leif Lindholm
From: Roy Franz 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 the implementation co

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

2014-02-05 Thread Leif Lindholm
From: Roy Franz 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 Signed-off-by: Leif Lindholm

[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 Acked-by: Grant Likely --- init/main.c |4 1 file changed, 4 insertions(+) diff --git a/init/main.c b/init/main.c index 2fd9cef..0

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

2014-02-05 Thread Leif Lindholm
From: Mark Salter 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 not sufficient for UE

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

2014-02-05 Thread Leif Lindholm
From: Roy Franz 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 triggers when CONFIG_

[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 Cc: linux-...@vger.kernel.org Signed-off-by: Leif Lindholm Signed-off-by: Leif Lindholm Acked-by: G

[PATCH 10/22] Add EFI stub for ARM

2014-02-05 Thread Leif Lindholm
From: Roy Franz 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 loading the initrd (option

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

2014-02-05 Thread Leif Lindholm
From: Mark Salter 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 Signed-off-by: Leif Lindholm --- lib/Makefile |3 ++- lib/fdt_empty_tree.c |2 ++ 2 files changed, 4 insertions(+), 1

[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 --- 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 47279aa..cc3487e 100644 -

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

2014-02-05 Thread Leif Lindholm
From: Ard Biesheuvel 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 Signed-off-by: Leif Lindholm --- drivers/firmware/efi/arm-stub.c|4 +++- dri

[PATCH 20/22] Improve cmdline conversion

2014-02-05 Thread Leif Lindholm
From: "H. Peter Anvin" Improve the conversion of the UTF-16 EFI command line to UTF-8 for passing to the kernel. Signed-off-by: Roy Franz Signed-off-by: H. Peter Anvin Signed-off-by: Leif Lindholm --- arch/x86/boot/compressed/eboot.c |3 +- drivers/firmware/efi/arm-stub.c|

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

[PATCH 19/22] arm64: add EFI runtime services

2014-02-05 Thread Leif Lindholm
From: Mark Salter This patch adds EFI runtime support for arm64. The runtime support allows the kernel to access various EFI runtime services provided by EFI firmware. Things like reboot, real time clock, EFI boot variables, and others. Signed-off-by: Mark Salter Signed-off-by: Leif Lindholm -

[PATCH 18/22] doc: arm64: add description of EFI stub support

2014-02-05 Thread Leif Lindholm
From: Mark Salter Add explanation of arm64 EFI stub and kernel image header changes needed to masquerade as a PE/COFF application. Signed-off-by: Mark Salter Signed-off-by: Leif Lindholm Acked-by: Grant Likely CC: linux-...@vger.kernel.org CC: Rob Landley --- Documentation/arm64/booting.txt