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

2013-09-16 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 16/17] Fix types in EFI calls to match EFI function definitions.

2013-09-16 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 08/17] Generalize relocate_kernel() for use by other architectures.

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

[PATCH 12/17] use efi_get_memory_map() to get final map for x86

2013-09-16 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 10/17] Rename __get_map() to efi_get_memory_map()

2013-09-16 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 13/17] Allow efi_free() to be called with size of 0, and do nothing in that case.

2013-09-16 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 02/17] Add proper definitions for some EFI function pointers.

2013-09-16 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 V4 00/17] ARM EFI stub common code

2013-09-16 Thread Roy Franz
x86 and common code into more patches. 10 more patches in this series. Roy Franz (17): EFI stub documentation updates Add proper definitions for some EFI function pointers. Move common EFI stub code from x86 arch code to common location Add system table pointer argument to shared functi

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

2013-09-16 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 V4 00/17] ARM EFI stub common code

2013-09-16 Thread Roy Franz
into more patches. 10 more patches in this series. Roy Franz (17): EFI stub documentation updates Add proper definitions for some EFI function pointers. Move common EFI stub code from x86 arch code to common location Add system table pointer argument to shared functions. Rename memory

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

2013-09-16 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 10/17] Rename __get_map() to efi_get_memory_map()

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

[PATCH 12/17] use efi_get_memory_map() to get final map for x86

2013-09-16 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 08/17] Generalize relocate_kernel() for use by other architectures.

2013-09-16 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 | 12 -- drivers/firmware/efi/efi-stub-helper.c | 74 ++-- 2 files changed, 60 insertions(+), 26 deletions(-) diff --git a/arch

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

2013-09-16 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 17/17] resolve warnings found on ARM compile

2013-09-16 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 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 roy.fr

[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 roy.fr...@linaro.org Acked-by: Mark Salter msal...@redhat.com Reviewed-by: Grant Likely grant.lik

[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 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 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 roy.fr...@linaro.org --- arch/x86/boot/compressed/eboot.c | 34 --- drivers/firmware/efi/efi-stub-helper.c | 35

[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 roy.fr...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions

[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 roy.fr...@linaro.org Acked-by: Mark Salter msal

[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 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/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 roy.fr...@linaro.org --- Documentation/efi-stub.txt | 65 Documentation/x86/efi-stub.txt | 65

[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 roy.fr...@linaro.org Acked-by: Mark Salter msal...@redhat.com Reviewed

[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 roy.fr...@linaro.org --- arch/x86/boot/compressed/eboot.c | 38 +++-- drivers/firmware/efi/efi-stub-helper.c | 96

Re: [PATCH V3 RFC 00/16] EFI stub for ARM

2013-09-02 Thread Roy Franz
On Mon, Sep 2, 2013 at 3:33 AM, Matt Fleming wrote: > On Tue, 13 Aug, at 10:58:16AM, Roy Franz wrote: >> Hi Matt, >> >>Do you have any more feedback on the X86 and common code (patches >> 1-13) that needs to be addressed? Mark Salter has a working ARM64 EF

Re: [PATCH V3 RFC 00/16] EFI stub for ARM

2013-09-02 Thread Roy Franz
On Mon, Sep 2, 2013 at 3:33 AM, Matt Fleming m...@console-pimps.org wrote: On Tue, 13 Aug, at 10:58:16AM, Roy Franz wrote: Hi Matt, Do you have any more feedback on the X86 and common code (patches 1-13) that needs to be addressed? Mark Salter has a working ARM64 EFI stub implemented

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

2013-08-30 Thread Roy Franz
On Fri, Aug 30, 2013 at 7:36 AM, Grant Likely wrote: > On Fri, 9 Aug 2013 16:26:16 -0700, Roy Franz wrote: >> This patch adds EFI stub support for the ARM Linux kernel. The EFI stub >> operations similarly to the x86 stub: it is a shim between the EFI firmware >> and th

Re: [PATCH 12/16] Fix types in EFI calls to match EFI function definitions.

2013-08-30 Thread Roy Franz
On Fri, Aug 30, 2013 at 4:14 PM, Grant Likely wrote: > On Sat, Aug 31, 2013 at 12:12 AM, Roy Franz wrote: >> On Fri, Aug 30, 2013 at 6:39 AM, Grant Likely >> wrote: >>> I think you need some description in the commit text about why the type >>> of chunksiz

Re: [PATCH 12/16] Fix types in EFI calls to match EFI function definitions.

2013-08-30 Thread Roy Franz
On Fri, Aug 30, 2013 at 6:39 AM, Grant Likely wrote: > On Fri, 9 Aug 2013 16:26:13 -0700, Roy Franz wrote: >> EFI calls can made directly on ARM, so the function pointers >> are directly invoked. This allows types to be checked at >> compile time, so here we ensure that

Re: [PATCH 10/16] Move EFI_READ_CHUNK_SIZE define to shared location.

2013-08-30 Thread Roy Franz
On Fri, Aug 30, 2013 at 6:33 AM, Grant Likely wrote: > On Fri, 9 Aug 2013 16:26:11 -0700, Roy Franz wrote: >> This #define is only used the the shared code, so move >> it there. >> >> Signed-off-by: Roy Franz > > Can this be squashed into patch

Re: [PATCH 04/16] Add minimum address parameter to efi_low_alloc()

2013-08-30 Thread Roy Franz
On Fri, Aug 30, 2013 at 6:01 AM, Grant Likely wrote: > On Fri, 9 Aug 2013 16:26:05 -0700, Roy Franz wrote: >> This allows allocations to be made low in memory while >> avoiding allocations at the base of memory. > > Your commit message should include /why/ the change is nee

Re: [PATCH 02/16] Add system pointer argument to shared EFI stub related functions so they no longer use global system table pointer as they did when part of eboot.c. This code is now shared, so using

2013-08-30 Thread Roy Franz
On Fri, Aug 30, 2013 at 5:53 AM, Grant Likely wrote: > On Fri, 9 Aug 2013 16:26:03 -0700, Roy Franz wrote: >> Signed-off-by: Roy Franz > > The entire commit message is contained in the subject line! The first > line of a commit message needs to be a short summary, followed

Re: [PATCH 14/16] Add strstr to compressed string.c for ARM.

2013-08-30 Thread Roy Franz
On Fri, Aug 30, 2013 at 7:02 AM, Grant Likely wrote: > On Fri, Aug 30, 2013 at 2:47 PM, Russell King - ARM Linux > wrote: >> On Fri, Aug 30, 2013 at 02:43:25PM +0100, Grant Likely wrote: >>> On Fri, 9 Aug 2013 16:26:15 -0700, Roy Franz wrote: >>> > The s

Re: [PATCH 14/16] Add strstr to compressed string.c for ARM.

2013-08-30 Thread Roy Franz
On Fri, Aug 30, 2013 at 7:02 AM, Grant Likely grant.lik...@secretlab.ca wrote: On Fri, Aug 30, 2013 at 2:47 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Fri, Aug 30, 2013 at 02:43:25PM +0100, Grant Likely wrote: On Fri, 9 Aug 2013 16:26:15 -0700, Roy Franz roy.fr

Re: [PATCH 02/16] Add system pointer argument to shared EFI stub related functions so they no longer use global system table pointer as they did when part of eboot.c. This code is now shared, so using

2013-08-30 Thread Roy Franz
On Fri, Aug 30, 2013 at 5:53 AM, Grant Likely grant.lik...@secretlab.ca wrote: On Fri, 9 Aug 2013 16:26:03 -0700, Roy Franz roy.fr...@linaro.org wrote: Signed-off-by: Roy Franz roy.fr...@linaro.org The entire commit message is contained in the subject line! The first line of a commit message

Re: [PATCH 04/16] Add minimum address parameter to efi_low_alloc()

2013-08-30 Thread Roy Franz
On Fri, Aug 30, 2013 at 6:01 AM, Grant Likely grant.lik...@secretlab.ca wrote: On Fri, 9 Aug 2013 16:26:05 -0700, Roy Franz roy.fr...@linaro.org wrote: This allows allocations to be made low in memory while avoiding allocations at the base of memory. Your commit message should include /why

Re: [PATCH 10/16] Move EFI_READ_CHUNK_SIZE define to shared location.

2013-08-30 Thread Roy Franz
On Fri, Aug 30, 2013 at 6:33 AM, Grant Likely grant.lik...@secretlab.ca wrote: On Fri, 9 Aug 2013 16:26:11 -0700, Roy Franz roy.fr...@linaro.org wrote: This #define is only used the the shared code, so move it there. Signed-off-by: Roy Franz roy.fr...@linaro.org Can this be squashed

Re: [PATCH 12/16] Fix types in EFI calls to match EFI function definitions.

2013-08-30 Thread Roy Franz
On Fri, Aug 30, 2013 at 6:39 AM, Grant Likely grant.lik...@secretlab.ca wrote: On Fri, 9 Aug 2013 16:26:13 -0700, Roy Franz roy.fr...@linaro.org wrote: EFI calls can made directly on ARM, so the function pointers are directly invoked. This allows types to be checked at compile time, so here

Re: [PATCH 12/16] Fix types in EFI calls to match EFI function definitions.

2013-08-30 Thread Roy Franz
On Fri, Aug 30, 2013 at 4:14 PM, Grant Likely grant.lik...@secretlab.ca wrote: On Sat, Aug 31, 2013 at 12:12 AM, Roy Franz roy.fr...@linaro.org wrote: On Fri, Aug 30, 2013 at 6:39 AM, Grant Likely grant.lik...@secretlab.ca wrote: I think you need some description in the commit text about why

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

2013-08-30 Thread Roy Franz
On Fri, Aug 30, 2013 at 7:36 AM, Grant Likely grant.lik...@secretlab.ca wrote: On Fri, 9 Aug 2013 16:26:16 -0700, Roy Franz roy.fr...@linaro.org wrote: This patch adds EFI stub support for the ARM Linux kernel. The EFI stub operations similarly to the x86 stub: it is a shim between the EFI

Re: [PATCH V3 RFC 00/16] EFI stub for ARM

2013-08-23 Thread Roy Franz
On Fri, Aug 16, 2013 at 5:16 PM, Roy Franz wrote: > On Tue, Aug 13, 2013 at 10:58 AM, Roy Franz wrote: >> On Fri, Aug 9, 2013 at 4:26 PM, Roy Franz wrote: >>> >>> This patch series adds EFI stub support for the ARM architecture. >>> Some code that was previ

Re: [PATCH V3 RFC 00/16] EFI stub for ARM

2013-08-23 Thread Roy Franz
On Fri, Aug 16, 2013 at 5:16 PM, Roy Franz roy.fr...@linaro.org wrote: On Tue, Aug 13, 2013 at 10:58 AM, Roy Franz roy.fr...@linaro.org wrote: On Fri, Aug 9, 2013 at 4:26 PM, Roy Franz roy.fr...@linaro.org wrote: This patch series adds EFI stub support for the ARM architecture. Some code

Re: [PATCH V3 RFC 00/16] EFI stub for ARM

2013-08-16 Thread Roy Franz
On Tue, Aug 13, 2013 at 10:58 AM, Roy Franz wrote: > On Fri, Aug 9, 2013 at 4:26 PM, Roy Franz wrote: >> >> This patch series adds EFI stub support for the ARM architecture. >> Some code that was previously only used by x86/x86_64 is now shared >> and has been m

Re: [PATCH V3 RFC 00/16] EFI stub for ARM

2013-08-16 Thread Roy Franz
On Tue, Aug 13, 2013 at 10:58 AM, Roy Franz roy.fr...@linaro.org wrote: On Fri, Aug 9, 2013 at 4:26 PM, Roy Franz roy.fr...@linaro.org wrote: This patch series adds EFI stub support for the ARM architecture. Some code that was previously only used by x86/x86_64 is now shared and has been made

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

2013-08-13 Thread Roy Franz
On Tue, Aug 13, 2013 at 6:44 PM, Roy Franz wrote: > > Thanks Dave - comments inline, and I have an updated head.S diff at the end. > > Roy > > > On Tue, Aug 13, 2013 at 7:19 AM, Dave Martin wrote: >> >> On Fri, Aug 09, 2013 at 04:26:16PM -0700, Roy Franz wro

Re: [PATCH V3 RFC 00/16] EFI stub for ARM

2013-08-13 Thread Roy Franz
On Fri, Aug 9, 2013 at 4:26 PM, Roy Franz wrote: > > This patch series adds EFI stub support for the ARM architecture. > Some code that was previously only used by x86/x86_64 is now shared > and has been made more general. The stub for ARM is implemented in > a simila

Re: [PATCH 16/16] Add config EFI_STUB for ARM to Kconfig

2013-08-13 Thread Roy Franz
On Tue, Aug 13, 2013 at 6:18 AM, Dave Martin wrote: > On Fri, Aug 09, 2013 at 04:26:17PM -0700, Roy Franz wrote: >> Signed-off-by: Roy Franz >> --- >> arch/arm/Kconfig | 11 +++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/arch/arm/Kcon

Re: [PATCH 16/16] Add config EFI_STUB for ARM to Kconfig

2013-08-13 Thread Roy Franz
On Tue, Aug 13, 2013 at 6:18 AM, Dave Martin dave.mar...@arm.com wrote: On Fri, Aug 09, 2013 at 04:26:17PM -0700, Roy Franz wrote: 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

Re: [PATCH V3 RFC 00/16] EFI stub for ARM

2013-08-13 Thread Roy Franz
On Fri, Aug 9, 2013 at 4:26 PM, Roy Franz roy.fr...@linaro.org wrote: This patch series adds EFI stub support for the ARM architecture. Some code that was previously only used by x86/x86_64 is now shared and has been made more general. The stub for ARM is implemented in a similar manner

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

2013-08-13 Thread Roy Franz
On Tue, Aug 13, 2013 at 6:44 PM, Roy Franz roy.fr...@linaro.org wrote: Thanks Dave - comments inline, and I have an updated head.S diff at the end. Roy On Tue, Aug 13, 2013 at 7:19 AM, Dave Martin dave.mar...@arm.com wrote: On Fri, Aug 09, 2013 at 04:26:16PM -0700, Roy Franz wrote

Re: [PATCH V3 RFC 00/16] EFI stub for ARM

2013-08-12 Thread Roy Franz
On Mon, Aug 12, 2013 at 7:02 AM, Mark Salter wrote: > On Fri, 2013-08-09 at 16:26 -0700, Roy Franz wrote: >> * Change FDT memory allocation to retry with a larger allocation if >> first educated guess is inadequate. > > With this change, it looks like you no longer free

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

2013-08-12 Thread Roy Franz
On Mon, Aug 12, 2013 at 7:51 AM, Mark Salter wrote: > On Fri, 2013-08-09 at 16:26 -0700, Roy Franz wrote: >> +static int relocate_kernel(efi_system_table_t *sys_table, >> + unsigned long *zimage_addr, >> + unsi

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

2013-08-12 Thread Roy Franz
On Mon, Aug 12, 2013 at 7:51 AM, Mark Salter msal...@redhat.com wrote: On Fri, 2013-08-09 at 16:26 -0700, Roy Franz wrote: +static int relocate_kernel(efi_system_table_t *sys_table, + unsigned long *zimage_addr, + unsigned long zimage_size

Re: [PATCH V3 RFC 00/16] EFI stub for ARM

2013-08-12 Thread Roy Franz
On Mon, Aug 12, 2013 at 7:02 AM, Mark Salter msal...@redhat.com wrote: On Fri, 2013-08-09 at 16:26 -0700, Roy Franz wrote: * Change FDT memory allocation to retry with a larger allocation if first educated guess is inadequate. With this change, it looks like you no longer free the original

[PATCH 05/16] rename __get_map() to efi_get_memory_map(), add parameter to optionally return mmap key. The mmap key is required to exit EFI boot services, and allows efi_get_memory_map() to be used fo

2013-08-09 Thread Roy Franz
Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers/firmware/efi/efi-stub-helper.c index 40cd16e..1d0a079 100644 --- a/drivers/firmware/efi

[PATCH 03/16] Rename memory allocation/free functions

2013-08-09 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 --- arch/x86/boot/compressed/eboot.c

[PATCH 02/16] Add system pointer argument to shared EFI stub related functions so they no longer use global system table pointer as they did when part of eboot.c. This code is now shared, so using a g

2013-08-09 Thread Roy Franz
Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.c | 38 +++-- drivers/firmware/efi/efi-stub-helper.c | 96 +--- 2 files changed, 72 insertions(+), 62 deletions(-) diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed

[PATCH 10/16] Move EFI_READ_CHUNK_SIZE define to shared location.

2013-08-09 Thread Roy Franz
This #define is only used the the shared code, so move it there. Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.h |1 - drivers/firmware/efi/efi-stub-helper.c |2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/boot/compressed/eboot.h b/arch

[PATCH 06/16] Enforce minimum alignment of 1 page on allocations. The efi_high_alloc() and efi_low_alloc() functions use the EFI_ALLOCATE_ADDRESS option to the EFI function allocate_pages(), which req

2013-08-09 Thread Roy Franz
The existing code could fail to allocate depending on allocation size, as although repeated allocation attempts were made, none were guaranteed to be page aligned. Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c | 14 ++ 1 file changed, 14 insertions(+) diff

[PATCH 08/16] Generalize handle_ramdisks() and rename to handle_cmdline_files().

2013-08-09 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 --- arch

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

2013-08-09 Thread Roy Franz
Rename variables to be not initrd specific, as now the function loads arbitrary files. Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c | 92 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/drivers/firmware/efi/efi-stub

[PATCH 13/16] resolve warnings found on ARM compile

2013-08-09 Thread Roy Franz
2 unused labels 1 "value computed is not used" Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers/firmware/efi/efi-stub-helper.c index 4bb542

[PATCH 11/16] Add proper definitions for some EFI function pointers.

2013-08-09 Thread Roy Franz
. Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.h |2 -- include/linux/efi.h | 45 -- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/arch/x86/boot/compressed/eboot.h b/arch/x86/boot/compressed/eboot.h index bafbd94

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

2013-08-09 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/16] Add config EFI_STUB for ARM to Kconfig

2013-08-09 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..8607d03 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1805,6 +1805,17 @@ config UACCESS_WITH_MEMCPY However

[PATCH 12/16] Fix types in EFI calls to match EFI function definitions.

2013-08-09 Thread Roy Franz
EFI calls can made directly on ARM, so the function pointers are directly invoked. This allows types to be checked at compile time, so here we ensure that the parameters match the function signature. Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c | 15 +-- 1

[PATCH V3 RFC 00/16] EFI stub for ARM

2013-08-09 Thread Roy Franz
up changes to x86 and common code into more patches. 10 more patches in this series. Roy Franz (16): Move common EFI stub code from x86 arch code to common location Add system pointer argument to shared EFI stub related functions so they no longer use global system table pointer as th

[PATCH 01/16] Move common EFI stub code from x86 arch code to common location

2013-08-09 Thread Roy Franz
No code changes made, just moving functions 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 --- arch/x86/boot/compressed/eboot.c | 442 +- arch

[PATCH 04/16] Add minimum address parameter to efi_low_alloc()

2013-08-09 Thread Roy Franz
This allows allocations to be made low in memory while avoiding allocations at the base of memory. Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.c | 11 ++- drivers/firmware/efi/efi-stub-helper.c |7 +-- 2 files changed, 11 insertions(+), 7 deletions

[PATCH 14/16] Add strstr to compressed string.c for ARM.

2013-08-09 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 --- arch/arm/boot/compressed/string.c | 21 + 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot/compressed/string.c

[PATCH 15/16] Add EFI stub for ARM

2013-08-09 Thread Roy Franz
orrupts r5, which is not used by the zImage 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 | 448 + arch/arm/boot/compressed/

Re: [PATCH 12/17] Add proper definitions for some EFI function pointers.

2013-08-09 Thread Roy Franz
Thanks Mark - I'll get that in the next version of the patches. On Fri, Aug 9, 2013 at 7:10 AM, Mark Salter wrote: > On Tue, 2013-08-06 at 20:45 -0700, Roy Franz wrote: >> The x86/AMD64 EFI stubs must us a call wrapper to convert between >> the Linux and EFI ABIs, so void pointers

Re: [PATCH 12/17] Add proper definitions for some EFI function pointers.

2013-08-09 Thread Roy Franz
Thanks Mark - I'll get that in the next version of the patches. On Fri, Aug 9, 2013 at 7:10 AM, Mark Salter msal...@redhat.com wrote: On Tue, 2013-08-06 at 20:45 -0700, Roy Franz wrote: The x86/AMD64 EFI stubs must us a call wrapper to convert between the Linux and EFI ABIs, so void pointers

[PATCH 14/16] Add strstr to compressed string.c for ARM.

2013-08-09 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 --- arch/arm/boot/compressed/string.c | 21 + 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot

[PATCH 15/16] Add EFI stub for ARM

2013-08-09 Thread Roy Franz
, which is not used by the zImage interface. Signed-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 | 448 + arch/arm/boot/compressed

[PATCH V3 RFC 00/16] EFI stub for ARM

2013-08-09 Thread Roy Franz
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. * Broke up changes to x86 and common code into more patches. 10 more patches in this series. Roy

[PATCH 01/16] Move common EFI stub code from x86 arch code to common location

2013-08-09 Thread Roy Franz
No code changes made, just moving functions 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 --- arch/x86/boot/compressed/eboot.c | 442

[PATCH 04/16] Add minimum address parameter to efi_low_alloc()

2013-08-09 Thread Roy Franz
This allows allocations to be made low in memory while avoiding allocations at the base of memory. Signed-off-by: Roy Franz roy.fr...@linaro.org --- arch/x86/boot/compressed/eboot.c | 11 ++- drivers/firmware/efi/efi-stub-helper.c |7 +-- 2 files changed, 11 insertions

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

2013-08-09 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..8607d03 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1805,6 +1805,17 @@ config UACCESS_WITH_MEMCPY

[PATCH 12/16] Fix types in EFI calls to match EFI function definitions.

2013-08-09 Thread Roy Franz
EFI calls can made directly on ARM, so the function pointers are directly invoked. This allows types to be checked at compile time, so here we ensure that the parameters match the function signature. Signed-off-by: Roy Franz roy.fr...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c | 15

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

2013-08-09 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 13/16] resolve warnings found on ARM compile

2013-08-09 Thread Roy Franz
2 unused labels 1 value computed is not used 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 --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers/firmware/efi/efi-stub-helper.c index

[PATCH 11/16] Add proper definitions for some EFI function pointers.

2013-08-09 Thread Roy Franz
. Signed-off-by: Roy Franz roy.fr...@linaro.org --- arch/x86/boot/compressed/eboot.h |2 -- include/linux/efi.h | 45 -- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/arch/x86/boot/compressed/eboot.h b/arch/x86/boot/compressed

[PATCH 06/16] Enforce minimum alignment of 1 page on allocations. The efi_high_alloc() and efi_low_alloc() functions use the EFI_ALLOCATE_ADDRESS option to the EFI function allocate_pages(), which req

2013-08-09 Thread Roy Franz
The existing code could fail to allocate depending on allocation size, as although repeated allocation attempts were made, none were guaranteed to be page aligned. Signed-off-by: Roy Franz roy.fr...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c | 14 ++ 1 file changed, 14

[PATCH 08/16] Generalize handle_ramdisks() and rename to handle_cmdline_files().

2013-08-09 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 09/16] Renames in handle_cmdline_files() to complete generalization.

2013-08-09 Thread Roy Franz
Rename variables to be not initrd specific, as now the function loads arbitrary files. Signed-off-by: Roy Franz roy.fr...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c | 92 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/drivers

[PATCH 10/16] Move EFI_READ_CHUNK_SIZE define to shared location.

2013-08-09 Thread Roy Franz
This #define is only used the the shared code, so move it there. Signed-off-by: Roy Franz roy.fr...@linaro.org --- arch/x86/boot/compressed/eboot.h |1 - drivers/firmware/efi/efi-stub-helper.c |2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/boot

[PATCH 03/16] Rename memory allocation/free functions

2013-08-09 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 --- arch/x86/boot/compressed/eboot.c

[PATCH 02/16] Add system pointer argument to shared EFI stub related functions so they no longer use global system table pointer as they did when part of eboot.c. This code is now shared, so using a g

2013-08-09 Thread Roy Franz
Signed-off-by: Roy Franz roy.fr...@linaro.org --- arch/x86/boot/compressed/eboot.c | 38 +++-- drivers/firmware/efi/efi-stub-helper.c | 96 +--- 2 files changed, 72 insertions(+), 62 deletions(-) diff --git a/arch/x86/boot/compressed/eboot.c b/arch

[PATCH 05/16] rename __get_map() to efi_get_memory_map(), add parameter to optionally return mmap key. The mmap key is required to exit EFI boot services, and allows efi_get_memory_map() to be used fo

2013-08-09 Thread Roy Franz
Signed-off-by: Roy Franz roy.fr...@linaro.org --- drivers/firmware/efi/efi-stub-helper.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers/firmware/efi/efi-stub-helper.c index 40cd16e..1d0a079 100644

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

2013-08-08 Thread Roy Franz
Dave - here is an updated patch for head.S, I'm still working on the rest. I will make the EFI stub depend on !CPU_ENDIAN_BE32 to make the stub LE only for now. I think I have addressed the rest of your comments in head.S in the patch below. I will send a complete new series once I have the

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

2013-08-08 Thread Roy Franz
On Wed, Aug 7, 2013 at 11:05 AM, Dave Martin wrote: > On Tue, Aug 06, 2013 at 08:45:12PM -0700, Roy Franz wrote: >> This patch adds EFI stub support for the ARM Linux kernel. The EFI stub >> operations similarly to the x86 stub: it is a shim between the EFI firmware >>

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

2013-08-08 Thread Roy Franz
On Wed, Aug 7, 2013 at 11:05 AM, Dave Martin dave.mar...@arm.com wrote: On Tue, Aug 06, 2013 at 08:45:12PM -0700, Roy Franz wrote: This patch adds EFI stub support for the ARM Linux kernel. The EFI stub operations similarly to the x86 stub: it is a shim between the EFI firmware and the normal

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

2013-08-08 Thread Roy Franz
Dave - here is an updated patch for head.S, I'm still working on the rest. I will make the EFI stub depend on !CPU_ENDIAN_BE32 to make the stub LE only for now. I think I have addressed the rest of your comments in head.S in the patch below. I will send a complete new series once I have the

Re: [PATCH 12/17] Add proper definitions for some EFI function pointers.

2013-08-07 Thread Roy Franz
On Wed, Aug 7, 2013 at 6:09 AM, Matt Fleming wrote: > On Tue, 06 Aug, at 08:45:08PM, Roy Franz wrote: >> The x86/AMD64 EFI stubs must us a call wrapper to convert between >> the Linux and EFI ABIs, so void pointers are sufficient. For ARM, >> the ABIs are compatible, so w

Re: [PATCH 04/17] Rename memory allocation/free functions

2013-08-07 Thread Roy Franz
On Wed, Aug 7, 2013 at 6:09 AM, Matt Fleming wrote: > On Tue, 06 Aug, at 08:45:00PM, Roy Franz wrote: >> 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_h

Re: [PATCH 03/17] Add system pointer argument to shared EFI stub related functions so they no longer use global system table pointer as they did when part of eboot.c.

2013-08-07 Thread Roy Franz
On Wed, Aug 7, 2013 at 6:08 AM, Matt Fleming wrote: > On Tue, 06 Aug, at 08:44:59PM, Roy Franz wrote: >> Signed-off-by: Roy Franz >> --- >> arch/x86/boot/compressed/eboot.c | 38 +++-- >> drivers/firmware/efi/efi-stub-helper.c | 96 >> +

Re: [PATCH 03/17] Add system pointer argument to shared EFI stub related functions so they no longer use global system table pointer as they did when part of eboot.c.

2013-08-07 Thread Roy Franz
On Wed, Aug 7, 2013 at 6:08 AM, Matt Fleming m...@console-pimps.org wrote: On Tue, 06 Aug, at 08:44:59PM, Roy Franz wrote: Signed-off-by: Roy Franz roy.fr...@linaro.org --- arch/x86/boot/compressed/eboot.c | 38 +++-- drivers/firmware/efi/efi-stub-helper.c | 96

<    1   2   3   4   >