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

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

2013-08-05 Thread Leif Lindholm
On Mon, Aug 05, 2013 at 03:11:49PM +0100, Dave Martin wrote: diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 75189f1..4c70b9e 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -122,19 +122,106 @@

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

2013-08-07 Thread Leif Lindholm
On Mon, Aug 05, 2013 at 01:15:40PM +0100, Matt Fleming wrote: +static __init int match_config_table(efi_guid_t *guid, +unsigned long table, +efi_config_table_type_t *table_types) +{ + u8 str[38]; Shouldn't this be 37?

Re: [PATCH 16/17] Add EFI stub for ARM

2013-08-07 Thread Leif Lindholm
On Wed, Aug 07, 2013 at 07:05:54PM +0100, Dave Martin wrote: Is it possible for this allocation to fail -- i.e., because UEFI has put us in an unsuitable location which is within the first 128MB of RAM, such that we can't pick a suitable location without overlap? For the time being though, I

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

2013-08-07 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 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 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 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

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

2013-08-07 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 v3 2/5] efi: provide a generic efi_config_init()

2013-08-07 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

Re: [PATCH v2 2/2] arm: add early_ioremap support

2013-09-10 Thread Leif Lindholm
On Fri, Sep 06, 2013 at 05:14:49PM +0100, Catalin Marinas wrote: On Fri, Sep 06, 2013 at 10:19:18AM +0100, Leif Lindholm wrote: --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -877,6 +878,10 @@ void __init setup_arch(char **cmdline_p) parse_early_param

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

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

2013-07-30 Thread Leif Lindholm
efi_lookup_mapped_addr() is a handy utility for other platforms than x86. Move it from arch/x86 to drivers/firmware/efi. This function will be used by future ARM patches. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/x86/platform/efi/efi.c | 28

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

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

Re: [PATCH 4/4] efi: x86: make efi_lookup_mapped_addr() a common function

2013-08-01 Thread Leif Lindholm
On Wed, Jul 31, 2013 at 09:58:20AM +0100, Matt Fleming wrote: On 07/30/2013 05:47 PM, Leif Lindholm wrote: efi_lookup_mapped_addr() is a handy utility for other platforms than x86. Move it from arch/x86 to drivers/firmware/efi. This function will be used by future ARM patches

Re: Is: Wrap-up Was: Re: EFI and multiboot2 devlopment work for Xen

2013-11-05 Thread Leif Lindholm
On Mon, Nov 04, 2013 at 08:41:11PM +, Stefano Stabellini wrote: multiboot2 protocol requires some more changes. However, about 80% of code is ready. In this case Xen and modules are loaded by GRUB2 itself. It means that all images could be placed on any filesystem recognized by GRUB2.

[PATCH v3 1/2] Documentation: arm: early_ioremap/early_memremap

2013-10-03 Thread Leif Lindholm
-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Rob Landley r...@landley.net --- Documentation/arm/00-INDEX |2 ++ Documentation/arm/early_ioremap.txt | 23 +++ 2 files changed, 25 insertions(+) create mode 100644 Documentation/arm/early_ioremap.txt diff

[PATCH v3 0/2] arm: add early_ioremap support

2013-10-03 Thread Leif Lindholm
early_memremap() to use MT_WRITEALLOC instead of MT_UNCACHED. Cc: Nicolas Pitre n...@linaro.org Cc: Arnd Bergman a...@arndb.de Cc: Catalin Marinas catalin.mari...@arm.com Leif Lindholm (2): Documentation: arm: early_ioremap/early_memremap arm: add early_ioremap support Documentation/arm/00

[PATCH v3 2/2] arm: add early_ioremap support

2013-10-03 Thread Leif Lindholm
catalin.mari...@arm.com Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/arm/Kconfig |9 ++ arch/arm/include/asm/fixmap.h | 29 - arch/arm/include/asm/io.h | 23 arch/arm/kernel/setup.c |3 + arch/arm/mm/Makefile |1 + arch/arm/mm

[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 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 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 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 11:11:18AM -0500, Rob Herring wrote: Adding devicetree list since you are defining bindings... +with CONFIG_OF. + +It parses the FDT /chosen node for the following parameters: DT bindings should be documented in Documentation/devicetree/bindings. I also

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

[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

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

2013-11-28 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 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

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 0/3] (U)EFI runtime services for arm

2013-11-29 Thread Leif Lindholm
On Fri, Nov 29, 2013 at 11:53:19AM +, Matt Fleming wrote: On Thu, 28 Nov, at 04:41:20PM, Leif Lindholm wrote: In systems based on [U]EFI-conformant firmware, runtime services provide a standardised way for the kernel to update firmware environment variables. This is used for example

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 v2 0/3] arm: [U]EFI runtime services support

2013-11-15 Thread Leif Lindholm
Hi Olof, Many thanks for having a look. On Fri, Nov 15, 2013 at 10:04:22AM -0800, Olof Johansson wrote: This series is generally looking sane to me without looking at the code in very close detail. In the interest of full disclosure, I would like to point out that I will be posting another

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

[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 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 11/15] arm64: add EFI stub

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

2014-03-13 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 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 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 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 06/15] doc: efi-stub.txt updates for ARM

2014-03-13 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 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 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 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 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 v2 01/15] efi: delete stray ARM ifdef

2014-03-13 Thread Leif Lindholm
An #ifdef CONFIG_ARM clause in efi-stub-helper.c got included with some of the generic stub rework by Roy Franz. Drop it here to make subsequent patches less confusing. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c | 14 ++ 1 file

Re: [PATCH v4 4/6] arm: add early_ioremap support

2014-02-26 Thread Leif Lindholm
early_ioremap code to implement early_ioremap for ARM. The ARM-specific bits come mostly from an earlier patch from Leif Lindholm leif.lindh...@linaro.org here: This doesn't actually work for me. The PTE flags are not correct and accesses to a device fault. See below. Do they fault before

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

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

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 4/5] arm: Add [U]EFI runtime services support

2014-01-14 Thread Leif Lindholm
On 14 January 2014 13:26, Arnd Bergmann a...@arndb.de wrote: Are you suggesting that I should #ifndef ARM in common code, or that I should neglect to document what the common code will do with data it is given by UEFI? It would probably be good to document the fact that it won't work,

[PATCH 2/2] arm: add early_ioremap support

2013-06-25 Thread Leif Lindholm
This patch adds support for early_ioremap, based on the existing mechanism in x86. Up to 7 regions of up to 128KB each can be temporarily mapped in before paging_init, regardless of later highmem status. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/arm/Kconfig

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

2013-06-25 Thread Leif Lindholm
of early_ioremap(), available before paging_init() only. Like the x86 code on which it is based, it (p)re-uses the fixmap regions for its virtual mapping range. Up to 7 simultaneous mappings of up to 128KB can be accommodated in the available fixmap space. Leif Lindholm (2): Documentation: arm

[PATCH 1/2] Documentation: arm: early_ioremap

2013-06-25 Thread Leif Lindholm
This patch provides documentation of the early_ioremap() functionality, including its implementation and usage instructions. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- Documentation/arm/00-INDEX |2 ++ Documentation/arm/early_ioremap.txt | 12 2 files

[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

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

2013-06-25 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 also locates any presented SMBIOS configuration table and stores it for potential later use by DMI. Signed-off-by: Leif

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

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 1/4] Documentation: arm: [U]EFI runtime services

2013-06-26 Thread Leif Lindholm
On Wed, Jun 26, 2013 at 02:13:39PM +0100, Grant Likely wrote: diff --git a/Documentation/arm/uefi.txt b/Documentation/arm/uefi.txt +It (early) parses the FDT for the following parameters: Need to state which node these properties can be found in. I recommend /chosen Will do. I would

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 0/2] arm: add early_ioremap() support

2013-06-26 Thread Leif Lindholm
On Wed, Jun 26, 2013 at 08:52:09PM +0200, Arnd Bergmann wrote: I made a similar suggestion to extending the use of fixmap recently, see Re: SCU registers mapping for CA9/CA5 cores. Russell pointed out that fixmap is intentionally limited to just kmap_atomic uses at the moment and changing that

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

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

2013-06-26 Thread Leif Lindholm
On Wed, Jun 26, 2013 at 11:23:50PM +0200, Arnd Bergmann wrote: Is this an issue here, since (unlike x86) this early_ioremap only works before paging_init()? The main problem is that the total fixmap size is only around 900kb, and we want to reserve at least 64kb per cpu for kmap_atomic.

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

2013-06-26 Thread Leif Lindholm
On Thu, Jun 27, 2013 at 12:13:55AM +0200, Arnd Bergmann wrote: Sorry, I still don't get it. Are you saying that kmap_atomic is available before kmap_init() (in paging_init())? If not, all of my mappings are discarded (well, abandoned to be more correct), so I don't see how it affects

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 3/3] efi: x86: make efi_lookup_mapped_addr() a common function

2013-09-05 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 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

[PATCH v4 2/3] efi: x86: ia64: provide a generic efi_config_init()

2013-09-05 Thread Leif Lindholm
from the x86 and ia64 code. Squashed into one big patch to avoid breaking bisection. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Tony Luck tony.l...@intel.com Signed-off-by: Matt Fleming matt.flem...@intel.com --- arch/ia64/kernel/efi.c | 54 +- arch

[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 v2 1/2] Documentation: arm: early_ioremap/early_memremap

2013-09-06 Thread Leif Lindholm
This patch provides documentation of the early_ioremap() and early_memremap() functionality,including its implementation and usage instructions. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Acked-by: Rob Landley r...@landley.net --- Documentation/arm/00-INDEX |2

[PATCH v2 0/2] Add early_ioremap()/early_memremap() support to arm

2013-09-06 Thread Leif Lindholm
is the addition of the early_memremap() call, which maps a region in with uncached normal memory type. Leif Lindholm (2): Documentation: arm: early_ioremap/early_memremap arm: add early_ioremap support Documentation/arm/00-INDEX |2 + Documentation/arm/early_ioremap.txt | 23

[PATCH v2 2/2] arm: add early_ioremap support

2013-09-06 Thread Leif Lindholm
This patch adds support for early_ioremap and early_memremap, based on the existing mechanism in x86. Up to 7 regions of up to 128KB each can be temporarily mapped in before paging_init, regardless of later highmem status. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org --- arch/arm

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

2013-09-21 Thread Leif Lindholm
On Fri, Sep 20, 2013 at 11:42:49AM +0100, Matt Fleming wrote: On Thu, 19 Sep, at 04:54:45PM, Borislav Petkov wrote: From: Borislav Petkov b...@suse.de ... and use the good old standard defines which we all know. Also, simplify math to shift by PAGE_SHIFT instead of multiplying by

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

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:50:39PM +0200, Borislav Petkov wrote: Ok, maybe the generic header include/linux/efi.h might be a problem but the rest are changes to arch/x86/ which should have no effect whatsoever on any other arch. Or are you planning to move some of it into generic code?

[PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-06 Thread Leif Lindholm
__early_set_fixmap does not do any synchronization when called to set a fixmap entry. Add call to flush_vmap_cache(). Tested on hardware. Signed-off-by: Leif Lindholm leif.lindh...@linaro.org Tested-by: Graeme Gregory graeme.greg...@linaro.org Cc: Steve Capper steve.cap...@linaro.org --- arch

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-06 Thread Leif Lindholm
On Fri, Jun 06, 2014 at 10:37:29AM -0400, Mark Salter wrote: On Fri, 2014-06-06 at 11:29 +0100, Leif Lindholm wrote: __early_set_fixmap does not do any synchronization when called to set a fixmap entry. Add call to flush_vmap_cache(). Tested on hardware. Signed-off-by: Leif Lindholm

Re: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap

2014-06-09 Thread Leif Lindholm
On Mon, Jun 09, 2014 at 12:03:56PM +0100, Catalin Marinas wrote: __early_set_fixmap does not do any synchronization when called to set a fixmap entry. Add call to flush_vmap_cache(). Did you hit a problem or it was just for safety? This fixes an abort when accessing early UEFI

  1   2   3   4   5   >