diff mbox series

[v2,11/14] arm/efi: switch to arm64 linux loader

Message ID 20170803100432.29913-12-leif.lindholm@linaro.org
State New
Headers show
Series efi: improved correctness, arm unification, and cleanup | expand

Commit Message

Leif Lindholm Aug. 3, 2017, 10:04 a.m. UTC
Switch over to the EFI-stub aware arm64 loader for 32-bit ARM platforms.

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>

---
 grub-core/Makefile.core.def | 6 +++---
 grub-core/kern/efi/mm.c     | 2 +-
 include/grub/efi/efi.h      | 2 --
 3 files changed, 4 insertions(+), 6 deletions(-)

-- 
2.11.0


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Comments

Vladimir 'phcoder' Serbinenko Aug. 7, 2017, 2:08 p.m. UTC | #1
Le Thu, Aug 3, 2017 à 12:10 PM, Leif Lindholm <leif.lindholm@linaro.org> a
écrit :

> Switch over to the EFI-stub aware arm64 loader for 32-bit ARM platforms.

>

> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>

> ---

>  grub-core/Makefile.core.def | 6 +++---

>  grub-core/kern/efi/mm.c     | 2 +-

>  include/grub/efi/efi.h      | 2 --

>  3 files changed, 4 insertions(+), 6 deletions(-)

>

> diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def

> index a65c27f7f..87f80d316 100644

> --- a/grub-core/Makefile.core.def

> +++ b/grub-core/Makefile.core.def

> @@ -229,7 +229,6 @@ kernel = {

>    ia64_efi = kern/ia64/cache.c;

>

>    arm_efi = kern/arm/efi/init.c;

> -  arm_efi = kern/arm/efi/misc.c;

>    arm_efi = kern/efi/fdt.c;

>

>    arm64_efi = kern/arm64/efi/init.c;

> @@ -1698,7 +1697,8 @@ module = {

>    powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c;

>    sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c;

>    ia64_efi = loader/ia64/efi/linux.c;

> -  arm = loader/arm/linux.c;

> +  arm_uboot = loader/arm/linux.c;

> +  arm_efi = loader/arm64/linux.c;

>

This misses arm-coreboot

>    arm64 = loader/arm64/linux.c;

>    common = loader/linux.c;

>    common = lib/cmdline.c;

> @@ -1707,7 +1707,7 @@ module = {

>

>  module = {

>    name = fdt;

> -  arm64 = loader/efi/fdt.c;

> +  efi = loader/efi/fdt.c;

>    common = lib/fdt.c;

>    enable = fdt;

>  };

> diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c

> index 1e62eff8f..c8fffe902 100644

> --- a/grub-core/kern/efi/mm.c

> +++ b/grub-core/kern/efi/mm.c

> @@ -572,7 +572,7 @@ grub_efi_mm_init (void)

>                        2 * BYTES_TO_PAGES (MEMORY_MAP_SIZE));

>  }

>

> -#if defined (__aarch64__)

> +#if defined (__aarch64__) || defined (__arm__)

>  grub_err_t

>  grub_efi_get_ram_base(grub_addr_t *base_addr)

>  {

> diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h

> index 149969941..ec691bd44 100644

> --- a/include/grub/efi/efi.h

> +++ b/include/grub/efi/efi.h

> @@ -89,8 +89,6 @@ extern void (*EXPORT_VAR(grub_efi_net_config))

> (grub_efi_handle_t hnd,

>

>  #if defined(__arm__) || defined(__aarch64__)

>  void *EXPORT_FUNC(grub_efi_get_firmware_fdt)(void);

> -#endif

> -#if defined(__aarch64__)

>  grub_err_t EXPORT_FUNC(grub_efi_get_ram_base)(grub_addr_t *);

>  #include <grub/cpu/linux.h>

>  grub_err_t grub_efi_linux_check_image(struct grub_linux_kernel_header

> *lh);

> --

> 2.11.0

>

>

> _______________________________________________

> Grub-devel mailing list

> Grub-devel@gnu.org

> https://lists.gnu.org/mailman/listinfo/grub-devel

>
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
Leif Lindholm Sept. 4, 2017, 2:35 p.m. UTC | #2
On Mon, Aug 07, 2017 at 02:08:29PM +0000, Vladimir 'phcoder' Serbinenko wrote:
> Le Thu, Aug 3, 2017 à 12:10 PM, Leif Lindholm <leif.lindholm@linaro.org> a

> écrit :

> 

> > Switch over to the EFI-stub aware arm64 loader for 32-bit ARM platforms.

> >

> > Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>

> > ---

> >  grub-core/Makefile.core.def | 6 +++---

> >  grub-core/kern/efi/mm.c     | 2 +-

> >  include/grub/efi/efi.h      | 2 --

> >  3 files changed, 4 insertions(+), 6 deletions(-)

> >

> > diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def

> > index a65c27f7f..87f80d316 100644

> > --- a/grub-core/Makefile.core.def

> > +++ b/grub-core/Makefile.core.def

> > @@ -229,7 +229,6 @@ kernel = {

> >    ia64_efi = kern/ia64/cache.c;

> >

> >    arm_efi = kern/arm/efi/init.c;

> > -  arm_efi = kern/arm/efi/misc.c;

> >    arm_efi = kern/efi/fdt.c;

> >

> >    arm64_efi = kern/arm64/efi/init.c;

> > @@ -1698,7 +1697,8 @@ module = {

> >    powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c;

> >    sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c;

> >    ia64_efi = loader/ia64/efi/linux.c;

> > -  arm = loader/arm/linux.c;

> > +  arm_uboot = loader/arm/linux.c;

> > +  arm_efi = loader/arm64/linux.c;

> >

> This misses arm-coreboot


Ah, apologies, this set predated the coreboot support being merged,
and I did not notice in the rebase.

/
    Leif

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
diff mbox series

Patch

diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index a65c27f7f..87f80d316 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -229,7 +229,6 @@  kernel = {
   ia64_efi = kern/ia64/cache.c;
 
   arm_efi = kern/arm/efi/init.c;
-  arm_efi = kern/arm/efi/misc.c;
   arm_efi = kern/efi/fdt.c;
 
   arm64_efi = kern/arm64/efi/init.c;
@@ -1698,7 +1697,8 @@  module = {
   powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c;
   sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c;
   ia64_efi = loader/ia64/efi/linux.c;
-  arm = loader/arm/linux.c;
+  arm_uboot = loader/arm/linux.c;
+  arm_efi = loader/arm64/linux.c;
   arm64 = loader/arm64/linux.c;
   common = loader/linux.c;
   common = lib/cmdline.c;
@@ -1707,7 +1707,7 @@  module = {
 
 module = {
   name = fdt;
-  arm64 = loader/efi/fdt.c;
+  efi = loader/efi/fdt.c;
   common = lib/fdt.c;
   enable = fdt;
 };
diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
index 1e62eff8f..c8fffe902 100644
--- a/grub-core/kern/efi/mm.c
+++ b/grub-core/kern/efi/mm.c
@@ -572,7 +572,7 @@  grub_efi_mm_init (void)
 		       2 * BYTES_TO_PAGES (MEMORY_MAP_SIZE));
 }
 
-#if defined (__aarch64__)
+#if defined (__aarch64__) || defined (__arm__)
 grub_err_t
 grub_efi_get_ram_base(grub_addr_t *base_addr)
 {
diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
index 149969941..ec691bd44 100644
--- a/include/grub/efi/efi.h
+++ b/include/grub/efi/efi.h
@@ -89,8 +89,6 @@  extern void (*EXPORT_VAR(grub_efi_net_config)) (grub_efi_handle_t hnd,
 
 #if defined(__arm__) || defined(__aarch64__)
 void *EXPORT_FUNC(grub_efi_get_firmware_fdt)(void);
-#endif
-#if defined(__aarch64__)
 grub_err_t EXPORT_FUNC(grub_efi_get_ram_base)(grub_addr_t *);
 #include <grub/cpu/linux.h>
 grub_err_t grub_efi_linux_check_image(struct grub_linux_kernel_header *lh);