Re: [PATCH V5 2/6] Add shared update_fdt() function for ARM/ARM64

2013-12-05 Thread Roy Franz
On Thu, Dec 5, 2013 at 11:24 AM, Grant Likely grant.lik...@linaro.org wrote: On Wed, 27 Nov 2013 15:31:51 -0800, Roy Franz roy.fr...@linaro.org wrote: 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

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

2013-12-05 Thread Roy Franz
On Thu, Dec 5, 2013 at 12:00 PM, Grant Likely grant.lik...@linaro.org wrote: On Wed, 27 Nov 2013 15:31:53 -0800, Roy Franz roy.fr...@linaro.org wrote: 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

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

2013-12-03 Thread Roy Franz
On Tue, Dec 3, 2013 at 10:38 AM, Will Deacon wrote: > Hi Mark, Roy, > > On Fri, Nov 29, 2013 at 10:05:10PM +, Mark Salter wrote: >> 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

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

2013-12-03 Thread Roy Franz
On Tue, Dec 3, 2013 at 10:38 AM, Will Deacon will.dea...@arm.com wrote: Hi Mark, Roy, On Fri, Nov 29, 2013 at 10:05:10PM +, Mark Salter wrote: 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

Re: [PATCH V5 2/6] Add shared update_fdt() function for ARM/ARM64

2013-12-02 Thread Roy Franz
On Mon, Dec 2, 2013 at 6:56 AM, Mark Salter wrote: > On Fri, 2013-11-29 at 11:30 +, Matt Fleming wrote: >> > /* >> >* Add an additional efi_memory_desc_t because we're doing an >> >* allocation which may be in a new descriptor region. >> > + * We allocate as

Re: [PATCH V5 2/6] Add shared update_fdt() function for ARM/ARM64

2013-12-02 Thread Roy Franz
On Mon, Dec 2, 2013 at 6:56 AM, Mark Salter msal...@redhat.com wrote: On Fri, 2013-11-29 at 11:30 +, Matt Fleming wrote: /* * Add an additional efi_memory_desc_t because we're doing an * allocation which may be in a new descriptor region. + * We allocate as

[PATCH V5 1/6] efi-stub.txt updates for ARM

2013-11-27 Thread 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 --- Documentation/efi-stub.txt | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-)

[PATCH V5 0/6] Add ARM EFI stub

2013-11-27 Thread Roy Franz
allocations. * Added prefix to all prints, reduced number of prints, and reviewed all messages. * Change mixed usage of dtb/fdt to all be fdt or "device tree" in efi-stub.c * remove unnecessary zimage_size variable from relocate_kernel() * correct return types on EFI functions - should be e

[PATCH V5 2/6] Add shared update_fdt() function for ARM/ARM64

2013-11-27 Thread Roy Franz
allocation type for memory map to EFI_RUNTIME_SERVICES_DATA, since we are passing this buffer to the kernel, or immediately freeing it. Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c |9 ++- drivers/firmware/efi/fdt.c | 115

[PATCH V5 3/6] Add strstr to compressed string.c for ARM.

2013-11-27 Thread Roy Franz
The shared efi-stub-helper.c functions require a strstr implementation. Implementation copied from arch/x86/boot/string.c Signed-off-by: Roy Franz Reviewed-by: Grant Likely --- arch/arm/boot/compressed/string.c | 21 + 1 file changed, 21 insertions(+) diff --git a/arch

[PATCH V5 6/6] Add config EFI_STUB for ARM to Kconfig

2013-11-27 Thread Roy Franz
Signed-off-by: Roy Franz --- arch/arm/Kconfig | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a1b4758..6601985 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1857,6 +1857,16 @@ config EFI This option is only useful

[PATCH V5 4/6] Add EFI stub for ARM

2013-11-27 Thread Roy Franz
interface. Signed-off-by: Roy Franz --- arch/arm/boot/compressed/Makefile | 15 +- arch/arm/boot/compressed/efi-header.S | 117 + arch/arm/boot/compressed/efi-stub.c | 291 + arch/arm/boot/compressed/efi-stub.h |5 + arch/arm/boot/compres

[PATCH V5 5/6] Disable stack protection for decompressor/stub

2013-11-27 Thread Roy Franz
-stack-protector. Signed-off-by: Roy Franz --- arch/arm/boot/compressed/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index c0c7fee..7974791 100644 --- a/arch/arm/boot/compressed/Makefile

[PATCH V5 3/6] Add strstr to compressed string.c for ARM.

2013-11-27 Thread Roy Franz
The shared efi-stub-helper.c functions require a strstr implementation. Implementation copied from arch/x86/boot/string.c Signed-off-by: Roy Franz roy.fr...@linaro.org Reviewed-by: Grant Likely grant.lik...@linaro.org --- arch/arm/boot/compressed/string.c | 21 + 1 file

[PATCH V5 6/6] Add config EFI_STUB for ARM to Kconfig

2013-11-27 Thread Roy Franz
Signed-off-by: Roy Franz roy.fr...@linaro.org --- arch/arm/Kconfig | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a1b4758..6601985 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1857,6 +1857,16 @@ config EFI

[PATCH V5 4/6] Add EFI stub for ARM

2013-11-27 Thread Roy Franz
-off-by: Roy Franz roy.fr...@linaro.org --- arch/arm/boot/compressed/Makefile | 15 +- arch/arm/boot/compressed/efi-header.S | 117 + arch/arm/boot/compressed/efi-stub.c | 291 + arch/arm/boot/compressed/efi-stub.h |5 + arch/arm/boot

[PATCH V5 5/6] Disable stack protection for decompressor/stub

2013-11-27 Thread Roy Franz
-stack-protector. Signed-off-by: Roy Franz roy.fr...@linaro.org --- arch/arm/boot/compressed/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index c0c7fee..7974791 100644 --- a/arch/arm/boot

[PATCH V5 0/6] Add ARM EFI stub

2013-11-27 Thread Roy Franz
of prints, and reviewed all messages. * Change mixed usage of dtb/fdt to all be fdt or device tree in efi-stub.c * remove unnecessary zimage_size variable from relocate_kernel() * correct return types on EFI functions - should be efi_status_t, not int. Roy Franz (6): efi-stub.txt updates for ARM Add

[PATCH V5 2/6] Add shared update_fdt() function for ARM/ARM64

2013-11-27 Thread Roy Franz
allocation type for memory map to EFI_RUNTIME_SERVICES_DATA, since we are passing this buffer to the kernel, or immediately freeing it. Signed-off-by: Roy Franz roy.fr...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c |9 ++- drivers/firmware/efi/fdt.c | 115

[PATCH V5 1/6] efi-stub.txt updates for ARM

2013-11-27 Thread 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 roy.fr...@linaro.org --- Documentation/efi-stub.txt | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-) diff

[PATCH] Remove redundant and incorrect memset()

2013-10-04 Thread Roy Franz
-by: Roy Franz Acked-by: Mark Salter --- drivers/firmware/efi/efi-stub-helper.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers/firmware/efi/efi-stub-helper.c index cc0581d..b6bffbf 100644 --- a/drivers/firmware/efi/efi-stub-helper.c +++ b

[PATCH] Remove redundant and incorrect memset()

2013-10-04 Thread Roy Franz
-by: Roy Franz roy.fr...@linaro.org Acked-by: Mark Salter msal...@redhat.com --- drivers/firmware/efi/efi-stub-helper.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers/firmware/efi/efi-stub-helper.c index cc0581d..b6bffbf 100644 --- a/drivers

Re: [PATCH 2/6] Add shared update_fdt() function for ARM/ARM64

2013-10-03 Thread Roy Franz
On Thu, Oct 3, 2013 at 7:27 AM, Matt Fleming wrote: > On Thu, 03 Oct, at 09:43:24AM, Mark Salter wrote: >> On Thu, 2013-10-03 at 10:52 +0100, Matt Fleming wrote: >> > > +#if defined(CONFIG_ARM) || defined(CONFIG_ARM64) >> > > +static efi_status_t update_fdt(efi_system_table_t *sys_table, void >>

Re: [PATCH 2/6] Add shared update_fdt() function for ARM/ARM64

2013-10-03 Thread Roy Franz
On Thu, Oct 3, 2013 at 7:27 AM, Matt Fleming m...@console-pimps.org wrote: On Thu, 03 Oct, at 09:43:24AM, Mark Salter wrote: On Thu, 2013-10-03 at 10:52 +0100, Matt Fleming wrote: +#if defined(CONFIG_ARM) || defined(CONFIG_ARM64) +static efi_status_t update_fdt(efi_system_table_t

[PATCH] Improve EFI stub command line conversion

2013-09-28 Thread Roy Franz
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 --- arch/arm/boot/compressed/efi-stub.c|2 +- arch/x86/boot/compressed/eboot.c |3 +- drivers/firmware/efi/efi-stub-helpe

[PATCH V2 ] Improve EFI stub command line conversion

2013-09-28 Thread Roy Franz
Improve the conversion of the UTF-16 EFI command line to UTF-8 for passing to the kernel. Depends on series: [PATCH V4 0/6] ADD ARM EFI stub Changes from V1: * Fix loop limit when processing UTF-16 EFI command line * Break out from series: [PATCH V5 00/18] ARM EFI stub common code * Now includes

[PATCH 5/6] Disable stack protection for decompressor/stub

2013-09-28 Thread Roy Franz
-stack-protector. Signed-off-by: Roy Franz --- arch/arm/boot/compressed/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 5fad8bd..551dbf9 100644 --- a/arch/arm/boot/compressed/Makefile +++ b

[PATCH 3/6] Add strstr to compressed string.c for ARM.

2013-09-28 Thread Roy Franz
The shared efi-stub-helper.c functions require a strstr implementation. Implementation copied from arch/x86/boot/string.c Signed-off-by: Roy Franz Reviewed-by: Grant Likely --- arch/arm/boot/compressed/string.c | 21 + 1 file changed, 21 insertions(+) diff --git a/arch

[PATCH 6/6] Add config EFI_STUB for ARM to Kconfig

2013-09-28 Thread Roy Franz
Signed-off-by: Roy Franz --- arch/arm/Kconfig | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 43594d5..9c84429 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1805,6 +1805,17 @@ config UACCESS_WITH_MEMCPY However

[PATCH 1/6] efi-stub.txt updates for ARM

2013-09-28 Thread 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 --- Documentation/efi-stub.txt | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-)

[PATCH 2/6] Add shared update_fdt() function for ARM/ARM64

2013-09-28 Thread 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. Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c | 86

[PATCH 4/6] Add EFI stub for ARM

2013-09-28 Thread Roy Franz
interface. Signed-off-by: Roy Franz --- arch/arm/boot/compressed/Makefile | 15 +- arch/arm/boot/compressed/efi-header.S | 111 + arch/arm/boot/compressed/efi-stub.c | 288 + arch/arm/boot/compressed/efi-stub.h |5 + arch/arm/boot/compres

[PATCH V4 0/6] ADD ARM EFI stub

2013-09-28 Thread Roy Franz
om relocate_kernel() * correct return types on EFI functions - should be efi_status_t, not int. Changes since V1: * Updated head.S based on feedback from Dave Martin. ARM/THUMB switches now much cleaner. Roy Franz (6): efi-stub.txt updates for ARM Add shared update_fdt() function for ARM/

[PATCH V4 0/6] ADD ARM EFI stub

2013-09-28 Thread Roy Franz
be efi_status_t, not int. Changes since V1: * Updated head.S based on feedback from Dave Martin. ARM/THUMB switches now much cleaner. Roy Franz (6): efi-stub.txt updates for ARM Add shared update_fdt() function for ARM/ARM64 Add strstr to compressed string.c for ARM. Add EFI stub for ARM

[PATCH 4/6] Add EFI stub for ARM

2013-09-28 Thread Roy Franz
-off-by: Roy Franz roy.fr...@linaro.org --- arch/arm/boot/compressed/Makefile | 15 +- arch/arm/boot/compressed/efi-header.S | 111 + arch/arm/boot/compressed/efi-stub.c | 288 + arch/arm/boot/compressed/efi-stub.h |5 + arch/arm/boot

[PATCH 2/6] Add shared update_fdt() function for ARM/ARM64

2013-09-28 Thread 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. Signed-off-by: Roy Franz roy.fr...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c | 86

[PATCH 1/6] efi-stub.txt updates for ARM

2013-09-28 Thread 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 roy.fr...@linaro.org --- Documentation/efi-stub.txt | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-) diff

[PATCH 6/6] Add config EFI_STUB for ARM to Kconfig

2013-09-28 Thread Roy Franz
Signed-off-by: Roy Franz roy.fr...@linaro.org --- arch/arm/Kconfig | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 43594d5..9c84429 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1805,6 +1805,17 @@ config UACCESS_WITH_MEMCPY

[PATCH 3/6] Add strstr to compressed string.c for ARM.

2013-09-28 Thread Roy Franz
The shared efi-stub-helper.c functions require a strstr implementation. Implementation copied from arch/x86/boot/string.c Signed-off-by: Roy Franz roy.fr...@linaro.org Reviewed-by: Grant Likely grant.lik...@linaro.org --- arch/arm/boot/compressed/string.c | 21 + 1 file

[PATCH 5/6] Disable stack protection for decompressor/stub

2013-09-28 Thread Roy Franz
-stack-protector. Signed-off-by: Roy Franz roy.fr...@linaro.org --- arch/arm/boot/compressed/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 5fad8bd..551dbf9 100644 --- a/arch/arm/boot

[PATCH V2 ] Improve EFI stub command line conversion

2013-09-28 Thread Roy Franz
Improve the conversion of the UTF-16 EFI command line to UTF-8 for passing to the kernel. Depends on series: [PATCH V4 0/6] ADD ARM EFI stub Changes from V1: * Fix loop limit when processing UTF-16 EFI command line * Break out from series: [PATCH V5 00/18] ARM EFI stub common code * Now includes

[PATCH] Improve EFI stub command line conversion

2013-09-28 Thread Roy Franz
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 --- arch/arm/boot/compressed/efi-stub.c|2 +- arch/x86/boot/compressed/eboot.c |3 +- drivers/firmware

Re: [PATCH 10/18] Do proper conversion from UTF-16 to UTF-8

2013-09-25 Thread Roy Franz
On Wed, Sep 25, 2013 at 5:01 AM, Matt Fleming wrote: > On Sun, 22 Sep, at 05:24:28PM, H. Peter Anvin wrote: >> On 09/22/2013 04:07 PM, Roy Franz wrote: >> > On Sun, Sep 22, 2013 at 3:54 PM, H. Peter Anvin wrote: >> >> Sorry this version is broken and doesn't

Re: [PATCH 10/18] Do proper conversion from UTF-16 to UTF-8

2013-09-25 Thread Roy Franz
On Wed, Sep 25, 2013 at 5:01 AM, Matt Fleming m...@console-pimps.org wrote: On Sun, 22 Sep, at 05:24:28PM, H. Peter Anvin wrote: On 09/22/2013 04:07 PM, Roy Franz wrote: On Sun, Sep 22, 2013 at 3:54 PM, H. Peter Anvin h...@zytor.com wrote: Sorry this version is broken and doesn't even

Re: [PATCH 10/18] Do proper conversion from UTF-16 to UTF-8

2013-09-22 Thread Roy Franz
't see an compilation problems. Thanks, Roy > > Roy Franz wrote: >>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 >>--- >> arch/x86/b

[PATCH 11/18] Rename __get_map() to efi_get_memory_map()

2013-09-22 Thread Roy Franz
Rename function in preparation for making it more flexible and sharing it. Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers/firmware/efi/efi

[PATCH 02/18] Add proper definitions for some EFI function pointers.

2013-09-22 Thread Roy Franz
. Also add some EFI types used by EFI functions. Signed-off-by: Roy Franz Acked-by: Mark Salter Reviewed-by: Grant Likely --- arch/x86/boot/compressed/eboot.h |8 -- include/linux/efi.h | 50 ++ 2 files changed, 34 insertions(+), 24

[PATCH 03/18] Move common EFI stub code from x86 arch code to common location

2013-09-22 Thread Roy Franz
No code changes made, just moving functions and #define from x86 arch directory to common location. Code is shared using #include, similar to how decompression code is shared among architectures. Signed-off-by: Roy Franz Acked-by: Mark Salter Reviewed-by: Grant Likely --- arch/x86/boot

[PATCH 04/18] Add system table pointer argument to shared functions.

2013-09-22 Thread Roy Franz
stub fixup its GOT, which is shared with the decompressor, simplifies the relocating of the zImage to a bootable address. Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.c | 38 +++-- drivers/firmware/efi/efi-stub-helper.c | 96 +--- 2

[PATCH 10/18] Do proper conversion from UTF-16 to UTF-8

2013-09-22 Thread Roy Franz
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 --- arch/x86/boot/compressed/eboot.c |3 +- drivers/firmware/efi/efi-stub-helper.c | 92 2 files c

[PATCH 08/18] Generalize relocate_kernel() for use by other architectures.

2013-09-22 Thread Roy Franz
kernel, and needs to allocate space for BSS. Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.c | 10 - drivers/firmware/efi/efi-stub-helper.c | 72 ++-- 2 files changed, 59 insertions(+), 23 deletions(-) diff --git a/arch/x86/boot/compressed

[PATCH 09/18] Move unicode to ASCII conversion to shared function.

2013-09-22 Thread Roy Franz
line and device tree. Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.c | 43 --- drivers/firmware/efi/efi-stub-helper.c | 58 2 files changed, 64 insertions(+), 37 deletions(-) diff --git a/arch/x86/boot/compressed/eboot.c

[PATCH 01/18] EFI stub documentation updates

2013-09-22 Thread Roy Franz
Move efi-stub.txt out of x86 directory and into common directory in preparation for adding ARM EFI stub support. Signed-off-by: Roy Franz --- Documentation/efi-stub.txt | 65 Documentation/x86/efi-stub.txt | 65

[PATCH 07/18] Move relocate_kernel() to shared file.

2013-09-22 Thread Roy Franz
The relocate_kernel() function will be generalized and used by all architectures, as they all have similar requirements. Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.c | 34 --- drivers/firmware/efi/efi-stub-helper.c | 35

[PATCH 05/18] Rename memory allocation/free functions

2013-09-22 Thread Roy Franz
Rename them to be more similar, as low_free() could be used to free memory allocated by both high_alloc() and low_alloc(). high_alloc() -> efi_high_alloc() low_alloc() -> efi_low_alloc() low_free() -> efi_free() Signed-off-by: Roy Franz Acked-by: Mark Salter Reviewed-by: Gra

[PATCH 15/18] Generalize handle_ramdisks() and rename to handle_cmdline_files().

2013-09-22 Thread Roy Franz
The handle_cmdline_files now takes the option to handle as a string, and returns the loaded data through parameters, rather than taking an x86 specific setup_header structure. For ARM, this will be used to load a device tree blob in addition to initrd images. Signed-off-by: Roy Franz Acked

[PATCH 13/18] use efi_get_memory_map() to get final map for x86

2013-09-22 Thread Roy Franz
Replace the open-coded memory map getting with the efi_get_memory_map() that is now general enough to use. Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.c | 22 +- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/arch/x86/boot/compressed/eboot.c

[PATCH 14/18] Allow efi_free() to be called with size of 0, and do nothing in that case.

2013-09-22 Thread Roy Franz
Make efi_free() safely callable with size of 0, similar to free() being callable with NULL pointers. Remove size checks that this makes redundant. This also avoids some size checks in the ARM EFI stub code that will be added as well. Signed-off-by: Roy Franz --- arch/x86/boot/compressed

[PATCH 16/18] Renames in handle_cmdline_files() to complete generalization.

2013-09-22 Thread Roy Franz
Rename variables to be not initrd specific, as now the function loads arbitrary files. This change is exclusively renames and comment changes to reflect the generalization. Signed-off-by: Roy Franz Acked-by: Mark Salter Reviewed-by: Grant Likely --- drivers/firmware/efi/efi-stub-helper.c

[PATCH 18/18] resolve warnings found on ARM compile

2013-09-22 Thread Roy Franz
warnings from gcc: warning: label 'free_pool' defined but not used [-Wunused-label] warning: value computed is not used [-Wunused-value] Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers

[PATCH 12/18] generalize efi_get_memory_map()

2013-09-22 Thread Roy Franz
Add arguments for returning the descriptor version and also the memory map key. The key is required for calling exit_boot_services(). Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git

[PATCH 17/18] Fix types in EFI calls to match EFI function definitions.

2013-09-22 Thread Roy Franz
on native width as specified by the EFI_FILE_PROTOCOL read() function. Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers/firmware/efi/efi-stub

[PATCH V5 00/18] ARM EFI stub common code

2013-09-22 Thread Roy Franz
e_size variable from relocate_kernel() * correct return types on EFI functions - should be efi_status_t, not int. Changes since V1: * Broke up changes to x86 and common code into more patches. 10 more patches in this series. H. Peter Anvin (1): Do proper conversion from UTF-16 to UTF-8 Roy Fr

[PATCH 06/18] Enforce minimum alignment of 1 page on allocations.

2013-09-22 Thread Roy Franz
allocation attempts were made, none were guaranteed to be page aligned. Signed-off-by: Roy Franz Acked-by: Mark Salter Reviewed-by: Grant Likely --- drivers/firmware/efi/efi-stub-helper.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/firmware/efi/efi-stub-helper.c

[PATCH 06/18] Enforce minimum alignment of 1 page on allocations.

2013-09-22 Thread Roy Franz
allocation attempts were made, none were guaranteed to be page aligned. Signed-off-by: Roy Franz roy.fr...@linaro.org Acked-by: Mark Salter msal...@redhat.com Reviewed-by: Grant Likely grant.lik...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c | 14 ++ 1 file changed, 14

[PATCH V5 00/18] ARM EFI stub common code

2013-09-22 Thread Roy Franz
() * correct return types on EFI functions - should be efi_status_t, not int. Changes since V1: * Broke up changes to x86 and common code into more patches. 10 more patches in this series. H. Peter Anvin (1): Do proper conversion from UTF-16 to UTF-8 Roy Franz (17): EFI stub documentation

[PATCH 17/18] Fix types in EFI calls to match EFI function definitions.

2013-09-22 Thread Roy Franz
on native width as specified by the EFI_FILE_PROTOCOL read() function. Signed-off-by: Roy Franz roy.fr...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers

[PATCH 16/18] Renames in handle_cmdline_files() to complete generalization.

2013-09-22 Thread Roy Franz
Rename variables to be not initrd specific, as now the function loads arbitrary files. This change is exclusively renames and comment changes to reflect the generalization. Signed-off-by: Roy Franz roy.fr...@linaro.org Acked-by: Mark Salter msal...@redhat.com Reviewed-by: Grant Likely grant.lik

[PATCH 18/18] resolve warnings found on ARM compile

2013-09-22 Thread Roy Franz
warnings from gcc: warning: label 'free_pool' defined but not used [-Wunused-label] warning: value computed is not used [-Wunused-value] Signed-off-by: Roy Franz roy.fr...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[PATCH 12/18] generalize efi_get_memory_map()

2013-09-22 Thread Roy Franz
Add arguments for returning the descriptor version and also the memory map key. The key is required for calling exit_boot_services(). Signed-off-by: Roy Franz roy.fr...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions

[PATCH 15/18] Generalize handle_ramdisks() and rename to handle_cmdline_files().

2013-09-22 Thread Roy Franz
The handle_cmdline_files now takes the option to handle as a string, and returns the loaded data through parameters, rather than taking an x86 specific setup_header structure. For ARM, this will be used to load a device tree blob in addition to initrd images. Signed-off-by: Roy Franz roy.fr

[PATCH 13/18] use efi_get_memory_map() to get final map for x86

2013-09-22 Thread Roy Franz
Replace the open-coded memory map getting with the efi_get_memory_map() that is now general enough to use. Signed-off-by: Roy Franz roy.fr...@linaro.org --- arch/x86/boot/compressed/eboot.c | 22 +- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/arch/x86

[PATCH 14/18] Allow efi_free() to be called with size of 0, and do nothing in that case.

2013-09-22 Thread Roy Franz
Make efi_free() safely callable with size of 0, similar to free() being callable with NULL pointers. Remove size checks that this makes redundant. This also avoids some size checks in the ARM EFI stub code that will be added as well. Signed-off-by: Roy Franz roy.fr...@linaro.org --- arch/x86

[PATCH 05/18] Rename memory allocation/free functions

2013-09-22 Thread Roy Franz
Rename them to be more similar, as low_free() could be used to free memory allocated by both high_alloc() and low_alloc(). high_alloc() - efi_high_alloc() low_alloc() - efi_low_alloc() low_free() - efi_free() Signed-off-by: Roy Franz roy.fr...@linaro.org Acked-by: Mark Salter msal

[PATCH 07/18] Move relocate_kernel() to shared file.

2013-09-22 Thread Roy Franz
The relocate_kernel() function will be generalized and used by all architectures, as they all have similar requirements. Signed-off-by: Roy Franz roy.fr...@linaro.org --- arch/x86/boot/compressed/eboot.c | 34 --- drivers/firmware/efi/efi-stub-helper.c | 35

[PATCH 10/18] Do proper conversion from UTF-16 to UTF-8

2013-09-22 Thread Roy Franz
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 --- arch/x86/boot/compressed/eboot.c |3 +- drivers/firmware/efi/efi-stub-helper.c | 92

[PATCH 08/18] Generalize relocate_kernel() for use by other architectures.

2013-09-22 Thread Roy Franz
kernel, and needs to allocate space for BSS. Signed-off-by: Roy Franz roy.fr...@linaro.org --- arch/x86/boot/compressed/eboot.c | 10 - drivers/firmware/efi/efi-stub-helper.c | 72 ++-- 2 files changed, 59 insertions(+), 23 deletions(-) diff --git a/arch

[PATCH 09/18] Move unicode to ASCII conversion to shared function.

2013-09-22 Thread Roy Franz
line and device tree. Signed-off-by: Roy Franz roy.fr...@linaro.org --- arch/x86/boot/compressed/eboot.c | 43 --- drivers/firmware/efi/efi-stub-helper.c | 58 2 files changed, 64 insertions(+), 37 deletions(-) diff --git a/arch/x86

[PATCH 01/18] EFI stub documentation updates

2013-09-22 Thread Roy Franz
Move efi-stub.txt out of x86 directory and into common directory in preparation for adding ARM EFI stub support. Signed-off-by: Roy Franz roy.fr...@linaro.org --- Documentation/efi-stub.txt | 65 Documentation/x86/efi-stub.txt | 65

[PATCH 04/18] Add system table pointer argument to shared functions.

2013-09-22 Thread Roy Franz
stub fixup its GOT, which is shared with the decompressor, simplifies the relocating of the zImage to a bootable address. Signed-off-by: Roy Franz roy.fr...@linaro.org --- arch/x86/boot/compressed/eboot.c | 38 +++-- drivers/firmware/efi/efi-stub-helper.c | 96

[PATCH 03/18] Move common EFI stub code from x86 arch code to common location

2013-09-22 Thread Roy Franz
No code changes made, just moving functions and #define from x86 arch directory to common location. Code is shared using #include, similar to how decompression code is shared among architectures. Signed-off-by: Roy Franz roy.fr...@linaro.org Acked-by: Mark Salter msal...@redhat.com Reviewed

[PATCH 02/18] Add proper definitions for some EFI function pointers.

2013-09-22 Thread Roy Franz
. Also add some EFI types used by EFI functions. Signed-off-by: Roy Franz roy.fr...@linaro.org Acked-by: Mark Salter msal...@redhat.com Reviewed-by: Grant Likely grant.lik...@linaro.org --- arch/x86/boot/compressed/eboot.h |8 -- include/linux/efi.h | 50

[PATCH 11/18] Rename __get_map() to efi_get_memory_map()

2013-09-22 Thread Roy Franz
Rename function in preparation for making it more flexible and sharing it. Signed-off-by: Roy Franz roy.fr...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers

Re: [PATCH 10/18] Do proper conversion from UTF-16 to UTF-8

2013-09-22 Thread Roy Franz
see an compilation problems. Thanks, Roy Roy Franz roy.fr...@linaro.org wrote: 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 --- arch/x86/boot/compressed/eboot.c

Re: [PATCH 09/17] Move unicode to ASCII conversion to shared function.

2013-09-21 Thread Roy Franz
On Fri, Sep 20, 2013 at 8:00 AM, H. Peter Anvin wrote: > On 09/20/2013 04:27 AM, Matt Fleming wrote: >> On Wed, 18 Sep, at 09:48:44PM, Roy Franz wrote: >>> Would it be acceptable to fix the naming/comments, and convert values >>> above 126 to '?' >>> in the

Re: [PATCH 09/17] Move unicode to ASCII conversion to shared function.

2013-09-21 Thread Roy Franz
On Fri, Sep 20, 2013 at 8:00 AM, H. Peter Anvin h...@zytor.com wrote: On 09/20/2013 04:27 AM, Matt Fleming wrote: On Wed, 18 Sep, at 09:48:44PM, Roy Franz wrote: Would it be acceptable to fix the naming/comments, and convert values above 126 to '?' in the current patchset, and address a more

Re: [PATCH 09/17] Move unicode to ASCII conversion to shared function.

2013-09-18 Thread Roy Franz
On Wed, Sep 18, 2013 at 8:44 PM, Adam Borowski wrote: > On Mon, Sep 16, 2013 at 09:11:25PM -0700, Roy Franz wrote: >> +/* Convert the unicode UEFI command line to ASCII to pass to kernel. >> + * Size of memory allocated return in *cmd_line_len. >> + * Returns NULL on erro

Re: [PATCH 08/17] Generalize relocate_kernel() for use by other architectures.

2013-09-18 Thread Roy Franz
On Wed, Sep 18, 2013 at 5:12 AM, Matt Fleming wrote: > On Mon, 16 Sep, at 09:11:24PM, Roy Franz wrote: >> Rename relocate_kernel() to efi_relocate_kernel(), and take >> parameters rather than x86 specific structure. Add max_addr >> argument as for ARM we have some addres

Re: [PATCH 08/17] Generalize relocate_kernel() for use by other architectures.

2013-09-18 Thread Roy Franz
On Wed, Sep 18, 2013 at 5:12 AM, Matt Fleming m...@console-pimps.org wrote: On Mon, 16 Sep, at 09:11:24PM, Roy Franz wrote: Rename relocate_kernel() to efi_relocate_kernel(), and take parameters rather than x86 specific structure. Add max_addr argument as for ARM we have some address

Re: [PATCH 09/17] Move unicode to ASCII conversion to shared function.

2013-09-18 Thread Roy Franz
On Wed, Sep 18, 2013 at 8:44 PM, Adam Borowski kilob...@angband.pl wrote: On Mon, Sep 16, 2013 at 09:11:25PM -0700, Roy Franz wrote: +/* Convert the unicode UEFI command line to ASCII to pass to kernel. + * Size of memory allocated return in *cmd_line_len. + * Returns NULL on error

[PATCH 04/17] Add system table pointer argument to shared functions.

2013-09-16 Thread Roy Franz
stub fixup its GOT, which is shared with the decompressor, simplifies the relocating of the zImage to a bootable address. Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.c | 38 +++-- drivers/firmware/efi/efi-stub-helper.c | 96 +--- 2

[PATCH 03/17] Move common EFI stub code from x86 arch code to common location

2013-09-16 Thread Roy Franz
No code changes made, just moving functions and #define from x86 arch directory to common location. Code is shared using #include, similar to how decompression code is shared among architectures. Signed-off-by: Roy Franz Acked-by: Mark Salter Reviewed-by: Grant Likely --- arch/x86/boot

[PATCH 01/17] EFI stub documentation updates

2013-09-16 Thread Roy Franz
Move efi-stub.txt out of x86 directory and into common directory in preparation for adding ARM EFI stub support. Signed-off-by: Roy Franz --- Documentation/efi-stub.txt | 65 Documentation/x86/efi-stub.txt | 65

[PATCH 09/17] Move unicode to ASCII conversion to shared function.

2013-09-16 Thread Roy Franz
line and device tree. Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.c | 43 --- drivers/firmware/efi/efi-stub-helper.c | 58 2 files changed, 64 insertions(+), 37 deletions(-) diff --git a/arch/x86/boot/compressed/eboot.c

[PATCH 05/17] Rename memory allocation/free functions

2013-09-16 Thread Roy Franz
Rename them to be more similar, as low_free() could be used to free memory allocated by both high_alloc() and low_alloc(). high_alloc() -> efi_high_alloc() low_alloc() -> efi_low_alloc() low_free() -> efi_free() Signed-off-by: Roy Franz Acked-by: Mark Salter Reviewed-by: Gra

[PATCH 11/17] generalize efi_get_memory_map()

2013-09-16 Thread Roy Franz
Add arguments for returning the descriptor version and also the memory map key. The key is required for calling exit_boot_services(). Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git

[PATCH 07/17] Move relocate_kernel() to shared file.

2013-09-16 Thread Roy Franz
The relocate_kernel() function will be generalized and used by all architectures, as they all have similar requirements. Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.c | 34 --- drivers/firmware/efi/efi-stub-helper.c | 35

[PATCH 06/17] Enforce minimum alignment of 1 page on allocations.

2013-09-16 Thread Roy Franz
allocation attempts were made, none were guaranteed to be page aligned. Signed-off-by: Roy Franz Acked-by: Mark Salter Reviewed-by: Grant Likely --- drivers/firmware/efi/efi-stub-helper.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/firmware/efi/efi-stub-helper.c

[PATCH 15/17] Renames in handle_cmdline_files() to complete generalization.

2013-09-16 Thread Roy Franz
Rename variables to be not initrd specific, as now the function loads arbitrary files. This change is exclusively renames and comment changes to reflect the generalization. Signed-off-by: Roy Franz Acked-by: Mark Salter Reviewed-by: Grant Likely --- drivers/firmware/efi/efi-stub-helper.c

[PATCH 14/17] Generalize handle_ramdisks() and rename to handle_cmdline_files().

2013-09-16 Thread Roy Franz
The handle_cmdline_files now takes the option to handle as a string, and returns the loaded data through parameters, rather than taking an x86 specific setup_header structure. For ARM, this will be used to load a device tree blob in addition to initrd images. Signed-off-by: Roy Franz Acked

<    1   2   3   4   >