Skip to content

RFC grub 64bit little-endian on power

Ram Pai grub-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest23 patches 44 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/23Add a new architecture to the build processMakefile.am config.h.in configure.ac +4 more+45 -60 replies
2/23Build LE grub as O1configure.ac+6 -10 replies
3/23ignore .TOC. symbolgrub-core/gensyminfo.sh.in+6 -11 reply
4/23grub-install can now recognize and install a LE grub boot loaderinclude/grub/offsets.h include/grub/util/install.h util/grub-install-common.c +2 more+39 -20 replies
5/23set ABI version in e_flag of the PPC64LE ELF image.include/grub/elf.h util/grub-mkimagexx.c+5 -00 replies
6/23Add IEEE1275_ADDR helpergrub-core/disk/ieee1275/ofdisk.c grub-core/kern/ieee1275/ieee1275.c grub-core/kern/ieee1275/openfw.c +3 more+26 -241 reply
7/23Fix some more warnings when casting.grub-core/disk/ieee1275/ofdisk.c grub-core/lib/powerpc/relocator.c grub-core/net/drivers/ieee1275/ofnet.c+6 -60 replies
8/23Add powerpc64 typesinclude/grub/powerpc/types.h+8 -02 replies
9/23Fix warnings when building powerpc linux loader 64bitgrub-core/loader/powerpc/ieee1275/linux.c+3 -32 replies
10/23GRUB_ELF_R_PPC_* processing is applicable only for 32 bit bootloader.grub-core/kern/powerpc/dl.c+6 -10 replies
11/23Fix powerpc setjmp/longjmp 64bit issuesgrub-core/lib/powerpc/setjmp.S+52 -426 replies
12/23Add powerpc64 ieee1275 trampolinegrub-core/Makefile.core.def grub-core/kern/powerpc/ieee1275/entry.S include/grub/powerpc/ieee1275/ieee1275.h+158 -00 replies
13/23Add 64bit support to powerpc startup codegrub-core/kern/powerpc/ieee1275/startup.S+26 -40 replies
14/23Add grub_dl_find_section_addrgrub-core/kern/dl.c include/grub/dl.h+28 -10 replies
15/23Add ppc64 relocationsgrub-core/kern/powerpc/dl.c include/grub/elf.h+172 -100 replies
16/23ppc64 doesn't need libgcc routinesinclude/grub/libgcc.h+1 -10 replies
17/23Use FUNC_START/FUNC_END for powerpc function definitionsgrub-core/kern/powerpc/cache.S grub-core/lib/powerpc/setjmp.S+9 -50 replies
18/23.TOC. symbol is special in ppc64legrub-core/kern/dl.c+33 -10 replies
19/23align .toc section on 4byte boundary.grub-core/kern/dl.c+5 -00 replies
20/23fix parameter to firmware callsgrub-core/disk/ieee1275/nand.c grub-core/disk/ieee1275/ofdisk.c grub-core/kern/ieee1275/ieee1275.c +4 more+146 -1143 replies
21/23powerpc64 is not necessarily BigEndian anymore! :)include/grub/powerpc/types.h+7 -329 replies
22/23fix segfaults if initrdgrub-core/loader/powerpc/ieee1275/linux.c+4 -00 replies
23/23Optional: Power7 VSX instructions workaround.grub-core/fs/fshelp.c grub-core/kern/term.c grub-core/normal/term.c+63 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 00/23] grub 64bit little-endian on power

The following patches enable grub to support
64bit Little Endian Power architecture.

Anton Blanchard (12):
Add IEEE1275_ADDR helper
Fix some more warnings when casting.
Add powerpc64 types
Fix warnings when building powerpc linux loader 64bit Fix powerpc setjmp/longjmp 64bit issues
Add powerpc64 ieee1275 trampoline
Add 64bit support to powerpc startup code
Add grub_dl_find_section_addr
Add ppc64 relocations
ppc64 doesn't need libgcc routines
Use FUNC_START/FUNC_END for powerpc function definitions powerpc64 is not necessarily BigEndian anymore! :)

Ram Pai (11):
Add a new architecture to the build process
Build grub as O1 until we add savegpr and restgpr routines powerpc64 LE's linker knows how to handle the undefined symbol .TOC.
in grub modules. So just ignore that symbol during build.
grub-install can now recognize and install a LE grub boot loader set the ABI version to 0x02 in the e_flag of the PPC64LE ELF image. GRUB_ELF_R_PPC_* processing is applicable only for 32 bit bootloader. .TOC. symbol is special in ppc64le . It maps to the address of the
.toc section.
the .toc section in powerpc64le modules are sometimes not aligned on a
four byte boundary. This fails the module linker especially when
processing R_PPC64_TOC16_LO_DS, since the addresses are expected
to be aligned on 4byte boundary.
all parameter to firmware calls should to be BigEndian and the results
should be CPU endian.
grub segfaults if initrd is specified before specifying the kernel.
The problem is the initrd module sees that kernel is not specified
and takes the fail path. In the fail path it checks if anything
has be malloc'ed. Unfortunately the variable that it looks to
check for is a uninitialized stack variable. The stack variable
can incorrectly indicate something is malloced, which leads the
module to free some unallocated memory. This patch fixes the
problem by initializing the stack variable.
Power7 cannot handle VSX instructions correctly. It segfaults.
This patch is applicable only for power7 systems.

Thomas Falcon (1):
Add a new architecture to the build process

Tomohiro B Berry (1):
Add a new architecture to the build process

 Makefile.am                               |   4 +
 config.h.in                               |   4 +
 configure.ac                              |  17 ++-
 gentpl.py                                 |   7 +-
 grub-core/Makefile.am                     |   7 ++
 grub-core/Makefile.core.def               |  20 ++++
 grub-core/disk/ieee1275/nand.c            |  41 +++----
 grub-core/disk/ieee1275/ofdisk.c          |  28 +++--
 grub-core/fs/fshelp.c                     |  10 ++
 grub-core/gensyminfo.sh.in                |   7 +-
 grub-core/kern/dl.c                       |  66 +++++++++++-
 grub-core/kern/ieee1275/ieee1275.c        | 162 ++++++++++++++++------------
 grub-core/kern/ieee1275/openfw.c          |  25 ++---
 grub-core/kern/powerpc/cache.S            |   6 +-
 grub-core/kern/powerpc/dl.c               | 172 +++++++++++++++++++++++++++++-
 grub-core/kern/powerpc/ieee1275/entry.S   | 150 ++++++++++++++++++++++++++
 grub-core/kern/powerpc/ieee1275/startup.S |  30 +++++-
 grub-core/kern/term.c                     |  11 ++
 grub-core/lib/ieee1275/datetime.c         |  36 +++----
 grub-core/lib/powerpc/relocator.c         |   8 +-
 grub-core/lib/powerpc/setjmp.S            | 102 ++++++++++--------
 grub-core/loader/powerpc/ieee1275/linux.c |  10 +-
 grub-core/net/drivers/ieee1275/ofnet.c    |   8 +-
 grub-core/normal/term.c                   |  42 ++++++++
 include/grub/dl.h                         |   2 +
 include/grub/elf.h                        |   4 +
 include/grub/ieee1275/ieee1275.h          |   8 +-
 include/grub/libgcc.h                     |   2 +-
 include/grub/offsets.h                    |   5 +
 include/grub/powerpc/ieee1275/ieee1275.h  |   6 ++
 include/grub/powerpc/types.h              |  16 ++-
 include/grub/powerpc64le                  |   1 +
 include/grub/util/install.h               |   1 +
 util/grub-install-common.c                |   1 +
 util/grub-install.c                       |  15 ++-
 util/grub-mkimagexx.c                     |   4 +
 util/mkimage.c                            |  19 ++++
 37 files changed, 843 insertions(+), 214 deletions(-)
 create mode 100644 grub-core/kern/powerpc/ieee1275/entry.S
 create mode 120000 include/grub/powerpc64le
Signature · 1 line
1.8.5.3