Author: afaerber Date: Sat Oct 30 17:17:37 2010 New Revision: 927 URL: http://tracker.coreboot.org/trac/openbios/changeset/927
Log: switch-arch: Prepare ppc64 support
Detect ppc64 as Big Endian and 64-bit. Reuse arch/ppc/ wherever possible.
v3: * Split off int128_t fix. * Rebase to HEAD, add support for qemu-ppc64 target. * Rename $INCLUDEARCH to $BASEARCH and initialize it earlier. * Set both CONFIG_$BASEARCH and CONFIG_$ARCH if they differ. * Use -fno-builtin. * Add ppc64 config, copied from ppc.
v2: * Use powerpc64 prefix. * Disable fake int128_t for everything but sparc64.
Signed-off-by: Andreas Färber andreas.faerber@web.de
Added: trunk/openbios-devel/config/examples/ppc64_config.xml - copied unchanged from r926, trunk/openbios-devel/config/examples/ppc_config.xml Modified: trunk/openbios-devel/config/scripts/switch-arch
Copied: trunk/openbios-devel/config/examples/ppc64_config.xml (from r926, trunk/openbios-devel/config/examples/ppc_config.xml) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/openbios-devel/config/examples/ppc64_config.xml Sat Oct 30 17:17:37 2010 (r927, copy of r926, trunk/openbios-devel/config/examples/ppc_config.xml) @@ -0,0 +1,77 @@ + <!-- Kernel Debugging --> + <option name="CONFIG_DEBUG" type="boolean" value="true"/> + <option name="CONFIG_DEBUG_BOOT" type="boolean" value="false"/> + <option name="CONFIG_DEBUG_DSTACK" type="boolean" value="false"/> + <option name="CONFIG_DEBUG_RSTACK" type="boolean" value="false"/> + <option name="CONFIG_DEBUG_DICTIONARY" type="boolean" value="false"/> + <option name="CONFIG_DEBUG_INTERNAL" type="boolean" value="false"/> + <option name="CONFIG_DEBUG_INTERPRETER" type="boolean" value="false"/> + <option name="CONFIG_DEBUG_CONSOLE" type="boolean" value="true"/> + <option name="CONFIG_DEBUG_CONSOLE_SERIAL" type="boolean" value="true"/> + <option name="CONFIG_SERIAL_PORT" type="integer" value="0"/> + <option name="CONFIG_SERIAL_SPEED" type="integer" value="115200"/> + <option name="CONFIG_DEBUG_CONSOLE_VGA" type="boolean" value="true"/> + <option name="CONFIG_DEBUG_OFMEM" type="boolean" value="false"/> + + + <!-- Module Configuration --> + <option name="CONFIG_CMDLINE" type="boolean" value="true"/> + <option name="CONFIG_DEBLOCKER" type="boolean" value="true"/> + <option name="CONFIG_FONT_8X8" type="boolean" value="true"/> + <option name="CONFIG_FONT_8X16" type="boolean" value="false"/> + <option name="CONFIG_OFMEM" type="boolean" value="true"/> + <option name="CONFIG_OFMEM_MALLOC_ALIGN" type="integer" value="4"/> + <option name="CONFIG_VGA_WIDTH" type="integer" value="800"/> + <option name="CONFIG_VGA_HEIGHT" type="integer" value="600"/> + <option name="CONFIG_VGA_DEPTH" type="integer" value="8"/> + <option name="CONFIG_LOADER_AOUT" type="boolean" value="false"/> + <option name="CONFIG_LOADER_BOOTINFO" type="boolean" value="true"/> + <option name="CONFIG_LOADER_ELF" type="boolean" value="true"/> + <option name="CONFIG_LOADER_FCODE" type="boolean" value="false"/> + <option name="CONFIG_LOADER_FORTH" type="boolean" value="false"/> + <option name="CONFIG_LOADER_XCOFF" type="boolean" value="true"/> + + <!-- Filesystem Configuration --> + <option name="CONFIG_DISK_LABEL" type="boolean" value="true"/> + <option name="CONFIG_PART_SUPPORT" type="boolean" value="true"/> + <option name="CONFIG_MAC_PARTS" type="boolean" value="true"/> + <option name="CONFIG_DEBUG_MAC_PARTS" type="boolean" value="false"/> + <option name="CONFIG_PC_PARTS" type="boolean" value="true"/> + <option name="CONFIG_HFS" type="boolean" value="true"/> + <option name="CONFIG_HFSP" type="boolean" value="true"/> + <option name="CONFIG_ISO9660" type="boolean" value="true"/> + <option name="CONFIG_EXT2" type="boolean" value="true"/> + <option name="CONFIG_GRUBFS" type="boolean" value="true"/> + <option name="CONFIG_FSYS_EXT2FS" type="boolean" value="false"/> + <option name="CONFIG_FSYS_FAT" type="boolean" value="false"/> + <option name="CONFIG_FSYS_JFS" type="boolean" value="false"/> + <option name="CONFIG_FSYS_MINIX" type="boolean" value="false"/> + <option name="CONFIG_FSYS_REISERFS" type="boolean" value="false"/> + <option name="CONFIG_FSYS_XFS" type="boolean" value="false"/> + <option name="CONFIG_FSYS_UFS" type="boolean" value="false"/> + <option name="CONFIG_FSYS_ISO9660" type="boolean" value="false"/> + <option name="CONFIG_FSYS_FFS" type="boolean" value="false"/> + <option name="CONFIG_FSYS_VSTAFS" type="boolean" value="false"/> + <option name="CONFIG_FSYS_NTFS" type="boolean" value="false"/> + <option name="CONFIG_FSYS_AFFS" type="boolean" value="false"/> + <option name="CONFIG_DEBUG_FS" type="boolean" value="false"/> + + <!-- Miscellaneous --> + <option name="CONFIG_LINUXBIOS" type="boolean" value="false"/> + <option name="CONFIG_RTAS" type="boolean" value="false"/> + + <!-- Drivers --> + <option name="CONFIG_DRIVER_PCI" type="boolean" value="true"/> + <option name="CONFIG_DEBUG_PCI" type="boolean" value="false"/> + <option name="CONFIG_DRIVER_IDE" type="boolean" value="true"/> + <option name="CONFIG_IDE_NUM_CHANNELS" type="integer" value="2"/> + <option name="CONFIG_IDE_FIRST_UNIT" type="integer" value="1"/> + <option name="CONFIG_IDE_DEV_NAME" type="string" value="ata-%d"/> + <option name="CONFIG_IDE_DEV_TYPE" type="string" value="ata"/> + <option name="CONFIG_DEBUG_IDE" type="boolean" value="false"/> + <option name="CONFIG_DRIVER_ADB" type="boolean" value="true"/> + <option name="CONFIG_DRIVER_VGA" type="boolean" value="true"/> + <option name="CONFIG_DRIVER_MACIO" type="boolean" value="true"/> + <option name="CONFIG_DRIVER_ESCC" type="boolean" value="true"/> + <option name="CONFIG_DRIVER_FW_CFG" type="boolean" value="true"/> + <option name="CONFIG_FW_CFG_ADDR" type="integer" value="0xf0000510"/>
Modified: trunk/openbios-devel/config/scripts/switch-arch ============================================================================== --- trunk/openbios-devel/config/scripts/switch-arch Sat Oct 30 15:35:07 2010 (r926) +++ trunk/openbios-devel/config/scripts/switch-arch Sat Oct 30 17:17:37 2010 (r927) @@ -12,7 +12,7 @@ printf "Add "unix-" prefix to compile openbios-unix executable (native only)\n" printf "Add "builtin-" prefix to compile openbios-builtin executables\n\n" printf "Without prefixes, builtin and unix targets are selected\n\n" - printf "Special targets: mol-ppc briq-ppc pearpc-ppc qemu-ppc xbox-x86\n\n" + printf "Special targets: mol-ppc briq-ppc pearpc-ppc qemu-ppc qemu-ppc64 xbox-x86\n\n" printf "Example: $0 builtin-sparc32 unix-amd64 builtin-amd64\n" exit 0 fi @@ -41,6 +41,7 @@ fi
if test "$target" = "powerpc" -o "$target" = "ppc" \ + -o "$target" = "powerpc64" -o "$target" = "ppc64" \ -o "$target" = "mips" -o "$target" = "s390" \ -o "$target" = "sparc32" -o "$target" = "sparc64" \ -o "$target" = "m68k" -o "$target" = "armv4b"; then @@ -52,6 +53,7 @@ # target long bits test if test "$target" = "sparc64" -o "$target" = "ia64" \ -o "$target" = "amd64" -o "$target" = "x86_64" \ + -o "$target" = "powerpc64" -o "$target" = "ppc64" \ -o "$target" = "alpha"; then targetlongbits="64" else @@ -132,7 +134,7 @@ target_list="" for target in $*; do case $target in - unix-*|builtin-*|plain-*|mol-ppc|briq-ppc|pearpc-ppc|qemu-ppc|xbox-x86) + unix-*|builtin-*|plain-*|mol-ppc|briq-ppc|pearpc-ppc|qemu-ppc|qemu-ppc64|xbox-x86) target_list="$target_list $target" ;; cross-*) @@ -189,7 +191,7 @@ pearpc-ppc) pearpc="yes" ;; - builtin-ppc|qemu-ppc) + builtin-ppc|qemu-ppc|builtin-ppc64|qemu-ppc64) qemu="yes" ;; xbox-x86) @@ -215,6 +217,7 @@ esac done
+ BASEARCH=$ARCH case $ARCH in amd64) select_prefix x86_64 @@ -232,6 +235,13 @@ AS_FLAGS= ;;
+ ppc64) + select_prefix powerpc64 + CFLAGS="-Wa,-a64 -m64 -msoft-float -fno-builtin" + AS_FLAGS="-Wa,-a64" + BASEARCH=ppc + ;; + sparc32) select_prefix sparc CFLAGS="-Wa,-xarch=v8 -Wa,-32 -m32 -mcpu=supersparc -fno-builtin" @@ -279,7 +289,7 @@ mkdir -p $OBJDIR/host/include mkdir -p $OBJDIR/host/kernel mkdir -p $OBJDIR/forth - ln -s ../../../include/arch/$ARCH $OBJDIR/target/include/asm + ln -s ../../../include/arch/$BASEARCH $OBJDIR/target/include/asm #compile the host binary with target settings instead #ln -s ../../../include/arch/$HOSTARCH $OBJDIR/host/include/asm if [ "$mol" = "yes" ]; then @@ -328,6 +338,9 @@ echo "<?xml version=\"1.0\"?><config>" > $ODIR/config.xml # Generic config_set_boolean CONFIG_$ARCH >> $ODIR/config.xml + if [ "$BASEARCH" != "$ARCH" ]; then + config_set_boolean CONFIG_$BASEARCH >> $ODIR/config.xml + fi if [ "$mol" = "yes" ]; then config_set_boolean CONFIG_MOL >> $ODIR/config.xml fi