From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1WIjGw-000194-V2 for mharc-grub-devel@gnu.org; Wed, 26 Feb 2014 13:31:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIjGn-000109-8K for grub-devel@gnu.org; Wed, 26 Feb 2014 13:31:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIjGg-000147-KB for grub-devel@gnu.org; Wed, 26 Feb 2014 13:31:49 -0500 Received: from e36.co.us.ibm.com ([32.97.110.154]:60987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIjGg-000143-DS for grub-devel@gnu.org; Wed, 26 Feb 2014 13:31:42 -0500 Received: from /spool/local by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 26 Feb 2014 11:31:41 -0700 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 26 Feb 2014 11:31:39 -0700 Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 44EF319D8051 for ; Wed, 26 Feb 2014 11:31:37 -0700 (MST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp08028.gho.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s1QIVc0k5046668 for ; Wed, 26 Feb 2014 19:31:38 +0100 Received: from d03av02.boulder.ibm.com (localhost [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s1QIVcvl014933 for ; Wed, 26 Feb 2014 11:31:38 -0700 Received: from ram.oc3035372033.ibm.com.com (sig-9-65-83-23.mts.ibm.com [9.65.83.23]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s1QIVZLP014663; Wed, 26 Feb 2014 11:31:36 -0700 From: Ram Pai To: grub-devel@gnu.org Subject: [RFC PATCH 00/23] grub 64bit little-endian on power Date: Wed, 26 Feb 2014 10:30:59 -0800 Message-Id: <1393439482-20341-1-git-send-email-linuxram@us.ibm.com> X-Mailer: git-send-email 1.7.1 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14022618-3532-0000-0000-0000060A95E8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 32.97.110.154 Cc: tonyb@au1.ibm.com, anton@au1.ibm.com, linuxram@us.ibm.com, tlfalcon@linux.vnet.ibm.com, tbberry@us.ibm.com X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2014 18:31:56 -0000 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 -- 1.8.5.3