From 7be6ad9701934100d2929abbcce770da1e0a005f Mon Sep 17 00:00:00 2001 From: Eric Norum Date: Wed, 20 Oct 2004 15:21:05 +0000 Subject: Add MVME550 BSP --- c/src/lib/libbsp/powerpc/ChangeLog | 6 + c/src/lib/libbsp/powerpc/acinclude.m4 | 2 + c/src/lib/libbsp/powerpc/configure.ac | 3 +- .../libbsp/powerpc/mvme5500/GT64260/GT64260TWSI.c | 210 + .../libbsp/powerpc/mvme5500/GT64260/GT64260TWSI.h | 9 + .../libbsp/powerpc/mvme5500/GT64260/MVME5500I2C.c | 100 + .../libbsp/powerpc/mvme5500/GT64260/Makefile.am | 52 + .../libbsp/powerpc/mvme5500/GT64260/Makefile.in | 601 +++ c/src/lib/libbsp/powerpc/mvme5500/GT64260/VPD.h | 11 + .../libbsp/powerpc/mvme5500/GT64260/bspMvme5500.h | 15 + c/src/lib/libbsp/powerpc/mvme5500/GT64260/gtreg.h | 811 +++ c/src/lib/libbsp/powerpc/mvme5500/LICENSE | 112 + c/src/lib/libbsp/powerpc/mvme5500/Makefile.am | 17 + c/src/lib/libbsp/powerpc/mvme5500/README | 105 + c/src/lib/libbsp/powerpc/mvme5500/README.VME | 19 + c/src/lib/libbsp/powerpc/mvme5500/README.booting | 62 + c/src/lib/libbsp/powerpc/mvme5500/README.irq | 52 + c/src/lib/libbsp/powerpc/mvme5500/bsp_specs | 25 + .../lib/libbsp/powerpc/mvme5500/clock/Makefile.am | 24 + .../lib/libbsp/powerpc/mvme5500/clock/Makefile.in | 503 ++ c/src/lib/libbsp/powerpc/mvme5500/configure | 5586 ++++++++++++++++++++ c/src/lib/libbsp/powerpc/mvme5500/configure.ac | 51 + .../libbsp/powerpc/mvme5500/console/Makefile.am | 33 + .../libbsp/powerpc/mvme5500/console/Makefile.in | 582 ++ .../libbsp/powerpc/mvme5500/include/Makefile.am | 26 + .../libbsp/powerpc/mvme5500/include/Makefile.in | 437 ++ c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h | 109 + .../libbsp/powerpc/mvme5500/include/bspopts.h.in | 23 + c/src/lib/libbsp/powerpc/mvme5500/irq/GT64260Int.c | 245 + c/src/lib/libbsp/powerpc/mvme5500/irq/Makefile.am | 43 + c/src/lib/libbsp/powerpc/mvme5500/irq/Makefile.in | 594 +++ c/src/lib/libbsp/powerpc/mvme5500/irq/irq.c | 544 ++ c/src/lib/libbsp/powerpc/mvme5500/irq/irq.h | 331 ++ c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c | 242 + .../libbsp/powerpc/mvme5500/network/GT64260eth.c | 1649 ++++++ .../libbsp/powerpc/mvme5500/network/GT64260eth.h | 135 + .../powerpc/mvme5500/network/GT64260ethreg.h | 879 +++ .../libbsp/powerpc/mvme5500/network/Makefile.am | 43 + .../libbsp/powerpc/mvme5500/network/Makefile.in | 594 +++ c/src/lib/libbsp/powerpc/mvme5500/pci/Makefile.am | 35 + c/src/lib/libbsp/powerpc/mvme5500/pci/Makefile.in | 586 ++ .../powerpc/mvme5500/pci/detect_host_bridge.c | 72 + c/src/lib/libbsp/powerpc/mvme5500/pci/gtpcireg.h | 91 + c/src/lib/libbsp/powerpc/mvme5500/pci/pci.c | 378 ++ c/src/lib/libbsp/powerpc/mvme5500/pci/pci.h | 1200 +++++ .../libbsp/powerpc/mvme5500/pci/pci_interface.c | 171 + .../libbsp/powerpc/mvme5500/pci/pcifinddevice.c | 66 + .../lib/libbsp/powerpc/mvme5500/start/Makefile.am | 46 + .../lib/libbsp/powerpc/mvme5500/start/Makefile.in | 541 ++ c/src/lib/libbsp/powerpc/mvme5500/start/preload.S | 287 + c/src/lib/libbsp/powerpc/mvme5500/start/start.S | 219 + .../libbsp/powerpc/mvme5500/startup/Makefile.am | 37 + .../libbsp/powerpc/mvme5500/startup/Makefile.in | 538 ++ .../libbsp/powerpc/mvme5500/startup/bootpstuff.c | 71 + .../lib/libbsp/powerpc/mvme5500/startup/bspclean.c | 18 + .../lib/libbsp/powerpc/mvme5500/startup/bspstart.c | 625 +++ c/src/lib/libbsp/powerpc/mvme5500/startup/linkcmds | 302 ++ .../powerpc/mvme5500/startup/pgtbl_activate.c | 37 + c/src/lib/libbsp/powerpc/mvme5500/startup/reboot.c | 16 + c/src/lib/libbsp/powerpc/mvme5500/tod/Makefile.am | 24 + c/src/lib/libbsp/powerpc/mvme5500/tod/todcfg.c | 36 + .../libbsp/powerpc/mvme5500/vectors/Makefile.am | 47 + .../libbsp/powerpc/mvme5500/vectors/Makefile.in | 597 +++ .../libbsp/powerpc/mvme5500/vectors/bspException.h | 57 + .../powerpc/mvme5500/vectors/exceptionhandler.c | 201 + c/src/lib/libbsp/powerpc/mvme5500/vme/Makefile.am | 51 + c/src/lib/libbsp/powerpc/mvme5500/vme/Makefile.in | 596 +++ c/src/lib/libbsp/powerpc/mvme5500/vme/VME.h | 97 + c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h | 28 + c/src/lib/libbsp/powerpc/mvme5500/vme/vmeconfig.c | 85 + .../lib/libbsp/powerpc/mvme5500/wrapup/Makefile.am | 27 + .../lib/libbsp/powerpc/mvme5500/wrapup/Makefile.in | 509 ++ 72 files changed, 22575 insertions(+), 1 deletion(-) create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/GT64260/GT64260TWSI.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/GT64260/GT64260TWSI.h create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/GT64260/MVME5500I2C.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/GT64260/Makefile.am create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/GT64260/Makefile.in create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/GT64260/VPD.h create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/GT64260/bspMvme5500.h create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/GT64260/gtreg.h create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/LICENSE create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/Makefile.am create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/README create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/README.VME create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/README.booting create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/README.irq create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/bsp_specs create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/clock/Makefile.am create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/clock/Makefile.in create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/configure create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/configure.ac create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/console/Makefile.am create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/console/Makefile.in create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/include/Makefile.am create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/include/Makefile.in create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/include/bspopts.h.in create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/irq/GT64260Int.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/irq/Makefile.am create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/irq/Makefile.in create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/irq/irq.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/irq/irq.h create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/network/GT64260eth.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/network/GT64260eth.h create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/network/GT64260ethreg.h create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/network/Makefile.am create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/network/Makefile.in create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/pci/Makefile.am create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/pci/Makefile.in create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/pci/detect_host_bridge.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/pci/gtpcireg.h create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/pci/pci.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/pci/pci.h create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/pci/pci_interface.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/pci/pcifinddevice.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/start/Makefile.am create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/start/Makefile.in create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/start/preload.S create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/start/start.S create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/startup/Makefile.am create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/startup/Makefile.in create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/startup/bootpstuff.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/startup/bspclean.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/startup/linkcmds create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/startup/pgtbl_activate.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/startup/reboot.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/tod/Makefile.am create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/tod/todcfg.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/vectors/Makefile.am create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/vectors/Makefile.in create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/vectors/bspException.h create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/vme/Makefile.am create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/vme/Makefile.in create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/vme/VME.h create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/vme/vmeconfig.c create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/wrapup/Makefile.am create mode 100644 c/src/lib/libbsp/powerpc/mvme5500/wrapup/Makefile.in (limited to 'c/src/lib') diff --git a/c/src/lib/libbsp/powerpc/ChangeLog b/c/src/lib/libbsp/powerpc/ChangeLog index 7f9de65b87..6f33c1a6fc 100644 --- a/c/src/lib/libbsp/powerpc/ChangeLog +++ b/c/src/lib/libbsp/powerpc/ChangeLog @@ -1,3 +1,9 @@ +2004-10-20 Eric Norum + + * acinclude.m4: Add mvme5500 BSP + * configure.ac + * mvme5500/....... + 2004-09-24 Ralf Corsepius * configure.ac: Require automake > 1.9. diff --git a/c/src/lib/libbsp/powerpc/acinclude.m4 b/c/src/lib/libbsp/powerpc/acinclude.m4 index 414fcee7ed..9d305f7d31 100644 --- a/c/src/lib/libbsp/powerpc/acinclude.m4 +++ b/c/src/lib/libbsp/powerpc/acinclude.m4 @@ -16,6 +16,8 @@ AC_DEFUN([RTEMS_CHECK_BSPDIR], AC_CONFIG_SUBDIRS([motorola_powerpc]);; mpc8260ads ) AC_CONFIG_SUBDIRS([mpc8260ads]);; + mvme5500 ) + AC_CONFIG_SUBDIRS([mvme5500]);; ppcn_60x ) AC_CONFIG_SUBDIRS([ppcn_60x]);; psim ) diff --git a/c/src/lib/libbsp/powerpc/configure.ac b/c/src/lib/libbsp/powerpc/configure.ac index 1dec36ba74..d42203fc86 100644 --- a/c/src/lib/libbsp/powerpc/configure.ac +++ b/c/src/lib/libbsp/powerpc/configure.ac @@ -17,7 +17,8 @@ RTEMS_PROJECT_ROOT RTEMS_CHECK_BSPDIR([$RTEMS_BSP_FAMILY]) -AM_CONDITIONAL(need_shared, test "$RTEMS_BSP_FAMILY" = "motorola_powerpc") +AM_CONDITIONAL(need_shared, test "$RTEMS_BSP_FAMILY" = "motorola_powerpc" \ + || test "$RTEMS_BSP_FAMILY" = "mvme5500") # Explicitly list all Makefiles here AC_CONFIG_FILES([Makefile diff --git a/c/src/lib/libbsp/powerpc/mvme5500/GT64260/GT64260TWSI.c b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/GT64260TWSI.c new file mode 100644 index 0000000000..aca7619086 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/GT64260TWSI.c @@ -0,0 +1,210 @@ +/* GT64260TWSI.c : Two-Wire Serial Interface (TWSI) support for the GT64260 + * + * Copyright (c) 2004, Brookhaven National Laboratory and + * Shuchen Kate Feng + * All rights reserved. + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution. + * + * See section 24:TWSI interface of "the GT-64260B System Controller + * for powerPc Processors Data Sheet". + * + * For full TWSI protocol description look in Philips Semiconductor + * TWSI spec. + * + * We need it to read out I2C devices used for the MVME5500 + * (eg. the memory SPD and VPD). + * + */ +#include /*registers.h included here for rtems_bsp_delay()*/ +#include +#include /* printk */ + +#include "bsp/gtreg.h" +#include "bsp/GT64260TWSI.h" + +#define MAX_LOOP 100 + +#define TWSI_DEBUG 0 + +int TWSI_initFlg = 0; /* TWSI Initialization Flag */ + +void GT64260TWSIinit() +{ + + if ( !TWSI_initFlg) { +#if TWSI_DEBUG + printk("GT64260TWSIinit("); +#endif + outl( 0, TWSI_SFT_RST); /* soft reset */ + rtems_bsp_delay(1000); + + /* See 24.2.5 : Assume bus speed is 133MHZ + * Try to be close to the default frequency : 62.5KHZ + * value 0x2c: 69.27 KHz TWSI bus clock + */ + outl(0x2c, TWSI_BAUDE_RATE); + rtems_bsp_delay(1000); + + /* Set Acknowledge and enable TWSI in the Control register */ + outl(0x44, TWSI_CTRL); + rtems_bsp_delay(4000); + TWSI_initFlg = 1; +#if TWSI_DEBUG + printk(")\n"); +#endif + } +} + +/* return the interrupt flag */ +int GT64260TWSIintFlag() +{ + unsigned int loop; + + for (loop = 0; loop < MAX_LOOP; loop++ ) { + /* Return 1 if the interrupt flag is set */ + if (inl(TWSI_CTRL) & TWSI_INTFLG) return(1); + rtems_bsp_delay(1000); + } + return(0); +} + +int GT64260TWSIstop() +{ + +#if TWSI_DEBUG + printk("GT64260TWSIstop("); +#endif + + outl((inl(TWSI_CTRL) | TWSI_STOP), TWSI_CTRL); + rtems_bsp_delay(1000); + + /* Check if interrupt flag bit is set*/ + if (GT64260TWSIintFlag()) { + outl((inl( TWSI_CTRL) & ~TWSI_INTFLG), TWSI_CTRL); + rtems_bsp_delay(1000); +#if TWSI_DEBUG + printk(")\n"); +#endif + return(0); + } +#if TWSI_DEBUG + printk("NoIntFlag\n"); +#endif + return(-1); +} + +int GT64260TWSIstart() +{ + unsigned int loop; + unsigned int status; + +#if TWSI_DEBUG + printk("GT64260TWSIstart("); +#endif + /* Initialize the TWSI interface */ + GT64260TWSIinit(); + + /* set the start bit */ + outl((TWSI_START | TWSI_TWSIEN), TWSI_CTRL); + rtems_bsp_delay(1000); + + if (GT64260TWSIintFlag()) { + /* Check for completion of START sequence */ + for (loop = 0; loop + * All rights reserved. + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution. + * + * To read inoformation of the EEPROM via the I2C + * + */ + +#include /* printk */ +#include "bsp/GT64260TWSI.h" + +/* #define I2C_DEBUG*/ +typedef unsigned int u32; +typedef unsigned char unchar; + +unchar I2cAddrPack(unchar busAddr,u32 offset) +{ + return(busAddr | ((offset & 0x700) >> 7)); +} +unchar I2cDevByteAddr(u32 devA2A1A0, unchar byteNum) +{ + return(( devA2A1A0 >>(byteNum*8)) & 0xff); +} +/**************************************************************************** +* I2Cread_eeprom - read EEPROM VPD from the I2C +*/ +int I2Cread_eeprom(unchar I2cBusAddr,u32 devA2A1A0,u32 AddrBytes,unchar *pBuff,u32 numBytes) +{ + int status=0, lastByte=0; + + switch (AddrBytes) { + case 1: + if ((status=GT64260TWSIstart()) != -1) { + if ((status=GT64260TWSIwrite(I2cAddrPack(I2cBusAddr,devA2A1A0)))!= -1){ + if ((status=GT64260TWSIwrite(devA2A1A0))!=-1){ + if ((status=GT64260TWSIstart())!=-1) + status=GT64260TWSIwrite(I2cAddrPack((I2cBusAddr|0x01),devA2A1A0)); + } + } + } + break; + case 2: + if ((status=GT64260TWSIstart())!=-1) { + if ((status=GT64260TWSIwrite(I2cBusAddr))!= -1) { + if ((status=GT64260TWSIwrite(I2cDevByteAddr(devA2A1A0,1)))!=-1) { + if ((status=GT64260TWSIwrite(I2cDevByteAddr(devA2A1A0,0)))!= -1){ + if ((status=GT64260TWSIstart()) != -1) { + status = GT64260TWSIwrite((I2cBusAddr | 0x01)); + } + } + } + } + } + break; + case 3: + if ((status = GT64260TWSIstart())!= -1) { + if ((status = GT64260TWSIwrite(I2cBusAddr))!= -1) { + if ((status=GT64260TWSIwrite(I2cDevByteAddr(devA2A1A0,2)))!= -1){ + if ((status=GT64260TWSIwrite(I2cDevByteAddr(devA2A1A0,1)))!= -1){ + if ((status=GT64260TWSIwrite(I2cDevByteAddr(devA2A1A0,0)))!= -1){ + if ((status=GT64260TWSIstart())!= -1) { + status = GT64260TWSIwrite(I2cBusAddr | 0x01); + } + } + } + } + } + } + break; + default: + status=-1; + break; + } + if (status !=-1) { +#ifdef I2C_DEBUG + printk("\n"); +#endif + /* read data from device */ + for ( ; numBytes > 0; numBytes-- ) { + if ( numBytes == 1) lastByte=1; + if (GT64260TWSIread(pBuff,lastByte) == -1) return (-1); +#ifdef I2C_DEBUG + printk("%2x ", *pBuff); + if ( (numBytes % 20)==0 ) printk("\n"); +#endif + pBuff++; + } +#ifdef I2C_DEBUG + printk("\n"); +#endif + if (GT64260TWSIstop() == -1) return (-1); + } + return (status); +} + diff --git a/c/src/lib/libbsp/powerpc/mvme5500/GT64260/Makefile.am b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/Makefile.am new file mode 100644 index 0000000000..567c3d427c --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/Makefile.am @@ -0,0 +1,52 @@ +## +## $Id: Makefile.am, S. Kate Feng /12/03 +## + +VPATH = @srcdir@: + +INCLUDES = -I @srcdir@/../GT64260 + +C_FILES = GT64260TWSI.c MVME5500I2C.c + +include_bspdir = $(includedir)/bsp +include_bsp_HEADERS = bspMvme5500.h gtreg.h GT64260TWSI.h VPD.h + +H_FILES = bspMvme5500.h gtreg.h GT64260TWSI.h VPD.h + +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) + +EXTRA_DIST = GT64260TWSI.c MVME5500I2C.c + +OBJS = $(C_O_FILES) + +include $(top_srcdir)/../../../../../../automake/compile.am +include $(top_srcdir)/../../../../../../automake/lib.am + +# +# (OPTIONAL) Add local stuff here using += +# + +$(PROJECT_INCLUDE)/bsp: + $(mkinstalldirs) $< + +$(PROJECT_INCLUDE)/bsp/bspMvme5500.h: bspMvme5500.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/bsp/gtreg.h: gtreg.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/bsp/GT64260TWSI.h: GT64260TWSI.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/bsp/VPD.h: VPD.h + $(INSTALL_DATA) $< $@ + +# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile +PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp $(PROJECT_INCLUDE)/bsp/bspMvme5500.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/gtreg.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/GT64260TWSI.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/VPD.h + +all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) + +include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/lib/libbsp/powerpc/mvme5500/GT64260/Makefile.in b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/Makefile.in new file mode 100644 index 0000000000..4a99976a5c --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/Makefile.in @@ -0,0 +1,601 @@ +# Makefile.in generated by automake 1.7.2 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ + +VPATH = @srcdir@: +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ + +AR = @AR@ + +# OBSOLETE: Don't use +AS = $(CC) +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BARE_CPU_CFLAGS = @BARE_CPU_CFLAGS@ +BARE_CPU_MODEL = @BARE_CPU_MODEL@ + +CC = @CC@ $(GCCSPECS) + +CCAS = $(CC) +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @RTEMS_CFLAGS@ $(XCFLAGS) +CFLAGS_DEBUG_V = @CFLAGS_DEBUG_V@ +CFLAGS_OPTIMIZE_V = @CFLAGS_OPTIMIZE_V@ +CFLAGS_PROFILE_V = @CFLAGS_PROFILE_V@ +CPP = @CPP@ $(GCCSPECS) + +CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES) $(XCPPFLAGS) + +CPU_CFLAGS = @CPU_CFLAGS@ +CYGPATH_W = @CYGPATH_W@ + +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ENDIF = @ENDIF@ +EXEEXT = @EXEEXT@ +GCC_SPECS = @GCC_SPECS@ +HAS_MP = @HAS_MP@ +HAS_NETWORKING = @HAS_NETWORKING@ +HAS_NETWORKING_FALSE = @HAS_NETWORKING_FALSE@ +HAS_NETWORKING_TRUE = @HAS_NETWORKING_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKE = @MAKE@ +MAKEINFO = @MAKEINFO@ +MULTILIB_FALSE = @MULTILIB_FALSE@ +MULTILIB_TRUE = @MULTILIB_TRUE@ +NM = @NM@ +OBJCOPY = @OBJCOPY@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKHEX = @PACKHEX@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PROJECT_INCLUDE = @PROJECT_INCLUDE@ +PROJECT_RELEASE = @PROJECT_RELEASE@ +PROJECT_ROOT = @PROJECT_ROOT@ +PROJECT_TOPdir = @PROJECT_TOPdir@ +RANLIB = @RANLIB@ +RTEMS_BSP = @RTEMS_BSP@ +RTEMS_BSP_FAMILY = @RTEMS_BSP_FAMILY@ +RTEMS_BSP_SPECS = @RTEMS_BSP_SPECS@ +RTEMS_CFLAGS = @RTEMS_CFLAGS@ +RTEMS_CPPFLAGS = @RTEMS_CPPFLAGS@ +RTEMS_CPU = @RTEMS_CPU@ +RTEMS_CPU_MODEL = @RTEMS_CPU_MODEL@ +RTEMS_HAS_NETWORKING = @RTEMS_HAS_NETWORKING@ +RTEMS_HOST = @RTEMS_HOST@ +RTEMS_ROOT = @RTEMS_ROOT@ +RTEMS_TOPdir = @RTEMS_TOPdir@ +RTEMS_USE_GCC_FALSE = @RTEMS_USE_GCC_FALSE@ +RTEMS_USE_GCC_TRUE = @RTEMS_USE_GCC_TRUE@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIZE = @SIZE@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__include = @am__include@ +am__quote = @am__quote@ +bindir = @bindir@ +bsplibdir = @bsplibdir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exceptions = @exceptions@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ + +INCLUDES = -I @srcdir@/../GT64260 + +C_FILES = GT64260TWSI.c MVME5500I2C.c + +include_bspdir = $(includedir)/bsp +include_bsp_HEADERS = bspMvme5500.h gtreg.h GT64260TWSI.h VPD.h + +H_FILES = bspMvme5500.h gtreg.h GT64260TWSI.h VPD.h + +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) + +EXTRA_DIST = GT64260TWSI.c MVME5500I2C.c + +OBJS = $(C_O_FILES) + +@RTEMS_USE_GCC_TRUE@GCCSPECS = $(GCC_SPECS) $(RTEMS_BSP_SPECS) +# CXXFLAGS = @RTEMS_CXXFLAGS@ $(XCXXFLAGS) +CXXFLAGS = @RTEMS_CFLAGS@ $(XCXXFLAGS) +ASFLAGS = $(CPU_ASFLAGS) $(CPU_CFLAGS) $(XASFLAGS) + +LINK_LIBS = $(LD_LIBS) + + +# +# Client compiler and support tools +# + +# +# How to compile stuff into ${ARCH} subdirectory +# +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + + +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + +CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) +ASCOMPILE = $(AS) $(AM_ASFLAGS) $(ASFLAGS) + + +# Dependency files for use by gmake +# NOTE: we don't put them into $(ARCH) +# so that 'make clean' doesn't blow it away +DEPEND = Depends-${ARCH} + + +# spell out all the LINK_FILE's, rather than using -lbsp, so +# that $(LINK_FILES) can be a dependency +LINK_OBJS = \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +LINK_FILES = \ + $(START_FILE) \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +VARIANT = OPTIMIZE + +VARIANT_OPTIMIZE_V = OPTIMIZE +VARIANT_DEBUG_V = DEBUG +VARIANT_PROFILE_V = PROFILE +VARIANT_optimize_V = OPTIMIZE +VARIANT_debug_V = DEBUG +VARIANT_profile_V = PROFILE + +VARIANT_V = $(VARIANT_$(VARIANT)_V) + +ARCH_OPTIMIZE_V = o-optimize +ARCH_DEBUG_V = o-debug +ARCH_PROFILE_V = o-profile + +ARCH__V = $(ARCH_OPTIMIZE_V) +ARCH = $(ARCH_$(VARIANT_V)_V) + +LIBSUFFIX_OPTIMIZE_V = +LIBSUFFIX_DEBUG_V = _g +LIBSUFFIX_PROFILE_V = _p +LIBSUFFIX__V = $(LIBSUFFIX_OPTIMIZE_V) + +LIB_VARIANT = $(LIBSUFFIX_$(VARIANT_V)_V) +CFLAGS__V = $(CFLAGS_OPTIMIZE_V) + +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_OPTIMIZE_V = +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_DEBUG_V = -qrtems_debug -Wno-unused +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_PROFILE_V = -pg + +RTEMS_CFLAGS__V = $(RTEMS_CFLAGS_OPTIMIZE_V) +CXX = @CXX@ $(GCCSPECS) + +AM_CPPFLAGS = $(RTEMS_CPPFLAGS) +AM_CFLAGS = +AM_CXXFLAGS = +AM_CCASFLAGS = $(CPU_CFLAGS) $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS) + +ARFLAGS = ruv + +TMPINSTALL_FILES = $(PROJECT_RELEASE)/lib + +# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile +PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp $(PROJECT_INCLUDE)/bsp/bspMvme5500.h $(PROJECT_INCLUDE)/bsp/gtreg.h $(PROJECT_INCLUDE)/bsp/GT64260TWSI.h $(PROJECT_INCLUDE)/bsp/VPD.h + +PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools +subdir = GT64260 +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/bspopts.tmp +CONFIG_CLEAN_FILES = +DIST_SOURCES = +HEADERS = $(include_bsp_HEADERS) + +DIST_COMMON = $(include_bsp_HEADERS) \ + $(top_srcdir)/../../../../../../automake/compile.am \ + $(top_srcdir)/../../../../../../automake/lib.am \ + $(top_srcdir)/../../../../../../automake/local.am Makefile.am \ + Makefile.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/../../../../../../automake/compile.am $(top_srcdir)/../../../../../../automake/lib.am $(top_srcdir)/../../../../../../automake/local.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign GT64260/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +uninstall-info-am: +include_bspHEADERS_INSTALL = $(INSTALL_HEADER) +install-include_bspHEADERS: $(include_bsp_HEADERS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(include_bspdir) + @list='$(include_bsp_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(include_bspHEADERS_INSTALL) $$d$$p $(DESTDIR)$(include_bspdir)/$$f"; \ + $(include_bspHEADERS_INSTALL) $$d$$p $(DESTDIR)$(include_bspdir)/$$f; \ + done + +uninstall-include_bspHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_bsp_HEADERS)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(include_bspdir)/$$f"; \ + rm -f $(DESTDIR)$(include_bspdir)/$$f; \ + done + +ETAGS = etags +ETAGSFLAGS = + +CTAGS = ctags +CTAGSFLAGS = + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + $(mkinstalldirs) $(distdir)/../../../../../../../automake + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(HEADERS) all-local + +installdirs: + $(mkinstalldirs) $(DESTDIR)$(include_bspdir) + +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-local mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: install-include_bspHEADERS + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-include_bspHEADERS uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ + clean-generic clean-local ctags distclean distclean-generic \ + distclean-tags distdir dvi dvi-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-include_bspHEADERS install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-include_bspHEADERS uninstall-info-am + +@RTEMS_USE_GCC_FALSE@include $(CONFIG.CC) + +${ARCH}/%.o: %.c + ${COMPILE} -o $@ -c $< + +${ARCH}/%.o: %.cc + ${CXXCOMPILE} -o $@ -c $< + +${ARCH}/%.o: %.S + ${CCASCOMPILE} -DASM -o $@ -c $< + +# We deliberately don't have anything depend on the +# $(DEPEND) file; otherwise it will get rebuilt even +# on 'make clean' +# + +@RTEMS_USE_GCC_TRUE@depend-gcc: $(C_FILES) $(CC_FILES) $(S_FILES) +@RTEMS_USE_GCC_TRUE@ $(COMPILE) -M $^ | \ +@RTEMS_USE_GCC_TRUE@ sed -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \ +@RTEMS_USE_GCC_TRUE@ -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp +@RTEMS_USE_GCC_TRUE@ mv $(DEPEND).tmp $(DEPEND) + +# pull in dependencies if they exist +@RTEMS_USE_GCC_TRUE@ifeq (${DEPEND},$(wildcard ${DEPEND})) +@RTEMS_USE_GCC_TRUE@include ${DEPEND} +@RTEMS_USE_GCC_TRUE@@ENDIF@ +depend: depend-am + +@RTEMS_USE_GCC_TRUE@define make-rel +@RTEMS_USE_GCC_TRUE@ $(LINK) -qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) $^ +@RTEMS_USE_GCC_TRUE@endef +@RTEMS_USE_GCC_FALSE@define make-rel +@RTEMS_USE_GCC_FALSE@ $(LINK) $(XLDFLAGS) $^ +@RTEMS_USE_GCC_FALSE@endef + +${ARCH}: + mkdir ${ARCH} + +clean-local: + $(RM) -r o-optimize o-debug o-profile $(CLEANDIRS) + $(RM) Depends-o-optimize.tmp Depends-o-debug.tmp Depends-o-profile.tmp + +define make-library +test -d $(ARCH) || mkdir $(ARCH) +$(RM) $@ +$(AR) $(ARFLAGS) $@ $^ +$(RANLIB) $@ +endef + +$(PROJECT_RELEASE)/lib: + @$(mkinstalldirs) $@ + +.PRECIOUS: $(LIB) + +# +# (OPTIONAL) Add local stuff here using += +# + +$(PROJECT_INCLUDE)/bsp: + $(mkinstalldirs) $< + +$(PROJECT_INCLUDE)/bsp/bspMvme5500.h: bspMvme5500.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/bsp/gtreg.h: gtreg.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/bsp/GT64260TWSI.h: GT64260TWSI.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/bsp/VPD.h: VPD.h + $(INSTALL_DATA) $< $@ + +all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) + +debug: + @echo + @echo "\"make debug\" is obsolete, instead use:" + @echo " make VARIANT=DEBUG" + @echo + +.PHONY: debug + +profile: + @echo + @echo "\"make profile\" is obsolete, instead use:" + @echo " make VARIANT=PROFILE" + @echo + +.PHONY: profile + +preinstall-am: $(PREINSTALL_FILES) +preinstall: preinstall-am +.PHONY: preinstall preinstall-am + +depend-am: depend-gcc +depend: depend-am +.PHONY: depend depend-am depend-gcc +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/c/src/lib/libbsp/powerpc/mvme5500/GT64260/VPD.h b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/VPD.h new file mode 100644 index 0000000000..4b37de6927 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/VPD.h @@ -0,0 +1,11 @@ +/* The mapping of the Configuration VPD + * + * (C) 2004, NSLS, Brookhaven National Laboratory, + * S. Kate Feng, + * + */ + +extern unsigned char ConfVPD_buff[200]; + +#define VPD_ENET0_OFFSET 0x3c +#define VPD_ENET1_OFFSET 0x45 diff --git a/c/src/lib/libbsp/powerpc/mvme5500/GT64260/bspMvme5500.h b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/bspMvme5500.h new file mode 100644 index 0000000000..20da5be0ed --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/bspMvme5500.h @@ -0,0 +1,15 @@ +/* GT64260 register base mapping on the MVME5500 + * + * (C) Shuchen K. Feng ,NSLS, + * Brookhaven National Laboratory, 2003 + * + */ +#define _256M 0x10000000 +#define _512M 0x20000000 + +#define GT64260_REG_BASE 0xf1000000 /* Base of GT64260 Reg Space */ +#define GT64260_REG_SPACE_SIZE 0x10000 /* 64Kb Internal Reg Space */ + +#define GT64260_DEV1_BASE 0xf1100000 /* Device bank1(chip select 1) base + */ +#define GT64260_DEV1_SIZE 0x00100000 /* Device bank size */ diff --git a/c/src/lib/libbsp/powerpc/mvme5500/GT64260/gtreg.h b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/gtreg.h new file mode 100644 index 0000000000..b58b086565 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/GT64260/gtreg.h @@ -0,0 +1,811 @@ +/* $NetBSD: gtreg.h,v 1.1 2003/03/05 22:08:22 matt Exp $ */ + +/* + * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed for the NetBSD Project by + * Allegro Networks, Inc., and Wasabi Systems, Inc. + * 4. The name of Allegro Networks, Inc. may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * 5. The name of Wasabi Systems, Inc. may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY ALLEGRO NETWORKS, INC. AND + * WASABI SYSTEMS, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL EITHER ALLEGRO NETWORKS, INC. OR WASABI SYSTEMS, INC. + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _DISCOVERY_DEV_GTREG_H_ +#define _DISCOVERY_DEV_GTREG_H_ + +#define GT__BIT(bit) (1U << (bit)) +#define GT__MASK(bit) (GT__BIT(bit) - 1) +#define GT__EXT(data, bit, len) (((data) >> (bit)) & GT__MASK(len)) +#define GT__CLR(data, bit, len) ((data) &= ~(GT__MASK(len) << (bit))) +#define GT__INS(new, bit) ((new) << (bit)) + + +/* + * Table 30: CPU Address Decode Register Map + */ +#define GT_SCS0_Low_Decode 0x0008 +#define GT_SCS0_High_Decode 0x0010 +#define GT_SCS1_Low_Decode 0x0208 +#define GT_SCS1_High_Decode 0x0210 +#define GT_SCS2_Low_Decode 0x0018 +#define GT_SCS2_High_Decode 0x0020 +#define GT_SCS3_Low_Decode 0x0218 +#define GT_SCS3_High_Decode 0x0220 +#define GT_CS0_Low_Decode 0x0028 +#define GT_CS0_High_Decode 0x0030 +#define GT_CS1_Low_Decode 0x0228 +#define GT_CS1_High_Decode 0x0230 +#define GT_CS2_Low_Decode 0x0248 +#define GT_CS2_High_Decode 0x0250 +#define GT_CS3_Low_Decode 0x0038 +#define GT_CS3_High_Decode 0x0040 +#define GT_BootCS_Low_Decode 0x0238 +#define GT_BootCS_High_Decode 0x0240 +#define GT_PCI0_IO_Low_Decode 0x0048 +#define GT_PCI0_IO_High_Decode 0x0050 +#define GT_PCI0_Mem0_Low_Decode 0x0058 +#define GT_PCI0_Mem0_High_Decode 0x0060 +#define GT_PCI0_Mem1_Low_Decode 0x0080 +#define GT_PCI0_Mem1_High_Decode 0x0088 +#define GT_PCI0_Mem2_Low_Decode 0x0258 +#define GT_PCI0_Mem2_High_Decode 0x0260 +#define GT_PCI0_Mem3_Low_Decode 0x0280 +#define GT_PCI0_Mem3_High_Decode 0x0288 +#define GT_PCI1_IO_Low_Decode 0x0090 +#define GT_PCI1_IO_High_Decode 0x0098 +#define GT_PCI1_Mem0_Low_Decode 0x00a0 +#define GT_PCI1_Mem0_High_Decode 0x00a8 +#define GT_PCI1_Mem1_Low_Decode 0x00b0 +#define GT_PCI1_Mem1_High_Decode 0x00b8 +#define GT_PCI1_Mem2_Low_Decode 0x02a0 +#define GT_PCI1_Mem2_High_Decode 0x02a8 +#define GT_PCI1_Mem3_Low_Decode 0x02b0 +#define GT_PCI1_Mem3_High_Decode 0x02b8 +#define GT_Internal_Decode 0x0068 +#define GT_CPU0_Low_Decode 0x0290 +#define GT_CPU0_High_Decode 0x0298 +#define GT_CPU1_Low_Decode 0x02c0 +#define GT_CPU1_High_Decode 0x02c8 +#define GT_PCI0_IO_Remap 0x00f0 +#define GT_PCI0_Mem0_Remap_Low 0x00f8 +#define GT_PCI0_Mem0_Remap_High 0x0320 +#define GT_PCI0_Mem1_Remap_Low 0x0100 +#define GT_PCI0_Mem1_Remap_High 0x0328 +#define GT_PCI0_Mem2_Remap_Low 0x02f8 +#define GT_PCI0_Mem2_Remap_High 0x0330 +#define GT_PCI0_Mem3_Remap_Low 0x0300 +#define GT_PCI0_Mem3_Remap_High 0x0338 +#define GT_PCI1_IO_Remap 0x0108 +#define GT_PCI1_Mem0_Remap_Low 0x0110 +#define GT_PCI1_Mem0_Remap_High 0x0340 +#define GT_PCI1_Mem1_Remap_Low 0x0118 +#define GT_PCI1_Mem1_Remap_High 0x0348 +#define GT_PCI1_Mem2_Remap_Low 0x0310 +#define GT_PCI1_Mem2_Remap_High 0x0350 +#define GT_PCI1_Mem3_Remap_Low 0x0318 +#define GT_PCI1_Mem3_Remap_High 0x0358 + + +/* + * Table 31: CPU Control Register Map + */ +#define GT_CPU_Cfg 0x0000 +#define GT_CPU_Mode 0x0120 +#define GT_CPU_Master_Ctl 0x0160 +#define GT_CPU_If_Xbar_Ctl_Low 0x0150 +#define GT_CPU_If_Xbar_Ctl_High 0x0158 +#define GT_CPU_If_Xbar_Timeout 0x0168 +#define GT_CPU_Rd_Rsp_Xbar_Ctl_Low 0x0170 +#define GT_CPU_Rd_Rsp_Xbar_Ctl_High 0x0178 + +/* + * Table 32: CPU Sync Barrier Register Map + */ +#define GT_PCI_Sync_Barrier(bus) (0x00c0 | ((bus) << 3)) +#define GT_PCI0_Sync_Barrier 0x00c0 +#define GT_PCI1_Sync_Barrier 0x00c8 + +/* + * Table 33: CPU Access Protection Register Map + */ +#define GT_Protect_Low_0 0x0180 +#define GT_Protect_High_0 0x0188 +#define GT_Protect_Low_1 0x0190 +#define GT_Protect_High_1 0x0198 +#define GT_Protect_Low_2 0x01a0 +#define GT_Protect_High_2 0x01a8 +#define GT_Protect_Low_3 0x01b0 +#define GT_Protect_High_3 0x01b8 +#define GT_Protect_Low_4 0x01c0 +#define GT_Protect_High_4 0x01c8 +#define GT_Protect_Low_5 0x01d0 +#define GT_Protect_High_5 0x01d8 +#define GT_Protect_Low_6 0x01e0 +#define GT_Protect_High_6 0x01e8 +#define GT_Protect_Low_7 0x01f0 +#define GT_Protect_High_7 0x01f8 + +/* + * Table 34: Snoop Control Register Map + */ +#define GT_Snoop_Base_0 0x0380 +#define GT_Snoop_Top_0 0x0388 +#define GT_Snoop_Base_1 0x0390 +#define GT_Snoop_Top_1 0x0398 +#define GT_Snoop_Base_2 0x03a0 +#define GT_Snoop_Top_2 0x03a8 +#define GT_Snoop_Base_3 0x03b0 +#define GT_Snoop_Top_3 0x03b8 + +/* + * Table 35: CPU Error Report Register Map + */ +#define GT_CPU_Error_Address_Low 0x0070 +#define GT_CPU_Error_Address_High 0x0078 +#define GT_CPU_Error_Data_Low 0x0128 +#define GT_CPU_Error_Data_High 0x0130 +#define GT_CPU_Error_Parity 0x0138 +#define GT_CPU_Error_Cause 0x0140 +#define GT_CPU_Error_Mask 0x0148 + +#define GT_DecodeAddr_SET(g, r, v) \ + do { \ + gt_read((g), GT_Internal_Decode); \ + gt_write((g), (r), ((v) & 0xfff00000) >> 20); \ + while ((gt_read((g), (r)) & 0xfff) != ((v) >> 20)); \ + } while (0) + +#define GT_LowAddr_GET(v) (GT__EXT((v), 0, 12) << 20) +#define GT_HighAddr_GET(v) ((GT__EXT((v), 0, 12) << 20) | 0xfffff) + +#define GT_MPP_Control0 0xf000 +#define GT_MPP_Control1 0xf004 +#define GT_MPP_Control2 0xf008 +#define GT_MPP_Control3 0xf00c + +/* added */ +#define GT_MPP_SerialPortMultiplex 0xf010 + +#define GT_GPP_IO_Control 0xf100 +#define GT_GPP_Level_Control 0xf110 +#define GT_GPP_Value 0xf104 +#define GT_GPP_Interrupt_Cause 0xf108 +#define GT_GPP_Interrupt_Mask 0xf10c +/* + * Table 36: SCS[0]* Low Decode Address, Offset: 0x008 + * Table 38: SCS[1]* Low Decode Address, Offset: 0x208 + * Table 40: SCS[2]* Low Decode Address, Offset: 0x018 + * Table 42: SCS[3]* Low Decode Address, Offset: 0x218 + * Table 44: CS[0]* Low Decode Address, Offset: 0x028 + * Table 46: CS[1]* Low Decode Address, Offset: 0x228 + * Table 48: CS[2]* Low Decode Address, Offset: 0x248 + * Table 50: CS[3]* Low Decode Address, Offset: 0x038 + * Table 52: BootCS* Low Decode Address, Offset: 0x238 + * Table 75: CPU 0 Low Decode Address, Offset: 0x290 + * Table 77: CPU 1 Low Decode Address, Offset: 0x2c0 + * + * 11:00 LowAddr SCS[0] Base Address + * 31:12 Reserved Must be 0. + */ + +/* + * Table 37: SCS[0]* High Decode Address, Offset: 0x010 + * Table 39: SCS[1]* High Decode Address, Offset: 0x210 + * Table 41: SCS[2]* High Decode Address, Offset: 0x020 + * Table 43: SCS[3]* High Decode Address, Offset: 0x220 + * Table 45: CS[0]* High Decode Address, Offset: 0x030 + * Table 47: CS[1]* High Decode Address, Offset: 0x230 + * Table 49: CS[2]* High Decode Address, Offset: 0x250 + * Table 51: CS[3]* High Decode Address, Offset: 0x040 + * Table 53: BootCS* High Decode Address, Offset: 0x240 + * Table 76: CPU 0 High Decode Address, Offset: 0x298 + * Table 78: CPU 1 High Decode Address, Offset: 0x2c8 + * + * 11:00 HighAddr SCS[0] Top Address + * 31:12 Reserved + */ + +/* + * Table 54: PCI_0 I/O Low Decode Address, Offset: 0x048 + * Table 56: PCI_0 Memory 0 Low Decode Address, Offset: 0x058 + * Table 58: PCI_0 Memory 1 Low Decode Address, Offset: 0x080 + * Table 60: PCI_0 Memory 2 Low Decode Address, Offset: 0x258 + * Table 62: PCI_0 Memory 3 Low Decode Address, Offset: 0x280 + * Table 64: PCI_1 I/O Low Decode Address, Offset: 0x090 + * Table 66: PCI_1 Memory 0 Low Decode Address, Offset: 0x0a0 + * Table 68: PCI_1 Memory 1 Low Decode Address, Offset: 0x0b0 + * Table 70: PCI_1 Memory 2 Low Decode Address, Offset: 0x2a0 + * Table 72: PCI_1 Memory 3 Low Decode Address, Offset: 0x2b0 + * + * 11:00 LowAddr PCI IO/Memory Space Base Address + * 23:12 Reserved + * 26:24 PCISwap PCI Master Data Swap Control (0: Byte Swap; + * 1: No swapping; 2: Both byte and word swap; + * 3: Word swap; 4..7: Reserved) + * 27:27 PCIReq64 PCI master REQ64* policy (Relevant only when + * configured to 64-bit PCI bus and not I/O) + * 0: Assert s REQ64* only when transaction + * is longer than 64-bits. + * 1: Always assert REQ64*. + * 31:28 Reserved + */ +#define GT_PCISwap_GET(v) GT__EXT((v), 24, 3) +#define GT_PCISwap_ByteSwap 0 +#define GT_PCISwap_NoSwap 1 +#define GT_PCISwap_ByteWordSwap 2 +#define GT_PCISwap_WordSwap 3 +#define GT_PCI_LowDecode_PCIReq64 GT__BIT(27) + +/* + * Table 55: PCI_0 I/O High Decode Address, Offset: 0x050 + * Table 57: PCI_0 Memory 0 High Decode Address, Offset: 0x060 + * Table 59: PCI_0 Memory 1 High Decode Address, Offset: 0x088 + * Table 61: PCI_0 Memory 2 High Decode Address, Offset: 0x260 + * Table 63: PCI_0 Memory 3 High Decode Address, Offset: 0x288 + * Table 65: PCI_1 I/O High Decode Address, Offset: 0x098 + * Table 67: PCI_1 Memory 0 High Decode Address, Offset: 0x0a8 + * Table 69: PCI_1 Memory 1 High Decode Address, Offset: 0x0b8 + * Table 71: PCI_1 Memory 2 High Decode Address, Offset: 0x2a8 + * Table 73: PCI_1 Memory 3 High Decode Address, Offset: 0x2b8 + * + * 11:00 HighAddr PCI_0 I/O Space Top Address + * 31:12 Reserved + */ + +/* + * Table 74: Internal Space Decode, Offset: 0x068 + * 15:00 IntDecode GT64260 Internal Space Base Address + * 23:16 Reserved + * 26:24 PCISwap Same as PCI_0 Memory 0 Low Decode Address. + * NOTE: Reserved for Galileo Technology usage. + * Relevant only for PCI master configuration + * transactions on the PCI bus. + * 31:27 Reserved + */ + +/* + * Table 79: PCI_0 I/O Address Remap, Offset: 0x0f0 + * Table 80: PCI_0 Memory 0 Address Remap Low, Offset: 0x0f8 + * Table 82: PCI_0 Memory 1 Address Remap Low, Offset: 0x100 + * Table 84: PCI_0 Memory 2 Address Remap Low, Offset: 0x2f8 + * Table 86: PCI_0 Memory 3 Address Remap Low, Offset: 0x300 + * Table 88: PCI_1 I/O Address Remap, Offset: 0x108 + * Table 89: PCI_1 Memory 0 Address Remap Low, Offset: 0x110 + * Table 91: PCI_1 Memory 1 Address Remap Low, Offset: 0x118 + * Table 93: PCI_1 Memory 2 Address Remap Low, Offset: 0x310 + * Table 95: PCI_1 Memory 3 Address Remap Low, Offset: 0x318 + * + * 11:00 Remap PCI IO/Memory Space Address Remap (31:20) + * 31:12 Reserved + */ + +/* + * Table 81: PCI_0 Memory 0 Address Remap High, Offset: 0x320 + * Table 83: PCI_0 Memory 1 Address Remap High, Offset: 0x328 + * Table 85: PCI_0 Memory 2 Address Remap High, Offset: 0x330 + * Table 87: PCI_0 Memory 3 Address Remap High, Offset: 0x338 + * Table 90: PCI_1 Memory 0 Address Remap High, Offset: 0x340 + * Table 92: PCI_1 Memory 1 Address Remap High, Offset: 0x348 + * Table 94: PCI_1 Memory 2 Address Remap High, Offset: 0x350 + * Table 96: PCI_1 Memory 3 Address Remap High, Offset: 0x358 + * + * 31:00 Remap PCI Memory Address Remap (high 32 bits) + */ + +/* + * Table 97: CPU Configuration, Offset: 0x000 + * 07:00 NoMatchCnt CPU Address Miss Counter + * 08:08 NoMatchCntEn CPU Address Miss Counter Enable + * NOTE: Relevant only if multi-GT is enabled. + * (0: Disabled; 1: Enabled) + * 09:09 NoMatchCntExt CPU address miss counter MSB + * 10:10 Reserved + * 11:11 AACKDelay Address Acknowledge Delay + * 0: AACK* is asserted one cycle after TS*. + * 1: AACK* is asserted two cycles after TS*. + * 12:12 Endianess Must be 0 + * NOTE: The GT64260 does not support the PowerPC + * Little Endian convention + * 13:13 Pipeline Pipeline Enable + * 0: Disabled. The GT64260 will not respond with + * AACK* to a new CPU transaction, before the + * previous transaction data phase completes. + * 1: Enabled. + * 14:14 Reserved + * 15:15 TADelay Transfer Acknowledge Delay + * 0: TA* is asserted one cycle after AACK* + * 1: TA* is asserted two cycles after AACK* + * 16:16 RdOOO Read Out of Order Completion + * 0: Not Supported, Data is always returned in + * order (DTI[0-2] is always driven + * 1: Supported + * 17:17 StopRetry Relevant only if PCI Retry is enabled + * 0: Keep Retry all PCI transactions targeted + * to the GT64260. + * 1: Stop Retry of PCI transactions. + * 18:18 MultiGTDec Multi-GT Address Decode + * 0: Normal address decoding + * 1: Multi-GT address decoding + * 19:19 DPValid CPU DP[0-7] Connection. CPU write parity ... + * 0: is not checked. (Not connected) + * 1: is checked (Connected) + * 21:20 Reserved + * 22:22 PErrProp Parity Error Propagation + * 0: GT64260 always drives good parity on + * DP[0-7] during CPU reads. + * 1: GT64260 drives bad parity on DP[0-7] in case + * the read response from the target interface + * comes with erroneous data indication + * (e.g. ECC error from SDRAM interface). + * 25:23 Reserved + * 26:26 APValid CPU AP[0-3] Connection. CPU address parity ... + * 0: is not checked. (Not connected) + * 1: is checked (Connected) + * 27:27 RemapWrDis Address Remap Registers Write Control + * 0: Write to Low Address decode register. + * Results in writing of the corresponding + * Remap register. + * 1: Write to Low Address decode register. No + * affect on the corresponding Remap register. + * 28:28 ConfSBDis Configuration Read Sync Barrier Disable + * 0: enabled; 1: disabled + * 29:29 IOSBDis I/O Read Sync Barrier Disable + * 0: enabled; 1: disabled + * 30:30 ClkSync Clocks Synchronization + * 0: The CPU interface is running with SysClk, + * which is asynchronous to TClk. + * 1: The CPU interface is running with TClk. + * 31:31 Reserved + */ +#define GT_CPUCfg_NoMatchCnt_GET(v) GT__EXT((v), 0, 8) +#define GT_CPUCfg_NoMatchCntEn GT__BIT( 9) +#define GT_CPUCfg_NoMatchCntExt GT__BIT(10) +#define GT_CPUCfg_AACKDelay GT__BIT(11) +#define GT_CPUCfg_Endianess GT__BIT(12) +#define GT_CPUCfg_Pipeline GT__BIT(13) +#define GT_CPUCfg_TADelay GT__BIT(15) +#define GT_CPUCfg_RdOOO GT__BIT(16) +#define GT_CPUCfg_StopRetry GT__BIT(17) +#define GT_CPUCfg_MultiGTDec GT__BIT(18) +#define GT_CPUCfg_DPValid GT__BIT(19) +#define GT_CPUCfg_PErrProp GT__BIT(22) +#define GT_CPUCfg_APValid GT__BIT(26) +#define GT_CPUCfg_RemapWrDis GT__BIT(27) +#define GT_CPUCfg_ConfSBDis GT__BIT(28) +#define GT_CPUCfg_IOSBDis GT__BIT(29) +#define GT_CPUCfg_ClkSync GT__BIT(30) + +/* + * Table 98: CPU Mode, Offset: 0x120, Read only + * 01:00 MultiGTID Multi-GT ID + * Represents the ID to which the GT64260 responds + * to during a multi-GT address decoding period. + * 02:02 MultiGT (0: Single; 1: Multiple) GT configuration + * 03:03 RetryEn (0: Don't; 1: Do) Retry PCI transactions + * 07:04 CPUType + * 0x0-0x3: Reserved + * 0x4: 64-bit PowerPC CPU, 60x bus + * 0x5: 64-bit PowerPC CPU, MPX bus + * 0x6-0xf: Reserved + * 31:08 Reserved + */ +#define GT_CPUMode_MultiGTID_GET(v) GT__EXT(v, 0, 2) +#define GT_CPUMode_MultiGT GT__BIT(2) +#define GT_CPUMode_RetryEn GT__BIT(3) +#define GT_CPUMode_CPUType_GET(v) GT__EXT(v, 4, 4) + +/* + * Table 99: CPU Master Control, Offset: 0x160 + * 07:00 Reserved + * 08:08 IntArb CPU Bus Internal Arbiter Enable + * NOTE: Only relevant to 60x bus mode. When + * running MPX bus, the GT64260 internal + * arbiter must be used. + * 0: Disabled. External arbiter is required. + * 1: Enabled. Use the GT64260 CPU bus arbiter. + * 09:09 IntBusCtl CPU Interface Unit Internal Bus Control + * NOTE: This bit must be set to 1. It is reserved + * for Galileo Technology usage. + * 0: Enable internal bus sharing between master + * and slave interfaces. + * 1: Disable internal bus sharing between master + * and slave interfaces. + * 10:10 MWrTrig Master Write Transaction Trigger + * 0: With first valid write data + * 1: With last valid write data + * 11:11 MRdTrig Master Read Response Trigger + * 0: With first valid read data + * 1: With last valid read data + * 12:12 CleanBlock Clean Block Snoop Transaction Support + * 0: CPU does not support clean block (603e,750) + * 1: CPU supports clean block (604e,G4) + * 13:13 FlushBlock Flush Block Snoop Transaction Support + * 0: CPU does not support flush block (603e,750) + * 1: CPU supports flush block (604e,G4) + * 31:14 Reserved + */ +#define GT_CPUMstrCtl_IntArb GT__BIT(8) +#define GT_CPUMstrCtl_IntBusCtl GT__BIT(9) +#define GT_CPUMstrCtl_MWrTrig GT__BIT(10) +#define GT_CPUMstrCtl_MRdTrig GT__BIT(11) +#define GT_CPUMstrCtl_CleanBlock GT__BIT(12) +#define GT_CPUMstrCtl_FlushBlock GT__BIT(13) + +#define GT_ArbSlice_SDRAM 0x0 /* SDRAM interface snoop request */ +#define GT_ArbSlice_DEVICE 0x1 /* Device request */ +#define GT_ArbSlice_NULL 0x2 /* NULL request */ +#define GT_ArbSlice_PCI0 0x3 /* PCI_0 access */ +#define GT_ArbSlice_PCI1 0x4 /* PCI_1 access */ +#define GT_ArbSlice_COMM 0x5 /* Comm unit access */ +#define GT_ArbSlice_IDMA0123 0x6 /* IDMA channels 0/1/2/3 access */ +#define GT_ArbSlice_IDMA4567 0x7 /* IDMA channels 4/5/6/7 access */ + /* 0x8-0xf: Reserved */ + +/* Pass in the slice number (from 0..16) as 'n' + */ +#define GT_XbarCtl_GET_ArbSlice(v, n) GT__EXT((v), (((n) & 7)*4, 4) + +/* + * Table 100: CPU Interface Crossbar Control Low, Offset: 0x150 + * 03:00 Arb0 Slice 0 of CPU Master pizza Arbiter + * 07:04 Arb1 Slice 1 of CPU Master pizza Arbiter + * 11:08 Arb2 Slice 2 of CPU Master pizza Arbiter + * 15:12 Arb3 Slice 3 of CPU Master pizza Arbiter + * 19:16 Arb4 Slice 4 of CPU Master pizza Arbiter + * 23:20 Arb5 Slice 5 of CPU Master pizza Arbiter + * 27:24 Arb6 Slice 6 of CPU Master pizza Arbiter + * 31:28 Arb7 Slice 7 of CPU Master pizza Arbiter + */ + +/* + * Table 101: CPU Interface Crossbar Control High, Offset: 0x158 + * 03:00 Arb8 Slice 8 of CPU Master pizza Arbiter + * 07:04 Arb9 Slice 9 of CPU Master pizza Arbiter + * 11:08 Arb10 Slice 10 of CPU Master pizza Arbiter + * 15:12 Arb11 Slice 11 of CPU Master pizza Arbiter + * 19:16 Arb12 Slice 12 of CPU Master pizza Arbiter + * 23:20 Arb13 Slice 13 of CPU Master pizza Arbiter + * 27:24 Arb14 Slice 14 of CPU Master pizza Arbiter + * 31:28 Arb15 Slice 15 of CPU Master pizza Arbiter + */ + +/* + * Table 102: CPU Interface Crossbar Timeout, Offset: 0x168 + * NOTE: Reserved for Galileo Technology usage. + * 07:00 Timeout Crossbar Arbiter Timeout Preset Value + * 15:08 Reserved + * 16:16 TimeoutEn Crossbar Arbiter Timer Enable + * (0: Enable; 1: Disable) + * 31:17 Reserved + */ + +/* + * Table 103: CPU Read Response Crossbar Control Low, Offset: 0x170 + * 03:00 Arb0 Slice 0 of CPU Slave pizza Arbiter + * 07:04 Arb1 Slice 1 of CPU Slave pizza Arbiter + * 11:08 Arb2 Slice 2 of CPU Slave pizza Arbiter + * 15:12 Arb3 Slice 3 of CPU Slave pizza Arbiter + * 19:16 Arb4 Slice 4 of CPU Slave pizza Arbiter + * 23:20 Arb5 Slice 5 of CPU Slave pizza Arbiter + * 27:24 Arb6 Slice 6 of CPU Slave pizza Arbiter + * 31:28 Arb7 Slice 7 of CPU Slave pizza Arbiter + */ +/* + * Table 104: CPU Read Response Crossbar Control High, Offset: 0x178 + * 03:00 Arb8 Slice 8 of CPU Slave pizza Arbiter + * 07:04 Arb9 Slice 9 of CPU Slave pizza Arbiter + * 11:08 Arb10 Slice 10 of CPU Slave pizza Arbiter + * 15:12 Arb11 Slice 11 of CPU Slave pizza Arbiter + * 19:16 Arb12 Slice 12 of CPU Slave pizza Arbiter + * 23:20 Arb13 Slice 13 of CPU Slave pizza Arbiter + * 27:24 Arb14 Slice 14 of CPU Slave pizza Arbiter + * 31:28 Arb15 Slice 15 of CPU Slave pizza Arbiter + */ + +/* + * Table 105: PCI_0 Sync Barrier Virtual Register, Offset: 0x0c0 + * Table 106: PCI_1 Sync Barrier Virtual Register, Offset: 0x0c8 + * NOTE: The read data is random and should be ignored. + * 31:00 SyncBarrier A CPU read from this register creates a + * synchronization barrier cycle. + */ + +/* + * Table 107: CPU Protect Address 0 Low, Offset: 0x180 + * Table 109: CPU Protect Address 1 Low, Offset: 0x190 + * Table 111: CPU Protect Address 2 Low, Offset: 0x1a0 + * Table 113: CPU Protect Address 3 Low, Offset: 0x1b0 + * Table 115: CPU Protect Address 4 Low, Offset: 0x1c0 + * Table 117: CPU Protect Address 5 Low, Offset: 0x1d0 + * Table 119: CPU Protect Address 6 Low, Offset: 0x1e0 + * Table 121: CPU Protect Address 7 Low, Offset: 0x1f0 + * + * 11:00 LowAddr CPU Protect Region Base Address + * Corresponds to address bits[31:20]. + * 15:12 Reserved. Must be 0 + * 16:16 AccProtect CPU Access Protect + * Access is (0: allowed; 1: forbidden) + * 17:17 WrProtect CPU Write Protect + * Writes are (0: allowed; 1: forbidden) + * 18:18 CacheProtect CPU caching protect. Caching (block read) + * is (0: allowed; 1: forbidden) + * 31:19 Reserved + */ +#define GT_CPU_AccProtect GT__BIT(16) +#define GT_CPU_WrProtect GT__BIT(17) +#define GT_CPU_CacheProtect GT__BIT(18) + +/* + * Table 108: CPU Protect Address 0 High, Offset: 0x188 + * Table 110: CPU Protect Address 1 High, Offset: 0x198 + * Table 112: CPU Protect Address 2 High, Offset: 0x1a8 + * Table 114: CPU Protect Address 3 High, Offset: 0x1b8 + * Table 116: CPU Protect Address 4 High, Offset: 0x1c8 + * Table 118: CPU Protect Address 5 High, Offset: 0x1d8 + * Table 120: CPU Protect Address 6 High, Offset: 0x1e8 + * Table 122: CPU Protect Address 7 High, Offset: 0x1f8 + * + * 11:00 HighAddr CPU Protect Region Top Address + * Corresponds to address bits[31:20] + * 31:12 Reserved + */ + +/* + * Table 123: Snoop Base Address 0, Offset: 0x380 + * Table 125: Snoop Base Address 1, Offset: 0x390 + * Table 127: Snoop Base Address 2, Offset: 0x3a0 + * Table 129: Snoop Base Address 3, Offset: 0x3b0 + * + * 11:00 LowAddr Snoop Region Base Address [31:20] + * 15:12 Reserved Must be 0. + * 17:16 Snoop Snoop Type + * 0x0: No Snoop + * 0x1: Snoop to WT region + * 0x2: Snoop to WB region + * 0x3: Reserved + * 31:18 Reserved + */ +#define GT_Snoop_GET(v) GT__EXT((v), 16, 2) +#define GT_Snoop_INS(v) GT__INS((v), 16) +#define GT_Snoop_None 0 +#define GT_Snoop_WT 1 +#define GT_Snoop_WB 2 + + +/* + * Table 124: Snoop Top Address 0, Offset: 0x388 + * Table 126: Snoop Top Address 1, Offset: 0x398 + * Table 128: Snoop Top Address 2, Offset: 0x3a8 + * Table 130: Snoop Top Address 3, Offset: 0x3b8 + * 11:00 HighAddr Snoop Region Top Address [31:20] + * 31:12 Reserved + */ + + +/* + * Table 131: CPU Error Address Low, Offset: 0x070, Read Only. + * In case of multiple errors, only the first one is latched. New error + * report latching is enabled only after the CPU Error Address Low register + * is being read. + * 31:00 ErrAddr Latched address bits [31:0] of a CPU + * transaction in case of: + * o illegal address (failed address decoding) + * o access protection violation + * o bad data parity + * o bad address parity + * Upon address latch, no new address are + * registered (due to additional error condition), + * until the register is being read. + */ + +/* + * Table 132: CPU Error Address High, Offset: 0x078, Read Only. + * Once data is latched, no new data can be registered (due to additional + * error condition), until CPU Error Low Address is being read (which + * implies, it should be the last being read by the interrupt handler). + * 03:00 Reserved + * 07:04 ErrPar Latched address parity bits in case + * of bad CPU address parity detection. + * 31:08 Reserved + */ +#define GT_CPUErrorAddrHigh_ErrPar_GET(v) GT__EXT((v), 4, 4) + +/* + * Table 133: CPU Error Data Low, Offset: 0x128, Read only. + * 31:00 PErrData Latched data bits [31:0] in case of bad data + * parity sampled on write transactions or on + * master read transactions. + */ + +/* + * Table 134: CPU Error Data High, Offset: 0x130, Read only. + * 31:00 PErrData Latched data bits [63:32] in case of bad data + * parity sampled on write transactions or on + * master read transactions. + */ + +/* + * Table 135: CPU Error Parity, Offset: 0x138, Read only. + * 07:00 PErrPar Latched data parity bus in case of bad data + * parity sampled on write transactions or on + * master read transactions. + * 31:10 Reserved + */ +#define GT_CPUErrorParity_PErrPar_GET(v) GT__EXT((v), 0, 8) + +/* + * Table 136: CPU Error Cause, Offset: 0x140 + * Bits[7:0] are clear only. A cause bit is set upon an error condition + * occurrence. Write a 0 value to clear the bit. Writing a 1 value has + * no affect. + * 00:00 AddrOut CPU Address Out of Range + * 01:01 AddrPErr Bad Address Parity Detected + * 02:02 TTErr Transfer Type Violation. + * The CPU attempts to burst (read or write) to an + * internal register. + * 03:03 AccErr Access to a Protected Region + * 04:04 WrErr Write to a Write Protected Region + * 05:05 CacheErr Read from a Caching protected region + * 06:06 WrDataPErr Bad Write Data Parity Detected + * 07:07 RdDataPErr Bad Read Data Parity Detected + * 26:08 Reserved + * 31:27 Sel Specifies the error event currently being + * reported in Error Address, Error Data, and + * Error Parity registers. + * 0x0: AddrOut + * 0x1: AddrPErr + * 0x2: TTErr + * 0x3: AccErr + * 0x4: WrErr + * 0x5: CacheErr + * 0x6: WrDataPErr + * 0x7: RdDataPErr + * 0x8-0x1f: Reserved + */ +#define GT_CPUError_AddrOut GT__BIT(GT_CPUError_Sel_AddrOut) +#define GT_CPUError_AddrPErr GT__BIT(GT_CPUError_Sel_AddrPErr) +#define GT_CPUError_TTErr GT__BIT(GT_CPUError_Sel_TTErr) +#define GT_CPUError_AccErr GT__BIT(GT_CPUError_Sel_AccErr) +#define GT_CPUError_WrErr GT__BIT(GT_CPUError_Sel_WrPErr) +#define GT_CPUError_CacheErr GT__BIT(GT_CPUError_Sel_CachePErr) +#define GT_CPUError_WrDataPErr GT__BIT(GT_CPUError_Sel_WrDataPErr) +#define GT_CPUError_RdDataPErr GT__BIT(GT_CPUError_Sel_RdDataPErr) + +#define GT_CPUError_Sel_AddrOut 0 +#define GT_CPUError_Sel_AddrPErr 1 +#define GT_CPUError_Sel_TTErr 2 +#define GT_CPUError_Sel_AccErr 3 +#define GT_CPUError_Sel_WrErr 4 +#define GT_CPUError_Sel_CacheErr 5 +#define GT_CPUError_Sel_WrDataPErr 6 +#define GT_CPUError_Sel_RdDataPErr 7 + +#define GT_CPUError_Sel_GET(v) GT__EXT((v), 27, 5) + +/* + * Table 137: CPU Error Mask, Offset: 0x148 + * 00:00 AddrOut If set to 1, enables AddrOut interrupt. + * 01:01 AddrPErr If set to 1, enables AddrPErr interrupt. + * 02:02 TTErr If set to 1, enables TTErr interrupt. + * 03:03 AccErr If set to 1, enables AccErr interrupt. + * 04:04 WrErr If set to 1, enables WrErr interrupt. + * 05:05 CacheErr If set to 1, enables CacheErr interrupt. + * 06:06 WrDataPErr If set to 1, enables WrDataPErr interrupt. + * 07:07 RdDataPErr If set to 1, enables RdDataPErr interrupt. + * 31:08 Reserved + */ + +/* Comm Unit Arbiter Control */ +#define GT_CommUnitArb_Ctrl 0xf300 /**/ +/* + * Comm Unit Interrupt registers + */ +#define GT_CommUnitIntr_Cause 0xf310 +#define GT_CommUnitIntr_Mask 0xf314 +#define GT_CommUnitIntr_ErrAddr 0xf318 + +#define GT_CommUnitIntr_E0 0x00000007 +#define GT_CommUnitIntr_E1 0x00000070 +#define GT_CommUnitIntr_E2 0x00000700 +#define GT_CommUnitIntr_S0 0x00070000 +#define GT_CommUnitIntr_S1 0x00700000 +#define GT_CommUnitIntr_Sel 0x70000000 + +/* + * SDRAM Error Report (ECC) Registers + */ +#define GT_ECC_Data_Lo 0x484 /* latched Error Data (low) */ +#define GT_ECC_Data_Hi 0x480 /* latched Error Data (high) */ +#define GT_ECC_Addr 0x490 /* latched Error Address */ +#define GT_ECC_Rec 0x488 /* latched ECC code from SDRAM */ +#define GT_ECC_Calc 0x48c /* latched ECC code from SDRAM */ +#define GT_ECC_Ctl 0x494 /* ECC Control */ +#define GT_ECC_Count 0x498 /* ECC 1-bit error count */ + +/* + * Watchdog Registers + */ +#define GT_WDOG_Config 0xb410 +#define GT_WDOG_Value 0xb414 +#define GT_WDOG_Value_NMI GT__MASK(24) +#define GT_WDOG_Config_Preset GT__MASK(24) +#define GT_WDOG_Config_Ctl1a GT__BIT(24) +#define GT_WDOG_Config_Ctl1b GT__BIT(25) +#define GT_WDOG_Config_Ctl2a GT__BIT(26) +#define GT_WDOG_Config_Ctl2b GT__BIT(27) +#define GT_WDOG_Config_Enb GT__BIT(31) + +#define GT_WDOG_NMI_DFLT (GT__MASK(24) & GT_WDOG_Value_NMI) +#define GT_WDOG_Preset_DFLT (GT__MASK(22) & GT_WDOG_Config_Preset) + +/* + * Device Bus Interrupts + */ +#define GT_DEVBUS_ICAUSE 0x4d0 /* Device Interrupt Cause */ +#define GT_DEVBUS_IMASK 0x4d4 /* Device Interrupt Mask */ +#define GT_DEVBUS_ERR_ADDR 0x4d8 /* Device Error Address */ + +/* + * bit defines for GT_DEVBUS_ICAUSE, GT_DEVBUS_IMASK + */ +#define GT_DEVBUS_DBurstErr GT__BIT(0) +#define GT_DEVBUS_DRdyErr GT__BIT(1) +#define GT_DEVBUS_Sel GT__BIT(27) +#define GT_DEVBUS_RES ~(GT_DEVBUS_DBurstErr|GT_DEVBUS_DRdyErr|GT_DEVBUS_Sel) + +/* TWSI Interface - TWSI Interface Registers */ +#define TWSI_SLV_ADDR 0xc000 +#define TWSI_EXT_SLV_ADDR 0xc010 +#define TWSI_DATA 0xc004 +#define TWSI_CTRL 0xc008 +#define TWSI_STATUS 0xc00c +#define TWSI_BAUDE_RATE 0xc00c +#define TWSI_SFT_RST 0xc01c + +/* Interrupt Controller - Interrupt Controller Registers */ +/* Section 25.2 : Table 734 */ + +#define GT_MAIN_INT_CAUSE_LO 0xc18 /* read Only */ +#define GT_MAIN_INT_CAUSE_HI 0xc68 /* read Only */ +#define GT_CPU_INT_MASK_LO 0xc1c +#define GT_CPU_INT_MASK_HI 0xc6c +#define GT_CPU_SEL_CAUSE 0xc70 /* read Only */ +#define GT_PCI0_INT_MASK_LO 0xc24 +#define GT_PCI0_INT_MASK_HI 0xc64 +#define GT_PCI0_SEL_CAUSE 0xc74 /* read Only */ +#define GT_PCI1_INT_MASK_LO 0xca4 +#define GT_PCI1_INT_MASK_HI 0xce4 +#define GT_PCI1_SEL_CAUSE 0xcf4 /* read Only */ +#define GT_CPU_INT0_MASK 0xe60 +#define GT_CPU_INT1_MASK 0xe64 +#define GT_CPU_INT2_MASK 0xe68 +#define GT_CPU_INT3_MASK 0xe6c + +#endif /* !_DISCOVERY_DEV_GTREG_H */ diff --git a/c/src/lib/libbsp/powerpc/mvme5500/LICENSE b/c/src/lib/libbsp/powerpc/mvme5500/LICENSE new file mode 100644 index 0000000000..0e7182016e --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/LICENSE @@ -0,0 +1,112 @@ + + EPICS Open License Terms + + The following is derived from the EPICS Open software license + agreement which applies to many of the unbundled EPICS extensions + and support modules. + + -------------------------------------------------------------- + + Copyright © 2004, Brookhaven National Laboratory and + Shuchen K. Feng + + The "RTEMS-MVME5500 Board Support Package" is distributed + subject to the following license conditions: + + SOFTWARE LICENSE AGREEMENT + Software: RTEMS-MVME5500 Board Support Package (BSP) + + 1. The "Software", below, refers to the aforementioned Board Support + package (in either source code, or binary form and accompanying + documentation) + + Each licensee is addressed as "you" or "Licensee." + + 1a.Part of the software was derived from the "RTEMS-PowerPC + BSPs", "NetBSD Project by Allegro Networks, Inc., and + Wasabi Systems, In.". The original Copyrights pertaining to + these items are contained in the individual source files, + and they are covered by their own License. + 2. The copyright holders shown above and their third-party + licensors hereby grant Licensee a royalty-free nonexclusive + license, subject to the limitations stated herein and U.S. + Government license rights. + 3. You may modify and make a copy or copies of the Software for use + within your organization, if you meet the following conditions: + a. Copies in source code must include the copyright notice + and this Software License Agreement. + b. Copies in binary form must include the copyright notice + and this Software License Agreement in the documentation + and/or other materials provided with the copy. + + 4. You may modify a copy or copies of the Software or any portion + of it, thus forming a work based on the Software, and distribute + copies of such work outside your organization, if you meet all + of the following conditions: + a. Copies in source code must include the copyright notice + and this Software License Agreement; + b. Copies in binary form must include the copyright notice + and this Software License Agreement in the documentation + and/or other materials provided with the copy; + c. Modified copies and works based on the Software must carry + prominent notices stating that you changed specified + portions of the Software. + + 5. Portions of the Software resulted from work developed under a + U.S. Government contract and are subject to the following + license: the Government is granted for itself and others acting + on its behalf a paid-up, nonexclusive, irrevocable worldwide + license in this computer software to reproduce, prepare + derivative works, and perform publicly and display publicly. + 6. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT + WARRANTY OF ANY KIND. THE COPYRIGHT HOLDERS, THEIR THIRD PARTY + LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF + ENERGY, AND THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED + WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, + TITLE OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY + OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS + OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF THE SOFTWARE + WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4) DO NOT WARRANT + THAT THE SOFTWARE WILL FUNCTION UNINTERRUPTED, THAT IT IS + ERROR-FREE OR THAT ANY ERRORS WILL BE CORRECTED. + 7. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT HOLDERS, + THEIR THIRD PARTY LICENSORS, THE UNITED STATES, THE UNITED + STATES DEPARTMENT OF ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR + ANY INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE + DAMAGES OF ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS + OF PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER + SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT + (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, EVEN + IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE POSSIBILITY OF + SUCH LOSS OR DAMAGES. + + Brookhaven National Laboratory Notice + ************************************* + + Acknowledgment of sponsorship + - - - - - - - - - - - - - - - - + This software was produced by the National Synchrotron Light Source, + Brookhaven National Laboratory, under Contract DE-AC02-98CH10886 with + the Department of Energy. + + Government disclaimer of liability + - - - - - - - - - - - - - - - - - + Neither the United States nor the United States Department of Energy, + nor any of their employees, makes any warranty, express or implied, + or assumes any legal liability or responsibility for the accuracy, + completeness, or usefulness of any data, apparatus, product, or process + disclosed, or represents that its use would not infringe privately + owned rights. + + Brookhaven disclaimer of liability + - - - - - - - - - - - - - - - - - + Brookhaven National Laboratory makes no representations or warranties, + express or implied, nor assumes any liability for the use of this software. + + Maintenance of notice + - - - - - - - - - - - + In the interest of clarity regarding the origin and status of this + software, Brookhaven National Laboratory requests that any recipient of + it maintain this notice affixed to any distribution by the recipient that + contains a copy or derivative of this software. diff --git a/c/src/lib/libbsp/powerpc/mvme5500/Makefile.am b/c/src/lib/libbsp/powerpc/mvme5500/Makefile.am new file mode 100644 index 0000000000..b2660b6318 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/Makefile.am @@ -0,0 +1,17 @@ +## +## Makefile.am,v 1.8.4.1 2003/02/20 21:55:34 joel Exp +## + +ACLOCAL_AMFLAGS = -I ../../../../../../aclocal + +# wrapup is the one that actually builds and installs the library +# from the individual .rel files built in other directories +SUBDIRS = include clock console pci irq tod vectors start \ + startup GT64260 network @exceptions@ vme wrapup + +include $(top_srcdir)/../../bsp.am + +EXTRA_DIST = README bsp_specs ChangeLog.1 + +include $(top_srcdir)/../../../../../../automake/subdirs.am +include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/lib/libbsp/powerpc/mvme5500/README b/c/src/lib/libbsp/powerpc/mvme5500/README new file mode 100644 index 0000000000..ed927235c1 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/README @@ -0,0 +1,105 @@ +# +# $Id: README,v 1.1 Shuchen Kate Feng, NSLS, BNL (10/10/04) +# + +BSP NAME: mvme5500 +BOARD: MVME5500 by Motorola +BUS: PCI +CPU FAMILY: ppc +CPU: MPC7455 @ 1GHZ +COPROCESSORS: N/A +MODE: 32/64 bit mode (support 32 bit for now) +DEBUG MONITOR: MOTLoad +SYSTEM CONTROLLER: GT64260B + +OTHER README FILES: README.booting,README.rtems-4.6.0-patch,README.VME, + README.irq + +PERIPHERALS +=========== +TIMERS: Eight, 32 bit programmable +SERIAL PORTS: 2 NS 16550 on GT64260B +REAL-TIME CLOCK: MK48T37V +32K NVSRAM: MK48T37V +WATCHDOG TIMER: use the one in GT-64260B +DMA: 8 channel DMA controller (GT-64260B) +VIDEO: none +NETWORKING: Port 1: Intel 82544EI Gigabit Ethernet Controller + 10/100/1000Mb/s routed to front panel RJ-45 + Port 2: 10/100 Mb ethernet unit integrated on the + Marvell's GT64260 system controller + +DRIVER INFORMATION +================== +CLOCK DRIVER: PPC internal +IOSUPP DRIVER: N/A +SHMSUPP: N/A +TIMER DRIVER: PPC internal +TTY DRIVER: PPC internal + +STDIO +===== +PORT: Console port 0 +ELECTRICAL: na +BAUD: na +BITS PER CHARACTER: na +PARITY: na +STOP BITS: na + + +Jumpers +======= + +1) The BSP is tested with the 60x bus mode instead of the MPX bus mode. + ( No jumper or a jumper across pins 1-2 on J19 selects the 60x bus mode) + +2) On the mvme5500 board, Ethernet 1 is the Gigabit Ethernet port and is + front panel only. Ethernet 2 is 10/100 BaseT Ethernet. For front-panel + Ethernet2, install jumpers across pins 1-2 on all J6, J7, J100 and + J101 headers. + +3) Enable SROM initialization at startup. (No jumper or a jumper across + pins 1-2 on J17) + +In fact, (if I did not miss anything) the mvme5500 board should function +properly if one keeps all the jumpers at factory configuration. +One can leave out the jumper on J30 to disable EEPROM programming. + +Notes +===== + +BSP BAT usage +---------------------- +DBAT0 and IBAT0 +0x00000000 +0x0fffffff 1st 256M, for MEMORY access (caching enabled) + +DBAT1 and IBAT1 +0x00000000 +0x0fffffff 2nd 256M, for MEMORY access (caching enabled) + +UPDATE: (2004/5). +The BSP now uses page tables for mapping the entire 512MB +of RAM. DBAT0 and DBAT1 is hence free for use by the +application. A simple 1:1 (virt<->phys) mapping is employed. +The BSP write-protects the text and read-only data +areas of the application. Special acknowledgement to Till +Straumann for providing inputs in +porting the memory protection software he wrote (BSP_pgtbl_xxx()) +to MVME5500. + + +The default VME configuration uses DBAT0 to map +more PCI memory space for use by the universe VME +bridge: + +DBAT0 +0x90000000 PCI memory space <-> VME +0x9fffffff + +Port VME-Addr Size PCI-Adrs Mode: +0: 0x20000000 0x0F000000 0x90000000 A32, Dat, Sup +1: 0x00000000 0x00FF0000 0x9F000000 A24, Dat, Sup +2: 0x00000000 0x00010000 0x9FFF0000 A16, Dat, Sup + + diff --git a/c/src/lib/libbsp/powerpc/mvme5500/README.VME b/c/src/lib/libbsp/powerpc/mvme5500/README.VME new file mode 100644 index 0000000000..7312f682eb --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/README.VME @@ -0,0 +1,19 @@ +README.VME: written by S. Kate Feng , 7/22/04 + + +Some VME modules(e.g. Oms58 motor controller) might require a PCI sync +command following the out_xx() function (e.g. out_be16()) if mvme5500 is +used as the SBC. The mechanism is a hardware hook to help software +synchronize between the CPU and PCI activities. The PCI sync is +implemented in pci/pci_interface.c. For more example of the usage,one +can refrence the drvOMS58.cc file that is posted in synAppRTEMS of +http://www.nsls.bnl.gov/organization/UserScience/Detectors/Software/Default.htm. + + +In spite of the PCI sync overhead for the Oms58 motor controller, I do +not see the runtime performance of RTEMS-mvme5500 being compromised as +compared with that of RTEMS-mvme2307. For example, it takes the same +time to run motor_init() of synAppRTEMS for 48 motor initializations +running either RTEMS-mvme2307 or RTEMS-mvme5500. + + diff --git a/c/src/lib/libbsp/powerpc/mvme5500/README.booting b/c/src/lib/libbsp/powerpc/mvme5500/README.booting new file mode 100644 index 0000000000..4a33d7fcc7 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/README.booting @@ -0,0 +1,62 @@ +README.booting: written by S. Kate Feng , 2004/10/11 + +The bootloader is adapted from Till Straumann's Generic Mini-loader, +which he wrote originally for the SVGM powerpc board. Part of the +BSP was derived from the "RTEMS-PowerPC BSPs" and the NetBSD projects. +As of today, the BSP is built and tested on the RTEMS-4.6.0 +release with small patches I added (see README.rtems-4.6.0-patch +and rtems-4.6.0-patch/ directory). + + +Booting requirement : +------------------------- + +1) One needs to setup BOOTP/DHCP and TFTP servers and /etc/bootptab + properly to boot the system. (Note : EPICS needs a NTP server). + +2) Please copy the prebuilt RTEMS binary (e.g. misc/rtems5500-cexp.bin) + and perhaps others (e.g. misc/st.sys) to the /tftpboot/epics/hostname/bin/ + directory or the TFTPBOOT one you specified in the 'tftpGet' + command of the boot script (as shown in the following example). + +3) Example of the boot script setup carried out on the MOTLoad + command line : + +MVME5500> gevEdit mot-script-boot +(Blank line terminates input.) +tftpGet -a4000000 -cxx.xx.xx.xx -sxx.xx.xx.xx -m255.255.254.0 -d/dev/enet0 -fepics/hostname/bin/rtems5500-cexp.bin +netShut +go -a4000000 + + +Update Global Environment Area of NVRAM (Y/N) ? Y +MVME5500> + +Note : (cxx.xx.xx.xx is the client IP address and + sxx.xx.xx.xx is the server IP address) + +4) Other reference web sites: +http://lansce.lanl.gov/EPICS/presentations/KateFeng%20RTEMS-mvme55001.ppt + +5) When generating code (especially C++) for this system, one should + use at least gcc-3.2 (preferrably a copy downloaded from the RTEMS + site [snapshot area] ) + +6) To reboot the RTEMS-MVME5500 (board reset), one can invoke the + rtemsReboot() command at Cexp> prompt. + +7) Please reference http://www.slac.stanford.edu/~strauman/rtems +for the source code and installation guidance of cexp, GeSys and +other useful utilities such as telnet, nfs, and so on. + +8) To get started with RTEMS/EPICS and to build development +tools and BSP, I would recommend one to reference +http://www.aps.anl.gov/epics/base/RTEMS/tutorial/ +in additional to the RTEMS document. + + +TODO lists: +1) 1 GHZ ethernet ( work in progress, to be released soon) +2) To measure the interrupt latency and context switching. +3) To implement the watchdog timer. + diff --git a/c/src/lib/libbsp/powerpc/mvme5500/README.irq b/c/src/lib/libbsp/powerpc/mvme5500/README.irq new file mode 100644 index 0000000000..3ebf672b3f --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/README.irq @@ -0,0 +1,52 @@ +README.irq : Shuchen Kate Feng , 10/10/04 + + +The BSPirqPrioTable[] listed in irq_init.c is where the +software developers can change the levels of priority +for main interrupts based on the need of their +applications. + + +Presently, a dynamic IRQ table (e.g. mainIrqTbl[64]), which is +arranged dynamically based on the priority levels of enabled +main interrupts, is used in C_dispatch_irq_handler() to +incorporate the handling of the software priority levels. + + +The valid entries listed in mainIrqTbl[64] by the BSP are: + +1. Main interrupt 59 (GPP31_24 : no enabled IRQ yet, + to enable 'watchdog timer' if needed) +2. Main interrupt 57 (GPP15_8 : VME interrupt enabled, + to enable 'PMC1' if needed) +3. Main interrupt 58 (GPP23_16 : no enabled IRQ yet, + to enable '1 GHZ ethernet' or 'PMC2' + if needed) +4. Main interrupt 32 (10/100 MHZ ethernet) +5. Main interrupt 56 (GPP7_0 : presently only COM1/COM2 enabled) + + +The main IRQs can be added to the mainIrqTbl[] dynamically +via the BSP_enable_main_irq(), or removed from the mainIrqTbl[] +dynamically via the BSP_disable_main_irq(). + + +Regarding other GPP interrupts not listed in the GPP7_0IrqTbl[8], +GPP15_8IrqTbl[8], GPP23_16IrqTbl[8], or GPP31_24IrqTbl[8], they +could be enabled by being added to the correspondent of +the four aforementioned tables listed in the irq_init.c. + + +Caveat: Presently, the eight GPP IRQs for each BSP_MAIN_GPPx_y_IRQ group +are set at the same main priority in the BSPirqPrioTable[], while the +sub-priority levels for the eight GPP in each group are sorted +statically by developers in the GPPx_yIrqTbl[8] from the highest +priority to the lowest one. + + +Note : +1. GPP7-0 (Main interrupt high cause, bit 24) +2. GPP15-8 (Main interrupt high cause, bit 25) +3. GPP23-16 (Main interrupt high cause, bit 26) +4. GPP31-24 (Main interrupt high cause, bit 27) + diff --git a/c/src/lib/libbsp/powerpc/mvme5500/bsp_specs b/c/src/lib/libbsp/powerpc/mvme5500/bsp_specs new file mode 100644 index 0000000000..a8e84b70bc --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/bsp_specs @@ -0,0 +1,25 @@ +%rename cpp old_cpp +%rename lib old_lib +%rename endfile old_endfile +%rename startfile old_startfile +%rename link old_link + +*cpp: +%(old_cpp) %{qrtems: -D__embedded__ -DUSE_ENHANCED_INTR_API} -Asystem(embedded) + +*lib: +%{!qrtems: %(old_lib)} %{!nostdlib: %{qrtems: --start-group \ +%{!qrtems_debug: -lrtemsbsp -lrtemscpu} %{qrtems_debug: -lrtemsbsp_g -lrtemscpu_g} \ +-lc -lgcc --end-group \ +%{!qnolinkcmds: -T linkcmds%s}}} + +*startfile: +%{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s \ +%{!qrtems_debug: mvme5500start.o%s} \ +%{qrtems_debug: mvme5500start_g.o%s}}} + +*link: +%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -e __rtems_entry_point -u __vectors} + +*endfile: +%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s} diff --git a/c/src/lib/libbsp/powerpc/mvme5500/clock/Makefile.am b/c/src/lib/libbsp/powerpc/mvme5500/clock/Makefile.am new file mode 100644 index 0000000000..560f4b8edf --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/clock/Makefile.am @@ -0,0 +1,24 @@ +## +## Makefile.am,v 1.6 2002/12/17 15:10:31 ralf Exp +## + + +VPATH = @srcdir@:@srcdir@/../../shared/clock + +C_FILES = p_clock.c +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) + +OBJS = $(C_O_FILES) + +include $(top_srcdir)/../../../../../../automake/compile.am +include $(top_srcdir)/../../../../../../automake/lib.am + +# +# (OPTIONAL) Add local stuff here using += +# + +# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile + +all-local: $(ARCH) $(OBJS) + +include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/lib/libbsp/powerpc/mvme5500/clock/Makefile.in b/c/src/lib/libbsp/powerpc/mvme5500/clock/Makefile.in new file mode 100644 index 0000000000..b83e0eadca --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/clock/Makefile.in @@ -0,0 +1,503 @@ +# Makefile.in generated by automake 1.7.2 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ + +VPATH = @srcdir@:@srcdir@/../../shared/clock +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ + +AR = @AR@ + +# OBSOLETE: Don't use +AS = $(CC) +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BARE_CPU_CFLAGS = @BARE_CPU_CFLAGS@ +BARE_CPU_MODEL = @BARE_CPU_MODEL@ + +CC = @CC@ $(GCCSPECS) + +CCAS = $(CC) +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @RTEMS_CFLAGS@ $(XCFLAGS) +CFLAGS_DEBUG_V = @CFLAGS_DEBUG_V@ +CFLAGS_OPTIMIZE_V = @CFLAGS_OPTIMIZE_V@ +CFLAGS_PROFILE_V = @CFLAGS_PROFILE_V@ +CPP = @CPP@ $(GCCSPECS) + +CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES) $(XCPPFLAGS) + +CPU_CFLAGS = @CPU_CFLAGS@ +CYGPATH_W = @CYGPATH_W@ + +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ENDIF = @ENDIF@ +EXEEXT = @EXEEXT@ +GCC_SPECS = @GCC_SPECS@ +HAS_MP = @HAS_MP@ +HAS_NETWORKING = @HAS_NETWORKING@ +HAS_NETWORKING_FALSE = @HAS_NETWORKING_FALSE@ +HAS_NETWORKING_TRUE = @HAS_NETWORKING_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKE = @MAKE@ +MAKEINFO = @MAKEINFO@ +MULTILIB_FALSE = @MULTILIB_FALSE@ +MULTILIB_TRUE = @MULTILIB_TRUE@ +NM = @NM@ +OBJCOPY = @OBJCOPY@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKHEX = @PACKHEX@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PROJECT_INCLUDE = @PROJECT_INCLUDE@ +PROJECT_RELEASE = @PROJECT_RELEASE@ +PROJECT_ROOT = @PROJECT_ROOT@ +PROJECT_TOPdir = @PROJECT_TOPdir@ +RANLIB = @RANLIB@ +RTEMS_BSP = @RTEMS_BSP@ +RTEMS_BSP_FAMILY = @RTEMS_BSP_FAMILY@ +RTEMS_BSP_SPECS = @RTEMS_BSP_SPECS@ +RTEMS_CFLAGS = @RTEMS_CFLAGS@ +RTEMS_CPPFLAGS = @RTEMS_CPPFLAGS@ +RTEMS_CPU = @RTEMS_CPU@ +RTEMS_CPU_MODEL = @RTEMS_CPU_MODEL@ +RTEMS_HAS_NETWORKING = @RTEMS_HAS_NETWORKING@ +RTEMS_HOST = @RTEMS_HOST@ +RTEMS_ROOT = @RTEMS_ROOT@ +RTEMS_TOPdir = @RTEMS_TOPdir@ +RTEMS_USE_GCC_FALSE = @RTEMS_USE_GCC_FALSE@ +RTEMS_USE_GCC_TRUE = @RTEMS_USE_GCC_TRUE@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIZE = @SIZE@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__include = @am__include@ +am__quote = @am__quote@ +bindir = @bindir@ +bsplibdir = @bsplibdir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exceptions = @exceptions@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ + +C_FILES = p_clock.c +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) + +OBJS = $(C_O_FILES) + +@RTEMS_USE_GCC_TRUE@GCCSPECS = $(GCC_SPECS) $(RTEMS_BSP_SPECS) +# CXXFLAGS = @RTEMS_CXXFLAGS@ $(XCXXFLAGS) +CXXFLAGS = @RTEMS_CFLAGS@ $(XCXXFLAGS) +ASFLAGS = $(CPU_ASFLAGS) $(CPU_CFLAGS) $(XASFLAGS) + +LINK_LIBS = $(LD_LIBS) + + +# +# Client compiler and support tools +# + +# +# How to compile stuff into ${ARCH} subdirectory +# +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + + +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + +CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) +ASCOMPILE = $(AS) $(AM_ASFLAGS) $(ASFLAGS) + + +# Dependency files for use by gmake +# NOTE: we don't put them into $(ARCH) +# so that 'make clean' doesn't blow it away +DEPEND = Depends-${ARCH} + + +# spell out all the LINK_FILE's, rather than using -lbsp, so +# that $(LINK_FILES) can be a dependency +LINK_OBJS = \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +LINK_FILES = \ + $(START_FILE) \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +VARIANT = OPTIMIZE + +VARIANT_OPTIMIZE_V = OPTIMIZE +VARIANT_DEBUG_V = DEBUG +VARIANT_PROFILE_V = PROFILE +VARIANT_optimize_V = OPTIMIZE +VARIANT_debug_V = DEBUG +VARIANT_profile_V = PROFILE + +VARIANT_V = $(VARIANT_$(VARIANT)_V) + +ARCH_OPTIMIZE_V = o-optimize +ARCH_DEBUG_V = o-debug +ARCH_PROFILE_V = o-profile + +ARCH__V = $(ARCH_OPTIMIZE_V) +ARCH = $(ARCH_$(VARIANT_V)_V) + +LIBSUFFIX_OPTIMIZE_V = +LIBSUFFIX_DEBUG_V = _g +LIBSUFFIX_PROFILE_V = _p +LIBSUFFIX__V = $(LIBSUFFIX_OPTIMIZE_V) + +LIB_VARIANT = $(LIBSUFFIX_$(VARIANT_V)_V) +CFLAGS__V = $(CFLAGS_OPTIMIZE_V) + +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_OPTIMIZE_V = +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_DEBUG_V = -qrtems_debug -Wno-unused +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_PROFILE_V = -pg + +RTEMS_CFLAGS__V = $(RTEMS_CFLAGS_OPTIMIZE_V) +CXX = @CXX@ $(GCCSPECS) + +AM_CPPFLAGS = $(RTEMS_CPPFLAGS) +AM_CFLAGS = +AM_CXXFLAGS = +AM_CCASFLAGS = $(CPU_CFLAGS) $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS) + +ARFLAGS = ruv + +TMPINSTALL_FILES = $(PROJECT_RELEASE)/lib + +PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools +subdir = clock +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/bspopts.tmp +CONFIG_CLEAN_FILES = +DIST_SOURCES = +DIST_COMMON = $(top_srcdir)/../../../../../../automake/compile.am \ + $(top_srcdir)/../../../../../../automake/lib.am \ + $(top_srcdir)/../../../../../../automake/local.am Makefile.am \ + Makefile.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/../../../../../../automake/compile.am $(top_srcdir)/../../../../../../automake/lib.am $(top_srcdir)/../../../../../../automake/local.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign clock/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + $(mkinstalldirs) $(distdir)/../../../../../../../automake + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile all-local + +installdirs: + +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-local mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am all-local check check-am clean clean-generic \ + clean-local distclean distclean-generic distdir dvi dvi-am info \ + info-am install install-am install-data install-data-am \ + install-exec install-exec-am install-info install-info-am \ + install-man install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ + uninstall-am uninstall-info-am + +@RTEMS_USE_GCC_FALSE@include $(CONFIG.CC) + +${ARCH}/%.o: %.c + ${COMPILE} -o $@ -c $< + +${ARCH}/%.o: %.cc + ${CXXCOMPILE} -o $@ -c $< + +${ARCH}/%.o: %.S + ${CCASCOMPILE} -DASM -o $@ -c $< + +# We deliberately don't have anything depend on the +# $(DEPEND) file; otherwise it will get rebuilt even +# on 'make clean' +# + +@RTEMS_USE_GCC_TRUE@depend-gcc: $(C_FILES) $(CC_FILES) $(S_FILES) +@RTEMS_USE_GCC_TRUE@ $(COMPILE) -M $^ | \ +@RTEMS_USE_GCC_TRUE@ sed -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \ +@RTEMS_USE_GCC_TRUE@ -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp +@RTEMS_USE_GCC_TRUE@ mv $(DEPEND).tmp $(DEPEND) + +# pull in dependencies if they exist +@RTEMS_USE_GCC_TRUE@ifeq (${DEPEND},$(wildcard ${DEPEND})) +@RTEMS_USE_GCC_TRUE@include ${DEPEND} +@RTEMS_USE_GCC_TRUE@@ENDIF@ +depend: depend-am + +@RTEMS_USE_GCC_TRUE@define make-rel +@RTEMS_USE_GCC_TRUE@ $(LINK) -qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) $^ +@RTEMS_USE_GCC_TRUE@endef +@RTEMS_USE_GCC_FALSE@define make-rel +@RTEMS_USE_GCC_FALSE@ $(LINK) $(XLDFLAGS) $^ +@RTEMS_USE_GCC_FALSE@endef + +${ARCH}: + mkdir ${ARCH} + +clean-local: + $(RM) -r o-optimize o-debug o-profile $(CLEANDIRS) + $(RM) Depends-o-optimize.tmp Depends-o-debug.tmp Depends-o-profile.tmp + +define make-library +test -d $(ARCH) || mkdir $(ARCH) +$(RM) $@ +$(AR) $(ARFLAGS) $@ $^ +$(RANLIB) $@ +endef + +$(PROJECT_RELEASE)/lib: + @$(mkinstalldirs) $@ + +.PRECIOUS: $(LIB) + +# +# (OPTIONAL) Add local stuff here using += +# + +# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile + +all-local: $(ARCH) $(OBJS) + +debug: + @echo + @echo "\"make debug\" is obsolete, instead use:" + @echo " make VARIANT=DEBUG" + @echo + +.PHONY: debug + +profile: + @echo + @echo "\"make profile\" is obsolete, instead use:" + @echo " make VARIANT=PROFILE" + @echo + +.PHONY: profile + +preinstall-am: $(PREINSTALL_FILES) +preinstall: preinstall-am +.PHONY: preinstall preinstall-am + +depend-am: depend-gcc +depend: depend-am +.PHONY: depend depend-am depend-gcc +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/c/src/lib/libbsp/powerpc/mvme5500/configure b/c/src/lib/libbsp/powerpc/mvme5500/configure new file mode 100644 index 0000000000..8c80da7b41 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/configure @@ -0,0 +1,5586 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.57 for rtems-c-src-lib-libbsp-powerpc-mvme5500 4.6.2. +# +# Report bugs to . +# +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME='rtems-c-src-lib-libbsp-powerpc-mvme5500' +PACKAGE_TARNAME='rtems-c-src-lib-libbsp-powerpc-mvme5500' +PACKAGE_VERSION='4.6.2' +PACKAGE_STRING='rtems-c-src-lib-libbsp-powerpc-mvme5500 4.6.2' +PACKAGE_BUGREPORT='rtems-bugs@OARcorp.com' + +ac_unique_file="bsp_specs" +ac_default_prefix=/opt/rtems-4.6 +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAKE ENDIF RTEMS_TOPdir PROJECT_TOPdir PROJECT_ROOT build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os RTEMS_CPU INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CPU_CFLAGS CFLAGS_OPTIMIZE_V CFLAGS_DEBUG_V CFLAGS_PROFILE_V RTEMS_BSP_FAMILY RTEMS_CPU_MODEL RTEMS_BSP RTEMS_BSP_SPECS GCC_SPECS PROJECT_INCLUDE PROJECT_RELEASE RTEMS_ROOT BARE_CPU_MODEL BARE_CPU_CFLAGS MULTILIB_TRUE MULTILIB_FALSE bsplibdir RTEMS_HOST PACKHEX HAS_MP RTEMS_CFLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP RTEMS_USE_GCC_TRUE RTEMS_USE_GCC_FALSE RTEMS_CPPFLAGS AR AS LD NM RANLIB OBJCOPY SIZE RTEMS_HAS_NETWORKING HAS_NETWORKING HAS_NETWORKING_TRUE HAS_NETWORKING_FALSE CCAS CCASFLAGS exceptions LIBOBJS LTLIBOBJS' +ac_subst_files='' + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +ac_prev= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_option in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CPU_CFLAGS_set=${CPU_CFLAGS+set} +ac_env_CPU_CFLAGS_value=$CPU_CFLAGS +ac_cv_env_CPU_CFLAGS_set=${CPU_CFLAGS+set} +ac_cv_env_CPU_CFLAGS_value=$CPU_CFLAGS +ac_env_CFLAGS_OPTIMIZE_V_set=${CFLAGS_OPTIMIZE_V+set} +ac_env_CFLAGS_OPTIMIZE_V_value=$CFLAGS_OPTIMIZE_V +ac_cv_env_CFLAGS_OPTIMIZE_V_set=${CFLAGS_OPTIMIZE_V+set} +ac_cv_env_CFLAGS_OPTIMIZE_V_value=$CFLAGS_OPTIMIZE_V +ac_env_CFLAGS_DEBUG_V_set=${CFLAGS_DEBUG_V+set} +ac_env_CFLAGS_DEBUG_V_value=$CFLAGS_DEBUG_V +ac_cv_env_CFLAGS_DEBUG_V_set=${CFLAGS_DEBUG_V+set} +ac_cv_env_CFLAGS_DEBUG_V_value=$CFLAGS_DEBUG_V +ac_env_CFLAGS_PROFILE_V_set=${CFLAGS_PROFILE_V+set} +ac_env_CFLAGS_PROFILE_V_value=$CFLAGS_PROFILE_V +ac_cv_env_CFLAGS_PROFILE_V_set=${CFLAGS_PROFILE_V+set} +ac_cv_env_CFLAGS_PROFILE_V_value=$CFLAGS_PROFILE_V +ac_env_RTEMS_BSP_FAMILY_set=${RTEMS_BSP_FAMILY+set} +ac_env_RTEMS_BSP_FAMILY_value=$RTEMS_BSP_FAMILY +ac_cv_env_RTEMS_BSP_FAMILY_set=${RTEMS_BSP_FAMILY+set} +ac_cv_env_RTEMS_BSP_FAMILY_value=$RTEMS_BSP_FAMILY +ac_env_RTEMS_CPU_MODEL_set=${RTEMS_CPU_MODEL+set} +ac_env_RTEMS_CPU_MODEL_value=$RTEMS_CPU_MODEL +ac_cv_env_RTEMS_CPU_MODEL_set=${RTEMS_CPU_MODEL+set} +ac_cv_env_RTEMS_CPU_MODEL_value=$RTEMS_CPU_MODEL +ac_env_RTEMS_BSP_set=${RTEMS_BSP+set} +ac_env_RTEMS_BSP_value=$RTEMS_BSP +ac_cv_env_RTEMS_BSP_set=${RTEMS_BSP+set} +ac_cv_env_RTEMS_BSP_value=$RTEMS_BSP +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures rtems-c-src-lib-libbsp-powerpc-mvme5500 4.6.2 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of rtems-c-src-lib-libbsp-powerpc-mvme5500 4.6.2:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --enable-bare-cpu-cflags + specify a particular cpu cflag (bare bsp specific) + --enable-bare-cpu-model specify a particular cpu model (bare bsp specific) + --enable-multilib build many library versions (default=no) + --enable-multiprocessing + enable multiprocessing interface + --disable-dependency-tracking Speeds up one-time builds + --enable-dependency-tracking Do not reject slow dependency extractors + --enable-networking enable TCP/IP stack + +Some influential environment variables: + CPU_CFLAGS CFLAGS specifying CPU-dependent features + CFLAGS_OPTIMIZE_V + CFLAGS for building the OPTIMIZE variant + CFLAGS_DEBUG_V + CFLAGS for building the DEBUG variant + CFLAGS_PROFILE_V + CFLAGS for building the PROFILE variant + RTEMS_BSP_FAMILY + RTEMS's BSP directory + RTEMS_CPU_MODEL + RTEMS's cpu model + RTEMS_BSP RTEMS_BSP to build + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + PPC_USE_DATA_CACHE + If defined, then the PowerPC specific code in RTEMS will use + data cache instructions to optimize the context switch code. + This code can conflict with debuggers or emulators. It is known + to break the Corelis PowerPC emulator with at least some + combinations of PowerPC 603e revisions and emulator versions. + The BSP actually contains the call that enables this. + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF +rtems-c-src-lib-libbsp-powerpc-mvme5500 configure 4.6.2 +generated by GNU Autoconf 2.57 + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by rtems-c-src-lib-libbsp-powerpc-mvme5500 $as_me 4.6.2, which was +generated by GNU Autoconf 2.57. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core core.* *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +ac_aux_dir= +for ac_dir in ../../../../../.. $srcdir/../../../../../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../../../../../.. $srcdir/../../../../../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in ../../../../../.. $srcdir/../../../../../.." >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +for ac_prog in gmake make +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_MAKE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$MAKE"; then + ac_cv_prog_MAKE="$MAKE" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MAKE="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +MAKE=$ac_cv_prog_MAKE +if test -n "$MAKE"; then + echo "$as_me:$LINENO: result: $MAKE" >&5 +echo "${ECHO_T}$MAKE" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$MAKE" && break +done + + + + +ENDIF=endif + + +RTEMS_TOPdir="../../../../../.."; + + +test -n "$with_target_subdir" || with_target_subdir="." + +if test "$with_target_subdir" = "." ; then +# Native +PROJECT_TOPdir=${RTEMS_TOPdir}/'$(top_builddir)' +else +# Cross +dots=`echo $with_target_subdir|\ +sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` +PROJECT_TOPdir=${dots}${RTEMS_TOPdir}/'$(top_builddir)' +fi + + +PROJECT_ROOT="${RTEMS_TOPdir}/\$(top_builddir)" + + +echo "$as_me:$LINENO: checking for RTEMS Version" >&5 +echo $ECHO_N "checking for RTEMS Version... $ECHO_C" >&6 +if test -r "${srcdir}/${RTEMS_TOPdir}/aclocal/version.m4"; then + : +else + { { echo "$as_me:$LINENO: error: Unable to find ${RTEMS_TOPdir}/aclocal/version.m4" >&5 +echo "$as_me: error: Unable to find ${RTEMS_TOPdir}/aclocal/version.m4" >&2;} + { (exit 1); exit 1; }; } +fi + +echo "$as_me:$LINENO: result: 4.6.2" >&5 +echo "${ECHO_T}4.6.2" >&6 + + +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + + +echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6 +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_target_alias=$target_alias +test "x$ac_cv_target_alias" = "x" && + ac_cv_target_alias=$ac_cv_host_alias +ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6 +target=$ac_cv_target +target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +echo "$as_me:$LINENO: checking rtems target cpu" >&5 +echo $ECHO_N "checking rtems target cpu... $ECHO_C" >&6 +case "${target}" in + # hpux unix port should go here + i[34567]86-*linux*) # unix "simulator" port + RTEMS_CPU=unix + ;; + i[34567]86-*freebsd*) # unix "simulator" port + RTEMS_CPU=unix + ;; + i[34567]86-pc-cygwin*) # Cygwin is just enough unix like :) + RTEMS_CPU=unix + ;; + no_cpu-*rtems*) + RTEMS_CPU=no_cpu + ;; + sparc-sun-solaris*) # unix "simulator" port + RTEMS_CPU=unix + ;; + tic4x-*rtems*) # gcc changed the name + RTEMS_CPU=c4x + ;; + *) + RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'` + ;; +esac + +echo "$as_me:$LINENO: result: $RTEMS_CPU" >&5 +echo "${ECHO_T}$RTEMS_CPU" >&6 + +am__api_version="1.7" +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +test "$program_prefix" != NONE && + program_transform_name="s,^,$program_prefix,;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$,$program_suffix,;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm conftest.sed + + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$AWK" && break +done + +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +all: + @echo 'ac_maketemp="$(MAKE)"' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + # test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE=rtems-c-src-lib-libbsp-powerpc-mvme5500 + VERSION=4.6.2 + + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +install_sh=${install_sh-"$am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + STRIP=$ac_ct_STRIP +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. + + + + +# Check whether --enable-multilib or --disable-multilib was given. +if test "${enable_multilib+set}" = set; then + enableval="$enable_multilib" + case "${enableval}" in + yes) multilib=yes ;; + no) multilib=no ;; + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for multilib option" >&5 +echo "$as_me: error: bad value ${enableval} for multilib option" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + multilib=no +fi; + + +if test x"${multilib}" = x"yes"; then + MULTILIB_TRUE= + MULTILIB_FALSE='#' +else + MULTILIB_TRUE='#' + MULTILIB_FALSE= +fi + + + + + +# Is this a supported CPU? +echo "$as_me:$LINENO: checking if cpu $RTEMS_CPU is supported" >&5 +echo $ECHO_N "checking if cpu $RTEMS_CPU is supported... $ECHO_C" >&6 +# FIXME: Temporary hack +if test -d "$srcdir/$RTEMS_TOPdir/cpukit/score/cpu/$RTEMS_CPU"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + { { echo "$as_me:$LINENO: error: no" >&5 +echo "$as_me: error: no" >&2;} + { (exit 1); exit 1; }; } +fi + + +# Check whether --enable-multiprocessing or --disable-multiprocessing was given. +if test "${enable_multiprocessing+set}" = set; then + enableval="$enable_multiprocessing" + case "${enable_multiprocessing}" in + yes) ;; + no) ;; + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for enable-multiprocessing option" >&5 +echo "$as_me: error: bad value ${enableval} for enable-multiprocessing option" >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + enable_multiprocessing=no +fi; + +# account for "aliased" bsps which share source code + case $RTEMS_BSP in + simcpu32) RTEMS_BSP_FAMILY=sim68000 ;; # BSVC CPU32 variant + c3xsim) RTEMS_BSP_FAMILY=c4xsim ;; # TI C3x Simulator in gdb + mcp750) RTEMS_BSP_FAMILY=motorola_powerpc ;; # Motorola PPC board variant + mvme2307) RTEMS_BSP_FAMILY=motorola_powerpc ;; # Motorola PPC board variant + mtx603e) RTEMS_BSP_FAMILY=motorola_powerpc ;; # Motorola PPC board variant + mvme162lx) RTEMS_BSP_FAMILY=mvme162 ;; # m68k - mvme162 board variant + gen68360_040) RTEMS_BSP_FAMILY=gen68360 ;; # m68k - 68360 in companion mode + p4600) RTEMS_BSP_FAMILY=p4000 ;; # mips64orion - p4000 board w/IDT 4600 + p4650) RTEMS_BSP_FAMILY=p4000 ;; # mips64orion - p4000 board w/IDT 4650 + mbx8*) RTEMS_BSP_FAMILY=mbx8xx ;; # MBX821/MBX860 board + pc386dx) RTEMS_BSP_FAMILY=pc386 ;; # i386 - PC w/o FPU + pc486) RTEMS_BSP_FAMILY=pc386 ;; # i386 - PC with i486DX + pc586) RTEMS_BSP_FAMILY=pc386 ;; # i386 - PC with Pentium + pc686) RTEMS_BSP_FAMILY=pc386 ;; # i386 - PC with PentiumPro + pck6) RTEMS_BSP_FAMILY=pc386 ;; # i386 - PC with K6 + bare*) RTEMS_BSP_FAMILY=bare ;; # EXP: bare-aliases + erc32nfp) RTEMS_BSP_FAMILY=erc32 ;; # erc32 without fpu + leon1) RTEMS_BSP_FAMILY=leon ;; # leon without fpu + leon2) RTEMS_BSP_FAMILY=leon ;; # leon with fpu + simsh7032) RTEMS_BSP_FAMILY=shsim ;; # SH7032 simulator + simsh7045) RTEMS_BSP_FAMILY=shsim ;; # SH7045 simulator + *) RTEMS_BSP_FAMILY=$RTEMS_BSP;; + esac + + + + + echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" + USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi; + echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 + + +if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + + + + + + + + + +echo "$as_me:$LINENO: checking for RTEMS_BSP" >&5 +echo $ECHO_N "checking for RTEMS_BSP... $ECHO_C" >&6 +if test "${rtems_cv_RTEMS_BSP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP"; + +fi +if test -z "$rtems_cv_RTEMS_BSP"; then + { { echo "$as_me:$LINENO: error: Missing RTEMS_BSP" >&5 +echo "$as_me: error: Missing RTEMS_BSP" >&2;} + { (exit 1); exit 1; }; } +fi +RTEMS_BSP="$rtems_cv_RTEMS_BSP" +echo "$as_me:$LINENO: result: ${RTEMS_BSP}" >&5 +echo "${ECHO_T}${RTEMS_BSP}" >&6 + + +RTEMS_BSP_SPECS="-specs bsp_specs -qrtems" + + +GCC_SPECS="-B\$(PROJECT_ROOT)/lib/ -B\$(PROJECT_ROOT)/$RTEMS_BSP/lib/" + + +PROJECT_INCLUDE="\$(PROJECT_ROOT)/$RTEMS_BSP/lib/include" + + +PROJECT_RELEASE="\$(PROJECT_ROOT)/$RTEMS_BSP" + + +RTEMS_ROOT="\$(PROJECT_ROOT)/c/$RTEMS_BSP" + + + +# Check whether --enable-bare-cpu-cflags or --disable-bare-cpu-cflags was given. +if test "${enable_bare_cpu_cflags+set}" = set; then + enableval="$enable_bare_cpu_cflags" + case "${enableval}" in + no) BARE_CPU_CFLAGS="" ;; + *) BARE_CPU_CFLAGS="${enableval}" ;; +esac +else + BARE_CPU_CFLAGS="" +fi; + +# Check whether --enable-bare-cpu-model or --disable-bare-cpu-model was given. +if test "${enable_bare_cpu_model+set}" = set; then + enableval="$enable_bare_cpu_model" + case "${enableval}" in + no) BARE_CPU_MODEL="" ;; + *) BARE_CPU_MODEL="${enableval}" ;; +esac +else + BARE_CPU_MODEL="" +fi; + + + + + + +if false; then + MULTILIB_TRUE= + MULTILIB_FALSE='#' +else + MULTILIB_TRUE='#' + MULTILIB_FALSE= +fi + + +includedir="\${exec_prefix}/${RTEMS_BSP}/lib/include" +libdir="\${exec_prefix}/${RTEMS_BSP}/lib" + +bsplibdir="\${exec_prefix}/${RTEMS_BSP}/lib" + + + + + + +echo "$as_me:$LINENO: checking for make/custom/$RTEMS_BSP.cfg" >&5 +echo $ECHO_N "checking for make/custom/$RTEMS_BSP.cfg... $ECHO_C" >&6 +if test -r "$srcdir/$RTEMS_TOPdir/make/custom/$RTEMS_BSP.cfg"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + { { echo "$as_me:$LINENO: error: no" >&5 +echo "$as_me: error: no" >&2;} + { (exit 1); exit 1; }; } +fi + + + + +RTEMS_HOST=$host_os +case "${target}" in + # hpux unix port should go here + i[34567]86-*linux*) # unix "simulator" port + RTEMS_HOST=Linux + ;; + i[34567]86-*freebsd*) # unix "simulator" port + RTEMS_HOST=FreeBSD + ;; + i[34567]86-pc-cygwin*) # Cygwin is just enough unix like :) + RTEMS_HOST=Cygwin + ;; + sparc-sun-solaris*) # unix "simulator" port + RTEMS_HOST=Solaris + ;; + *) + ;; +esac + + + ac_config_headers="$ac_config_headers include/bspopts.tmp:include/bspopts.h.in" + + + +PACKHEX="\$(PROJECT_TOPdir)/tools/build/packhex" + + + + +echo "$as_me:$LINENO: checking if wanting multiprocessing" >&5 +echo $ECHO_N "checking if wanting multiprocessing... $ECHO_C" >&6 +if test "${rtems_cv_want_multiprocessing+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test x"$multilib" = x"no"; then + # no cpukit + rtems_cv_want_multiprocessing="$enable_multiprocessing" + +else + +#HACK: Should check for RTEMS_MULTIPROCESSING in cpuopts.h, instead + rtems_cv_want_multiprocessing="$enable_multiprocessing" + +fi + + +fi +echo "$as_me:$LINENO: result: $rtems_cv_want_multiprocessing" >&5 +echo "${ECHO_T}$rtems_cv_want_multiprocessing" >&6 + +if test "$rtems_cv_want_multiprocessing" = "yes"; then + + echo "$as_me:$LINENO: checking whether BSP supports multiprocessing" >&5 +echo $ECHO_N "checking whether BSP supports multiprocessing... $ECHO_C" >&6 +if test "${rtems_cv_HAS_MP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}/${RTEMS_BSP_FAMILY}/shmsupp"; then + rtems_cv_HAS_MP="yes" ; + else + rtems_cv_HAS_MP="no"; + fi + +fi +echo "$as_me:$LINENO: result: $rtems_cv_HAS_MP" >&5 +echo "${ECHO_T}$rtems_cv_HAS_MP" >&6 +if test $rtems_cv_HAS_MP = "no"; then +{ { echo "$as_me:$LINENO: error: multiprocessing requested but not supported" >&5 +echo "$as_me: error: multiprocessing requested but not supported" >&2;} + { (exit 1); exit 1; }; } +fi + +else + rtems_cv_HAS_MP="no"; +fi + + +HAS_MP=$rtems_cv_HAS_MP + + + + +rm -f .deps 2>/dev/null +mkdir .deps 2>/dev/null +if test -d .deps; then + DEPDIR=.deps +else + # MS-DOS does not allow filenames that begin with a dot. + DEPDIR=_deps +fi +rmdir .deps 2>/dev/null + + + ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +doit: + @echo done +END +# If we don't find an include directive, just comment out the code. +echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6 +rm -f confinc confmf + +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval="$enable_dependency_tracking" + +fi; +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + + +if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + + + + + +if test -n "${CFLAGS}"; then + RTEMS_CFLAGS=${CFLAGS} +else + RTEMS_CFLAGS="\$(CPU_CFLAGS) \$(RTEMS_CFLAGS_\$(VARIANT_V)_V) \$(CFLAGS_\$(VARIANT_V)_V) -g" +fi + + + + + + if test "x$build_alias" != "x$host_alias"; then + rtems_tool_prefix=${ac_tool_prefix} +fi + + # Extract the first word of "${rtems_tool_prefix}gcc", so it can be a program name with args. +set dummy ${rtems_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${rtems_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +test -z "$CC" && \ + { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5 +echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output" >&5 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + echo '#include "conftest.h"' > conftest.c + echo 'int i;' > conftest.h + echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=conftest.c object=conftest.o \ + depfile=conftest.Po tmpdepfile=conftest.TPo \ + $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 && + grep conftest.h conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +if test x"$GCC" = x"yes"; then + RTEMS_USE_GCC_TRUE= + RTEMS_USE_GCC_FALSE='#' +else + RTEMS_USE_GCC_TRUE='#' + RTEMS_USE_GCC_FALSE= +fi + + + +echo "$as_me:$LINENO: checking whether $CC accepts -isystem" >&5 +echo $ECHO_N "checking whether $CC accepts -isystem... $ECHO_C" >&6 +if test "${rtems_cv_gcc_isystem+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +rtems_cv_gcc_isystem=no +if test x"$GCC" = x"yes"; then +cat << EOF > conftest.h +int conftest123(); +EOF +cat << EOF > conftest.c +#include +int conftest123() {} +EOF + if test -z "`${CC} -isystem./ -c conftest.c 2>&1`";then + rtems_cv_gcc_isystem=yes + fi +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $rtems_cv_gcc_isystem" >&5 +echo "${ECHO_T}$rtems_cv_gcc_isystem" >&6 + + +echo "$as_me:$LINENO: checking whether $CC accepts --pipe" >&5 +echo $ECHO_N "checking whether $CC accepts --pipe... $ECHO_C" >&6 +if test "${rtems_cv_gcc_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +rtems_cv_gcc_pipe=no +if test x"$GCC" = x"yes"; then + echo 'void f(){}' >conftest.c + if test -z "`${CC} --pipe -c conftest.c 2>&1`";then + rtems_cv_gcc_pipe=yes + fi + rm -f conftest* +fi + +fi +echo "$as_me:$LINENO: result: $rtems_cv_gcc_pipe" >&5 +echo "${ECHO_T}$rtems_cv_gcc_pipe" >&6 + +test "$rtems_cv_gcc_pipe" = "yes" && CC="$CC --pipe" + + +echo "$as_me:$LINENO: checking whether $CC accepts -specs" >&5 +echo $ECHO_N "checking whether $CC accepts -specs... $ECHO_C" >&6 +if test "${rtems_cv_gcc_specs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +rtems_cv_gcc_specs=no +if test x"$GCC" = x"yes"; then + touch confspec + echo 'void f(){}' >conftest.c + if test -z "`${CC} -specs confspec -c conftest.c 2>&1`";then + rtems_cv_gcc_specs=yes + fi +fi +rm -f confspec conftest* + +fi +echo "$as_me:$LINENO: result: $rtems_cv_gcc_specs" >&5 +echo "${ECHO_T}$rtems_cv_gcc_specs" >&6 + +if test "$GCC" = yes; then +RTEMS_CFLAGS="$RTEMS_CFLAGS -Wall" +RTEMS_CFLAGS="$RTEMS_CFLAGS -ansi -fasm" +fi + +if test x"$rtems_cv_gcc_isystem" = x"yes"; then + + RTEMS_CPPFLAGS="-isystem \$(PROJECT_INCLUDE)" +else + + RTEMS_CPPFLAGS="-I\$(PROJECT_INCLUDE)" + +fi + + + + + + if test "x$build_alias" != "x$host_alias"; then + rtems_tool_prefix=${ac_tool_prefix} +fi + + # Extract the first word of "${rtems_tool_prefix}ar", so it can be a program name with args. +set dummy ${rtems_tool_prefix}ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${rtems_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="no" +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + + if test "x$build_alias" != "x$host_alias"; then + rtems_tool_prefix=${ac_tool_prefix} +fi + + # Extract the first word of "${rtems_tool_prefix}as", so it can be a program name with args. +set dummy ${rtems_tool_prefix}as; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AS="${rtems_tool_prefix}as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="no" +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + echo "$as_me:$LINENO: result: $AS" >&5 +echo "${ECHO_T}$AS" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + + if test "x$build_alias" != "x$host_alias"; then + rtems_tool_prefix=${ac_tool_prefix} +fi + + # Extract the first word of "${rtems_tool_prefix}ld", so it can be a program name with args. +set dummy ${rtems_tool_prefix}ld; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$LD"; then + ac_cv_prog_LD="$LD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LD="${rtems_tool_prefix}ld" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_LD" && ac_cv_prog_LD="no" +fi +fi +LD=$ac_cv_prog_LD +if test -n "$LD"; then + echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + + if test "x$build_alias" != "x$host_alias"; then + rtems_tool_prefix=${ac_tool_prefix} +fi + + # Extract the first word of "${rtems_tool_prefix}nm", so it can be a program name with args. +set dummy ${rtems_tool_prefix}nm; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + ac_cv_prog_NM="$NM" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NM="${rtems_tool_prefix}nm" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="no" +fi +fi +NM=$ac_cv_prog_NM +if test -n "$NM"; then + echo "$as_me:$LINENO: result: $NM" >&5 +echo "${ECHO_T}$NM" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + + + if test "x$build_alias" != "x$host_alias"; then + rtems_tool_prefix=${ac_tool_prefix} +fi + + # Extract the first word of "${rtems_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${rtems_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${rtems_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + + + if test "x$build_alias" != "x$host_alias"; then + rtems_tool_prefix=${ac_tool_prefix} +fi + + # Extract the first word of "${rtems_tool_prefix}objcopy", so it can be a program name with args. +set dummy ${rtems_tool_prefix}objcopy; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_OBJCOPY+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$OBJCOPY"; then + ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJCOPY="${rtems_tool_prefix}objcopy" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_OBJCOPY" && ac_cv_prog_OBJCOPY="no" +fi +fi +OBJCOPY=$ac_cv_prog_OBJCOPY +if test -n "$OBJCOPY"; then + echo "$as_me:$LINENO: result: $OBJCOPY" >&5 +echo "${ECHO_T}$OBJCOPY" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + + if test "x$build_alias" != "x$host_alias"; then + rtems_tool_prefix=${ac_tool_prefix} +fi + + # Extract the first word of "${rtems_tool_prefix}size", so it can be a program name with args. +set dummy ${rtems_tool_prefix}size; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_SIZE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$SIZE"; then + ac_cv_prog_SIZE="$SIZE" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_SIZE="${rtems_tool_prefix}size" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_SIZE" && ac_cv_prog_SIZE="no" +fi +fi +SIZE=$ac_cv_prog_SIZE +if test -n "$SIZE"; then + echo "$as_me:$LINENO: result: $SIZE" >&5 +echo "${ECHO_T}$SIZE" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + + if test "x$build_alias" != "x$host_alias"; then + rtems_tool_prefix=${ac_tool_prefix} +fi + + # Extract the first word of "${rtems_tool_prefix}strip", so it can be a program name with args. +set dummy ${rtems_tool_prefix}strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${rtems_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":" +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + + + + +# Check whether --enable-networking or --disable-networking was given. +if test "${enable_networking+set}" = set; then + enableval="$enable_networking" + case "${enableval}" in + yes) RTEMS_HAS_NETWORKING=yes ;; + no) RTEMS_HAS_NETWORKING=no ;; + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for enable-networking option" >&5 +echo "$as_me: error: bad value ${enableval} for enable-networking option" >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + RTEMS_HAS_NETWORKING=yes +fi; + + +echo "$as_me:$LINENO: checking whether BSP supports networking" >&5 +echo $ECHO_N "checking whether BSP supports networking... $ECHO_C" >&6 +if test "${rtems_cv_HAS_NETWORKING+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$RTEMS_CPU" in + unix*) + rtems_cv_HAS_NETWORKING="no" + ;; + *) + if test "${RTEMS_HAS_NETWORKING}" = "yes"; then + rtems_cv_HAS_NETWORKING="yes"; + else + rtems_cv_HAS_NETWORKING="disabled"; + fi + ;; + esac +fi +echo "$as_me:$LINENO: result: $rtems_cv_HAS_NETWORKING" >&5 +echo "${ECHO_T}$rtems_cv_HAS_NETWORKING" >&6 +if test "$rtems_cv_HAS_NETWORKING" = "yes"; then + HAS_NETWORKING="yes"; +else + HAS_NETWORKING="no"; +fi + + + +if test "$HAS_NETWORKING" = "yes"; then + HAS_NETWORKING_TRUE= + HAS_NETWORKING_FALSE='#' +else + HAS_NETWORKING_TRUE='#' + HAS_NETWORKING_FALSE= +fi + + +AS=$CC +# By default we simply use the C compiler to build assembly code. + +: ${CCAS='$(CC)'} +# Set ASFLAGS if not already set. +: ${CCASFLAGS='$(CFLAGS)'} + + + + + + + + + +case ${RTEMS_BSP} in +* ) + PPC_USE_DATA_CACHE=${PPC_USE_DATA_CACHE-1} ;; +esac +if test -n "${PPC_USE_DATA_CACHE}"; then +cat >>confdefs.h <<_ACEOF +#define PPC_USE_DATA_CACHE $PPC_USE_DATA_CACHE +_ACEOF +fi + + + +# Explicitly list all Makefiles here + ac_config_files="$ac_config_files Makefile clock/Makefile console/Makefile include/Makefile pci/Makefile GT64260/Makefile network/Makefile irq/Makefile start/Makefile startup/Makefile vectors/Makefile vme/Makefile wrapup/Makefile" + + + +exceptions="new_exception_processing" + + + + + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${MULTILIB_TRUE}" && test -z "${MULTILIB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MULTILIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MULTILIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${MULTILIB_TRUE}" && test -z "${MULTILIB_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MULTILIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MULTILIB\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${RTEMS_USE_GCC_TRUE}" && test -z "${RTEMS_USE_GCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"RTEMS_USE_GCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"RTEMS_USE_GCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAS_NETWORKING_TRUE}" && test -z "${HAS_NETWORKING_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAS_NETWORKING\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAS_NETWORKING\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by rtems-c-src-lib-libbsp-powerpc-mvme5500 $as_me 4.6.2, which was +generated by GNU Autoconf 2.57. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +rtems-c-src-lib-libbsp-powerpc-mvme5500 config.status 4.6.2 +configured by $0, generated by GNU Autoconf 2.57, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS section. +# + +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "clock/Makefile" ) CONFIG_FILES="$CONFIG_FILES clock/Makefile" ;; + "console/Makefile" ) CONFIG_FILES="$CONFIG_FILES console/Makefile" ;; + "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; + "pci/Makefile" ) CONFIG_FILES="$CONFIG_FILES pci/Makefile" ;; + "GT64260/Makefile" ) CONFIG_FILES="$CONFIG_FILES GT64260/Makefile" ;; + "network/Makefile" ) CONFIG_FILES="$CONFIG_FILES network/Makefile" ;; + "irq/Makefile" ) CONFIG_FILES="$CONFIG_FILES irq/Makefile" ;; + "start/Makefile" ) CONFIG_FILES="$CONFIG_FILES start/Makefile" ;; + "startup/Makefile" ) CONFIG_FILES="$CONFIG_FILES startup/Makefile" ;; + "vectors/Makefile" ) CONFIG_FILES="$CONFIG_FILES vectors/Makefile" ;; + "vme/Makefile" ) CONFIG_FILES="$CONFIG_FILES vme/Makefile" ;; + "wrapup/Makefile" ) CONFIG_FILES="$CONFIG_FILES wrapup/Makefile" ;; + "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "include/bspopts.tmp" ) CONFIG_HEADERS="$CONFIG_HEADERS include/bspopts.tmp:include/bspopts.h.in" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@MAKE@,$MAKE,;t t +s,@ENDIF@,$ENDIF,;t t +s,@RTEMS_TOPdir@,$RTEMS_TOPdir,;t t +s,@PROJECT_TOPdir@,$PROJECT_TOPdir,;t t +s,@PROJECT_ROOT@,$PROJECT_ROOT,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@target@,$target,;t t +s,@target_cpu@,$target_cpu,;t t +s,@target_vendor@,$target_vendor,;t t +s,@target_os@,$target_os,;t t +s,@RTEMS_CPU@,$RTEMS_CPU,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@CYGPATH_W@,$CYGPATH_W,;t t +s,@PACKAGE@,$PACKAGE,;t t +s,@VERSION@,$VERSION,;t t +s,@ACLOCAL@,$ACLOCAL,;t t +s,@AUTOCONF@,$AUTOCONF,;t t +s,@AUTOMAKE@,$AUTOMAKE,;t t +s,@AUTOHEADER@,$AUTOHEADER,;t t +s,@MAKEINFO@,$MAKEINFO,;t t +s,@AMTAR@,$AMTAR,;t t +s,@install_sh@,$install_sh,;t t +s,@STRIP@,$STRIP,;t t +s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t +s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +s,@AWK@,$AWK,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t +s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t +s,@MAINT@,$MAINT,;t t +s,@CPU_CFLAGS@,$CPU_CFLAGS,;t t +s,@CFLAGS_OPTIMIZE_V@,$CFLAGS_OPTIMIZE_V,;t t +s,@CFLAGS_DEBUG_V@,$CFLAGS_DEBUG_V,;t t +s,@CFLAGS_PROFILE_V@,$CFLAGS_PROFILE_V,;t t +s,@RTEMS_BSP_FAMILY@,$RTEMS_BSP_FAMILY,;t t +s,@RTEMS_CPU_MODEL@,$RTEMS_CPU_MODEL,;t t +s,@RTEMS_BSP@,$RTEMS_BSP,;t t +s,@RTEMS_BSP_SPECS@,$RTEMS_BSP_SPECS,;t t +s,@GCC_SPECS@,$GCC_SPECS,;t t +s,@PROJECT_INCLUDE@,$PROJECT_INCLUDE,;t t +s,@PROJECT_RELEASE@,$PROJECT_RELEASE,;t t +s,@RTEMS_ROOT@,$RTEMS_ROOT,;t t +s,@BARE_CPU_MODEL@,$BARE_CPU_MODEL,;t t +s,@BARE_CPU_CFLAGS@,$BARE_CPU_CFLAGS,;t t +s,@MULTILIB_TRUE@,$MULTILIB_TRUE,;t t +s,@MULTILIB_FALSE@,$MULTILIB_FALSE,;t t +s,@bsplibdir@,$bsplibdir,;t t +s,@RTEMS_HOST@,$RTEMS_HOST,;t t +s,@PACKHEX@,$PACKHEX,;t t +s,@HAS_MP@,$HAS_MP,;t t +s,@RTEMS_CFLAGS@,$RTEMS_CFLAGS,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@DEPDIR@,$DEPDIR,;t t +s,@am__include@,$am__include,;t t +s,@am__quote@,$am__quote,;t t +s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t +s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t +s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t +s,@CCDEPMODE@,$CCDEPMODE,;t t +s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t +s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t +s,@CPP@,$CPP,;t t +s,@RTEMS_USE_GCC_TRUE@,$RTEMS_USE_GCC_TRUE,;t t +s,@RTEMS_USE_GCC_FALSE@,$RTEMS_USE_GCC_FALSE,;t t +s,@RTEMS_CPPFLAGS@,$RTEMS_CPPFLAGS,;t t +s,@AR@,$AR,;t t +s,@AS@,$AS,;t t +s,@LD@,$LD,;t t +s,@NM@,$NM,;t t +s,@RANLIB@,$RANLIB,;t t +s,@OBJCOPY@,$OBJCOPY,;t t +s,@SIZE@,$SIZE,;t t +s,@RTEMS_HAS_NETWORKING@,$RTEMS_HAS_NETWORKING,;t t +s,@HAS_NETWORKING@,$HAS_NETWORKING,;t t +s,@HAS_NETWORKING_TRUE@,$HAS_NETWORKING_TRUE,;t t +s,@HAS_NETWORKING_FALSE@,$HAS_NETWORKING_FALSE,;t t +s,@CCAS@,$CCAS,;t t +s,@CCASFLAGS@,$CCASFLAGS,;t t +s,@exceptions@,$exceptions,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +_am_stamp_count=`expr ${_am_stamp_count-0} + 1` +echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'`/stamp-h$_am_stamp_count + # Run the commands associated with the file. + case $ac_file in + include/bspopts.tmp ) +echo "/* BSP dependent options file */" >$tmp/config.h +echo "/* automatically generated -- DO NOT EDIT!! */" >>$tmp/config.h +echo >>$tmp/config.h +echo "#ifndef __BSP_OPTIONS_h" >>$tmp/config.h +echo "#define __BSP_OPTIONS_h" >>$tmp/config.h +echo >>$tmp/config.h +sed -e '/.*PACKAGE.*/d' include/bspopts.tmp >> $tmp/config.h +echo >>$tmp/config.h +echo "#endif" >>$tmp/config.h + if cmp -s include/bspopts.h $tmp/config.h 2>/dev/null; then + + { echo "$as_me:$LINENO: include/bspopts.h is unchanged" >&5 +echo "$as_me: include/bspopts.h is unchanged" >&6;} + rm -f $tmp/config.h +else + + { echo "$as_me:$LINENO: creating include/bspopts.h" >&5 +echo "$as_me: creating include/bspopts.h" >&6;} + rm -f include/bspopts.h + mv $tmp/config.h include/bspopts.h + +fi + + ;; + esac +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`(dirname "$mf") 2>/dev/null || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + else + continue + fi + grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue + # Extract the definition of DEP_FILES from the Makefile without + # running `make'. + DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` + test -z "$DEPDIR" && continue + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n -e '/^U = / s///p' < "$mf"` + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" + # We invoke sed twice because it is the simplest approach to + # changing $(DEPDIR) to its actual value in the expansion. + for file in `sed -n -e ' + /^DEP_FILES = .*\\\\$/ { + s/^DEP_FILES = // + :loop + s/\\\\$// + p + n + /\\\\$/ b loop + p + } + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`(dirname "$file") 2>/dev/null || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p $dirpart/$fdir + else + as_dir=$dirpart/$fdir + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 +echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} + { (exit 1); exit 1; }; }; } + + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + esac +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + + exceptions_subdirs="new_exception_processing" + updir=/../support + +if test "$no_recursion" != yes; then + + + +ac_sub_configure_args_prune() +{ + # Remove --cache-file and --srcdir arguments so they do not pile up. + ac_sub_configure_args= + ac_prev= + for ac_arg + do + if test -n "$ac_prev"; then + ac_prev= + continue + fi + case $ac_arg in + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ + | --c=*) + ;; + --config-cache | -C) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + + *) ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; + esac + done + export ac_sub_configure_args +} + +eval ac_sub_configure_args_prune $ac_configure_args + + + for ac_subdir in : $exceptions_subdirs; do test "x$ac_subdir" = x: && continue + + # Do not complain, so a configure script can configure whichever + # parts of a large source tree are present. + test -d $srcdir${updir}/$ac_subdir || continue + + { echo "$as_me:$LINENO: configuring in $ac_subdir" >&5 +echo "$as_me: configuring in $ac_subdir" >&6;} + case $srcdir in + .) ;; + *) { if $as_mkdir_p; then + mkdir -p "./$ac_subdir" + else + as_dir="./$ac_subdir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"./$ac_subdir\"" >&5 +echo "$as_me: error: cannot create directory \"./$ac_subdir\"" >&2;} + { (exit 1); exit 1; }; }; } + + if test -d ./$ac_subdir; then :; + else + { { echo "$as_me:$LINENO: error: cannot create \`pwd\`/$ac_subdir" >&5 +echo "$as_me: error: cannot create \`pwd\`/$ac_subdir" >&2;} + { (exit 1); exit 1; }; } + fi + ;; + esac + + ac_popdir=`pwd` + cd $ac_subdir + + # A "../" for each directory in /$ac_subdir. + ac_dots=`echo $ac_subdir | + sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` + + case $srcdir in + .) # No --srcdir option. We are building in place. + ac_sub_srcdir=$srcdir${updir} ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_sub_srcdir=$srcdir${updir}/$ac_subdir ;; + *) # Relative path. + ac_sub_srcdir=$ac_dots$srcdir${updir}/$ac_subdir ;; + esac + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_sub_srcdir/configure.gnu; then + ac_sub_configure="$SHELL '$ac_sub_srcdir/configure.gnu'" + elif test -f $ac_sub_srcdir/configure; then + ac_sub_configure="$SHELL '$ac_sub_srcdir/configure'" + elif test -f $ac_sub_srcdir/configure.in; then + ac_sub_configure=$ac_configure + else + { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_subdir" >&5 +echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2;} + ac_sub_configure= + fi + + # The recursion is here. + if test -n "$ac_sub_configure"; then + # Make the cache file name correct relative to the subdirectory. + case $cache_file in + [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; + *) # Relative path. + ac_sub_cache_file=$ac_dots$cache_file ;; + esac + + { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" >&5 +echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir" >&6;} + # The eval makes quoting arguments work. + eval $ac_sub_configure $ac_sub_configure_args \ + --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir || + { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_subdir" >&5 +echo "$as_me: error: $ac_sub_configure failed for $ac_subdir" >&2;} + { (exit 1); exit 1; }; } + fi + + cd "$ac_popdir" + done +fi + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + diff --git a/c/src/lib/libbsp/powerpc/mvme5500/configure.ac b/c/src/lib/libbsp/powerpc/mvme5500/configure.ac new file mode 100644 index 0000000000..09c7d0a3b3 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/configure.ac @@ -0,0 +1,51 @@ +## Process this file with autoconf to produce a configure script. +## +## configure.ac,v 1.9.2.2 2003/03/06 10:42:42 ralf Exp + +AC_PREREQ(2.57) +AC_INIT([rtems-c-src-lib-libbsp-powerpc-mvme5500],[_RTEMS_VERSION],[rtems-bugs@OARcorp.com]) +AC_CONFIG_SRCDIR([bsp_specs]) +RTEMS_TOP(../../../../../..) + +RTEMS_CANONICAL_TARGET_CPU +AM_INIT_AUTOMAKE([no-define foreign 1.7.2]) +RTEMS_BSP_CONFIGURE + +RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm]) +RTEMS_CANONICALIZE_TOOLS + +RTEMS_CHECK_NETWORKING +AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes") + +AS=$CC +AM_PROG_AS + +RTEMS_BSPOPTS_SET([PPC_USE_DATA_CACHE],[*],[1]) +RTEMS_BSPOPTS_HELP([PPC_USE_DATA_CACHE], +[If defined, then the PowerPC specific code in RTEMS will use + data cache instructions to optimize the context switch code. + This code can conflict with debuggers or emulators. It is known + to break the Corelis PowerPC emulator with at least some combinations + of PowerPC 603e revisions and emulator versions. + The BSP actually contains the call that enables this.]) + + +# Explicitly list all Makefiles here +AC_CONFIG_FILES([Makefile +clock/Makefile +console/Makefile +include/Makefile +pci/Makefile +GT64260/Makefile +network/Makefile +irq/Makefile +tod/Makefile +start/Makefile +startup/Makefile +vectors/Makefile +vme/Makefile +wrapup/Makefile]) + +RTEMS_PPC_EXCEPTIONS([new]) + +AC_OUTPUT diff --git a/c/src/lib/libbsp/powerpc/mvme5500/console/Makefile.am b/c/src/lib/libbsp/powerpc/mvme5500/console/Makefile.am new file mode 100644 index 0000000000..e0cc6d8951 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/console/Makefile.am @@ -0,0 +1,33 @@ +## +## $Id$ +## + +VPATH = @srcdir@:@srcdir@/../../shared/console + +C_FILES = uart.c console.c +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) + +H_FILES = ../../shared/console/uart.h + +OBJS = $(C_O_FILES) + +include_bspdir = $(includedir)/bsp +include_bsp_HEADERS = ../../shared/console/uart.h + +include $(top_srcdir)/../../../../../../automake/compile.am +include $(top_srcdir)/../../../../../../automake/lib.am + +$(PROJECT_INCLUDE)/bsp: + $(mkinstalldirs) $@ + +$(PROJECT_INCLUDE)/bsp/uart.h:../../shared/console/uart.h + $(INSTALL_DATA) $< $@ + +PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/uart.h + +AM_CPPFLAGS += -DSTATIC_LOG_ALLOC + +all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) + +include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/lib/libbsp/powerpc/mvme5500/console/Makefile.in b/c/src/lib/libbsp/powerpc/mvme5500/console/Makefile.in new file mode 100644 index 0000000000..e68ff1ea8d --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/console/Makefile.in @@ -0,0 +1,582 @@ +# Makefile.in generated by automake 1.7.2 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ + +VPATH = @srcdir@:@srcdir@/../../shared/console +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ + +AR = @AR@ + +# OBSOLETE: Don't use +AS = $(CC) +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BARE_CPU_CFLAGS = @BARE_CPU_CFLAGS@ +BARE_CPU_MODEL = @BARE_CPU_MODEL@ + +CC = @CC@ $(GCCSPECS) + +CCAS = $(CC) +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @RTEMS_CFLAGS@ $(XCFLAGS) +CFLAGS_DEBUG_V = @CFLAGS_DEBUG_V@ +CFLAGS_OPTIMIZE_V = @CFLAGS_OPTIMIZE_V@ +CFLAGS_PROFILE_V = @CFLAGS_PROFILE_V@ +CPP = @CPP@ $(GCCSPECS) + +CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES) $(XCPPFLAGS) + +CPU_CFLAGS = @CPU_CFLAGS@ +CYGPATH_W = @CYGPATH_W@ + +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ENDIF = @ENDIF@ +EXEEXT = @EXEEXT@ +GCC_SPECS = @GCC_SPECS@ +HAS_MP = @HAS_MP@ +HAS_NETWORKING = @HAS_NETWORKING@ +HAS_NETWORKING_FALSE = @HAS_NETWORKING_FALSE@ +HAS_NETWORKING_TRUE = @HAS_NETWORKING_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKE = @MAKE@ +MAKEINFO = @MAKEINFO@ +MULTILIB_FALSE = @MULTILIB_FALSE@ +MULTILIB_TRUE = @MULTILIB_TRUE@ +NM = @NM@ +OBJCOPY = @OBJCOPY@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKHEX = @PACKHEX@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PROJECT_INCLUDE = @PROJECT_INCLUDE@ +PROJECT_RELEASE = @PROJECT_RELEASE@ +PROJECT_ROOT = @PROJECT_ROOT@ +PROJECT_TOPdir = @PROJECT_TOPdir@ +RANLIB = @RANLIB@ +RTEMS_BSP = @RTEMS_BSP@ +RTEMS_BSP_FAMILY = @RTEMS_BSP_FAMILY@ +RTEMS_BSP_SPECS = @RTEMS_BSP_SPECS@ +RTEMS_CFLAGS = @RTEMS_CFLAGS@ +RTEMS_CPPFLAGS = @RTEMS_CPPFLAGS@ +RTEMS_CPU = @RTEMS_CPU@ +RTEMS_CPU_MODEL = @RTEMS_CPU_MODEL@ +RTEMS_HAS_NETWORKING = @RTEMS_HAS_NETWORKING@ +RTEMS_HOST = @RTEMS_HOST@ +RTEMS_ROOT = @RTEMS_ROOT@ +RTEMS_TOPdir = @RTEMS_TOPdir@ +RTEMS_USE_GCC_FALSE = @RTEMS_USE_GCC_FALSE@ +RTEMS_USE_GCC_TRUE = @RTEMS_USE_GCC_TRUE@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIZE = @SIZE@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__include = @am__include@ +am__quote = @am__quote@ +bindir = @bindir@ +bsplibdir = @bsplibdir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exceptions = @exceptions@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ + +C_FILES = uart.c console.c +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) + +H_FILES = ../../shared/console/uart.h + +OBJS = $(C_O_FILES) + +include_bspdir = $(includedir)/bsp +include_bsp_HEADERS = ../../shared/console/uart.h + +@RTEMS_USE_GCC_TRUE@GCCSPECS = $(GCC_SPECS) $(RTEMS_BSP_SPECS) +# CXXFLAGS = @RTEMS_CXXFLAGS@ $(XCXXFLAGS) +CXXFLAGS = @RTEMS_CFLAGS@ $(XCXXFLAGS) +ASFLAGS = $(CPU_ASFLAGS) $(CPU_CFLAGS) $(XASFLAGS) + +LINK_LIBS = $(LD_LIBS) + + +# +# Client compiler and support tools +# + +# +# How to compile stuff into ${ARCH} subdirectory +# +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + + +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + +CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) +ASCOMPILE = $(AS) $(AM_ASFLAGS) $(ASFLAGS) + + +# Dependency files for use by gmake +# NOTE: we don't put them into $(ARCH) +# so that 'make clean' doesn't blow it away +DEPEND = Depends-${ARCH} + + +# spell out all the LINK_FILE's, rather than using -lbsp, so +# that $(LINK_FILES) can be a dependency +LINK_OBJS = \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +LINK_FILES = \ + $(START_FILE) \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +VARIANT = OPTIMIZE + +VARIANT_OPTIMIZE_V = OPTIMIZE +VARIANT_DEBUG_V = DEBUG +VARIANT_PROFILE_V = PROFILE +VARIANT_optimize_V = OPTIMIZE +VARIANT_debug_V = DEBUG +VARIANT_profile_V = PROFILE + +VARIANT_V = $(VARIANT_$(VARIANT)_V) + +ARCH_OPTIMIZE_V = o-optimize +ARCH_DEBUG_V = o-debug +ARCH_PROFILE_V = o-profile + +ARCH__V = $(ARCH_OPTIMIZE_V) +ARCH = $(ARCH_$(VARIANT_V)_V) + +LIBSUFFIX_OPTIMIZE_V = +LIBSUFFIX_DEBUG_V = _g +LIBSUFFIX_PROFILE_V = _p +LIBSUFFIX__V = $(LIBSUFFIX_OPTIMIZE_V) + +LIB_VARIANT = $(LIBSUFFIX_$(VARIANT_V)_V) +CFLAGS__V = $(CFLAGS_OPTIMIZE_V) + +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_OPTIMIZE_V = +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_DEBUG_V = -qrtems_debug -Wno-unused +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_PROFILE_V = -pg + +RTEMS_CFLAGS__V = $(RTEMS_CFLAGS_OPTIMIZE_V) +CXX = @CXX@ $(GCCSPECS) + +AM_CPPFLAGS = $(RTEMS_CPPFLAGS) -DSTATIC_LOG_ALLOC +AM_CFLAGS = +AM_CXXFLAGS = +AM_CCASFLAGS = $(CPU_CFLAGS) $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS) + +ARFLAGS = ruv + +TMPINSTALL_FILES = $(PROJECT_RELEASE)/lib + +PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp $(PROJECT_INCLUDE)/bsp/uart.h + +PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools +subdir = console +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/bspopts.tmp +CONFIG_CLEAN_FILES = +DIST_SOURCES = +HEADERS = $(include_bsp_HEADERS) + +DIST_COMMON = $(include_bsp_HEADERS) \ + $(top_srcdir)/../../../../../../automake/compile.am \ + $(top_srcdir)/../../../../../../automake/lib.am \ + $(top_srcdir)/../../../../../../automake/local.am Makefile.am \ + Makefile.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/../../../../../../automake/compile.am $(top_srcdir)/../../../../../../automake/lib.am $(top_srcdir)/../../../../../../automake/local.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign console/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +uninstall-info-am: +include_bspHEADERS_INSTALL = $(INSTALL_HEADER) +install-include_bspHEADERS: $(include_bsp_HEADERS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(include_bspdir) + @list='$(include_bsp_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(include_bspHEADERS_INSTALL) $$d$$p $(DESTDIR)$(include_bspdir)/$$f"; \ + $(include_bspHEADERS_INSTALL) $$d$$p $(DESTDIR)$(include_bspdir)/$$f; \ + done + +uninstall-include_bspHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_bsp_HEADERS)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(include_bspdir)/$$f"; \ + rm -f $(DESTDIR)$(include_bspdir)/$$f; \ + done + +ETAGS = etags +ETAGSFLAGS = + +CTAGS = ctags +CTAGSFLAGS = + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + $(mkinstalldirs) $(distdir)/../../../../../../../automake $(distdir)/../../shared/console + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(HEADERS) all-local + +installdirs: + $(mkinstalldirs) $(DESTDIR)$(include_bspdir) + +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-local mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: install-include_bspHEADERS + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-include_bspHEADERS uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ + clean-generic clean-local ctags distclean distclean-generic \ + distclean-tags distdir dvi dvi-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-include_bspHEADERS install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-include_bspHEADERS uninstall-info-am + +@RTEMS_USE_GCC_FALSE@include $(CONFIG.CC) + +${ARCH}/%.o: %.c + ${COMPILE} -o $@ -c $< + +${ARCH}/%.o: %.cc + ${CXXCOMPILE} -o $@ -c $< + +${ARCH}/%.o: %.S + ${CCASCOMPILE} -DASM -o $@ -c $< + +# We deliberately don't have anything depend on the +# $(DEPEND) file; otherwise it will get rebuilt even +# on 'make clean' +# + +@RTEMS_USE_GCC_TRUE@depend-gcc: $(C_FILES) $(CC_FILES) $(S_FILES) +@RTEMS_USE_GCC_TRUE@ $(COMPILE) -M $^ | \ +@RTEMS_USE_GCC_TRUE@ sed -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \ +@RTEMS_USE_GCC_TRUE@ -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp +@RTEMS_USE_GCC_TRUE@ mv $(DEPEND).tmp $(DEPEND) + +# pull in dependencies if they exist +@RTEMS_USE_GCC_TRUE@ifeq (${DEPEND},$(wildcard ${DEPEND})) +@RTEMS_USE_GCC_TRUE@include ${DEPEND} +@RTEMS_USE_GCC_TRUE@@ENDIF@ +depend: depend-am + +@RTEMS_USE_GCC_TRUE@define make-rel +@RTEMS_USE_GCC_TRUE@ $(LINK) -qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) $^ +@RTEMS_USE_GCC_TRUE@endef +@RTEMS_USE_GCC_FALSE@define make-rel +@RTEMS_USE_GCC_FALSE@ $(LINK) $(XLDFLAGS) $^ +@RTEMS_USE_GCC_FALSE@endef + +${ARCH}: + mkdir ${ARCH} + +clean-local: + $(RM) -r o-optimize o-debug o-profile $(CLEANDIRS) + $(RM) Depends-o-optimize.tmp Depends-o-debug.tmp Depends-o-profile.tmp + +define make-library +test -d $(ARCH) || mkdir $(ARCH) +$(RM) $@ +$(AR) $(ARFLAGS) $@ $^ +$(RANLIB) $@ +endef + +$(PROJECT_RELEASE)/lib: + @$(mkinstalldirs) $@ + +.PRECIOUS: $(LIB) + +$(PROJECT_INCLUDE)/bsp: + $(mkinstalldirs) $@ + +$(PROJECT_INCLUDE)/bsp/uart.h:../../shared/console/uart.h + $(INSTALL_DATA) $< $@ + +all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) + +debug: + @echo + @echo "\"make debug\" is obsolete, instead use:" + @echo " make VARIANT=DEBUG" + @echo + +.PHONY: debug + +profile: + @echo + @echo "\"make profile\" is obsolete, instead use:" + @echo " make VARIANT=PROFILE" + @echo + +.PHONY: profile + +preinstall-am: $(PREINSTALL_FILES) +preinstall: preinstall-am +.PHONY: preinstall preinstall-am + +depend-am: depend-gcc +depend: depend-am +.PHONY: depend depend-am depend-gcc +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/c/src/lib/libbsp/powerpc/mvme5500/include/Makefile.am b/c/src/lib/libbsp/powerpc/mvme5500/include/Makefile.am new file mode 100644 index 0000000000..c63341f49a --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/include/Makefile.am @@ -0,0 +1,26 @@ +## +## Kate Feng +## + +VPATH = @srcdir@:@srcdir@/../../shared/console + +include_HEADERS = bspopts.h +include_HEADERS += bsp.h + +H_FILES = bsp.h + +include_bspdir = $(includedir)/bsp + +$(PROJECT_INCLUDE): + $(mkinstalldirs) $@ + +$(PROJECT_INCLUDE)/%.h: %.h + $(INSTALL_DATA) $< $@ + +PREINSTALL_FILES = $(PROJECT_INCLUDE) +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h + +all-local: $(PREINSTALL_FILES) $(ARCH) $(OBJS) + +include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/lib/libbsp/powerpc/mvme5500/include/Makefile.in b/c/src/lib/libbsp/powerpc/mvme5500/include/Makefile.in new file mode 100644 index 0000000000..84a615fcf0 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/include/Makefile.in @@ -0,0 +1,437 @@ +# Makefile.in generated by automake 1.7.2 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ + +VPATH = @srcdir@:@srcdir@/../../shared/console +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BARE_CPU_CFLAGS = @BARE_CPU_CFLAGS@ +BARE_CPU_MODEL = @BARE_CPU_MODEL@ +CC = @CC@ +CCAS = @CCAS@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CFLAGS_DEBUG_V = @CFLAGS_DEBUG_V@ +CFLAGS_OPTIMIZE_V = @CFLAGS_OPTIMIZE_V@ +CFLAGS_PROFILE_V = @CFLAGS_PROFILE_V@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPU_CFLAGS = @CPU_CFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ENDIF = @ENDIF@ +EXEEXT = @EXEEXT@ +GCC_SPECS = @GCC_SPECS@ +HAS_MP = @HAS_MP@ +HAS_NETWORKING = @HAS_NETWORKING@ +HAS_NETWORKING_FALSE = @HAS_NETWORKING_FALSE@ +HAS_NETWORKING_TRUE = @HAS_NETWORKING_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKE = @MAKE@ +MAKEINFO = @MAKEINFO@ +MULTILIB_FALSE = @MULTILIB_FALSE@ +MULTILIB_TRUE = @MULTILIB_TRUE@ +NM = @NM@ +OBJCOPY = @OBJCOPY@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKHEX = @PACKHEX@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PROJECT_INCLUDE = @PROJECT_INCLUDE@ +PROJECT_RELEASE = @PROJECT_RELEASE@ +PROJECT_ROOT = @PROJECT_ROOT@ +PROJECT_TOPdir = @PROJECT_TOPdir@ +RANLIB = @RANLIB@ +RTEMS_BSP = @RTEMS_BSP@ +RTEMS_BSP_FAMILY = @RTEMS_BSP_FAMILY@ +RTEMS_BSP_SPECS = @RTEMS_BSP_SPECS@ +RTEMS_CFLAGS = @RTEMS_CFLAGS@ +RTEMS_CPPFLAGS = @RTEMS_CPPFLAGS@ +RTEMS_CPU = @RTEMS_CPU@ +RTEMS_CPU_MODEL = @RTEMS_CPU_MODEL@ +RTEMS_HAS_NETWORKING = @RTEMS_HAS_NETWORKING@ +RTEMS_HOST = @RTEMS_HOST@ +RTEMS_ROOT = @RTEMS_ROOT@ +RTEMS_TOPdir = @RTEMS_TOPdir@ +RTEMS_USE_GCC_FALSE = @RTEMS_USE_GCC_FALSE@ +RTEMS_USE_GCC_TRUE = @RTEMS_USE_GCC_TRUE@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIZE = @SIZE@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__include = @am__include@ +am__quote = @am__quote@ +bindir = @bindir@ +bsplibdir = @bsplibdir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exceptions = @exceptions@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ + +include_HEADERS = bspopts.h bsp.h + +H_FILES = bsp.h + +include_bspdir = $(includedir)/bsp + +PREINSTALL_FILES = $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/bsp.h $(PROJECT_INCLUDE)/bspopts.h + +PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools +subdir = include +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../mkinstalldirs +CONFIG_HEADER = bspopts.tmp +CONFIG_CLEAN_FILES = +DIST_SOURCES = +HEADERS = $(include_HEADERS) + +DIST_COMMON = $(include_HEADERS) \ + $(top_srcdir)/../../../../../../automake/local.am Makefile.am \ + Makefile.in bspopts.h.in +all: bspopts.tmp + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/../../../../../../automake/local.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign include/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) + +bspopts.tmp: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/bspopts.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status include/bspopts.tmp + +$(srcdir)/bspopts.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOHEADER) + touch $(srcdir)/bspopts.h.in + +distclean-hdr: + -rm -f bspopts.tmp stamp-h1 +uninstall-info-am: +includeHEADERS_INSTALL = $(INSTALL_HEADER) +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(includedir) + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \ + $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(includedir)/$$f"; \ + rm -f $(DESTDIR)$(includedir)/$$f; \ + done + +ETAGS = etags +ETAGSFLAGS = + +CTAGS = ctags +CTAGSFLAGS = + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique + +TAGS: $(HEADERS) $(SOURCES) bspopts.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) bspopts.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) bspopts.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) bspopts.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + $(mkinstalldirs) $(distdir)/../../../../../../../automake + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(HEADERS) bspopts.tmp all-local + +installdirs: + $(mkinstalldirs) $(DESTDIR)$(includedir) + +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-generic distclean-hdr distclean-tags + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: install-includeHEADERS + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includeHEADERS uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ + clean-generic ctags distclean distclean-generic distclean-hdr \ + distclean-tags distdir dvi dvi-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-includeHEADERS install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-includeHEADERS uninstall-info-am + + +$(PROJECT_INCLUDE): + $(mkinstalldirs) $@ + +$(PROJECT_INCLUDE)/%.h: %.h + $(INSTALL_DATA) $< $@ + +all-local: $(PREINSTALL_FILES) $(ARCH) $(OBJS) + +debug: + @echo + @echo "\"make debug\" is obsolete, instead use:" + @echo " make VARIANT=DEBUG" + @echo + +.PHONY: debug + +profile: + @echo + @echo "\"make profile\" is obsolete, instead use:" + @echo " make VARIANT=PROFILE" + @echo + +.PHONY: profile + +preinstall-am: $(PREINSTALL_FILES) +preinstall: preinstall-am +.PHONY: preinstall preinstall-am + +depend-am: depend-gcc +depend: depend-am +.PHONY: depend depend-am depend-gcc +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h b/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h new file mode 100644 index 0000000000..81df57d8ef --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h @@ -0,0 +1,109 @@ +/* + * bsp.h -- contain BSP API definition. + * + * Copyright (C) 1999 Eric Valette. valette@crf.canon.fr + * + * The license and distribution terms for this file may be + * found in found in the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * S. Kate Feng 12/03 : Modified it to support the MVME5500 board. + * + */ + +#ifndef LIBBSP_POWERPC_MVME5500_BSP_H +#define LIBBSP_POWERPC_MVME5500_BSP_H + +#include + +#include +#include +#include +#include +#include + +#include + +/* fundamental addresses for this BSP (PREPxxx are from libcpu/io.h) */ +#define _IO_BASE GT64260_REG_BASE + +/* PCI0 Domain I/O space */ +#define PCI0_IO_BASE 0xf0000000 +#define PCI1_IO_BASE 0xf0800000 + +/* PCI 0 memory space as seen from the CPU */ +#define PCI0_MEM_BASE 0x80000000 +#define PCI_MEM_BASE 0 /* glue for vmeUniverse */ + +/* address of our ram on the PCI bus */ +#define PCI_DRAM_OFFSET 0 + +/* PCI 1 memory space as seen from the CPU */ +#define PCI1_MEM_BASE 0xe0000000 +#define PCI1_MEM_SIZE 0x10000000 + +/* The glues to Till's vmeUniverse, although the name does not + * actually reflect the relevant architect of the MVME5500. + * Till TODO ? : BSP_PCI_DO_EOI instead ? + * BSP_EXT_IRQ0 instead of BSP_PCI_IRQ0 ? + * + */ +#define BSP_PIC_DO_EOI inl(0xc34) /* PCI IACK */ +#define BSP_PCI_IRQ0 BSP_GPP_IRQ_LOWEST_OFFSET + +/* + * confdefs.h overrides for this BSP: + * - termios serial ports (defaults to 1) + * - Interrupt stack space is not minimum if defined. + */ + +#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 +#define CONFIGURE_INTERRUPT_STACK_MEMORY (16 * 1024) + +/* uart.c uses out_8 instead of outb */ +#define BSP_UART_IOBASE_COM1 GT64260_DEV1_BASE + 0x20000 +#define BSP_UART_IOBASE_COM2 GT64260_DEV1_BASE + 0x21000 + +#define BSP_CONSOLE_PORT BSP_UART_COM1 /* console */ +#define BSP_UART_BAUD_BASE 115200 + +/* + * Vital Board data Start using DATA RESIDUAL + */ +/* + * Total memory using RESIDUAL DATA + */ +extern unsigned int BSP_mem_size; +/* + * PCI Bus Frequency + */ +extern unsigned int BSP_bus_frequency; +/* + * processor clock frequency + */ +extern unsigned int BSP_processor_frequency; +/* + * Time base divisior (how many tick for 1 second). + */ +extern unsigned int BSP_time_base_divisor; + +#define BSP_Convert_decrementer( _value ) \ + ((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value))) + +extern rtems_configuration_table BSP_Configuration; +extern void BSP_panic(char *s); +extern void rtemsReboot(void); +/* extern int printk(const char *, ...) __attribute__((format(printf, 1, 2))); */ +extern int BSP_disconnect_clock_handler (void); +extern int BSP_connect_clock_handler (void); + +extern unsigned long _BSP_clear_hostbridge_errors(); + +#define RTEMS_BSP_NETWORK_DRIVER_NAME "gt1" +#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_GT64260eth_driver_attach + +extern int +RTEMS_BSP_NETWORK_DRIVER_ATTACH(/* struct rtems_bsdnet_ifconfig * */); + + +#endif diff --git a/c/src/lib/libbsp/powerpc/mvme5500/include/bspopts.h.in b/c/src/lib/libbsp/powerpc/mvme5500/include/bspopts.h.in new file mode 100644 index 0000000000..2678efef45 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/include/bspopts.h.in @@ -0,0 +1,23 @@ +/* include/bspopts.h.in. Generated from configure.ac by autoheader. */ + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* If defined, then the PowerPC specific code in RTEMS will use data cache + instructions to optimize the context switch code. This code can conflict + with debuggers or emulators. It is known to break the Corelis PowerPC + emulator with at least some combinations of PowerPC 603e revisions and + emulator versions. The BSP actually contains the call that enables this. */ +#undef PPC_USE_DATA_CACHE diff --git a/c/src/lib/libbsp/powerpc/mvme5500/irq/GT64260Int.c b/c/src/lib/libbsp/powerpc/mvme5500/irq/GT64260Int.c new file mode 100644 index 0000000000..3c383c09ef --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/irq/GT64260Int.c @@ -0,0 +1,245 @@ +/* GT64260Int.c - GT64260 Interrupt controller support functions + * + * Copyright 2003, 2004, Brookhaven National Laboratory and + * Shuchen Kate Feng + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution. + * + */ +#include +#include /* for printk */ + +#include "bsp/gtreg.h" +#include "bsp/irq.h" + +extern rtems_irq_prio BSPirqPrioTable[BSP_MAIN_IRQ_NUMBER]; + +rtems_GTirq_masks GT_GPPirq_cache=0; +rtems_GTirq_masks GT_MAINirqLO_cache=0, GT_MAINirqHI_cache=0; + +void BSP_GT64260INT_init() +{ + + /* Page 401, Table 598: + * Comm Unit Arbiter Control register : + * bit 10:GPP interrupts as level sensitive(1) or edge sensitive(0). + * We set the GPP interrupts to be edge sensitive. + * MOTload default is set as level sensitive(1). + */ + outl((inl(GT_CommUnitArb_Ctrl)& (~(1<<10))), GT_CommUnitArb_Ctrl); + + /* Initialize the interrupt related GT64260 registers */ + outl( 0, GT_CPU_INT_MASK_LO); + outl( 0, GT_CPU_INT_MASK_HI); + + outl( 0, GT_PCI0_INT_MASK_LO); + outl( 0, GT_PCI0_INT_MASK_HI); + + + outl( 0, GT_PCI1_INT_MASK_LO); + outl( 0, GT_PCI1_INT_MASK_HI); + + outl( 0, GT_CPU_INT0_MASK); + outl( 0, GT_CPU_INT1_MASK); + outl( 0, GT_CPU_INT2_MASK); + outl( 0, GT_CPU_INT3_MASK); + outl(0, GT_GPP_Interrupt_Mask); + outl( 0, GT_GPP_Value); + outl( 0, GT_GPP_Interrupt_Cause); +#if 0 + printk("watchdog timer 0x%x\n",inl(0xb410)); +#endif +} + +static void UpdateMainIrqTbl(int irqNum) +{ + int i=0, j, shifted=0, found=0; + +#ifdef SHOW_MORE_INIT_SETTINGS + unsigned long val2, val1; + + val2 = (MainIrqInTbl>>32) & 0xffffffff; + val1 = MainIrqInTbl&0xffffffff; + printk("irqNum %d, MainIrqInTbl 0x%x%x\n", irqNum, val2, val1); + printMainIrqTbl(); +#endif + + /* If entry not in table*/ + if ( !((unsigned long long)(1LLU << irqNum) & MainIrqInTbl)) { + while ( mainIrqTbl[i]!=-1) { + if (BSPirqPrioTable[irqNum]>BSPirqPrioTable[mainIrqTbl[i]]) { + /* all other lower priority entries shifted right */ + for (j=MainIrqTblPtr;j>i; j--) + mainIrqTbl[j]=mainIrqTbl[j-1]; + mainIrqTbl[i]=irqNum; + shifted=1; + break; + } + i++; + } + if (!shifted) mainIrqTbl[MainIrqTblPtr]=irqNum; + MainIrqInTbl |= (unsigned long long)(1LLU << irqNum); + MainIrqTblPtr++; + } +} + +static void CleanMainIrqTbl(int irqNum) +{ + int i, j; + + if (((1LLU << irqNum) & MainIrqInTbl)) { /* If entry in table*/ + for (i=0; i<64; i++) { + if (mainIrqTbl[i]==irqNum) {/*remove it from the entry */ + /* all other lower priority entries shifted left */ + for (j=i;j$(DEPEND).tmp +@RTEMS_USE_GCC_TRUE@ mv $(DEPEND).tmp $(DEPEND) + +# pull in dependencies if they exist +@RTEMS_USE_GCC_TRUE@ifeq (${DEPEND},$(wildcard ${DEPEND})) +@RTEMS_USE_GCC_TRUE@include ${DEPEND} +@RTEMS_USE_GCC_TRUE@@ENDIF@ +depend: depend-am + +@RTEMS_USE_GCC_TRUE@define make-rel +@RTEMS_USE_GCC_TRUE@ $(LINK) -qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) $^ +@RTEMS_USE_GCC_TRUE@endef +@RTEMS_USE_GCC_FALSE@define make-rel +@RTEMS_USE_GCC_FALSE@ $(LINK) $(XLDFLAGS) $^ +@RTEMS_USE_GCC_FALSE@endef + +${ARCH}: + mkdir ${ARCH} + +clean-local: + $(RM) -r o-optimize o-debug o-profile $(CLEANDIRS) + $(RM) Depends-o-optimize.tmp Depends-o-debug.tmp Depends-o-profile.tmp + +define make-library +test -d $(ARCH) || mkdir $(ARCH) +$(RM) $@ +$(AR) $(ARFLAGS) $@ $^ +$(RANLIB) $@ +endef + +$(PROJECT_RELEASE)/lib: + @$(mkinstalldirs) $@ + +.PRECIOUS: $(LIB) + +# +# (OPTIONAL) Add local stuff here using += +# + +$(PROJECT_INCLUDE)/bsp: + $(mkinstalldirs) $< + +$(PROJECT_INCLUDE)/bsp/irq.h: irq.h + $(INSTALL_DATA) $< $@ + +all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) + +debug: + @echo + @echo "\"make debug\" is obsolete, instead use:" + @echo " make VARIANT=DEBUG" + @echo + +.PHONY: debug + +profile: + @echo + @echo "\"make profile\" is obsolete, instead use:" + @echo " make VARIANT=PROFILE" + @echo + +.PHONY: profile + +preinstall-am: $(PREINSTALL_FILES) +preinstall: preinstall-am +.PHONY: preinstall preinstall-am + +depend-am: depend-gcc +depend: depend-am +.PHONY: depend depend-am depend-gcc +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/c/src/lib/libbsp/powerpc/mvme5500/irq/irq.c b/c/src/lib/libbsp/powerpc/mvme5500/irq/irq.c new file mode 100644 index 0000000000..9108d2b87e --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/irq/irq.c @@ -0,0 +1,544 @@ +/* irq.c + * + * This file contains the implementation of the function described in irq.h + * + * Copyright (C) 1998, 1999 valette@crf.canon.fr + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * Special acknowledgement to Till Straumann + * for providing inputs to the IRQ handling and optimization. + * + * Modified and added support for the MVME5500 board + * Copyright 2003, 2004, Shuchen Kate Feng , + * NSLS,Brookhaven National Laboratory + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include /* for printk */ +#include "bsp/gtreg.h" + +#define HI_INT_CAUSE 0x40000000 + +/*#define DEBUG*/ + +int gpp_int_error =0; + +/* + * pointer to the mask representing the additionnal irq vectors + * that must be disabled when a particular entry is activated. + * They will be dynamically computed from teh prioruty table given + * in BSP_rtems_irq_mngt_set(); + * CAUTION : this table is accessed directly by interrupt routine + * prologue. + */ +static unsigned int irq_prio_maskLO_tbl[BSP_MAIN_IRQ_NUMBER]; +static unsigned int irq_prio_maskHI_tbl[BSP_MAIN_IRQ_NUMBER]; + +/* + * default handler connected on each irq after bsp initialization + */ +static rtems_irq_connect_data default_rtems_entry; + +/* + * location used to store initial tables used for interrupt + * management. + */ +static rtems_irq_global_settings* internal_config; +static rtems_irq_connect_data* rtems_hdl_tbl; + +static unsigned int irqCAUSE[20], irqLOW[20], irqHIGH[20]; +static int irqIndex=0; + +/* + * Check if IRQ is a MAIN CPU internal IRQ + */ +static inline int is_main_irq(const rtems_irq_symbolic_name irqLine) +{ + return (((int) irqLine <= BSP_MICH_IRQ_MAX_OFFSET) & + ((int) irqLine >= BSP_MICL_IRQ_LOWEST_OFFSET) + ); +} + +/* + * Check if IRQ is a GPP IRQ + */ +static inline int is_gpp_irq(const rtems_irq_symbolic_name irqLine) +{ + return (((int) irqLine <= BSP_GPP_IRQ_MAX_OFFSET) & + ((int) irqLine >= BSP_GPP_IRQ_LOWEST_OFFSET) + ); +} + +/* + * Check if IRQ is a Porcessor IRQ + */ +static inline int is_processor_irq(const rtems_irq_symbolic_name irqLine) +{ + return (((int) irqLine <= BSP_PROCESSOR_IRQ_MAX_OFFSET) & + ((int) irqLine >= BSP_PROCESSOR_IRQ_LOWEST_OFFSET) + ); +} + +#define GT_GPP_Int1_Cause GT_GPP_Interrupt_Cause+1 +#define GT_GPP_Int2_Cause GT_GPP_Interrupt_Cause+2 +#define GT_GPP_Int3_Cause GT_GPP_Interrupt_Cause+3 + +void GT_GPP_IntHandler0() +{ + + unsigned gppCause, irqNum, bitNum; + int i, found=0; + + gppCause = inb(GT_GPP_Interrupt_Cause) & GT_GPPirq_cache; + + for (i=0; GPP7_0IrqTbl[i]!=-1;i++){ + bitNum =GPP7_0IrqTbl[i]; + if (gppCause & (1<>8); + + for (i=0; GPP15_8IrqTbl[i]!=-1;i++){ + bitNum =GPP15_8IrqTbl[i]; + if (gppCause & (1<>16); + + for (i=0; GPP23_16IrqTbl[i]!=-1;i++){ + bitNum =GPP23_16IrqTbl[i]; + if (gppCause & (1<>24); + + for (i=0; GPP31_24IrqTbl[i]!=-1;i++){ + bitNum=GPP31_24IrqTbl[i]; + if (gppCause & (1< a equal priority. + */ + if (internal_config->irqPrioTbl [i] >= internal_config->irqPrioTbl [j]) { + irq_prio_mask |= (unsigned long long)(1LLU << j); + } + } + + irq_prio_maskLO_tbl[i] = irq_prio_mask & 0xffffffff; + irq_prio_maskHI_tbl[i] = (irq_prio_mask>>32) & 0xffffffff; +#ifdef DEBUG + printk("irq_mask_prio_tbl[%d]:0x%8x%8x\n",i,irq_prio_maskHI_tbl[i], + irq_prio_maskLO_tbl[i]); +#endif + } +} + +/* + * This function check that the value given for the irq line + * is valid. + */ + +static int isValidInterrupt(int irq) +{ + if ( (irq < BSP_LOWEST_OFFSET) || (irq > BSP_MAX_OFFSET)) + return 0; + return 1; +} + +/* + * ------------------------ RTEMS Single Irq Handler Mngt Routines ---------------- + */ + +int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq) +{ + unsigned int level; + + if (!isValidInterrupt(irq->name)) { + printk("Invalid interrupt vector %d\n",irq->name); + return 0; + } + /* + * Check if default handler is actually connected. If not issue an error. + * You must first get the current handler via i386_get_current_idt_entry + * and then disconnect it using i386_delete_idt_entry. + * RATIONALE : to always have the same transition by forcing the user + * to get the previous handler before accepting to disconnect. + */ + _CPU_ISR_Disable(level); + if (rtems_hdl_tbl[irq->name].hdl != default_rtems_entry.hdl) { + _CPU_ISR_Enable(level); + printk("IRQ vector %d already connected\n",irq->name); + return 0; + } + + /* + * store the data provided by user + */ + rtems_hdl_tbl[irq->name] = *irq; + rtems_hdl_tbl[irq->name].next_handler = (void *)-1; + + if (is_main_irq(irq->name)) { + /* + * Enable (internal ) Main Interrupt Cause Low and High + */ +#ifdef DEBUG_IRQ + printk("main irq %d\n",irq->name); +#endif + BSP_enable_main_irq(irq->name); + } + + if (is_gpp_irq(irq->name)) { + /* + * Enable (external) GPP[x] interrupt + */ + BSP_enable_gpp_irq((int) irq->name); + } + + if (is_processor_irq(irq->name)) { + /* + * Enable exception at processor level + */ + } + /* + * Enable interrupt on device + + irq->on(irq);*/ + + _CPU_ISR_Enable(level); + + return 1; +} + + +int BSP_get_current_rtems_irq_handler (rtems_irq_connect_data* irq) +{ + if (!isValidInterrupt(irq->name)) { + return 0; + } + *irq = rtems_hdl_tbl[irq->name]; + return 1; +} + +int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq) +{ + unsigned int level; + + if (!isValidInterrupt(irq->name)) { + return 0; + } + /* + * Check if default handler is actually connected. If not issue an error. + * You must first get the current handler via i386_get_current_idt_entry + * and then disconnect it using i386_delete_idt_entry. + * RATIONALE : to always have the same transition by forcing the user + * to get the previous handler before accepting to disconnect. + */ + if (rtems_hdl_tbl[irq->name].hdl != irq->hdl) { + return 0; + } + _CPU_ISR_Disable(level); + + if (is_main_irq(irq->name)) { + /* + * disable CPU main interrupt + */ + BSP_disable_main_irq(irq->name); + } + if (is_gpp_irq(irq->name)) { + /* + * disable external interrupt + */ + BSP_disable_gpp_irq(irq->name); + } + if (is_processor_irq(irq->name)) { + /* + * disable exception at processor level + */ + } + + /* + * Disable interrupt on device + */ + irq->off(irq); + + /* + * restore the default irq value + */ + rtems_hdl_tbl[irq->name] = default_rtems_entry; + + _CPU_ISR_Enable(level); + + return 1; +} + +/* + * ------------------------ RTEMS Global Irq Handler Mngt Routines ---------------- + */ + +int BSP_rtems_irq_mngt_set(rtems_irq_global_settings* config) +{ + int i; + unsigned int level; + /* + * Store various code accelerators + */ + internal_config = config; + default_rtems_entry = config->defaultEntry; + rtems_hdl_tbl = config->irqHdlTbl; + + _CPU_ISR_Disable(level); + compute_GT64260int_masks_from_prio(); + + /* + * set up internal tables used by rtems interrupt prologue + */ + /* + * start with MAIN CPU IRQ + */ + for (i=BSP_MICL_IRQ_LOWEST_OFFSET; i < BSP_GPP_IRQ_LOWEST_OFFSET ; i++) { + if (rtems_hdl_tbl[i].hdl != default_rtems_entry.hdl) { + BSP_enable_main_irq(i); + rtems_hdl_tbl[i].on(&rtems_hdl_tbl[i]); + } + else { + rtems_hdl_tbl[i].off(&rtems_hdl_tbl[i]); + BSP_disable_main_irq(i); + } + } + /* + * continue with external IRQ + */ + for (i=BSP_GPP_IRQ_LOWEST_OFFSET; i It seems that reading back is necessary to ensure the + * interrupt mask updated. Otherwise, spurious interrupt will + * happen. However, I do not want to use "while loop" to risk + * the CPU stuck. I wound rather keep track of the interrupt + * mask if not updated. + */ + if (((irqLOW[irqIndex]= inl(GT_CPU_INT_MASK_LO))!=GT_MAINirqLO_cache)|| + ((irqHIGH[irqIndex]= inl(GT_CPU_INT_MASK_HI))!=GT_MAINirqHI_cache)){ + irqIndex++; + irqIndex %=20; + irqCAUSE[irqIndex] = irq; + } + _CPU_MSR_GET(msr); + new_msr = msr | MSR_EE; + _CPU_MSR_SET(new_msr); + rtems_hdl_tbl[irq].hdl(); + _CPU_MSR_SET(msr); + break; + } + } + GT_MAINirqLO_cache=oldMask[0]; + outl(GT_MAINirqLO_cache, GT_CPU_INT_MASK_LO); + GT_MAINirqHI_cache=oldMask[1]; + outl(GT_MAINirqHI_cache, GT_CPU_INT_MASK_HI); +} + +void _ThreadProcessSignalsFromIrq (BSP_Exception_frame* ctx) +{ + /* + * Process pending signals that have not already been + * processed by _Thread_Displatch. This happens quite + * unfrequently : the ISR must have posted an action + * to the current running thread. + */ + if ( _Thread_Do_post_task_switch_extension || + _Thread_Executing->do_post_task_switch_extension ) { + _Thread_Executing->do_post_task_switch_extension = FALSE; + _API_extensions_Run_postswitch(); + } + /* + * I plan to process other thread related events here. + * This will include DEBUG session requested from keyboard... + */ +} + +void BSP_printIRQMask() +{ + int i; + + for (i=0; i< 20; i++) + printk("IRQ%d : 0x%x %x \n", irqCAUSE[i], irqHIGH[i],irqLOW[i]); +} diff --git a/c/src/lib/libbsp/powerpc/mvme5500/irq/irq.h b/c/src/lib/libbsp/powerpc/mvme5500/irq/irq.h new file mode 100644 index 0000000000..bfc246ca6a --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/irq/irq.h @@ -0,0 +1,331 @@ +/* irq.h + * + * This include file describe the data structure and the functions implemented + * by rtems to write interrupt handlers. + * + * CopyRight (C) 1999 valette@crf.canon.fr + * + * This code is heavilly inspired by the public specification of STREAM V2 + * that can be found at : + * + * by following + * the STREAM API Specification Document link. + * + * The license and distribution terms for this file may be + * found in found in the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * Copyright 2004, Brookhaven National Laboratory and + * Shuchen Kate Feng + * + * - modified shared/irq/irq.h for Mvme5500 (no ISA devices/PIC) + * - Discovery GT64260 interrupt controller instead of 8259. + * - Added support for software IRQ priority levels. + */ + +#ifndef LIBBSP_POWERPC_MVME5500_IRQ_IRQ_H +#define LIBBSP_POWERPC_MVME5500_IRQ_IRQ_H + + +#define BSP_ASM_IRQ_VECTOR_BASE 0x0 + +#ifndef ASM + +#define DynamicIrqTbl 1 + +/* + * Symbolic IRQ names and related definitions. + */ + +/* leave the ISA symbols in there, so we can reuse shared/irq.c + * Also, we start numbering PCI irqs at 16 because the OPENPIC + * driver relies on this when mapping irq number <-> vectors + * (OPENPIC_VEC_SOURCE in openpic.h) + */ + +typedef enum { + /* See section 25.2 , Table 734 of GT64260 controller + * Main Interrupt Cause Low register + */ + BSP_MICL_IRQ_NUMBER = 32, + BSP_MICL_IRQ_LOWEST_OFFSET = 0, + BSP_MICL_IRQ_MAX_OFFSET = BSP_MICL_IRQ_LOWEST_OFFSET + BSP_MICL_IRQ_NUMBER -1, + /* + * Main Interrupt Cause High register + */ + BSP_MICH_IRQ_NUMBER = 32, + BSP_MICH_IRQ_LOWEST_OFFSET = BSP_MICL_IRQ_MAX_OFFSET+1, + BSP_MICH_IRQ_MAX_OFFSET = BSP_MICH_IRQ_LOWEST_OFFSET + BSP_MICH_IRQ_NUMBER -1, + /* External GPP Interrupt assignements + */ + BSP_GPP_IRQ_NUMBER = 32, + BSP_GPP_IRQ_LOWEST_OFFSET = BSP_MICH_IRQ_MAX_OFFSET+1, + BSP_GPP_IRQ_MAX_OFFSET = BSP_GPP_IRQ_LOWEST_OFFSET + BSP_GPP_IRQ_NUMBER - 1, + + /* + * PowerPc exceptions handled as interrupt where a rtems managed interrupt + * handler might be connected + */ + BSP_PROCESSOR_IRQ_NUMBER = 1, + BSP_PROCESSOR_IRQ_LOWEST_OFFSET = BSP_GPP_IRQ_MAX_OFFSET + 1, + BSP_PROCESSOR_IRQ_MAX_OFFSET = BSP_PROCESSOR_IRQ_LOWEST_OFFSET + BSP_PROCESSOR_IRQ_NUMBER - 1, + + /* allow a couple of vectors for VME and counter/timer irq sources etc. + * This is probably not needed any more. + */ + BSP_MISC_IRQ_NUMBER = 30, + BSP_MISC_IRQ_LOWEST_OFFSET = BSP_PROCESSOR_IRQ_MAX_OFFSET + 1, + BSP_MISC_IRQ_MAX_OFFSET = BSP_MISC_IRQ_LOWEST_OFFSET + BSP_MISC_IRQ_NUMBER - 1, + +#if 0 + /* + * ISA IRQ handler related definitions + */ + /* MVME5500 ISA local resources exist only if an IPMC 712/761 module + * is mounted. + */ + BSP_ISA_IRQ_NUMBER = 0, + BSP_ISA_IRQ_LOWEST_OFFSET = BSP_MISC_IRQ_MAX_OFFSET+1, + BSP_ISA_IRQ_MAX_OFFSET = BSP_ISA_IRQ_LOWEST_OFFSET + BSP_ISA_IRQ_NUMBER - 1, + +#endif + + /* + * Summary + */ + BSP_IRQ_NUMBER = BSP_MISC_IRQ_MAX_OFFSET + 1, + BSP_MAIN_IRQ_NUMBER = 64, + BSP_LOWEST_OFFSET = BSP_MICL_IRQ_LOWEST_OFFSET, + BSP_MAX_OFFSET = BSP_MISC_IRQ_MAX_OFFSET, + + /* Main CPU interrupt cause (Low) */ + BSP_MAIN_TIMER0_1_IRQ = BSP_MICL_IRQ_LOWEST_OFFSET+8, + BSP_MAIN_PCI0_7_0 = BSP_MICL_IRQ_LOWEST_OFFSET+12, + BSP_MAIN_PCI0_15_8 = BSP_MICL_IRQ_LOWEST_OFFSET+13, + BSP_MAIN_PCI0_23_16 = BSP_MICL_IRQ_LOWEST_OFFSET+14, + BSP_MAIN_PCI0_31_24 = BSP_MICL_IRQ_LOWEST_OFFSET+15, + BSP_MAIN_PCI1_7_0 = BSP_MICL_IRQ_LOWEST_OFFSET+16, + BSP_MAIN_PCI1_15_8 = BSP_MICL_IRQ_LOWEST_OFFSET+18, + BSP_MAIN_PCI1_23_16 = BSP_MICL_IRQ_LOWEST_OFFSET+19, + BSP_MAIN_PCI1_31_24 = BSP_MICL_IRQ_LOWEST_OFFSET+20, + + + /* Main CPU interrupt cause (High) */ + BSP_MAIN_ETH0_IRQ = BSP_MICH_IRQ_LOWEST_OFFSET, + BSP_MAIN_ETH1_IRQ = BSP_MICH_IRQ_LOWEST_OFFSET+1, + BSP_MAIN_ETH2_IRQ = BSP_MICH_IRQ_LOWEST_OFFSET+2, + BSP_MAIN_GPP7_0_IRQ = BSP_MICH_IRQ_LOWEST_OFFSET+24, + BSP_MAIN_GPP15_8_IRQ = BSP_MICH_IRQ_LOWEST_OFFSET+25, + BSP_MAIN_GPP23_16_IRQ = BSP_MICH_IRQ_LOWEST_OFFSET+26, + BSP_MAIN_GPP31_24_IRQ = BSP_MICH_IRQ_LOWEST_OFFSET+27, + + /* on the MVME5500, these are the GT64260B external GPP0 interrupt */ + BSP_ISA_UART_COM2_IRQ = BSP_GPP_IRQ_LOWEST_OFFSET, + BSP_ISA_UART_COM1_IRQ = BSP_GPP_IRQ_LOWEST_OFFSET, + BSP_GPP8_IRQ_OFFSET = BSP_GPP_IRQ_LOWEST_OFFSET+8, + BSP_GPP16_IRQ_OFFSET = BSP_GPP_IRQ_LOWEST_OFFSET+16, + BSP_GPP24_IRQ_OFFSET = BSP_GPP_IRQ_LOWEST_OFFSET+24, + BSP_GPP_VME_VLINT0 = BSP_GPP_IRQ_LOWEST_OFFSET+12, + BSP_GPP_VME_VLINT1 = BSP_GPP_IRQ_LOWEST_OFFSET+13, + BSP_GPP_VME_VLINT2 = BSP_GPP_IRQ_LOWEST_OFFSET+14, + BSP_GPP_VME_VLINT3 = BSP_GPP_IRQ_LOWEST_OFFSET+15, + BSP_GPP_PMC2_INTA = BSP_GPP_IRQ_LOWEST_OFFSET+16, + BSP_GPP_82544_IRQ = BSP_GPP_IRQ_LOWEST_OFFSET+20, + BSP_GPP_WDT_NMI_IRQ = BSP_GPP_IRQ_LOWEST_OFFSET+24, + BSP_GPP_WDT_EXP_IRQ = BSP_GPP_IRQ_LOWEST_OFFSET+25, + + /* + * Some Processor execption handled as rtems IRQ symbolic name definition + */ + BSP_DECREMENTER = BSP_PROCESSOR_IRQ_LOWEST_OFFSET +}rtems_irq_symbolic_name; + +/* + * Type definition for RTEMS managed interrupts + */ +typedef unsigned char rtems_irq_prio; + +typedef unsigned int rtems_GTirq_masks; + +extern rtems_GTirq_masks GT_GPPirq_cache; +extern rtems_GTirq_masks GT_MAINirqLO_cache, GT_MAINirqHI_cache; + +struct __rtems_irq_connect_data__; /* forward declaratiuon */ + +typedef void (*rtems_irq_hdl) (void); +typedef void (*rtems_irq_ack) (void); +typedef void (*rtems_irq_enable) (const struct __rtems_irq_connect_data__*); +typedef void (*rtems_irq_disable) (const struct __rtems_irq_connect_data__*); +typedef int (*rtems_irq_is_enabled) (const struct __rtems_irq_connect_data__*); + +typedef struct __rtems_irq_connect_data__ { + /* + * IRQ line + */ + rtems_irq_symbolic_name name; + /* + * handler. See comment on handler properties below in function prototype. + */ + rtems_irq_hdl hdl; + /* + * function for enabling interrupts at device level (ONLY!). + * The BSP code will automatically enable it at i8259s level and openpic level. + * RATIONALE : anyway such code has to exist in current driver code. + * It is usually called immediately AFTER connecting the interrupt handler. + * RTEMS may well need such a function when restoring normal interrupt + * processing after a debug session. + * + */ + rtems_irq_enable on; + /* + * function for disabling interrupts at device level (ONLY!). + * The code will disable it at i8259s level. RATIONALE : anyway + * such code has to exist for clean shutdown. It is usually called + * BEFORE disconnecting the interrupt. RTEMS may well need such + * a function when disabling normal interrupt processing for + * a debug session. May well be a NOP function. + */ + rtems_irq_disable off; + /* + * function enabling to know what interrupt may currently occur + * if someone manipulates the i8259s interrupt mask without care... + */ + rtems_irq_is_enabled isOn; + /* + * Set to -1 for vectors forced to have only 1 handler + */ + void *next_handler; + +}rtems_irq_connect_data; + +typedef struct { + /* + * size of all the table fields (*Tbl) described below. + */ + unsigned int irqNb; + /* + * Default handler used when disconnecting interrupts. + */ + rtems_irq_connect_data defaultEntry; + /* + * Table containing initials/current value. + */ + rtems_irq_connect_data* irqHdlTbl; + /* + * actual value of BSP_ISA_IRQ_VECTOR_BASE... + */ + rtems_irq_symbolic_name irqBase; + /* + * software priorities associated with interrupts. + * if irqPrio [i] > intrPrio [j] it means that + * interrupt handler hdl connected for interrupt name i + * will not be interrupted by the handler connected for interrupt j + * The interrupt source will be physically masked at i8259 level. + */ + rtems_irq_prio* irqPrioTbl; +}rtems_irq_global_settings; + +/* + * ------------------------ RTEMS Single Irq Handler Mngt Routines ---------------- + */ +/* + * function to connect a particular irq handler. This hanlder will NOT be called + * directly as the result of the corresponding interrupt. Instead, a RTEMS + * irq prologue will be called that will : + * + * 1) save the C scratch registers, + * 2) switch to a interrupt stack if the interrupt is not nested, + * 3) store the current i8259s' interrupt masks + * 4) modify them to disable the current interrupt at 8259 level (and may + * be others depending on software priorities) + * 5) aknowledge the i8259s', + * 6) demask the processor, + * 7) call the application handler + * + * As a result the hdl function provided + * + * a) can perfectly be written is C, + * b) may also well directly call the part of the RTEMS API that can be used + * from interrupt level, + * c) It only responsible for handling the jobs that need to be done at + * the device level including (aknowledging/re-enabling the interrupt at device, + * level, getting the data,...) + * + * When returning from the function, the following will be performed by + * the RTEMS irq epilogue : + * + * 1) masks the interrupts again, + * 2) restore the original i8259s' interrupt masks + * 3) switch back on the orinal stack if needed, + * 4) perform rescheduling when necessary, + * 5) restore the C scratch registers... + * 6) restore initial execution flow + * + */ +int BSP_install_rtems_irq_handler (const rtems_irq_connect_data*); +int BSP_install_rtems_shared_irq_handler (const rtems_irq_connect_data*); + +#define BSP_SHARED_HANDLER_SUPPORT 1 + +/* + * function to get the current RTEMS irq handler for ptr->name. It enables to + * define hanlder chain... + */ +int BSP_get_current_rtems_irq_handler (rtems_irq_connect_data* ptr); +/* + * function to get disconnect the RTEMS irq handler for ptr->name. + * This function checks that the value given is the current one for safety reason. + * The user can use the previous function to get it. + */ +int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data*); + +/* + * ------------------------ RTEMS Global Irq Handler Mngt Routines ---------------- + */ +/* + * (Re) Initialize the RTEMS interrupt management. + * + * The result of calling this function will be the same as if each individual + * handler (config->irqHdlTbl[i].hdl) different from "config->defaultEntry.hdl" + * has been individualy connected via + * BSP_install_rtems_irq_handler(&config->irqHdlTbl[i]) + * And each handler currently equal to config->defaultEntry.hdl + * has been previously disconnected via + * BSP_remove_rtems_irq_handler (&config->irqHdlTbl[i]) + * + * This is to say that all information given will be used and not just + * only the space. + * + * CAUTION : the various table address contained in config will be used + * directly by the interrupt mangement code in order to save + * data size so they must stay valid after the call => they should + * not be modified or declared on a stack. + */ + +int BSP_rtems_irq_mngt_set(rtems_irq_global_settings* config); +/* + * (Re) get info on current RTEMS interrupt management. + */ +int BSP_rtems_irq_mngt_get(rtems_irq_global_settings**); + +void BSP_enable_main_irq(unsigned irqNum); +void BSP_disable_main_irq(unsigned irqNum); +void BSP_enable_gpp_irq(unsigned irqNum); +void BSP_disable_gpp_irq(unsigned irqNum); + +extern void BSP_rtems_irq_mng_init(unsigned cpuId); +extern int gpp_int_error; +#if DynamicIrqTbl +extern int MainIrqTblPtr; +extern unsigned long long MainIrqInTbl; +extern unsigned char GPPinMainIrqTbl[4]; +#endif +extern unsigned int mainIrqTbl[64]; +extern unsigned int GPP7_0IrqTbl[8]; +extern unsigned int GPP15_8IrqTbl[8]; +extern unsigned int GPP23_16IrqTbl[8]; +extern unsigned int GPP31_24IrqTbl[8]; + +#endif + +#endif diff --git a/c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c b/c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c new file mode 100644 index 0000000000..787737358c --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c @@ -0,0 +1,242 @@ +/* irq_init.c + * + * This file contains the implementation of rtems initialization + * related to interrupt handling. + * + * CopyRight (C) 1999 valette@crf.canon.fr + * + * Special acknowledgement to Till Straumann + * for providing inputs to the IRQ optimization. + * + * Modified and added support for the MVME5500. + * Copyright 2003, 2004, Brookhaven National Laboratory and + * Shuchen Kate Feng + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + */ +#include +#include +#include +#include +#include /* ASM_EXT_VECTOR, ASM_DEC_VECTOR ... */ + +extern unsigned int external_exception_vector_prolog_code_size[]; +extern void external_exception_vector_prolog_code(); +extern unsigned int decrementer_exception_vector_prolog_code_size[]; +extern void decrementer_exception_vector_prolog_code(); +extern void GT_GPP_IntHandler0(), GT_GPP_IntHandler1(); +extern void GT_GPP_IntHandler2(), GT_GPP_IntHandler3(); +extern void BSP_GT64260INT_init(); + +/* + * default on/off function + */ +static void nop_func(){} +/* + * default isOn function + */ +static int not_connected() {return 0;} +/* + * default possible isOn function + */ +static int connected() {return 1;} + +static rtems_irq_connect_data rtemsIrq[BSP_IRQ_NUMBER]; +static rtems_irq_global_settings initial_config; +static rtems_irq_connect_data defaultIrq = { + /* vectorIdex, hdl , on , off , isOn */ + 0, nop_func , nop_func , nop_func , not_connected +}; + +rtems_irq_prio BSPirqPrioTable[BSP_MAIN_IRQ_NUMBER]={ + /* + * This table is where the developers can change the levels of priority + * based on the need of their applications. + * + * actual priorities for CPU MAIN interrupts 0-63: + * 0 means that only current interrupt is masked (lowest priority) + * 255 means all other interrupts are masked + */ + /* CPU Main cause low interrupt */ + /* 0-15 */ + 0, 0, 0, 0, 0, 0, 0, 0, 4/*Timer*/, 0, 0, 0, 0, 0, 0, 0, + /* 16-31 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* CPU Main cause high interrupt */ + /* 32-47 */ + 1/*10/100MHZ*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 48-63 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0/*serial*/, 3/*VME*/, 2/*1GHZ*/, 5/*WD*/, 0, 0, 0, 0 +}; + +/* The mainIrqTbl[64] lists the enabled CPU main interrupt + * numbers [0-63] starting from the highest priority one + * to the lowest priority one. + * + * The highest priority interrupt is located at mainIrqTbl[0], and + * the lowest priority interrupt is located at + * mainIrqTbl[MainIrqTblPtr-1]. + */ + +#if DynamicIrqTbl +/* The mainIrqTbl[64] is updated dynamically based on the priority + * levels set at BSPirqPrioTable[64], as the BSP_enable_main_irq() and + * BSP_disable_main_irq() commands are invoked. + * + * Caveat: The eight GPP IRQs for each BSP_MAIN_GPPx_y_IRQ group are set + * at the same main priority in the BSPirqPrioTable, while the + * sub-priority levels for the eight GPP in each group are sorted + * statically by developers in the GPPx_yIrqTbl[8] from the highest + * priority to the lowest one. + */ +int MainIrqTblPtr=0; +unsigned long long MainIrqInTbl=0; +unsigned char GPPinMainIrqTbl[4]={0,0,0,0}; +/* BitNums for Main Interrupt Lo/High Cause, -1 means invalid bit */ +unsigned int mainIrqTbl[BSP_MAIN_IRQ_NUMBER]={ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1}; +#else +/* Pre-sorted for IRQ optimization, and prioritization + * The interrupts sorted are : + + 1. Watchdog timer (GPP #25) + 2. Timers 0-1 (Main interrupt low cause, bit 8) + 3. VME interrupt (GPP #12) + 4. 1 GHZ ethernet (GPP #20) + 5. 10/100 MHZ ethernet (Main interrupt high cause, bit 0) + 6. COM1/COM2 (GPP #0) + +*/ +/* BitNums for Main Interrupt Lo/High Cause, -1 means invalid bit */ +unsigned int mainIrqTbl[64]={ BSP_MAIN_GPP31_24_IRQ, /* 59:watchdog timer */ + BSP_MAIN_TIMER0_1_IRQ, /* 8:Timers 0-1 */ + BSP_MAIN_GPP15_8_IRQ, /* 57:VME interrupt */ + BSP_MAIN_GPP23_16_IRQ, /* 58: 1 GHZ ethernet */ + BSP_MAIN_ETH0_IRQ, /* 32:10/100 MHZ ethernet */ + BSP_MAIN_GPP7_0_IRQ, /* 56:COM1/COM2 */ + -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1}; +#endif + +unsigned int GPP7_0IrqTbl[8]={0, /* COM1/COM2 */ + -1, -1, -1, -1, -1, -1, -1}; +unsigned int GPP15_8IrqTbl[8]={4, /* VME (12-8=4) */ + -1, -1, -1, -1, -1, -1, -1}; +unsigned int GPP23_16IrqTbl[8]={4, /* 82544 1GHZ ethernet (20-16=4)*/ + -1, -1, -1, -1, -1, -1, -1}; +unsigned int GPP31_24IrqTbl[8]={1, /* watchdog timer (25-24=1) */ + -1, -1, -1, -1, -1, -1, -1}; + +static int +doit(unsigned intNum, rtems_irq_hdl handler, int (*p)(const rtems_irq_connect_data*)) +{ + rtems_irq_connect_data d={0}; + d.name = intNum; + d.isOn = connected; + d.hdl = handler; + return p(&d); +} + +int BSP_GT64260_install_isr(unsigned intNum,rtems_irq_hdl handler) +{ + return doit(intNum, handler, BSP_install_rtems_irq_handler); +} + +/* + * This code assumes the exceptions management setup has already + * been done. We just need to replace the exceptions that will + * be handled like interrupt. On MPC7455 and many PPC processors + * this means the decrementer exception and the external exception. + */ +void BSP_rtems_irq_mng_init(unsigned cpuId) +{ + rtems_raw_except_connect_data vectorDesc; + int i; + + /* + * First initialize the Interrupt management hardware + */ +#ifdef TRACE_IRQ_INIT + printk("Initializing the interrupt controller of the GT64260\n"); +#endif + BSP_GT64260INT_init(); + +#ifdef TRACE_IRQ_INIT + printk("Going to re-initialize the rtemsIrq table %d\n",BSP_IRQ_NUMBER); +#endif + /* + * Initialize Rtems management interrupt table + */ + /* + * re-init the rtemsIrq table + */ + for (i = 0; i < BSP_IRQ_NUMBER; i++) { + rtemsIrq[i] = defaultIrq; + rtemsIrq[i].name = i; + } + + /* + * Init initial Interrupt management config + */ + initial_config.irqNb = BSP_IRQ_NUMBER; + initial_config.defaultEntry = defaultIrq; + initial_config.irqHdlTbl = rtemsIrq; + initial_config.irqBase = BSP_ASM_IRQ_VECTOR_BASE; + initial_config.irqPrioTbl = BSPirqPrioTable; + +#ifdef TRACE_IRQ_INIT + printk("Going to setup irq mngt configuration\n"); +#endif + + if (!BSP_rtems_irq_mngt_set(&initial_config)) { + /* + * put something here that will show the failure... + */ + BSP_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n"); + } + + /* Connect the GPP int handler to each of the associated main cause bits */ + BSP_GT64260_install_isr(BSP_MAIN_GPP7_0_IRQ, GT_GPP_IntHandler0); /* COM1 & COM2, .... */ + BSP_GT64260_install_isr(BSP_MAIN_GPP15_8_IRQ, GT_GPP_IntHandler1); + BSP_GT64260_install_isr(BSP_MAIN_GPP23_16_IRQ, GT_GPP_IntHandler2); + BSP_GT64260_install_isr(BSP_MAIN_GPP31_24_IRQ, GT_GPP_IntHandler3); + + /* + * We must connect the raw irq handler for the two + * expected interrupt sources : decrementer and external interrupts. + */ + vectorDesc.exceptIndex = ASM_DEC_VECTOR; + vectorDesc.hdl.vector = ASM_DEC_VECTOR; + vectorDesc.hdl.raw_hdl = decrementer_exception_vector_prolog_code; + vectorDesc.hdl.raw_hdl_size = (unsigned) decrementer_exception_vector_prolog_code_size; + vectorDesc.on = nop_func; + vectorDesc.off = nop_func; + vectorDesc.isOn = connected; + if (!mpc60x_set_exception (&vectorDesc)) { + BSP_panic("Unable to initialize RTEMS decrementer raw exception\n"); + } + vectorDesc.exceptIndex = ASM_EXT_VECTOR; + vectorDesc.hdl.vector = ASM_EXT_VECTOR; + vectorDesc.hdl.raw_hdl = external_exception_vector_prolog_code; + vectorDesc.hdl.raw_hdl_size = (unsigned) external_exception_vector_prolog_code_size; + if (!mpc60x_set_exception (&vectorDesc)) { + BSP_panic("Unable to initialize RTEMS external raw exception\n"); + } +#ifdef TRACE_IRQ_INIT + printk("RTEMS IRQ management is now operationnal\n"); +#endif +} diff --git a/c/src/lib/libbsp/powerpc/mvme5500/network/GT64260eth.c b/c/src/lib/libbsp/powerpc/mvme5500/network/GT64260eth.c new file mode 100644 index 0000000000..530fa65fab --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/network/GT64260eth.c @@ -0,0 +1,1649 @@ +/* GT64260eth.c : GT64260 10/100 Mb ethernet MAC driver + * + * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. + * + * Copyright (c) 2003,2004 RTEMS/Mvme5500 port by S. Kate Feng + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed for the NetBSD Project by + * Allegro Networks, Inc., and Wasabi Systems, Inc. + * 4. The name of Allegro Networks, Inc. may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * 5. The name of Wasabi Systems, Inc. may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * + * S. Kate Feng, other notes in addition to porting to RTEMS : + * + * 1) Mvme5500 uses Eth0 (controller 0) of the GT64260 to implement + * the 10/100 BaseT Ethernet with PCI Master Data Byte Swap\ + * control. + * 2) It implements hardware snoop instead of software snoop + * to ensure SDRAM cache coherency. + * 3) The origianl ISR is optimized to minimize interrupt latencies, + * and to reduce system overhead. The driver's work is done by one single + * task who blocks on an event while it is idle. This implemetation + * is heavily inspired by the modification of SVGM network driver for + * RTEMS port written by Till Straumann, whihc is licensed under the + * EPICS open source. Ditto the GT64260eth_sendpacket(). + * + */ +#define BYTE_ORDER BIG_ENDIAN + +#ifndef KERNEL +#define KERNEL +#endif + +#define INET + +#include +#include /* printk */ +#include /* printf for statistics */ +#include + +#include /* inp & friends */ +#include /* registers.h is included here */ +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include /* SIOCADDMULTI, SIOC... */ +#include +#include +#include +#include + +#ifdef INET +#include +#endif + +#include +#include +#include +#include + +#define GT_ETH_TASK_NAME "Geth" +#define PKT_BUF_SZ 1536 +#define SOFTC_ALIGN 31 +#define HASH_ALIGN 15 + +#define TXQ_HiLmt_OFF 2 + +/* + * 1. printk debug is for diagnosis only, which may cause + * unexpected result, especially if txq is under heavy load + * because CPU is fast with a decent cache. + */ +#define GTeth_debug 0 +#define GTeth_rx_debug 0 + +#if 0 +#define GE_FORGOT +#define GE_NORX +#define GT_DEBUG +#endif + +/* RTEMS event to kill the daemon */ +#define KILL_EVENT RTEMS_EVENT_1 +/* RTEMS event to (re)start the transmitter */ +#define START_TRANSMIT_EVENT RTEMS_EVENT_2 +/* RTEMS events used by the ISR */ +#define RX_EVENT RTEMS_EVENT_3 +#define TX_EVENT RTEMS_EVENT_4 +#define ERR_EVENT RTEMS_EVENT_5 + +#define ALL_EVENTS (KILL_EVENT|START_TRANSMIT_EVENT|RX_EVENT|TX_EVENT|ERR_EVENT) + +enum GTeth_whack_op { + GE_WHACK_START, GE_WHACK_RESTART, + GE_WHACK_CHANGE, GE_WHACK_STOP +}; + +enum GTeth_hash_op { + GE_HASH_ADD, GE_HASH_REMOVE, +}; + +#define ET_MINLEN 64 /* minimum message length */ + +static int GTeth_ifioctl(struct ifnet *ifp,unsigned cmd, caddr_t data); +static void GTeth_ifstart (struct ifnet *); +static void GTeth_ifchange(struct GTeth_softc *sc); +static void GTeth_init_rx_ring(struct GTeth_softc *sc); +static void GT64260eth_daemon(void *arg); +static int GT64260eth_sendpacket(struct GTeth_softc *sc,struct mbuf *m,enum GTeth_txprio); +static unsigned GTeth_txq_done(struct GTeth_softc *sc, enum GTeth_txprio txprio); +static void GTeth_tx_cleanup(struct GTeth_softc *sc, enum GTeth_txprio, int); +static void GTeth_tx_start(struct GTeth_softc *sc, enum GTeth_txprio); +static void GTeth_tx_stop(struct GTeth_softc *sc, enum GTeth_whack_op op); +static void GTeth_rx_cleanup(struct GTeth_softc *sc, enum GTeth_rxprio); +static int GT64260eth_rx(struct GTeth_softc *sc, enum GTeth_rxprio); +static void GTeth_rx_setup(struct GTeth_softc *sc); +static void GTeth_rxprio_setup(struct GTeth_softc *sc, enum GTeth_rxprio); +static void GTeth_rx_stop(struct GTeth_softc *dc, enum GTeth_whack_op op); +static void GT64260eth_isr(); +static int GTeth_hash_compute(struct GTeth_softc *sc,unsigned char eaddr[ETHER_ADDR_LEN]); +static int GTeth_hash_entry_op(struct GTeth_softc *sc, enum GTeth_hash_op op, + enum GTeth_rxprio prio,unsigned char eaddr[ETHER_ADDR_LEN]); + +static int GTeth_hash_fill(struct GTeth_softc *sc); +static void GTeth_hash_init(struct GTeth_softc *sc); + +static struct GTeth_softc *root_GT64260eth_dev = NULL; +static int GTeth_MissedFrame_err=0; + +/* + * Convert Ethernet address to printable (loggable) representation. + */ +static const char digits[] = "0123456789abcdef"; +char * ether_sprintf(unsigned char *ap) +{ + int i; + static char etherbuf[18]; + char *cp = etherbuf; + + for (i = 0; i < 6; i++) { + *cp++ = digits[*ap >> 4]; + *cp++ = digits[*ap++ & 0xf]; + *cp++ = ':'; + } + *--cp = 0; + return (etherbuf); +} + +/* We can hard code the address here if config->hardware_address failed */ +static int GTethGet_macaddr(int macno, char *hwaddr) +{ + hwaddr[0] = 0x00; + hwaddr[1] = 0x01; + hwaddr[2] = 0xaf; + hwaddr[3] = 0x0b; + hwaddr[4] = 0x75; + hwaddr[5] = 0x36; + + return 0; +} + +static void GT64260eth_irq_on(const rtems_irq_connect_data *irq) +{ + struct GTeth_softc *sc; + + for (sc= root_GT64260eth_dev; sc; sc= sc-> next_module) { + printk("GT64260eth_irq_on\n"); + outl(0x30883444,ETH0_EIMR); /* MOTLoad default interrupt mask */ + return; + } +} + +static void GT64260eth_irq_off(const rtems_irq_connect_data *irq) +{ + struct GTeth_softc *sc; + + for (sc= root_GT64260eth_dev; sc; sc= sc-> next_module) + outl(0, ETH0_EIMR); +} + +static int GT64260eth_irq_is_on(const rtems_irq_connect_data *irq) +{ + return(inl(ETH0_EICR) & ETH_IR_EtherIntSum); +} + +static void GT64260eth_isr() +{ + struct GTeth_softc *sc = root_GT64260eth_dev; + rtems_event_set events=0; + uint32_t cause; + + + cause = inl(ETH0_EICR); + outl( ~cause,ETH0_EICR); /* clear the ICR */ + + if (cause & (ETH_IR_RxBuffer_3|ETH_IR_RxError_3)) { + sc->stats.rxInterrupts++; + events |= RX_EVENT; + } + /* If there is an error, we want to continue to next descriptor */ + if (cause & (ETH_IR_TxBufferHigh|ETH_IR_TxEndHigh|ETH_IR_TxErrorHigh)) { + sc->stats.txInterrupts++; + events |= TX_EVENT; + if ((sc->txq_nactive) && ((inl(ETH0_ESDCMR)Ð_ESDCMR_TXDH)==0)) + outl(ETH_ESDCMR_TXDH | ETH_ESDCMR_ERD,ETH0_ESDCMR); + } + if ( (!cause) || (cause & 0x803d00)) { + sc->intr_errsts[sc->intr_err_ptr2++]=cause; + sc->intr_err_ptr2 %=INTR_ERR_SIZE; /* Till Straumann */ + events |= ERR_EVENT; + } + + rtems_event_send(sc->daemonTid, events); +} + +static rtems_irq_connect_data GT64260ethIrqData={ + BSP_MAIN_ETH0_IRQ, + (rtems_irq_hdl) GT64260eth_isr, + (rtems_irq_enable) GT64260eth_irq_on, + (rtems_irq_disable) GT64260eth_irq_off, + (rtems_irq_is_enabled) GT64260eth_irq_is_on, +}; + +static void GT64260eth_init_hw(struct GTeth_softc *sc) +{ + +#ifdef GT_DEBUG + printk("GT64260eth_init_hw("); +#endif + /* Kate Feng : Turn the hardware snoop on as MOTLoad did not have + * it on by default. + */ + outl(RxBSnoopEn|TxBSnoopEn|RxDSnoopEn|TxDSnoopEn, GT_CUU_Eth0_AddrCtrlLow); + outl(HashSnoopEn, GT_CUU_Eth0_AddrCtrlHigh); + + sc->rxq_intrbits=0; + sc->sc_flags=0; + +#ifndef GE_NORX + GTeth_rx_setup(sc); +#endif + +#ifndef GE_NOTX + GTeth_tx_start(sc, GE_TXPRIO_HI); +#endif + + sc->sc_pcr |= ETH_EPCR_HS_512; + outl(sc->sc_pcr, ETH0_EPCR); + outl(sc->sc_pcxr, ETH0_EPCXR); /* port config. extended reg. */ + outl(0, ETH0_EICR); /* interrupt cause register */ + outl(sc->sc_intrmask, ETH0_EIMR); +#ifndef GE_NOHASH + /* Port Hash Table Pointer Reg*/ + outl(((unsigned) sc->sc_hashtable),ETH0_EHTPR); +#endif +#ifndef GE_NORX + outl(ETH_ESDCMR_ERD,ETH0_ESDCMR); /* enable Rx DMA in SDMA Command Register */ + sc->sc_flags |= GE_RXACTIVE; +#endif +#ifdef GT_DEBUG + printk("SDCMR 0x%x ", inl(ETH0_ESDCMR)); +#endif + + /* connect the interrupt handler which should + * take care of enabling interrupts + */ + if (!BSP_install_rtems_irq_handler(>64260ethIrqData)) + rtems_panic("GT64260eth: unable to install ISR"); + + /* The ethernet port is ready to transmit/receive */ + outl(sc->sc_pcr | ETH_EPCR_EN, ETH0_EPCR); + +#ifdef GT_DEBUG + printk(")\n"); +#endif +} + +static void GT64260eth_stop_hw(struct GTeth_softc *sc) +{ + + printk("GT64260eth_stop_hw("); + + /* remove our interrupt handler which will also + * disable interrupts at the MPIC and the device + * itself + */ + if (!BSP_remove_rtems_irq_handler(>64260ethIrqData)) + rtems_panic("Yellowfin: unable to remove IRQ handler!"); + + outl(sc->sc_pcr, ETH0_EPCR); + outl(0, ETH0_EIMR); + + sc->arpcom.ac_if.if_flags &= ~IFF_RUNNING; +#ifndef GE_NOTX + GTeth_tx_stop(sc, GE_WHACK_STOP); +#endif +#ifndef GE_NORX + GTeth_rx_stop(sc, GE_WHACK_STOP); +#endif + sc->sc_hashtable = NULL; + if (GTeth_debug>0) printk(")"); +} + +static void GT64260eth_stop(struct GTeth_softc *sc) +{ + if (GTeth_debug>0) printk("GT64260eth_stop("); + + /* The hardware is shutdown in the daemon */ + /* kill the daemon. We also must release the networking + * semaphore or there'll be a deadlock... + */ + rtems_event_send(sc->daemonTid, KILL_EVENT); + rtems_bsdnet_semaphore_release(); + + sc->daemonTid=0; + /* now wait for it to die */ + rtems_semaphore_obtain(sc->daemonSync,RTEMS_WAIT,RTEMS_NO_TIMEOUT); + + /* reacquire the bsdnet semaphore */ + rtems_bsdnet_semaphore_obtain(); + if (GTeth_debug>0) printk(")"); +} + +static void GT64260eth_ifinit(void *arg) +{ + struct GTeth_softc *sc = (struct GTeth_softc*)arg; + int i; + +#ifdef GT_DEBUG + printk("GT64260eth_ifinit(): daemon ID: 0x%08x)\n", sc->daemonTid); +#endif + if (sc->daemonTid) { +#ifdef GT_DEBUG + printk("GT64260eth: daemon already up, doing nothing\n"); +#endif + return; + } + +#ifndef GE_NOHASH + /* Mvme5500, the user must initialize the hash table before enabling the + * Ethernet controller + */ + GTeth_hash_init(sc); + GTeth_hash_fill(sc); +#endif + + sc->intr_err_ptr1=0; + sc->intr_err_ptr2=0; + for (i=0; i< INTR_ERR_SIZE; i++) sc->intr_errsts[i]=0; + + /* initialize the hardware (we are holding the network semaphore at this point) */ + (void)GT64260eth_init_hw(sc); + + /* launch network daemon */ + + /* NOTE: + * in ss-20011025 (and later) any task created by 'bsdnet_newproc' is + * wrapped by code which acquires the network semaphore... + */ + sc->daemonTid = rtems_bsdnet_newproc(GT_ETH_TASK_NAME,4096,GT64260eth_daemon,arg); + + /* Tell the world that we're running */ + sc->arpcom.ac_if.if_flags |= IFF_RUNNING; + +} + +/* attach parameter tells us whether to attach or to detach the driver */ +/* Attach this instance, and then all the sub-devices */ +int rtems_GT64260eth_driver_attach(struct rtems_bsdnet_ifconfig *config, int attach) +{ + struct GTeth_softc *sc; + struct ifnet *ifp; + unsigned sdcr, data; + unsigned char hwaddr[6]; + int i, unit, phyaddr; + void *softc_mem; + char *name; + + unit = rtems_bsdnet_parse_driver_name(config, &name); + if (unit < 0) return 0; + + printk("\nEthernet driver name %s unit %d \n",name, unit); + printk("Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.\n"); + printk("(c) 2004, Brookhaven National Lab. (RTEMS/mvme5500 port)\n"); + + /* Make certain elements e.g. descriptor lists are aligned. */ + softc_mem = rtems_bsdnet_malloc(sizeof(*sc) + SOFTC_ALIGN, M_FREE, M_NOWAIT); + + /* Check for the very unlikely case of no memory. */ + if (softc_mem == NULL) + rtems_panic("GT64260eth: OUT OF MEMORY"); + + sc = (void *)(((long)softc_mem + SOFTC_ALIGN) & ~SOFTC_ALIGN); + memset(sc, 0, sizeof(*sc)); + + if (GTeth_debug>0) printk("txq_desc[0] addr:%x, rxq_desc[0] addr:%x, sizeof sc %d\n",&sc->txq_desc[0], &sc->rxq_desc[0], sizeof(*sc)); + + sc->sc_macno = unit-1; + + data = inl(ETH_EPAR); + phyaddr = ETH_EPAR_PhyAD_GET(data, sc->sc_macno); + + /* try to read HW address from the device if not overridden + * by config + */ + if (config->hardware_address) { + memcpy(hwaddr, config->hardware_address, ETHER_ADDR_LEN); + } else { + printk("Read EEPROM "); + for (i = 0; i < 6; i++) + hwaddr[i] = ConfVPD_buff[VPD_ENET0_OFFSET+i]; + } + +#ifdef GT_DEBUG + printk("using MAC addr from device:"); + for (i = 0; i < ETHER_ADDR_LEN; i++) printk("%x:", hwaddr[i]); + printk("\n"); +#endif + + memcpy(sc->arpcom.ac_enaddr, hwaddr, ETHER_ADDR_LEN); + + ifp = &sc->arpcom.ac_if; + + sc->sc_pcr = inl(ETH0_EPCR); + sc->sc_pcxr = inl(ETH0_EPCXR); + sc->sc_intrmask = inl(ETH0_EIMR) | ETH_IR_MIIPhySTC; + + printk("address %s\n", ether_sprintf(hwaddr)); + +#ifdef GT_DEBUG + printk(", pcr %x, pcxr %x ", sc->sc_pcr, sc->sc_pcxr); +#endif + + + sc->sc_pcxr |= ETH_EPCXR_PRIOrx_Override; + sc->sc_pcxr |= (3<<6); /* highest priority only */ + sc->sc_pcxr &= ~ETH_EPCXR_RMIIEn; /* MII mode */ + + /* Max. Frame Length (packet) allowed for reception is 1536 bytes, + * instead of 2048 (MOTLoad default) or 64K. + */ + sc->sc_pcxr &= ~(3 << 14); + sc->sc_pcxr |= (ETH_EPCXR_MFL_1536 << 14); + sc->sc_max_frame_length = PKT_BUF_SZ; + + + if (sc->sc_pcr & ETH_EPCR_EN) { + int tries = 1000; + /* Abort transmitter and receiver and wait for them to quiese*/ + outl(ETH_ESDCMR_AR|ETH_ESDCMR_AT,ETH0_ESDCMR); + do { + rtems_bsp_delay(100); + } while (tries-- > 0 && (inl(ETH0_ESDCMR) & (ETH_ESDCMR_AR|ETH_ESDCMR_AT))); + } +#ifdef GT_DEBUG + printk(", phy %d (mii)\n", phyaddr); + printk("ETH0_ESDCMR %x ", inl(ETH0_ESDCMR)); +#endif + + sc->sc_pcr &= ~(ETH_EPCR_EN | ETH_EPCR_RBM | ETH_EPCR_PM | ETH_EPCR_PBF); + +#ifdef GT_DEBUG + printk("Now sc_pcr %x,sc_pcxr %x", sc->sc_pcr, sc->sc_pcxr); +#endif + + /* + * Now turn off the GT. If it didn't quiese, too ***ing bad. + */ + outl(sc->sc_pcr, ETH0_EPCR); + outl(sc->sc_intrmask, ETH0_EIMR); + sdcr = inl(ETH0_ESDCR); + /* Burst size is limited to 4 64bit words */ + ETH_ESDCR_BSZ_SET(sdcr, ETH_ESDCR_BSZ_4); + sdcr |= ETH_ESDCR_RIFB;/*limit interrupt on frame boundaries, instead of buffer*/ +#if 0 + sdcr &= ~(ETH_ESDCR_BLMT|ETH_ESDCR_BLMR); /* MOTLoad defualt Big-endian */ +#endif + outl(sdcr, ETH0_ESDCR); + +#ifdef GT_DEBUG + printk("sdcr %x \n", sdcr); +#endif + + if (phyaddr== -1) rtems_panic("MII auto negotiation ?"); + + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + + ifp->if_softc = sc; + + /* set this interface's name and unit */ + ifp->if_unit = unit; + ifp->if_name = name; + + ifp->if_mtu = config->mtu ? config->mtu : ETHERMTU; + + ifp->if_init = GT64260eth_ifinit; + ifp->if_ioctl = GTeth_ifioctl; + ifp->if_start = GTeth_ifstart; + ifp->if_output = ether_output; + + /* ifp->if_watchdog = GTeth_ifwatchdog;*/ + + if (ifp->if_snd.ifq_maxlen == 0) + ifp->if_snd.ifq_maxlen = ifqmaxlen; + + /* create the synchronization semaphore */ + if (RTEMS_SUCCESSFUL != rtems_semaphore_create( + rtems_build_name('G','e','t','h'),0,0,0,&sc->daemonSync)) + rtems_panic("GT64260eth: semaphore creation failed"); + + sc->next_module = root_GT64260eth_dev; + root_GT64260eth_dev = sc; + + /* Actually attach the interface */ + if_attach(ifp); + ether_ifattach(ifp); + +#ifdef GT_DEBUG + printk("GT64260eth: Ethernet driver has been attached (handle 0x%08x,ifp 0x%08x)\n",sc, ifp); +#endif + + return(1); +} + +static void GT64260eth_stats(struct GTeth_softc *sc) +{ + struct ifnet *ifp = &sc->arpcom.ac_if; + + printf(" Rx Interrupts:%-8lu\n", sc->stats.rxInterrupts); + printf(" Receive Packets:%-8lu\n", ifp->if_ipackets); + printf(" Receive errors:%-8lu\n", ifp->if_ierrors); + printf(" Missed Frame errors:%-8lu\n", GTeth_MissedFrame_err); + printf(" Framing Errors:%-8lu\n", sc->stats.frame_errors); + printf(" Crc Errors:%-8lu\n", sc->stats.crc_errors); + printf(" Oversized Frames:%-8lu\n", sc->stats.length_errors); + printf(" Active Rxqs:%-8lu\n", sc->rxq_active); + printf(" Tx Interrupts:%-8lu\n", sc->stats.txInterrupts); + printf("Multi-Buffer Packets:%-8lu\n", sc->stats.txMultiBuffPacket); + printf(" Transmitt Packets:%-8lu\n", ifp->if_opackets); + printf(" Transmitt errors:%-8lu\n", ifp->if_oerrors); + printf(" Tx/Rx collisions:%-8lu\n", ifp->if_collisions); + printf(" Active Txqs:%-8lu\n", sc->txq_nactive); +} + +GT64260eth_err() +{ + printf(" Missed Frame errors:%-8lu\n", GTeth_MissedFrame_err); +} + +static int GTeth_ifioctl(struct ifnet *ifp,unsigned cmd, caddr_t data) +{ + struct GTeth_softc *sc = ifp->if_softc; + struct ifreq *ifr = (struct ifreq *) data; + + int error = 0; + +#ifdef GT_DEBUG + printk("GTeth_ifioctl("); +#endif + + switch (cmd) { + default: + if (GTeth_debug >0) { + printk("etherioctl("); + if (cmd== SIOCSIFADDR) printk("SIOCSIFADDR "); + } + return ether_ioctl(ifp, cmd, data); + + case SIOCSIFFLAGS: + switch (ifp->if_flags & (IFF_UP|IFF_RUNNING)) { + case IFF_RUNNING: /* not up, so we stop */ + GT64260eth_stop(sc); + break; + case IFF_UP: /* not running, so we start */ + GT64260eth_ifinit(sc); + break; + case IFF_UP|IFF_RUNNING:/* active->active, update */ + GT64260eth_stop(sc); + GT64260eth_ifinit(sc); + break; + default: /* idle->idle: do nothing */ + break; + } + break; + case SIO_RTEMS_SHOW_STATS: + GT64260eth_stats (sc); + break; + case SIOCADDMULTI: + case SIOCDELMULTI: + error = (cmd == SIOCADDMULTI) + ? ether_addmulti(ifr, &sc->arpcom) + : ether_delmulti(ifr, &sc->arpcom); + if (error == ENETRESET) { + if (ifp->if_flags & IFF_RUNNING) + GTeth_ifchange(sc); + error = 0; + } + break; + case SIOCSIFMTU: + if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN) { + error = EINVAL; + break; + } + ifp->if_mtu = ifr->ifr_mtu; + break; + } + +#ifdef GT_DEBUG + printk("exit ioctl\n"); +#endif + return error; +} + +static void GTeth_ifstart(struct ifnet *ifp) +{ + struct GTeth_softc *sc = ifp->if_softc; + +#ifdef GT_DEBUG + printk("GTeth_ifstart("); +#endif + + if ((ifp->if_flags & IFF_RUNNING) == 0) { +#ifdef GT_DEBUG + printk("IFF_RUNNING==0\n"); +#endif + return; + } + + ifp->if_flags |= IFF_OACTIVE; + rtems_event_send (sc->daemonTid, START_TRANSMIT_EVENT); +#ifdef GT_DEBUG + printk(")\n"); +#endif +} + +/* Initialize the Rx rings */ +static void GTeth_init_rx_ring(struct GTeth_softc *sc) +{ + int i; + volatile struct GTeth_desc *rxd; + unsigned nxtaddr; + + sc->rxq_fi=0; + sc->rxq_head_desc = &sc->rxq_desc[0]; + rxd = sc->rxq_head_desc; + + sc->rxq_desc_busaddr = sc->rxq_head_desc; +#ifdef GT_DEBUG + printk("rxq_desc_busaddr %x ,&sc->rxq_desc[0] %x\n", + sc->rxq_desc_busaddr, sc->rxq_head_desc); +#endif + + nxtaddr = sc->rxq_desc_busaddr + sizeof(*rxd); + sc->rx_buf_sz = (sc->arpcom.ac_if.if_mtu <= 1500 ? PKT_BUF_SZ : sc->arpcom.ac_if.if_mtu + 32); + sc->rxq_active = RX_RING_SIZE; + + for (i = 0; i < RX_RING_SIZE; i++, rxd++, nxtaddr += sizeof(*rxd)) { + struct mbuf *m; + + rxd->ed_lencnt= sc->rx_buf_sz <<16; + rxd->ed_cmdsts = RX_CMD_F|RX_CMD_L|RX_CMD_O|RX_CMD_EI; + + MGETHDR(m, M_WAIT, MT_DATA); + MCLGET(m, M_WAIT); + m->m_pkthdr.rcvif = &sc->arpcom.ac_if; + sc->rxq_mbuf[i] = m; + + /* convert mbuf pointer to data pointer of correct type */ + rxd->ed_bufptr = mtod(m, void *); + + /* + * update the nxtptr to point to the next txd. + */ + if (i == RX_RING_SIZE - 1) + nxtaddr = sc->rxq_desc_busaddr; + rxd->ed_nxtptr = nxtaddr; + +#ifdef GT_DEBUG + printk("ed_lencnt %x, rx_buf_sz %x ",rxd->ed_lencnt, sc->rx_buf_sz); + printk("ed_cmdsts %x \n",rxd->ed_cmdsts); + printk("mbuf @ 0x%x, next desc. @ 0x%x\n",rxd->ed_bufptr,rxd->ed_nxtptr); +#endif + } +} + +static void GTeth_rxprio_setup(struct GTeth_softc *sc, enum GTeth_rxprio rxprio) +{ + + if (GTeth_debug>0) printk("GTeth_rxprio_setup(\n"); + GTeth_init_rx_ring(sc); + + sc->rxq_intrbits = ETH_IR_RxBuffer | ETH_IR_RxError; + + switch (rxprio) { + case GE_RXPRIO_HI: + sc->rxq_intrbits |= ETH_IR_RxBuffer_3|ETH_IR_RxError_3; + break; + case GE_RXPRIO_MEDHI: + sc->rxq_intrbits |= ETH_IR_RxBuffer_2|ETH_IR_RxError_2; + break; + case GE_RXPRIO_MEDLO: + sc->rxq_intrbits |= ETH_IR_RxBuffer_1|ETH_IR_RxError_1; + break; + case GE_RXPRIO_LO: + sc->rxq_intrbits |= ETH_IR_RxBuffer_0|ETH_IR_RxError_0; + break; + } + if (GTeth_debug>0) printk(")"); +} + +static int GT64260eth_rx(struct GTeth_softc *sc, enum GTeth_rxprio rxprio) +{ + struct ifnet *ifp = &sc->arpcom.ac_if; + struct mbuf *m; + int nloops=0; + unsigned int intr_status = sc->intr_errsts[sc->intr_err_ptr1]; + + if (GTeth_rx_debug>0) printk("GT64260eth_rx("); + if (GTeth_rx_debug>5) printk("(%d)", rxprio); + + while (sc->rxq_active > 0) { + volatile struct GTeth_desc *rxd = &sc->rxq_desc[sc->rxq_fi]; + struct ether_header *eh; + unsigned int cmdsts; + unsigned int byteCount; + + cmdsts = rxd->ed_cmdsts; + + /* + * Sometimes the GE "forgets" to reset the ownership bit. + * But if the length has been rewritten, the packet is ours + * so pretend the O bit is set. + * + */ + byteCount = rxd->ed_lencnt & 0xffff; + + if (cmdsts & RX_CMD_O) { + if (byteCount == 0) + return(0); + + /* Setting command/status to be zero seems to eliminate + * the spurious interrupt associated with the GE_FORGOT issue. + */ + rxd->ed_cmdsts=0; + +#ifdef GE_FORGOT + /* + * For dignosis purpose only. Not a good practice to turn it on + */ + printk("Rxq %d %d %d\n", sc->rxq_fi, byteCount,nloops); +#endif + } + + /* GT gave the ownership back to the CPU or the length has + * been rewritten , which means there + * is new packet in the descriptor/buffer + */ + + if (GTeth_rx_debug>0) printk("desc%d: cmdsts=%x, len=%d\n", + sc->rxq_fi,cmdsts,byteCount); + nloops++; + /* + * If this is not a single buffer packet with no errors + * or for some reason it's bigger than our frame size, + * ignore it and go to the next packet. + */ + if ((cmdsts & (RX_CMD_F|RX_CMD_L|RX_STS_ES)) != + (RX_CMD_F|RX_CMD_L) || + byteCount > sc->sc_max_frame_length) { + if (GTeth_rx_debug>0) printk("Rx Error"); + --sc->rxq_active; + ifp->if_ipackets++; + ifp->if_ierrors++; + if (cmdsts & RX_STS_OR) sc->stats.or_errors++; + if (cmdsts & RX_STS_CE) sc->stats.crc_errors++; + if (cmdsts & RX_STS_MFL) sc->stats.length_errors++; + if (cmdsts & RX_STS_SF) sc->stats.frame_errors++; + /* if (cmdsts & RX_STS_M) GTeth_MissedFrame_err++;*/ + if ((cmdsts & RX_STS_LC) || (cmdsts & RX_STS_COL)) + ifp->if_collisions++; + goto give_it_back; + } + + m = sc->rxq_mbuf[sc->rxq_fi]; + sc->rxq_mbuf[sc->rxq_fi] = NULL; + m->m_len = m->m_pkthdr.len = byteCount - sizeof(struct ether_header); + eh = mtod (m, struct ether_header *); + m->m_data += sizeof(struct ether_header); + ether_input (ifp, eh, m); + if (GTeth_rx_debug>20) { + if ( m->m_flags & M_BCAST ) printk("desc%d broadcast\n",sc->rxq_fi); + if ( m->m_flags & M_MCAST ) printk("multicast "); + } + + ifp->if_ipackets++; + ifp->if_ibytes+=byteCount; + --sc->rxq_active; + + give_it_back: + MGETHDR (m, M_WAIT, MT_DATA); + MCLGET (m, M_WAIT); + m->m_pkthdr.rcvif = ifp; + sc->rxq_mbuf[sc->rxq_fi]= m; + /* convert mbuf pointer to data pointer of correct type */ + rxd->ed_bufptr = mtod(m, void*); + rxd->ed_lencnt = (unsigned long) sc->rx_buf_sz <<16; + rxd->ed_cmdsts = RX_CMD_F|RX_CMD_L|RX_CMD_O|RX_CMD_EI; + + if (++sc->rxq_fi == RX_RING_SIZE) sc->rxq_fi = 0; + + sc->rxq_active++; + } /* while (sc->rxq_active > 0) */ + if (GTeth_rx_debug>0) printk(")"); + return nloops; +} + +static void GTeth_rx_setup(struct GTeth_softc *sc) +{ + + if (GTeth_rx_debug>0) printk("GTeth_rx_setup("); + + GTeth_rxprio_setup(sc, GE_RXPRIO_HI); + + if ((sc->sc_flags & GE_RXACTIVE) == 0) { + /* First Rx Descriptor Pointer 3 */ + outl( sc->rxq_desc_busaddr, ETH0_EFRDP3); + /* Current Rx Descriptor Pointer 3 */ + outl( sc->rxq_desc_busaddr,ETH0_ECRDP3); +#ifdef GT_DEBUG + printk("ETH0_EFRDP3 0x%x, ETH0_ECRDP3 0x%x \n", inl(ETH0_EFRDP3), + inl(ETH0_ECRDP3)); +#endif + } + sc->sc_intrmask |= sc->rxq_intrbits; + + if (GTeth_rx_debug>0) printk(")\n"); +} + +static void GTeth_rx_cleanup(struct GTeth_softc *sc, enum GTeth_rxprio rxprio) +{ + int i; + + if (GTeth_rx_debug>0) printk( "GTeth_rx_cleanup("); + if (sc->rxq_curpkt) + m_freem(sc->rxq_curpkt); + + for (i=0; i< RX_RING_SIZE; i++) { + if (sc->rxq_mbuf[i]) { + m_freem(sc->rxq_mbuf[i]); + sc->rxq_mbuf[i]=0; + } + } + if (GTeth_rx_debug>0) printk(")"); +} + +static void GTeth_rx_stop(struct GTeth_softc *sc, enum GTeth_whack_op op) +{ + if (GTeth_rx_debug>0) printk( "GTeth_rx_stop("); + sc->sc_flags &= ~GE_RXACTIVE; + sc->sc_idlemask &= ~(ETH_IR_RxBits|ETH_IR_RxBuffer_3|ETH_IR_RxError_3); + sc->sc_intrmask &= ~(ETH_IR_RxBits|ETH_IR_RxBuffer_3|ETH_IR_RxError_3); + outl(sc->sc_intrmask, ETH0_EIMR); + outl(ETH_ESDCMR_AR, ETH0_ESDCMR); /* abort receive */ + do { + rtems_bsp_delay(10); + } while (inl(ETH0_ESDCMR) & ETH_ESDCMR_AR); + GTeth_rx_cleanup(sc, GE_RXPRIO_HI); + if (GTeth_rx_debug>0) printk(")"); +} + +static void GTeth_txq_free(struct GTeth_softc *sc, unsigned cmdsts) +{ + struct ifnet *ifp = &sc->arpcom.ac_if; + volatile struct GTeth_desc *txd = &sc->txq_desc[sc->txq_fi]; + + /* ownership is sent back to CPU */ + if (GTeth_debug>0) printk("txq%d,active %d\n", sc->txq_fi, sc->txq_nactive); + + txd->ed_cmdsts &= ~TX_CMD_O; /* in case GT forgot */ + + /* statistics */ + ifp->if_opackets++; + ifp->if_obytes += sc->txq_mbuf[sc->txq_fi]->m_len; + if (cmdsts & TX_STS_ES) { + ifp->if_oerrors++; + if ((cmdsts & TX_STS_LC) || (cmdsts & TX_STS_COL)) + ifp->if_collisions++; + } + /* Free the original mbuf chain */ + m_freem(sc->txq_mbuf[sc->txq_fi]); + sc->txq_mbuf[sc->txq_fi] = 0; + ifp->if_timer = 5; + + sc->txq_free++; + if (++sc->txq_fi == TX_RING_SIZE) sc->txq_fi = 0; + --sc->txq_nactive; +} + +static int txq_high_limit(struct GTeth_softc *sc) +{ + /* + * Have we [over]consumed our limit of descriptors? + * Do we have enough free descriptors? + */ + if ( TX_RING_SIZE == sc->txq_nactive + TXQ_HiLmt_OFF) { + volatile struct GTeth_desc *txd2 = &sc->txq_desc[sc->txq_fi]; + unsigned cmdsts; + + cmdsts = txd2->ed_cmdsts; + if (cmdsts & TX_CMD_O) { /* Ownership (1=GT 0=CPU) */ + int nextin; + + /* + * Sometime the Discovery forgets to update the + * last descriptor. See if CPU owned the descriptor + * after it (since we know we've turned that to + * the discovery and if CPU owned it, the Discovery + * gave it back). If CPU does, we know the Discovery + * gave back this one but forgot to mark it back to CPU. + */ + nextin = (sc->txq_fi + 1) % TX_RING_SIZE; + if (sc->txq_desc[nextin].ed_cmdsts & TX_CMD_O) { +#if 0 + printk("Overconsuming Tx descriptors!\n"); +#endif + return 1; + } + printk("Txq %d forgot\n", sc->txq_fi); + } + /* Txq ring is almost full, let's free the current buffer here */ +#if 0 + printk("Txq ring near full, free desc%d\n",sc->txq_fi); +#endif + GTeth_txq_free(sc, cmdsts); + } /* end if ( TX_RING_SIZE == sc->txq_nactive + TXQ_HiLmt_OFF) */ + return 0; +} + +static int GT64260eth_sendpacket(struct GTeth_softc *sc,struct mbuf *m, enum GTeth_txprio txprio) +{ + struct ifnet *ifp=&sc->arpcom.ac_if; + volatile struct GTeth_desc *txd = &sc->txq_desc[sc->txq_lo]; + unsigned intrmask = sc->sc_intrmask; + unsigned index= sc->txq_lo; + + if (GTeth_debug>0) printk("sendpacket("); + + /* + * The end-of-list descriptor we put on last time is the starting point + * for this packet. The GT is supposed to terminate list processing on + * a NULL nxtptr but that currently is broken so a CPU-owned descriptor + * must terminate the list. + */ + intrmask = sc->sc_intrmask; + + if ( !(m->m_next)) /* single buffer packet */ + sc->txq_mbuf[index]= m; + else /* multiple mbufs in this packet */ + { + struct mbuf *mtp, *mdest; + volatile unsigned char *pt; + int len, y; + +#ifdef GT_DEBUG + printk("multi mbufs "); +#endif + MGETHDR(mdest, M_WAIT, MT_DATA); + MCLGET(mdest, M_WAIT); + pt = (volatile unsigned char *)mdest->m_data; + for (mtp=m,len=0;mtp;mtp=mtp->m_next) { + if ( (y=(len+mtp->m_len)) > sizeof(union mcluster)) { + /* GT64260 allows us to chain the remaining to the nex + * free descriptors. + */ + printk("packet size %x > mcluster %x\n", y,sizeof(union mcluster)); + rtems_panic("GT64260eth : packet too large "); + } + memcpy((void *)pt,(char *)mtp->m_data, mtp->m_len); + pt += mtp->m_len; +#if 0 + printk("%d ",mtp->m_len); +#endif + len += mtp->m_len; + } +#if 0 + printk("\n"); +#endif + mdest->m_len=len; + /* free old mbuf chain */ + m_freem(m); + sc->txq_mbuf[index] = m = mdest; + sc->stats.txMultiBuffPacket++; + } + if (m->m_len < ET_MINLEN) m->m_len = ET_MINLEN; + + txd->ed_bufptr = mtod(m, void*); + txd->ed_lencnt = m->m_len << 16; + txd->ed_cmdsts = TX_CMD_L|TX_CMD_GC|TX_CMD_P|TX_CMD_O|TX_CMD_F|TX_CMD_EI; + +#ifdef GT_DEBUG + printk("len = %d, cmdsts 0x%x ", m->m_len,txd->ed_cmdsts); +#endif + + /* + * Tell the SDMA engine to "Fetch!" + * Start Tx high and Tx low. + */ + outl(ETH_ESDCMR_TXDH,ETH0_ESDCMR); + sc->txq_nactive++; + if ( ++sc->txq_lo == TX_RING_SIZE) sc->txq_lo = 0; + sc->txq_free--; + + /* + * Since we have put an item into the packet queue, we now want + * an interrupt when the transmit queue finishes processing the + * list. But only update the mask if needs changing. + */ + intrmask |= sc->txq_intrbits & ( ETH_IR_TxEndHigh|ETH_IR_TxBufferHigh); + if (sc->sc_intrmask != intrmask) { + sc->sc_intrmask = intrmask; + outl(sc->sc_intrmask, ETH0_EIMR); + } + +#if 0 + printk("EICR= %x, EIMR= %x ", inl(ETH0_EICR), inl(ETH0_EIMR)); + printk("%s:transmit frame #%d queued in slot %d.\n", + sc->arpcom.ac_if.if_name, sc->txq_lo, index); + printk("pcr %x, pcxr %x DMA dcr %x cmr %x\n", inl(ETH0_EPCR), inl(ETH0_EPCXR), inl(ETH0_ESDCR), inl(ETH0_ESDCMR)); +#endif + + if (GTeth_debug>0) printk(")"); + return 1; +} + +static unsigned GTeth_txq_done(struct GTeth_softc *sc, enum GTeth_txprio txprio) +{ + if (GTeth_debug>0) printk("Txdone(" ); + + while (sc->txq_nactive > 0) { + /* next to be returned to the CPU */ + volatile struct GTeth_desc *txd = &sc->txq_desc[sc->txq_fi]; + unsigned cmdsts; + + /* if GT64260 still owns it ....... */ + if ((cmdsts = txd->ed_cmdsts) & TX_CMD_O) { + int nextin; + + /* Someone quoted : + * "Sometimes the Discovery forgets to update the + * ownership bit in the descriptor." + * More correctly, the last descriptor of each + * transmitted frame is returned to CPU ownership and + * status is updated only after the actual transmission + * of the packet is completed. Also, if there is an error + * during transmission, we want to continue the + * transmission of the next descriptor, in additions to + * reporting the error. + */ + /* The last descriptor */ + if (sc->txq_nactive == 1) return(0); + + /* + * Sometimes the Discovery forgets to update the + * ownership bit in the descriptor. See if CPU owned + * the descriptor after it (since we know we've turned + * that to the Discovery and if CPU owned it now then the + * Discovery gave it back). If we do, we know the + * Discovery gave back this one but forgot to mark it + * back to CPU. + */ + nextin = (sc->txq_fi + 1) % TX_RING_SIZE; + + if (sc->txq_desc[nextin].ed_cmdsts & TX_CMD_O) return(0); + printk("Txq%d forgot\n",sc->txq_fi); + } /* end checking GT64260eth owner */ + GTeth_txq_free(sc, cmdsts); + } /* end while */ + if (GTeth_debug>0) printk(")\n"); + return(1); +} + +static void GTeth_tx_start(struct GTeth_softc *sc, enum GTeth_txprio txprio) +{ + int i; + volatile struct GTeth_desc *txd; + unsigned nxtaddr; + +#ifdef GT_DEBUG + printk("GTeth_tx_start("); +#endif + sc->sc_intrmask &= ~(ETH_IR_TxEndHigh|ETH_IR_TxBufferHigh| + ETH_IR_TxEndLow |ETH_IR_TxBufferLow); + + txd = &sc->txq_desc[0]; + sc->txq_desc_busaddr = &sc->txq_desc[0]; +#ifdef GT_DEBUG + printk("txq_desc_busaddr %x, &sc->txq_desc[0] %x \n", + sc->txq_desc_busaddr,&sc->txq_desc[0]); +#endif + + nxtaddr = sc->txq_desc_busaddr + sizeof(*txd); + + sc->txq_pendq.ifq_maxlen = 10; + sc->txq_pendq.ifq_head= NULL; + sc->txq_pendq.ifq_tail= NULL; + sc->txq_nactive = 0; + sc->txq_fi = 0; + sc->txq_lo = 0; + sc->txq_inptr = PKT_BUF_SZ; + sc->txq_outptr = 0; + sc->txq_free = TX_RING_SIZE; + + for (i = 0; i < TX_RING_SIZE; + i++, txd++, nxtaddr += sizeof(*txd)) { + sc->txq_mbuf[i]=0; + txd->ed_bufptr = 0; + + /* + * update the nxtptr to point to the next txd. + */ + txd->ed_cmdsts = 0; + if ( i== TX_RING_SIZE-1) nxtaddr = sc->txq_desc_busaddr; + txd->ed_nxtptr = nxtaddr; +#ifdef GT_DEBUG + printk("next desc. @ 0x%x\n",txd->ed_nxtptr); +#endif + } + + switch (txprio) { + case GE_TXPRIO_HI: + sc->txq_intrbits = ETH_IR_TxEndHigh|ETH_IR_TxBufferHigh; + sc->txq_esdcmrbits = ETH_ESDCMR_TXDH; /* Start Tx high */ + sc->txq_epsrbits = ETH_EPSR_TxHigh; + /* offset to current tx desc ptr reg */ + sc->txq_ectdp = ETH0_ECTDP1; + /* Current Tx Desc Pointer 1 */ + outl(sc->txq_desc_busaddr,ETH0_ECTDP1); +#ifdef GT_DEBUG + printk("ETH0_ECTDP1 %x",inl(ETH0_ECTDP1)); +#endif + break; + + case GE_TXPRIO_LO: + sc->txq_intrbits = ETH_IR_TxEndLow|ETH_IR_TxBufferLow; + sc->txq_esdcmrbits = ETH_ESDCMR_TXDL; /* Start TX low */ + sc->txq_epsrbits = ETH_EPSR_TxLow; + sc->txq_ectdp = ETH0_ECTDP0; + /* Current Tx Desc Pointer 0 */ + outl(sc->txq_desc_busaddr,ETH0_ECTDP0); +#ifdef GT_DEBUG + printk("ETH0_ECTDP1 %x",inl(ETH0_ECTDP0)); +#endif + break; + + default: + printk("Invalid Txq prio\n"); + break; + } + +#ifdef GT_DEBUG + printk(")\n"); +#endif +} + +static void GTeth_tx_cleanup(struct GTeth_softc *sc,enum GTeth_txprio txprio,int flush) +{ + int i; + + if (GTeth_debug>0) printk( "GTeth_tx_cleanup("); + + if (!flush) { + if (GTeth_debug>0) printk("--"); + return; + } + for (i=0; i< TX_RING_SIZE; i++) { + if (sc->txq_mbuf[i]) { + m_freem(sc->txq_mbuf[i]); + sc->txq_mbuf[i]=0; + } + } + if (GTeth_debug>0) printk(")"); +} + +static void GTeth_tx_stop(struct GTeth_softc *sc, enum GTeth_whack_op op) +{ + if (GTeth_debug>0) printk("GTeth_tx_stop( "); + + /* SDMA command register : stop Tx high and low */ + outl(ETH_ESDCMR_STDH|ETH_ESDCMR_STDL, ETH0_ESDCMR); + + GTeth_txq_done(sc, GE_TXPRIO_HI); + sc->sc_intrmask &= ~(ETH_IR_TxEndHigh|ETH_IR_TxBufferHigh| + ETH_IR_TxEndLow |ETH_IR_TxBufferLow); + GTeth_tx_cleanup(sc, GE_TXPRIO_HI, op == GE_WHACK_STOP); + + sc->arpcom.ac_if.if_timer = 0; + if (GTeth_debug>0) printk(")"); +} + + +/* TOCHECK : Should it be about rx or tx ? */ +static void GTeth_ifchange(struct GTeth_softc *sc) +{ + if (GTeth_debug>0) printk("GTeth_ifchange("); + if (GTeth_debug>5) printk("(pcr=%#x,imr=%#x)",inl(ETH0_EPCR),inl(ETH0_EIMR)); + printk("SIOCADDMULTI (SIOCDELMULTI): is it about rx or tx ?\n"); + outl(sc->sc_pcr | ETH_EPCR_EN, ETH0_EPCR); + outl(sc->sc_intrmask, ETH0_EIMR); + GTeth_ifstart(&sc->arpcom.ac_if); + /* Current Tx Desc Pointer 0 and 1 */ + if (GTeth_debug>5) printk("(ectdp0=%#x, ectdp1=%#x)", + inl(ETH0_ECTDP0), inl(ETH0_ECTDP1)); + if (GTeth_debug>0) printk(")"); +} + +static int GTeth_hash_compute(struct GTeth_softc *sc,unsigned char eaddr[ETHER_ADDR_LEN]) +{ + unsigned w0, add0, add1; + unsigned result; + + if (GTeth_debug>0) printk("GTeth_hash_compute("); + add0 = ((unsigned) eaddr[5] << 0) | + ((unsigned) eaddr[4] << 8) | + ((unsigned) eaddr[3] << 16); + + add0 = ((add0 & 0x00f0f0f0) >> 4) | ((add0 & 0x000f0f0f) << 4); + add0 = ((add0 & 0x00cccccc) >> 2) | ((add0 & 0x00333333) << 2); + add0 = ((add0 & 0x00aaaaaa) >> 1) | ((add0 & 0x00555555) << 1); + + add1 = ((unsigned) eaddr[2] << 0) | + ((unsigned) eaddr[1] << 8) | + ((unsigned) eaddr[0] << 16); + + add1 = ((add1 & 0x00f0f0f0) >> 4) | ((add1 & 0x000f0f0f) << 4); + add1 = ((add1 & 0x00cccccc) >> 2) | ((add1 & 0x00333333) << 2); + add1 = ((add1 & 0x00aaaaaa) >> 1) | ((add1 & 0x00555555) << 1); + + if (GTeth_debug>0) printk("eaddr= %s add1:%x add0:%x\n", ether_sprintf(eaddr), add1, add0); + + /* + * hashResult is the 15 bits Hash entry address. + * ethernetADD is a 48 bit number, which is derived from the Ethernet + * MAC address, by nibble swapping in every byte (i.e MAC address + * of 0x123456789abc translates to ethernetADD of 0x21436587a9cb). + */ + if ((sc->sc_pcr & ETH_EPCR_HM) == 0) { + /* + * hashResult[14:0] = hashFunc0(ethernetADD[47:0]) + * + * hashFunc0 calculates the hashResult in the following manner: + * hashResult[ 8:0] = ethernetADD[14:8,1,0] + * XOR ethernetADD[23:15] XOR ethernetADD[32:24] + */ + result = (add0 & 3) | ((add0 >> 6) & ~3); + result ^= (add0 >> 15) ^ (add1 >> 0); + result &= 0x1ff; + /* + * hashResult[14:9] = ethernetADD[7:2] + */ + result |= (add0 & ~3) << 7; /* excess bits will be masked */ + if (GTeth_debug>0) printk("hash result %x ", result & 0x7fff); + } else { +#define TRIBITFLIP 073516240 /* yes its in octal */ + /* + * hashResult[14:0] = hashFunc1(ethernetADD[47:0]) + * + * hashFunc1 calculates the hashResult in the following manner: + * hashResult[08:00] = ethernetADD[06:14] + * XOR ethernetADD[15:23] XOR ethernetADD[24:32] + */ + w0 = ((add0 >> 6) ^ (add0 >> 15) ^ (add1)) & 0x1ff; + /* + * Now bitswap those 9 bits + */ + result = 0; + result |= ((TRIBITFLIP >> (((w0 >> 0) & 7) * 3)) & 7) << 6; + result |= ((TRIBITFLIP >> (((w0 >> 3) & 7) * 3)) & 7) << 3; + result |= ((TRIBITFLIP >> (((w0 >> 6) & 7) * 3)) & 7) << 0; + + /* + * hashResult[14:09] = ethernetADD[00:05] + */ + result |= ((TRIBITFLIP >> (((add0 >> 0) & 7) * 3)) & 7) << 12; + result |= ((TRIBITFLIP >> (((add0 >> 3) & 7) * 3)) & 7) << 9; + if (GTeth_debug>5) printk("1(%#x)", result); + } + if (GTeth_debug>0) printk(")"); + /* 1/2K address filtering (MOTLoad default )? ->16KB memory required + * or 8k address filtering ? -> 256KB memory required + */ + return result & ((sc->sc_pcr & ETH_EPCR_HS_512) ? 0x7ff : 0x7fff); +} + +static int GTeth_hash_entry_op(struct GTeth_softc *sc, enum GTeth_hash_op op, + enum GTeth_rxprio prio,unsigned char eaddr[ETHER_ADDR_LEN]) +{ + unsigned long long he; + unsigned long long *maybe_he_p = NULL; + int limit; + int hash; + int maybe_hash = 0; + + if (GTeth_debug>0) printk("GTeth_hash_entry_op(prio %d ", prio); + + hash = GTeth_hash_compute(sc, eaddr); + + if (sc->sc_hashtable == NULL) { + rtems_panic("hashtable == NULL!"); + } + if (GTeth_debug>0) printk("Hash computed %x eaddr %s\n", hash,ether_sprintf(eaddr)); + + + /* + * Assume we are going to insert so create the hash entry we + * are going to insert. We also use it to match entries we + * will be removing. The datasheet is wrong for this. + */ + he = (((unsigned long long) eaddr[5]) << 43) | + (((unsigned long long) eaddr[4]) << 35) | + (((unsigned long long) eaddr[3]) << 27) | + (((unsigned long long) eaddr[2]) << 19) | + (((unsigned long long) eaddr[1]) << 11) | + (((unsigned long long) eaddr[0]) << 3) | + ((unsigned long long) HSH_PRIO_INS(prio) | HSH_V | HSH_R); + /* he = 0x1b1acd87d08005;*/ + /* + * The GT will search upto 12 entries for a hit, so we must mimic that. + */ + hash &= (sc->sc_hashmask / sizeof(he)); + + if (GTeth_debug>0) { + unsigned val1, val2; + + val1= he & 0xffffffff; + val2= (he >>32) & 0xffffffff; + printk("Hash addr value %x%x, entry %x\n",val2,val1, hash); + } + + for (limit = HSH_LIMIT; limit > 0 ; --limit) { + /* + * Does the GT wrap at the end, stop at the, or overrun the + * end? Assume it wraps for now. Stash a copy of the + * current hash entry. + */ + unsigned long long *he_p = &sc->sc_hashtable[hash]; + unsigned long long thishe = *he_p; + + /* + * If the hash entry isn't valid, that break the chain. And + * this entry a good candidate for reuse. + */ + if ((thishe & HSH_V) == 0) { + maybe_he_p = he_p; + break; + } + + /* + * If the hash entry has the same address we are looking for + * then ... if we are removing and the skip bit is set, its + * already been removed. if are adding and the skip bit is + * clear, then its already added. In either return EBUSY + * indicating the op has already been done. Otherwise flip + * the skip bit and return 0. + */ + if (((he ^ thishe) & HSH_ADDR_MASK) == 0) { + if (((op == GE_HASH_REMOVE) && (thishe & HSH_S)) || + ((op == GE_HASH_ADD) && (thishe & HSH_S) == 0)) + return EBUSY; + *he_p = thishe ^ HSH_S; + + if (GTeth_debug>0) { + unsigned val1, val2; + + val1= *he_p & 0xffffffff; + val2= (*he_p >>32) & 0xffffffff; + printk("flip skip bit result %x%x entry %x ",val2,val1, hash); + } + return 0; + } + + /* + * If we haven't found a slot for the entry and this entry + * is currently being skipped, return this entry. + */ + if (maybe_he_p == NULL && (thishe & HSH_S)) { + maybe_he_p = he_p; + maybe_hash = hash; + } + hash = (hash + 1) & (sc->sc_hashmask / sizeof(he)); + } + + /* + * If we got here, then there was no entry to remove. + */ + if (op == GE_HASH_REMOVE) { + printk("GT64260eth : No entry to remove\n"); + return ENOENT; + } + + /* + * If we couldn't find a slot, return an error. + */ + if (maybe_he_p == NULL) { + rtems_panic("GT64260eth : No slot found"); + return ENOSPC; + } + + /* Update the entry.*/ + *maybe_he_p = he; + if (GTeth_debug>0) { + unsigned val1, val2; +#if 0 + unsigned long *pt= sc->sc_hashtable; + int i, loop; + + for (loop= 0; loop< 256; loop++) { + printk("%d)", loop); + for (i=0; i< 16; i++, pt++) printk("%x ",*pt); + printk("\n"); + } +#endif + val1= he & 0xffffffff; + val2= (he >>32) & 0xffffffff; + printk("Update Hash result %x%x, table addr %x entry %x )\n",val2, val1, maybe_he_p, hash); + } + return 0; +} + +static int GTeth_hash_fill(struct GTeth_softc *sc) +{ + struct ether_multistep step; + struct ether_multi *enm; + int error; + + if (GTeth_debug>0) printk( "GTeth_hash_fill("); + error = GTeth_hash_entry_op(sc,GE_HASH_ADD,GE_RXPRIO_HI,sc->arpcom.ac_enaddr); + + if (error) { + if (GTeth_debug>0) printk("!"); + return error; + } + + sc->sc_flags &= ~GE_ALLMULTI; + if ((sc->arpcom.ac_if.if_flags & IFF_PROMISC) == 0) + sc->sc_pcr &= ~ETH_EPCR_PM; + /* see lib/include/netinet/if_ether.h */ + ETHER_FIRST_MULTI(step, &sc->arpcom, enm); + while (enm != NULL) { + if (memcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) { + /* Frames are received regardless of their destinatin address */ + sc->sc_flags |= GE_ALLMULTI; + sc->sc_pcr |= ETH_EPCR_PM; + } else { + /* Frames are only received if the destinatin address is found + * in the hash table + */ + error = GTeth_hash_entry_op(sc, GE_HASH_ADD, + GE_RXPRIO_MEDLO, enm->enm_addrlo); + if (error == ENOSPC) break; + } + ETHER_NEXT_MULTI(step, enm); + } + if (GTeth_debug>0) printk(")\n"); + return error; +} + +static void GTeth_hash_init(struct GTeth_softc *sc) +{ + void *hash_mem; + + if (GTeth_debug>0) printk("GTeth_hash_init("); + /* MOTLoad defualt : 512 bytes of address filtering, which + * requires 16KB of memory + */ +#if 1 + hash_mem = rtems_bsdnet_malloc(HASH_DRAM_SIZE + HASH_ALIGN, M_FREE, M_NOWAIT); + sc->sc_hashtable =(void *)(((long)hash_mem+ HASH_ALIGN) & ~HASH_ALIGN); +#else + /* only for test */ + hash_mem = 0x68F000; + sc->sc_hashtable =(unsigned long long *)hash_mem; +#endif + sc->sc_hashmask = HASH_DRAM_SIZE - 1; + + memset((void *)sc->sc_hashtable, 0,HASH_DRAM_SIZE); + if (GTeth_debug>0) + printk("hashtable addr:%x, mask %x)\n", sc->sc_hashtable,sc->sc_hashmask); +} + +static void GT64260eth_error(struct GTeth_softc *sc) +{ + struct ifnet *ifp = &sc->arpcom.ac_if; + unsigned int intr_status= sc->intr_errsts[sc->intr_err_ptr1]; + + /* read and reset the status; because this is written + * by the ISR, we must disable interrupts here + */ + if (intr_status) { + printk("%s%d: ICR = 0x%x ", + ifp->if_name, ifp->if_unit, intr_status); +#if 1 + if (intr_status & INTR_RX_ERROR) { + printk("Rxq error, if_ierrors %d\n", + ifp->if_ierrors); + } +#endif + /* Rx error is handled in GT64260eth_rx() */ + if (intr_status & INTR_TX_ERROR) { + ifp->if_oerrors++; + printk("Txq error, if_oerrors %d\n",ifp->if_oerrors); + } + } + else + printk("%s%d: Ghost interrupt ?\n",ifp->if_name, + ifp->if_unit); + sc->intr_errsts[sc->intr_err_ptr1++]=0; + sc->intr_err_ptr1 %= INTR_ERR_SIZE; /* Till Straumann */ +} + + +/* The daemon does all of the work; RX, TX and cleaning up buffers/descriptors */ +static void GT64260eth_daemon(void *arg) +{ + struct GTeth_softc *sc = (struct GTeth_softc*)arg; + rtems_event_set events; + struct mbuf *m=0; + struct ifnet *ifp=&sc->arpcom.ac_if; + +#if 0 + /* see comments in GT64260eth_init(); in newer versions of + * rtems, we hold the network semaphore at this point + */ + rtems_semaphore_release(sc->daemonSync); +#endif + + /* NOTE: our creator possibly holds the bsdnet_semaphore. + * since that has PRIORITY_INVERSION enabled, our + * subsequent call to bsdnet_event_receive() will + * _not_ release it. It's still in posession of our + * owner. + * This is different from how killing this task + * is handled. + */ + + for (;;) { + /* sleep until there's work to be done */ + /* Note: bsdnet_event_receive() acquires + * the global bsdnet semaphore for + * mutual exclusion. + */ + rtems_bsdnet_event_receive(ALL_EVENTS, + RTEMS_WAIT | RTEMS_EVENT_ANY, + RTEMS_NO_TIMEOUT, + &events); + + if (KILL_EVENT & events) break; + +#ifndef GE_NORX + if (events & RX_EVENT) GT64260eth_rx(sc,GE_RXPRIO_HI); +#endif + + /* clean up and try sending packets */ + do { +#if 1 + if (gpp_int_error!=0) { + printk("GPP interrupt error %d\n", gpp_int_error); + gpp_int_error=0; + } +#endif + if (sc->txq_nactive) GTeth_txq_done(sc, GE_TXPRIO_HI); + + while (sc->txq_free>0) { + if (sc->txq_free>TXQ_HiLmt_OFF) { + m=0; + IF_DEQUEUE(&ifp->if_snd,m); + if (m==0) break; + GT64260eth_sendpacket(sc, m, GE_TXPRIO_HI); + } + else { + if (txq_high_limit(sc)) + break; + } + } + /* we leave this loop + * - either because there's no free buffer + * (m=0 initializer && !sc->txq_free) + * - or there's nothing to send (IF_DEQUEUE + * returned 0 + */ + } while (m); + + ifp->if_flags &= ~IFF_OACTIVE; + + /* Log errors and other uncommon events. */ + if (events & ERR_EVENT) GT64260eth_error(sc); + } /* end for(;;) { rtems_bsdnet_event_receive() .....*/ + + ifp->if_flags &= ~(IFF_RUNNING|IFF_OACTIVE); + + /* shut down the hardware */ + GT64260eth_stop_hw(sc); + /* flush the output queue */ + for (;;) { + IF_DEQUEUE(&ifp->if_snd,m); + if (!m) break; + m_freem(m); + } + /* as of 'rtems_bsdnet_event_receive()' we own the + * networking semaphore + */ + rtems_bsdnet_semaphore_release(); + rtems_semaphore_release(sc->daemonSync); + + /* Note that I dont use sc->daemonTid here - + * theoretically, that variable could already + * hold a newly created TID + */ + rtems_task_delete(RTEMS_SELF); +} + diff --git a/c/src/lib/libbsp/powerpc/mvme5500/network/GT64260eth.h b/c/src/lib/libbsp/powerpc/mvme5500/network/GT64260eth.h new file mode 100644 index 0000000000..926e436884 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/network/GT64260eth.h @@ -0,0 +1,135 @@ +/* GT64260eth.h + * + * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. + * All rights reserved. + * + * RTEMS/Mvme5500 port 2004 by S. Kate Feng, , + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed for the NetBSD Project by + * Allegro Networks, Inc., and Wasabi Systems, Inc. + * 4. The name of Allegro Networks, Inc. may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * 5. The name of Wasabi Systems, Inc. may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY ALLEGRO NETWORKS, INC. AND + * WASABI SYSTEMS, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL EITHER ALLEGRO NETWORKS, INC. OR WASABI SYSTEMS, INC. + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* Keep the ring sizes a power of two for efficiency. + Making the Tx ring too long decreases the effectiveness of channel + bonding and packet priority. + There are no ill effects from too-large receive rings. */ +#define TX_RING_SIZE 32 +#define GT_NEXTTX(x) ((x + 1) % TX_RING_SIZE ) +#define TX_QUARTER_FULL TX_RING_SIZE/2 +#define TX_HALF_FULL TX_RING_SIZE/2 +#define RX_RING_SIZE 16 +#define HASH_TABLE_SIZE 16 +#define HASH_DRAM_SIZE HASH_TABLE_SIZE*1024 /* size of DRAM for hash table */ +#define INTR_ERR_SIZE 16 + +enum GTeth_txprio { + GE_TXPRIO_HI=1, + GE_TXPRIO_LO=0, + GE_TXPRIO_NONE=2 +}; +enum GTeth_rxprio { + GE_RXPRIO_HI=3, + GE_RXPRIO_MEDHI=2, + GE_RXPRIO_MEDLO=1, + GE_RXPRIO_LO=0 +}; + +struct GTeth_softc { + struct GTeth_desc txq_desc[TX_RING_SIZE]; /* transmit descriptor memory */ + struct GTeth_desc rxq_desc[RX_RING_SIZE]; /* receive descriptor memory */ + struct mbuf* txq_mbuf[TX_RING_SIZE]; /* transmit buffer memory */ + struct mbuf* rxq_mbuf[RX_RING_SIZE]; /* receive buffer memory */ + struct GTeth_softc *next_module; + volatile unsigned int intr_errsts[INTR_ERR_SIZE]; /* capture the right intr_status */ + unsigned int intr_err_ptr1; /* ptr used in GTeth_error() */ + unsigned int intr_err_ptr2; /* ptr used in ISR */ + struct ifqueue txq_pendq; /* these are ready to go to the GT */ + unsigned int txq_pending; + unsigned int txq_lo; /* next to be given to GT */ + unsigned int txq_fi; /* next to be returned to CPU */ + unsigned int txq_ei_gapcount; /* counter until next EI */ + unsigned int txq_nactive; /* number of active descriptors */ + unsigned int txq_nintr; /* number of txq desc. send TX_EVENT */ + unsigned int txq_outptr; /* where to put next transmit packet */ + unsigned int txq_inptr; /* start of 1st queued tx packet */ + unsigned int txq_free; /* free Tx queue slots. */ + unsigned txq_intrbits; /* bits to write to EIMR */ + unsigned txq_esdcmrbits; /* bits to write to ESDCMR */ + unsigned txq_epsrbits; /* bits to test with EPSR */ + + caddr_t txq_ectdp; /* offset to cur. tx desc ptr reg */ + unsigned long txq_desc_busaddr; /* bus addr of tx descriptors */ + caddr_t txq_buf_busaddr; /* bus addr of tx buffers */ + + struct mbuf *rxq_curpkt; /* mbuf for current packet */ + struct GTeth_desc *rxq_head_desc; /* rxq head descriptor */ + unsigned int rxq_fi; /* next to be returned to CPU */ + unsigned int rxq_active; /* # of descriptors given to GT */ + unsigned rxq_intrbits; /* bits to write to EIMR */ + unsigned long rxq_desc_busaddr; /* bus addr of rx descriptors */ + + struct arpcom arpcom; /* rtems if structure, contains ifnet */ + int sc_macno; /* which mac? 0, 1, or 2 */ + + unsigned int sc_tickflags; + #define GE_TICK_TX_IFSTART 0x0001 + #define GE_TICK_RX_RESTART 0x0002 + unsigned int sc_flags; + #define GE_ALLMULTI 0x0001 + #define GE_PHYSTSCHG 0x0002 + #define GE_RXACTIVE 0x0004 + unsigned sc_pcr; /* current EPCR value */ + unsigned sc_pcxr; /* current EPCXR value */ + unsigned sc_intrmask; /* current EIMR value */ + unsigned sc_idlemask; /* suspended EIMR bits */ + unsigned sc_max_frame_length; /* maximum frame length */ + unsigned rx_buf_sz; + + /* Hash table related members */ + unsigned long long *sc_hashtable; + unsigned int sc_hashmask; /* 0x1ff or 0x1fff */ + + rtems_id daemonTid; + rtems_id daemonSync; /* synchronization with the daemon */ + /* statistics */ + struct { + volatile unsigned long rxInterrupts; + + volatile unsigned long txInterrupts; + unsigned long txMultiBuffPacket; + unsigned long length_errors; + unsigned long frame_errors; + unsigned long crc_errors; + unsigned long or_errors; /* overrun error */ + } stats; +}; diff --git a/c/src/lib/libbsp/powerpc/mvme5500/network/GT64260ethreg.h b/c/src/lib/libbsp/powerpc/mvme5500/network/GT64260ethreg.h new file mode 100644 index 0000000000..0b8133e99c --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/network/GT64260ethreg.h @@ -0,0 +1,879 @@ +/* $NetBSD: GT64260ethreg.h,v 1.2 2003/03/17 16:41:16 matt Exp $ */ + +/* + * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed for the NetBSD Project by + * Allegro Networks, Inc., and Wasabi Systems, Inc. + * 4. The name of Allegro Networks, Inc. may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * 5. The name of Wasabi Systems, Inc. may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY ALLEGRO NETWORKS, INC. AND + * WASABI SYSTEMS, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL EITHER ALLEGRO NETWORKS, INC. OR WASABI SYSTEMS, INC. + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _DEV_GTETHREG_H_ +#define _DEV_GTETHREG_H_ + +#define ETH__BIT(bit) (1U << (bit)) +#define ETH__LLBIT(bit) (1ULL << (bit)) +#define ETH__MASK(bit) (ETH__BIT(bit) - 1) +#define ETH__LLMASK(bit) (ETH__LLBIT(bit) - 1) +#define ETH__GEN(n, off) (0x2400+((n) << 10)+(ETH__ ## off)) +#define ETH__EXT(data, bit, len) (((data) >> (bit)) & ETH__MASK(len)) +#define ETH__LLEXT(data, bit, len) (((data) >> (bit)) & ETH__LLMASK(len)) +#define ETH__CLR(data, bit, len) ((data) &= ~(ETH__MASK(len) << (bit))) +#define ETH__INS(new, bit) ((new) << (bit)) +#define ETH__LLINS(new, bit) ((unsigned long long)(new) << (bit)) + +/* + * Descriptors used for both receive & transmit data. Note that the descriptor + * must start on a 4LW boundary. Since the GT accesses the descriptor as + * two 64-bit quantities, we must present them 32bit quantities in the right + * order based on endianess. + */ + +struct GTeth_desc { +#if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN /* for mvme5500 */ + unsigned ed_lencnt; /* Buffer size is hi 16 bits; Byte count (rx) is lo 16 */ + unsigned ed_cmdsts; /* command (hi16)/status (lo16) bits */ + unsigned ed_nxtptr; /* next descriptor (must be 4LW aligned) */ + unsigned ed_bufptr; /* pointer to packet buffer */ +#endif +#if defined(BYTE_ORDER) && BYTE_ORDER == LITTLE_ENDIAN + unsigned ed_cmdsts; /* command (hi16)/status (lo16) bits */ + unsigned ed_lencnt; /* length is hi 16 bits; count (rx) is lo 16 */ + unsigned ed_bufptr; /* pointer to packet buffer */ + unsigned ed_nxtptr; /* next descriptor (must be 4LW aligned) */ +#endif +}; + +/* Ethernet 0 address control (Low), Offset: 0xf200 */ +#define RxBSnoopEn ETH__BIT(6) /* Rx buffer snoop enable,1=enable*/ +#define TxBSnoopEn ETH__BIT(14) /* Tx buffer snoop enable */ +#define RxDSnoopEn ETH__BIT(22) /* Rx descriptor snoop enable */ +#define TxDSnoopEn ETH__BIT(30) /* Tx descriptor snoop enable */ + +/* Ethernet 0 address control (High), Offset: 0xf204 */ +#define HashSnoopEn ETH__BIT(6) /* Hash Table snoop enable */ + +/* */ +#define GT_CUU_Eth0_AddrCtrlLow 0xf200 +#define GT_CUU_Eth0_AddrCtrlHigh 0xf204 + +/* Table 578: Ethernet TX Descriptor - Command/Status word + * All bits except F, EI, AM, O are only valid if TX_CMD_L is also set, + * otherwise should be 0 (tx). + */ + +#define TX_STS_LC ETH__BIT(5) /* Late Collision */ +#define TX_STS_UR ETH__BIT(6) /* Underrun error */ +#define TX_STS_RL ETH__BIT(8) /* Retransmit Limit (excession coll) */ +#define TX_STS_COL ETH__BIT(9) /* Collision Occurred */ +#define TX_STS_RC(v) ETH__GETBITS(v, 10, 4) /* Retransmit Count */ +#define TX_STS_ES ETH__BIT(15) /* Error Summary (LC|UR|RL) */ +#define TX_CMD_L ETH__BIT(16) /* Last - End Of Packet */ +#define TX_CMD_F ETH__BIT(17) /* First - Start Of Packet */ +#define TX_CMD_P ETH__BIT(18) /* Pad Packet */ +#define TX_CMD_GC ETH__BIT(22) /* Generate CRC */ +#define TX_CMD_EI ETH__BIT(23) /* Enable Interrupt */ +#define TX_CMD_AM ETH__BIT(30) /* Auto Mode */ +#define TX_CMD_O ETH__BIT(31) /* Ownership (1=GT 0=CPU) */ + +#define TX_CMD_FIRST (TX_CMD_F|TX_CMD_O) +#define TX_CMD_LAST (TX_CMD_L|TX_CMD_GC|TX_CMD_P|TX_CMD_O) + +/* Table 608: Ethernet RX Descriptor - Command/Status Word + * All bits except F, EI, AM, O are only valid if RX_CMD_L is also set, + * otherwise should be ignored (rx). + */ +#define RX_STS_CE ETH__BIT(0) /* CRC Error */ +#define RX_STS_COL ETH__BIT(1) /* Collision sensed during reception */ +#define RX_STS_LC ETH__BIT(5) /* Late Collision (Reserved) */ +#define RX_STS_OR ETH__BIT(6) /* Overrun Error */ +#define RX_STS_MFL ETH__BIT(7) /* Max Frame Len Error */ +#define RX_STS_SF ETH__BIT(8) /* Short Frame Error (< 64 bytes) */ +#define RX_STS_FT ETH__BIT(11) /* Frame Type (1 = 802.3) */ +#define RX_STS_M ETH__BIT(12) /* Missed Frame */ +#define RX_STS_HE ETH__BIT(13) /* Hash Expired (manual match) */ +#define RX_STS_IGMP ETH__BIT(14) /* IGMP Packet */ +#define RX_STS_ES ETH__BIT(15) /* Error Summary (CE|COL|LC|OR|MFL|SF) */ +#define RX_CMD_L ETH__BIT(16) /* Last - End Of Packet */ +#define RX_CMD_F ETH__BIT(17) /* First - Start Of Packet */ +#define RX_CMD_EI ETH__BIT(23) /* Enable Interrupt */ +#define RX_CMD_AM ETH__BIT(30) /* Auto Mode */ +#define RX_CMD_O ETH__BIT(31) /* Ownership (1=GT 0=CPU) */ + +/* Table 586: Hash Table Entry Fields + */ +#define HSH_V ETH__LLBIT(0) /* Entry is valid */ +#define HSH_S ETH__LLBIT(1) /* Skip this entry */ +#define HSH_RD ETH__LLBIT(2) /* Receive(1) / Discard (0) */ +#define HSH_R ETH__LLBIT(2) /* Receive(1) */ +#define HSH_PRIO_GET(v) ETH__LLEXT(v, 51, 2) +#define HSH_PRIO_INS(v) ETH__LLINS(v, 51) +#define HSH_ADDR_MASK 0x7fffff8LLU +#define HSH_LIMIT 12 + + +#define ETH_EPAR 0x2000 /* PHY Address Register */ +#define ETH_ESMIR 0x2010 /* SMI Register */ + +#define ETH_BASE_ETH0 0x2400 /* Ethernet0 Register Base */ +#define ETH_BASE_ETH1 0x2800 /* Ethernet1 Register Base */ +#define ETH_BASE_ETH2 0x2c00 /* Ethernet2 Register Base */ +#define ETH_SIZE 0x0400 /* Register Space */ + +#define ETH__EBASE 0x0000 /* Base of Registers */ +#define ETH__EPCR 0x0000 /* Port Config. Register */ +#define ETH__EPCXR 0x0008 /* Port Config. Extend Reg */ +#define ETH__EPCMR 0x0010 /* Port Command Register */ +#define ETH__EPSR 0x0018 /* Port Status Register */ +#define ETH__ESPR 0x0020 /* Port Serial Parameters Reg */ +#define ETH__EHTPR 0x0028 /* Port Hash Table Pointer Reg*/ +#define ETH__EFCSAL 0x0030 /* Flow Control Src Addr Low */ +#define ETH__EFCSAH 0x0038 /* Flow Control Src Addr High */ +#define ETH__ESDCR 0x0040 /* SDMA Configuration Reg */ +#define ETH__ESDCMR 0x0048 /* SDMA Command Register */ +#define ETH__EICR 0x0050 /* Interrupt Cause Register */ +#define ETH__EIMR 0x0058 /* Interrupt Mask Register */ +#define ETH__EFRDP0 0x0080 /* First Rx Desc Pointer 0 */ +#define ETH__EFRDP1 0x0084 /* First Rx Desc Pointer 1 */ +#define ETH__EFRDP2 0x0088 /* First Rx Desc Pointer 2 */ +#define ETH__EFRDP3 0x008c /* First Rx Desc Pointer 3 */ +#define ETH__ECRDP0 0x00a0 /* Current Rx Desc Pointer 0 */ +#define ETH__ECRDP1 0x00a4 /* Current Rx Desc Pointer 1 */ +#define ETH__ECRDP2 0x00a8 /* Current Rx Desc Pointer 2 */ +#define ETH__ECRDP3 0x00ac /* Current Rx Desc Pointer 3 */ +#define ETH__ECTDP0 0x00e0 /* Current Tx Desc Pointer 0 */ +#define ETH__ECTDP1 0x00e4 /* Current Tx Desc Pointer 1 */ +#define ETH__EDSCP2P0L 0x0060 /* IP Differentiated Services + CodePoint to Priority0 low */ +#define ETH__EDSCP2P0H 0x0064 /* IP Differentiated Services + CodePoint to Priority0 high*/ +#define ETH__EDSCP2P1L 0x0068 /* IP Differentiated Services + CodePoint to Priority1 low */ +#define ETH__EDSCP2P1H 0x006c /* IP Differentiated Services + CodePoint to Priority1 high*/ +#define ETH__EVPT2P 0x0068 /* VLAN Prio. Tag to Priority */ +#define ETH__EMIBCTRS 0x0100 /* MIB Counters */ + +/* SKF : we are only concerned with the Ethernet0 for the mvme5500 board */ +#define ETH0_EBASE 0x2400 /* Base of Registers */ +#define ETH0_EPCR 0x2400 /* Port Config. Register */ +#define ETH0_EPCXR 0x2408 /* Port Config. Extend Reg */ +#define ETH0_EPCMR 0x2410 /* Port Command Register */ +#define ETH0_EPSR 0x2418 /* Port Status Register */ +#define ETH0_ESPR 0x2420 /* Port Serial Parameters Reg */ +#define ETH0_EHTPR 0x2428 /* Port Hash Table Pointer Reg*/ +#define ETH0_EFCSAL 0x2430 /* Flow Control Src Addr Low */ +#define ETH0_EFCSAH 0x2438 /* Flow Control Src Addr High */ +#define ETH0_ESDCR 0x2440 /* SDMA Configuration Reg */ +#define ETH0_ESDCMR 0x2448 /* SDMA Command Register */ +#define ETH0_EICR 0x2450 /* Interrupt Cause Register */ +#define ETH0_EIMR 0x2458 /* Interrupt Mask Register */ +#define ETH0_EFRDP0 0x2480 /* First Rx Desc Pointer 0 */ +#define ETH0_EFRDP1 0x2484 /* First Rx Desc Pointer 1 */ +#define ETH0_EFRDP2 0x2488 /* First Rx Desc Pointer 2 */ +#define ETH0_EFRDP3 0x248c /* First Rx Desc Pointer 3 */ +#define ETH0_ECRDP0 0x24a0 /* Current Rx Desc Pointer 0 */ +#define ETH0_ECRDP1 0x24a4 /* Current Rx Desc Pointer 1 */ +#define ETH0_ECRDP2 0x24a8 /* Current Rx Desc Pointer 2 */ +#define ETH0_ECRDP3 0x24ac /* Current Rx Desc Pointer 3 */ +#define ETH0_ECTDP0 0x24e0 /* Current Tx Desc Pointer 0 */ +#define ETH0_ECTDP1 0x24e4 /* Current Tx Desc Pointer 1 */ +#define ETH0_EDSCP2P0L 0x2460 /* IP Differentiated Services + CodePoint to Priority0 low */ +#define ETH0_EDSCP2P0H 0x2464 /* IP Differentiated Services + CodePoint to Priority0 high*/ +#define ETH0_EDSCP2P1L 0x2468 /* IP Differentiated Services + CodePoint to Priority1 low */ +#define ETH0_EDSCP2P1H 0x246c /* IP Differentiated Services + CodePoint to Priority1 high*/ +#define ETH0_EVPT2P 0x2468 /* VLAN Prio. Tag to Priority */ +#define ETH0_EMIBCTRS 0x2500 /* MIB Counters */ + +#define ETH_BASE(n) ETH__GEN(n, EBASE) +#define ETH_EPCR(n) ETH__GEN(n, EPCR) /* Port Config. Register */ +#define ETH_EPCXR(n) ETH__GEN(n, EPCXR) /* Port Config. Extend Reg */ +#define ETH_EPCMR(n) ETH__GEN(n, EPCMR) /* Port Command Register */ +#define ETH_EPSR(n) ETH__GEN(n, EPSR) /* Port Status Register */ +#define ETH_ESPR(n) ETH__GEN(n, ESPR) /* Port Serial Parameters Reg */ +#define ETH_EHTPR(n) ETH__GEN(n, EHPTR) /* Port Hash Table Pointer Reg*/ +#define ETH_EFCSAL(n) ETH__GEN(n, EFCSAL) /* Flow Control Src Addr Low */ +#define ETH_EFCSAH(n) ETH__GEN(n, EFCSAH) /* Flow Control Src Addr High */ +#define ETH_ESDCR(n) ETH__GEN(n, ESDCR) /* SDMA Configuration Reg */ +#define ETH_ESDCMR(n) ETH__GEN(n, ESDCMR) /* SDMA Command Register */ +#define ETH_EICR(n) ETH__GEN(n, EICR) /* Interrupt Cause Register */ +#define ETH_EIMR(n) ETH__GEN(n, EIMR) /* Interrupt Mask Register */ +#define ETH_EFRDP0(n) ETH__GEN(n, EFRDP0) /* First Rx Desc Pointer 0 */ +#define ETH_EFRDP1(n) ETH__GEN(n, EFRDP1) /* First Rx Desc Pointer 1 */ +#define ETH_EFRDP2(n) ETH__GEN(n, EFRDP2) /* First Rx Desc Pointer 2 */ +#define ETH_EFRDP3(n) ETH__GEN(n, EFRDP3) /* First Rx Desc Pointer 3 */ +#define ETH_ECRDP0(n) ETH__GEN(n, ECRDP0) /* Current Rx Desc Pointer 0 */ +#define ETH_ECRDP1(n) ETH__GEN(n, ECRDP1) /* Current Rx Desc Pointer 1 */ +#define ETH_ECRDP2(n) ETH__GEN(n, ECRDP2) /* Current Rx Desc Pointer 2 */ +#define ETH_ECRDP3(n) ETH__GEN(n, ECRDP3) /* Current Rx Desc Pointer 3 */ +#define ETH_ECTDP0(n) ETH__GEN(n, ECTDP0) /* Current Tx Desc Pointer 0 */ +#define ETH_ECTDP1(n) ETH__GEN(n, ECTDP1) /* Current Tx Desc Pointer 1 */ +#define ETH_EDSCP2P0L(n) ETH__GEN(n, EDSCP2P0L) /* IP Differentiated Services + CodePoint to Priority0 low */ +#define ETH_EDSCP2P0H(n) ETH__GEN(n, EDSCP2P0H) /* IP Differentiated Services + CodePoint to Priority0 high*/ +#define ETH_EDSCP2P1L(n) ETH__GEN(n, EDSCP2P1L) /* IP Differentiated Services + CodePoint to Priority1 low */ +#define ETH_EDSCP2P1H(n) ETH__GEN(n, EDSCP1P1H) /* IP Differentiated Services + CodePoint to Priority1 high*/ +#define ETH_EVPT2P(n) ETH__GEN(n, EVPT2P) /* VLAN Prio. Tag to Priority */ +#define ETH_EMIBCTRS(n) ETH__GEN(n, EMIBCTRS) /* MIB Counters */ + +#define ETH_EPAR_PhyAD_GET(v, n) (((v) >> ((n) * 5)) & 0x1f) + +#define ETH_ESMIR_READ(phy, reg) (ETH__INS(phy, 16)|\ + ETH__INS(reg, 21)|\ + ETH_ESMIR_ReadOpcode) +#define ETH_ESMIR_WRITE(phy, reg, val) (ETH__INS(phy, 16)|\ + ETH__INS(reg, 21)|\ + ETH__INS(val, 0)|\ + ETH_ESMIR_WriteOpcode) +#define ETH_ESMIR_Value_GET(v) ETH__EXT(v, 0, 16) +#define ETH_ESMIR_WriteOpcode 0 +#define ETH_ESMIR_ReadOpcode ETH__BIT(26) +#define ETH_ESMIR_ReadValid ETH__BIT(27) +#define ETH_ESMIR_Busy ETH__BIT(28) + +/* + * Table 597: Port Configuration Register (PCR) + * 00:00 PM Promiscuous mode + * 0: Normal mode (Frames are only received if the + * destination address is found in the hash + * table) + * 1: Promiscuous mode (Frames are received + * regardless of their destination address. + * Errored frames are discarded unless the Port + * Configuration register's PBF bit is set) + * 01:01 RBM Reject Broadcast Mode + * 0: Receive broadcast address + * 1: Reject frames with broadcast address + * Overridden by the promiscuous mode. + * 02:02 PBF Pass Bad Frames + * (0: Normal mode, 1: Pass bad Frames) + * The Ethernet receiver passes to the CPU errored + * frames (like fragments and collided packets) + * that are normally rejected. + * NOTE: Frames are only passed if they + * successfully pass address filtering. + * 06:03 Reserved + * 07:07 EN Enable (0: Disabled, 1: Enable) + * When enabled, the ethernet port is ready to + * transmit/receive. + * 09:08 LPBK Loop Back Mode + * 00: Normal mode + * 01: Internal loop back mode (TX data is looped + * back to the RX lines. No transition is seen + * on the interface pins) + * 10: External loop back mode (TX data is looped + * back to the RX lines and also transmitted + * out to the MII interface pins) + * 11: Reserved + * 10:10 FC Force Collision + * 0: Normal mode. + * 1: Force Collision on any TX frame. + * For RXM test (in Loopback mode). + * 11:11 Reserved. + * 12:12 HS Hash Size + * 0: 8K address filtering + * (256KB of memory space required). + * 1: 512 address filtering + * ( 16KB of memory space required). + * 13:13 HM Hash Mode (0: Hash Func. 0; 1: Hash Func. 1) + * 14:14 HDM Hash Default Mode + * 0: Discard addresses not found in address table + * 1: Pass addresses not found in address table + * 15:15 HD Duplex Mode (0: Half Duplex, 1: Full Duplex) + * NOTE: Valid only when auto-negotiation for + * duplex mode is disabled. + * 30:16 Reserved + * 31:31 ACCS Accelerate Slot Time + * (0: Normal mode, 1: Reserved) + */ +#define ETH_EPCR_PM ETH__BIT(0) +#define ETH_EPCR_RBM ETH__BIT(1) +#define ETH_EPCR_PBF ETH__BIT(2) +#define ETH_EPCR_EN ETH__BIT(7) +#define ETH_EPCR_LPBK_GET(v) ETH__BIT(v, 8, 2) +#define ETH_EPCR_LPBK_Normal 0 +#define ETH_EPCR_LPBK_Internal 1 +#define ETH_EPCR_LPBK_External 2 +#define ETH_EPCR_FC ETH__BIT(10) + +#define ETH_EPCR_HS ETH__BIT(12) +#define ETH_EPCR_HS_8K 0 +#define ETH_EPCR_HS_512 ETH_EPCR_HS + +#define ETH_EPCR_HM ETH__BIT(13) +#define ETH_EPCR_HM_0 0 +#define ETH_EPCR_HM_1 ETH_EPCR_HM + +#define ETH_EPCR_HDM ETH__BIT(14) +#define ETH_EPCR_HDM_Discard 0 +#define ETH_EPCR_HDM_Pass ETH_EPCR_HDM + +#define ETH_EPCR_HD_Half 0 +#define ETH_EPCR_HD_Full ETH_EPCR_HD_Full + +#define ETH_EPCR_ACCS ETH__BIT(31) + + + +/* + * Table 598: Port Configuration Extend Register (PCXR) + * 00:00 IGMP IGMP Packets Capture Enable + * 0: IGMP packets are treated as normal Multicast + * packets. + * 1: IGMP packets on IPv4/Ipv6 over Ethernet/802.3 + * are trapped and sent to high priority RX + * queue. + * 01:01 SPAN Spanning Tree Packets Capture Enable + * 0: BPDU (Bridge Protocol Data Unit) packets are + * treated as normal Multicast packets. + * 1: BPDU packets are trapped and sent to high + * priority RX queue. + * 02:02 PAR Partition Enable (0: Normal, 1: Partition) + * When more than 61 collisions occur while + * transmitting, the port enters Partition mode. + * It waits for the first good packet from the + * wire and then goes back to Normal mode. Under + * Partition mode it continues transmitting, but + * it does not receive. + * 05:03 PRIOtx Priority weight in the round-robin between high + * and low priority TX queues. + * 000: 1 pkt from HIGH, 1 pkt from LOW. + * 001: 2 pkt from HIGH, 1 pkt from LOW. + * 010: 4 pkt from HIGH, 1 pkt from LOW. + * 011: 6 pkt from HIGH, 1 pkt from LOW. + * 100: 8 pkt from HIGH, 1 pkt from LOW. + * 101: 10 pkt from HIGH, 1 pkt from LOW. + * 110: 12 pkt from HIGH, 1 pkt from LOW. + * 111: All pkt from HIGH, 0 pkt from LOW. LOW is + * served only if HIGH is empty. + * NOTE: If the HIGH queue is emptied before + * finishing the count, the count is reset + * until the next first HIGH comes in. + * 07:06 PRIOrx Default Priority for Packets Received on this + * Port (00: Lowest priority, 11: Highest priority) + * 08:08 PRIOrx_Override Override Priority for Packets Received on this + * Port (0: Do not override, 1: Override with + * field) + * 09:09 DPLXen Enable Auto-negotiation for Duplex Mode + * (0: Enable, 1: Disable) + * 11:10 FCTLen Enable Auto-negotiation for 802.3x Flow-control + * 0: Enable; When enabled, 1 is written (through + * SMI access) to the PHY's register 4 bit 10 + * to advertise flow-control capability. + * 1: Disable; Only enables flow control after the + * PHY address is set by the CPU. When changing + * the PHY address the flow control + * auto-negotiation must be disabled. + * 11:11 FLP Force Link Pass + * (0: Force Link Pass, 1: Do NOT Force Link pass) + * 12:12 FCTL 802.3x Flow-Control Mode (0: Enable, 1: Disable) + * NOTE: Only valid when auto negotiation for flow + * control is disabled. + * 13:13 Reserved + * 15:14 MFL Max Frame Length + * Maximum packet allowed for reception (including + * CRC): 00: 1518 bytes, 01: 1536 bytes, + * 10: 2048 bytes, 11: 64K bytes + * 16:16 MIBclrMode MIB Counters Clear Mode (0: Clear, 1: No effect) + * 17:17 MIBctrMode Reserved. (MBZ) + * 18:18 Speed Port Speed (0: 10Mbit/Sec, 1: 100Mbit/Sec) + * NOTE: Only valid if SpeedEn bit is set. + * 19:19 SpeedEn Enable Auto-negotiation for Speed + * (0: Enable, 1: Disable) + * 20:20 RMIIen RMII enable + * 0: Port functions as MII port + * 1: Port functions as RMII port + * 21:21 DSCPen DSCP enable + * 0: IP DSCP field decoding is disabled. + * 1: IP DSCP field decoding is enabled. + * 31:22 Reserved + */ +#define ETH_EPCXR_IGMP ETH__BIT(0) +#define ETH_EPCXR_SPAN ETH__BIT(1) +#define ETH_EPCXR_PAR ETH__BIT(2) +#define ETH_EPCXR_PRIOtx_GET(v) ETH__EXT(v, 3, 3) +#define ETH_EPCXR_PRIOrx_GET(v) ETH__EXT(v, 3, 3) +#define ETH_EPCXR_PRIOrx_Override ETH__BIT(8) +#define ETH_EPCXR_DLPXen ETH__BIT(9) +#define ETH_EPCXR_FCTLen ETH__BIT(10) +#define ETH_EPCXR_FLP ETH__BIT(11) +#define ETH_EPCXR_FCTL ETH__BIT(12) +#define ETH_EPCXR_MFL_GET(v) ETH__EXT(v, 14, 2) +#define ETH_EPCXR_MFL_1518 0 +#define ETH_EPCXR_MFL_1536 1 +#define ETH_EPCXR_MFL_2048 2 +#define ETH_EPCXR_MFL_64K 3 +#define ETH_EPCXR_MIBclrMode ETH__BIT(16) +#define ETH_EPCXR_MIBctrMode ETH__BIT(17) +#define ETH_EPCXR_Speed ETH__BIT(18) +#define ETH_EPCXR_SpeedEn ETH__BIT(19) +#define ETH_EPCXR_RMIIEn ETH__BIT(20) +#define ETH_EPCXR_DSCPEn ETH__BIT(21) + + + +/* + * Table 599: Port Command Register (PCMR) + * 14:00 Reserved + * 15:15 FJ Force Jam / Flow Control + * When in half-duplex mode, the CPU uses this bit + * to force collisions on the Ethernet segment. + * When the CPU recognizes that it is going to run + * out of receive buffers, it can force the + * transmitter to send jam frames, forcing + * collisions on the wire. To allow transmission + * on the Ethernet segment, the CPU must clear the + * FJ bit when more resources are available. When + * in full-duplex and flow-control is enabled, this + * bit causes the port's transmitter to send + * flow-control PAUSE packets. The CPU must reset + * this bit when more resources are available. + * 31:16 Reserved + */ + +#define ETH_EPCMR_FJ ETH__BIT(15) + + +/* + * Table 600: Port Status Register (PSR) -- Read Only + * 00:00 Speed Indicates Port Speed (0: 10Mbs, 1: 100Mbs) + * 01:01 Duplex Indicates Port Duplex Mode (0: Half, 1: Full) + * 02:02 Fctl Indicates Flow-control Mode + * (0: enabled, 1: disabled) + * 03:03 Link Indicates Link Status (0: down, 1: up) + * 04:04 Pause Indicates that the port is in flow-control + * disabled state. This bit is set when an IEEE + * 802.3x flow-control PAUSE (XOFF) packet is + * received (assuming that flow-control is + * enabled and the port is in full-duplex mode). + * Reset when XON is received, or when the XOFF + * timer has expired. + * 05:05 TxLow Tx Low Priority Status + * Indicates the status of the low priority + * transmit queue: (0: Stopped, 1: Running) + * 06:06 TxHigh Tx High Priority Status + * Indicates the status of the high priority + * transmit queue: (0: Stopped, 1: Running) + * 07:07 TXinProg TX in Progress + * Indicates that the port's transmitter is in an + * active transmission state. + * 31:08 Reserved + */ +#define ETH_EPSR_Speed ETH__BIT(0) +#define ETH_EPSR_Duplex ETH__BIT(1) +#define ETH_EPSR_Fctl ETH__BIT(2) +#define ETH_EPSR_Link ETH__BIT(3) +#define ETH_EPSR_Pause ETH__BIT(4) +#define ETH_EPSR_TxLow ETH__BIT(5) +#define ETH_EPSR_TxHigh ETH__BIT(6) +#define ETH_EPSR_TXinProg ETH__BIT(7) + + +/* + * Table 601: Serial Parameters Register (SPR) + * 01:00 JAM_LENGTH Two bits to determine the JAM Length + * (in Backpressure) as follows: + * 00 = 12K bit-times + * 01 = 24K bit-times + * 10 = 32K bit-times + * 11 = 48K bit-times + * 06:02 JAM_IPG Five bits to determine the JAM IPG. + * The step is four bit-times. The value may vary + * between 4 bit time to 124. + * 11:07 IPG_JAM_TO_DATA Five bits to determine the IPG JAM to DATA. + * The step is four bit-times. The value may vary + * between 4 bit time to 124. + * 16:12 IPG_DATA Inter-Packet Gap (IPG) + * The step is four bit-times. The value may vary + * between 12 bit time to 124. + * NOTE: These bits may be changed only when the + * Ethernet ports is disabled. + * 21:17 Data_Blind Data Blinder + * The number of nibbles from the beginning of the + * IPG, in which the IPG counter is restarted when + * detecting a carrier activity. Following this + * value, the port enters the Data Blinder zone and + * does not reset the IPG counter. This ensures + * fair access to the medium. + * The default is 10 hex (64 bit times - 2/3 of the + * default IPG). The step is 4 bit-times. Valid + * range is 3 to 1F hex nibbles. + * NOTE: These bits may be only changed when the + * Ethernet port is disabled. + * 22:22 Limit4 The number of consecutive packet collisions that + * occur before the collision counter is reset. + * 0: The port resets its collision counter after + * 16 consecutive retransmit trials and + * restarts the Backoff algorithm. + * 1: The port resets its collision counter and + * restarts the Backoff algorithm after 4 + * consecutive transmit trials. + * 31:23 Reserved + */ +#define ETH_ESPR_JAM_LENGTH_GET(v) ETH__EXT(v, 0, 2) +#define ETH_ESPR_JAM_IPG_GET(v) ETH__EXT(v, 2, 5) +#define ETH_ESPR_IPG_JAM_TO_DATA_GET(v) ETH__EXT(v, 7, 5) +#define ETH_ESPR_IPG_DATA_GET(v) ETH__EXT(v, 12, 5) +#define ETH_ESPR_Data_Bilnd_GET(v) ETH__EXT(v, 17, 5) +#define ETH_ESPR_Limit4(v) ETH__BIT(22) + +/* + * Table 602: Hash Table Pointer Register (HTPR) + * 31:00 HTP 32-bit pointer to the address table. + * Bits [2:0] must be set to zero. + */ + +/* + * Table 603: Flow Control Source Address Low (FCSAL) + * 15:0 SA[15:0] Source Address + * The least significant bits of the source + * address for the port. This address is used for + * Flow Control. + * 31:16 Reserved + */ + +/* + * Table 604: Flow Control Source Address High (FCSAH) + * 31:0 SA[47:16] Source Address + * The most significant bits of the source address + * for the port. This address is used for Flow + * Control. + */ + + +/* + * Table 605: SDMA Configuration Register (SDCR) + * 01:00 Reserved + * 05:02 RC Retransmit Count + * Sets the maximum number of retransmits per + * packet. After executing retransmit for RC + * times, the TX SDMA closes the descriptor with a + * Retransmit Limit error indication and processes + * the next packet. When RC is set to 0, the + * number of retransmits is unlimited. In this + * case, the retransmit process is only terminated + * if CPU issues an Abort command. + * 06:06 BLMR Big/Little Endian Receive Mode + * The DMA supports Big or Little Endian + * configurations on a per channel basis. The BLMR + * bit only affects data transfer to memory. + * 0: Big Endian + * 1: Little Endian + * 07:07 BLMT Big/Little Endian Transmit Mode + * The DMA supports Big or Little Endian + * configurations on a per channel basis. The BLMT + * bit only affects data transfer from memory. + * 0: Big Endian + * 1: Little Endian + * 08:08 POVR PCI Override + * When set, causes the SDMA to direct all its + * accesses in PCI_0 direction and overrides + * normal address decoding process. + * 09:09 RIFB Receive Interrupt on Frame Boundaries + * When set, the SDMA Rx generates interrupts only + * on frame boundaries (i.e. after writing the + * frame status to the descriptor). + * 11:10 Reserved + * 13:12 BSZ Burst Size + * Sets the maximum burst size for SDMA + * transactions: + * 00: Burst is limited to 1 64bit words. + * 01: Burst is limited to 2 64bit words. + * 10: Burst is limited to 4 64bit words. + * 11: Burst is limited to 8 64bit words. + * 31:14 Reserved + */ +#define ETH_ESDCR_RC_GET(v) ETH__EXT(v, 2, 4) +#define ETH_ESDCR_BLMR ETH__BIT(6) +#define ETH_ESDCR_BLMT ETH__BIT(7) +#define ETH_ESDCR_POVR ETH__BIT(8) +#define ETH_ESDCR_RIFB ETH__BIT(9) +#define ETH_ESDCR_BSZ_GET(v) ETH__EXT(v, 12, 2) +#define ETH_ESDCR_BSZ_SET(v, n) (ETH__CLR(v, 12, 2),\ + (v) |= ETH__INS(n, 12)) +#define ETH_ESDCR_BSZ_1 0 +#define ETH_ESDCR_BSZ_2 1 +#define ETH_ESDCR_BSZ_4 2 +#define ETH_ESDCR_BSZ_8 3 + +#define ETH_ESDCR_BSZ_Strings { "1 64-bit word", "2 64-bit words", \ + "4 64-bit words", "8 64-bit words" } + +/* + * Table 606: SDMA Command Register (SDCMR) + * 06:00 Reserved + * 07:07 ERD Enable RX DMA. + * Set to 1 by the CPU to cause the SDMA to start + * a receive process. Cleared when the CPU issues + * an Abort Receive command. + * 14:08 Reserved + * 15:15 AR Abort Receive + * Set to 1 by the CPU to abort a receive SDMA + * operation. When the AR bit is set, the SDMA + * aborts its current operation and moves to IDLE. + * No descriptor is closed. The AR bit is cleared + * upon entering IDLE. After setting the AR bit, + * the CPU must poll the bit to verify that the + * abort sequence is completed. + * 16:16 STDH Stop TX High + * Set to 1 by the CPU to stop the transmission + * process from the high priority queue at the end + * of the current frame. An interrupt is generated + * when the stop command has been executed. + * Writing 1 to STDH resets TXDH bit. + * Writing 0 to this bit has no effect. + * 17:17 STDL Stop TX Low + * Set to 1 by the CPU to stop the transmission + * process from the low priority queue at the end + * of the current frame. An interrupt is generated + * when the stop command has been executed. + * Writing 1 to STDL resets TXDL bit. + * Writing 0 to this bit has no effect. + * 22:18 Reserved + * 23:23 TXDH Start Tx High + * Set to 1 by the CPU to cause the SDMA to fetch + * the first descriptor and start a transmit + * process from the high priority Tx queue. + * Writing 1 to TXDH resets STDH bit. + * Writing 0 to this bit has no effect. + * 24:24 TXDL Start Tx Low + * Set to 1 by the CPU to cause the SDMA to fetch + * the first descriptor and start a transmit + * process from the low priority Tx queue. + * Writing 1 to TXDL resets STDL bit. + * Writing 0 to this bit has no effect. + * 30:25 Reserved + * 31:31 AT Abort Transmit + * Set to 1 by the CPU to abort a transmit DMA + * operation. When the AT bit is set, the SDMA + * aborts its current operation and moves to IDLE. + * No descriptor is closed. Cleared upon entering + * IDLE. After setting AT bit, the CPU must poll + * it in order to verify that the abort sequence + * is completed. + */ +#define ETH_ESDCMR_ERD ETH__BIT(7) +#define ETH_ESDCMR_AR ETH__BIT(15) +#define ETH_ESDCMR_STDH ETH__BIT(16) +#define ETH_ESDCMR_STDL ETH__BIT(17) +#define ETH_ESDCMR_TXDH ETH__BIT(23) +#define ETH_ESDCMR_TXDL ETH__BIT(24) +#define ETH_ESDCMR_AT ETH__BIT(31) + +/* + * Table 607: Interrupt Cause Register (ICR) + * 00:00 RxBuffer Rx Buffer Return + * Indicates an Rx buffer returned to CPU ownership + * or that the port finished reception of a Rx + * frame in either priority queues. + * NOTE: In order to get a Rx Buffer return per + * priority queue, use bit 19:16. This bit is + * set upon closing any Rx descriptor which + * has its EI bit set. To limit the + * interrupts to frame (rather than buffer) + * boundaries, the user must set SDMA + * Configuration register's RIFB bit. When + * the RIFB bit is set, an interrupt + * generates only upon closing the first + * descriptor of a received packet, if this + * descriptor has it EI bit set. + * 01:01 Reserved + * 02:02 TxBufferHigh Tx Buffer for High priority Queue + * Indicates a Tx buffer returned to CPU ownership + * or that the port finished transmission of a Tx + * frame. + * NOTE: This bit is set upon closing any Tx + * descriptor which has its EI bit set. To + * limit the interrupts to frame (rather than + * buffer) boundaries, the user must set EI + * only in the last descriptor. + * 03:03 TxBufferLow Tx Buffer for Low Priority Queue + * Indicates a Tx buffer returned to CPU ownership + * or that the port finished transmission of a Tx + * frame. + * NOTE: This bit is set upon closing any Tx + * descriptor which has its EI bit set. To + * limit the interrupts to frame (rather than + * buffer) boundaries, the user must set EI + * only in the last descriptor. + * 05:04 Reserved + * 06:06 TxEndHigh Tx End for High Priority Queue + * Indicates that the Tx DMA stopped processing the + * high priority queue after stop command, or that + * it reached the end of the high priority + * descriptor chain. + * 07:07 TxEndLow Tx End for Low Priority Queue + * Indicates that the Tx DMA stopped processing the + * low priority queue after stop command, or that + * it reached the end of the low priority + * descriptor chain. + * 08:08 RxError Rx Resource Error + * Indicates a Rx resource error event in one of + * the priority queues. + * NOTE: To get a Rx Resource Error Indication per + * priority queue, use bit 23:20. + * 09:09 Reserved + * 10:10 TxErrorHigh Tx Resource Error for High Priority Queue + * Indicates a Tx resource error event during + * packet transmission from the high priority queue + * 11:11 TxErrorLow Tx Resource Error for Low Priority Queue + * Indicates a Tx resource error event during + * packet transmission from the low priority queue + * 12:12 RxOVR Rx Overrun + * Indicates an overrun event that occurred during + * reception of a packet. + * 13:13 TxUdr Tx Underrun + * Indicates an underrun event that occurred during + * transmission of packet from either queue. + * 15:14 Reserved + * 16:16 RxBuffer-Queue[0] Rx Buffer Return in Priority Queue[0] + * Indicates a Rx buffer returned to CPU ownership + * or that the port completed reception of a Rx + * frame in a receive priority queue[0] + * 17:17 RxBuffer-Queue[1] Rx Buffer Return in Priority Queue[1] + * Indicates a Rx buffer returned to CPU ownership + * or that the port completed reception of a Rx + * frame in a receive priority queue[1]. + * 18:18 RxBuffer-Queue[2] Rx Buffer Return in Priority Queue[2] + * Indicates a Rx buffer returned to CPU ownership + * or that the port completed reception of a Rx + * frame in a receive priority queue[2]. + * 19:19 RxBuffer-Queue[3] Rx Buffer Return in Priority Queue[3] + * Indicates a Rx buffer returned to CPU ownership + * or that the port completed reception of a Rx + * frame in a receive priority queue[3]. + * 20:20 RxError-Queue[0] Rx Resource Error in Priority Queue[0] + * Indicates a Rx resource error event in receive + * priority queue[0]. + * 21:21 RxError-Queue[1] Rx Resource Error in Priority Queue[1] + * Indicates a Rx resource error event in receive + * priority queue[1]. + * 22:22 RxError-Queue[2] Rx Resource Error in Priority Queue[2] + * Indicates a Rx resource error event in receive + * priority queue[2]. + * 23:23 RxError-Queue[3] Rx Resource Error in Priority Queue[3] + * Indicates a Rx resource error event in receive + * priority queue[3]. + * 27:24 Reserved + * 28:29 MIIPhySTC MII PHY Status Change + * Indicates a status change reported by the PHY + * connected to this port. Set when the MII + * management interface block identifies a change + * in PHY's register 1. + * 29:29 SMIdone SMI Command Done + * Indicates that the SMI completed a MII + * management command (either read or write) that + * was initiated by the CPU writing to the SMI + * register. + * 30:30 Reserved + * 31:31 EtherIntSum Ethernet Interrupt Summary + * This bit is a logical OR of the (unmasked) bits + * [30:04] in the Interrupt Cause register. + */ + +#define ETH_IR_RxBuffer ETH__BIT(0) +#define ETH_IR_TxBufferHigh ETH__BIT(2) +#define ETH_IR_TxBufferLow ETH__BIT(3) +#define ETH_IR_TxEndHigh ETH__BIT(6) +#define ETH_IR_TxEndLow ETH__BIT(7) +#define ETH_IR_RxError ETH__BIT(8) +#define ETH_IR_TxErrorHigh ETH__BIT(10) +#define ETH_IR_TxErrorLow ETH__BIT(11) +#define ETH_IR_RxOVR ETH__BIT(12) +#define ETH_IR_TxUdr ETH__BIT(13) +#define ETH_IR_RxBuffer_0 ETH__BIT(16) +#define ETH_IR_RxBuffer_1 ETH__BIT(17) +#define ETH_IR_RxBuffer_2 ETH__BIT(18) +#define ETH_IR_RxBuffer_3 ETH__BIT(19) +#define ETH_IR_RxBuffer_GET(v) ETH__EXT(v, 16, 4) +#define ETH_IR_RxError_0 ETH__BIT(20) +#define ETH_IR_RxError_1 ETH__BIT(21) +#define ETH_IR_RxError_2 ETH__BIT(22) +#define ETH_IR_RxError_3 ETH__BIT(23) +#define ETH_IR_RxError_GET(v) ETH__EXT(v, 20, 4) +#define ETH_IR_RxBits (ETH_IR_RxBuffer_0|\ + ETH_IR_RxBuffer_1|\ + ETH_IR_RxBuffer_2|\ + ETH_IR_RxBuffer_3|\ + ETH_IR_RxError_0|\ + ETH_IR_RxError_1|\ + ETH_IR_RxError_2|\ + ETH_IR_RxError_3) +#define ETH_IR_MIIPhySTC ETH__BIT(28) +#define ETH_IR_SMIdone ETH__BIT(29) +#define ETH_IR_EtherIntSum (1<<31) +#define ETH_IR_Summary (1<<31) +#define ETH_IR_ErrorSum 0x803d00 +#define INTR_RX_ERROR 0x801100 +#define INTR_TX_ERROR 0x002c00 + +/* + * Table 608: Interrupt Mask Register (IMR) + * 31:00 Various Mask bits for the Interrupt Cause register. + */ + +/* + * Table 609: IP Differentiated Services CodePoint to Priority0 low (DSCP2P0L), + * 31:00 Priority0_low The LSB priority bits for DSCP[31:0] entries. + */ + +/* + * Table 610: IP Differentiated Services CodePoint to Priority0 high (DSCP2P0H) + * 31:00 Priority0_high The LSB priority bits for DSCP[63:32] entries. + */ + +/* + * Table 611: IP Differentiated Services CodePoint to Priority1 low (DSCP2P1L) + * 31:00 Priority1_low The MSB priority bits for DSCP[31:0] entries. + */ + +/* + * Table 612: IP Differentiated Services CodePoint to Priority1 high (DSCP2P1H) + * 31:00 Priority1_high The MSB priority bit for DSCP[63:32] entries. + */ + +/* + * Table 613: VLAN Priority Tag to Priority (VPT2P) + * 07:00 Priority0 The LSB priority bits for VLAN Priority[7:0] + * entries. + * 15:08 Priority1 The MSB priority bits for VLAN Priority[7:0] + * entries. + * 31:16 Reserved + */ +#endif /* _DEV_GTETHREG_H_ */ diff --git a/c/src/lib/libbsp/powerpc/mvme5500/network/Makefile.am b/c/src/lib/libbsp/powerpc/mvme5500/network/Makefile.am new file mode 100644 index 0000000000..55ead4c93e --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/network/Makefile.am @@ -0,0 +1,43 @@ +## +## $Id$ +## + +VPATH = @srcdir@: + +INCLUDES = -I @srcdir@/../GT64260 + +C_FILES = GT64260eth.c +include_bspdir = $(includedir)/bsp +include_bsp_HEADERS = GT64260eth.h GT64260ethreg.h + +H_FILES = GT64260eth.h GT64260ethreg.h + +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) + +EXTRA_DIST = GT64260eth.c + +OBJS = $(C_O_FILES) + +include $(top_srcdir)/../../../../../../automake/compile.am +include $(top_srcdir)/../../../../../../automake/lib.am + +# +# (OPTIONAL) Add local stuff here using += +# + +$(PROJECT_INCLUDE)/bsp: + $(mkinstalldirs) $< + +$(PROJECT_INCLUDE)/bsp/GT64260eth.h: GT64260eth.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/bsp/GT64260ethreg.h: GT64260ethreg.h + $(INSTALL_DATA) $< $@ + +# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile +PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp $(PROJECT_INCLUDE)/bsp/GT64260eth.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/GT64260ethreg.h + +all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) + +include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/lib/libbsp/powerpc/mvme5500/network/Makefile.in b/c/src/lib/libbsp/powerpc/mvme5500/network/Makefile.in new file mode 100644 index 0000000000..fade651cde --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/network/Makefile.in @@ -0,0 +1,594 @@ +# Makefile.in generated by automake 1.7.2 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ + +VPATH = @srcdir@: +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ + +AR = @AR@ + +# OBSOLETE: Don't use +AS = $(CC) +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BARE_CPU_CFLAGS = @BARE_CPU_CFLAGS@ +BARE_CPU_MODEL = @BARE_CPU_MODEL@ + +CC = @CC@ $(GCCSPECS) + +CCAS = $(CC) +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @RTEMS_CFLAGS@ $(XCFLAGS) +CFLAGS_DEBUG_V = @CFLAGS_DEBUG_V@ +CFLAGS_OPTIMIZE_V = @CFLAGS_OPTIMIZE_V@ +CFLAGS_PROFILE_V = @CFLAGS_PROFILE_V@ +CPP = @CPP@ $(GCCSPECS) + +CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES) $(XCPPFLAGS) + +CPU_CFLAGS = @CPU_CFLAGS@ +CYGPATH_W = @CYGPATH_W@ + +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ENDIF = @ENDIF@ +EXEEXT = @EXEEXT@ +GCC_SPECS = @GCC_SPECS@ +HAS_MP = @HAS_MP@ +HAS_NETWORKING = @HAS_NETWORKING@ +HAS_NETWORKING_FALSE = @HAS_NETWORKING_FALSE@ +HAS_NETWORKING_TRUE = @HAS_NETWORKING_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKE = @MAKE@ +MAKEINFO = @MAKEINFO@ +MULTILIB_FALSE = @MULTILIB_FALSE@ +MULTILIB_TRUE = @MULTILIB_TRUE@ +NM = @NM@ +OBJCOPY = @OBJCOPY@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKHEX = @PACKHEX@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PROJECT_INCLUDE = @PROJECT_INCLUDE@ +PROJECT_RELEASE = @PROJECT_RELEASE@ +PROJECT_ROOT = @PROJECT_ROOT@ +PROJECT_TOPdir = @PROJECT_TOPdir@ +RANLIB = @RANLIB@ +RTEMS_BSP = @RTEMS_BSP@ +RTEMS_BSP_FAMILY = @RTEMS_BSP_FAMILY@ +RTEMS_BSP_SPECS = @RTEMS_BSP_SPECS@ +RTEMS_CFLAGS = @RTEMS_CFLAGS@ +RTEMS_CPPFLAGS = @RTEMS_CPPFLAGS@ +RTEMS_CPU = @RTEMS_CPU@ +RTEMS_CPU_MODEL = @RTEMS_CPU_MODEL@ +RTEMS_HAS_NETWORKING = @RTEMS_HAS_NETWORKING@ +RTEMS_HOST = @RTEMS_HOST@ +RTEMS_ROOT = @RTEMS_ROOT@ +RTEMS_TOPdir = @RTEMS_TOPdir@ +RTEMS_USE_GCC_FALSE = @RTEMS_USE_GCC_FALSE@ +RTEMS_USE_GCC_TRUE = @RTEMS_USE_GCC_TRUE@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIZE = @SIZE@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__include = @am__include@ +am__quote = @am__quote@ +bindir = @bindir@ +bsplibdir = @bsplibdir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exceptions = @exceptions@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ + +INCLUDES = -I @srcdir@/../GT64260 + +C_FILES = GT64260eth.c +include_bspdir = $(includedir)/bsp +include_bsp_HEADERS = GT64260eth.h GT64260ethreg.h + +H_FILES = GT64260eth.h GT64260ethreg.h + +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) + +EXTRA_DIST = GT64260eth.c + +OBJS = $(C_O_FILES) + +@RTEMS_USE_GCC_TRUE@GCCSPECS = $(GCC_SPECS) $(RTEMS_BSP_SPECS) +# CXXFLAGS = @RTEMS_CXXFLAGS@ $(XCXXFLAGS) +CXXFLAGS = @RTEMS_CFLAGS@ $(XCXXFLAGS) +ASFLAGS = $(CPU_ASFLAGS) $(CPU_CFLAGS) $(XASFLAGS) + +LINK_LIBS = $(LD_LIBS) + + +# +# Client compiler and support tools +# + +# +# How to compile stuff into ${ARCH} subdirectory +# +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + + +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + +CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) +ASCOMPILE = $(AS) $(AM_ASFLAGS) $(ASFLAGS) + + +# Dependency files for use by gmake +# NOTE: we don't put them into $(ARCH) +# so that 'make clean' doesn't blow it away +DEPEND = Depends-${ARCH} + + +# spell out all the LINK_FILE's, rather than using -lbsp, so +# that $(LINK_FILES) can be a dependency +LINK_OBJS = \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +LINK_FILES = \ + $(START_FILE) \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +VARIANT = OPTIMIZE + +VARIANT_OPTIMIZE_V = OPTIMIZE +VARIANT_DEBUG_V = DEBUG +VARIANT_PROFILE_V = PROFILE +VARIANT_optimize_V = OPTIMIZE +VARIANT_debug_V = DEBUG +VARIANT_profile_V = PROFILE + +VARIANT_V = $(VARIANT_$(VARIANT)_V) + +ARCH_OPTIMIZE_V = o-optimize +ARCH_DEBUG_V = o-debug +ARCH_PROFILE_V = o-profile + +ARCH__V = $(ARCH_OPTIMIZE_V) +ARCH = $(ARCH_$(VARIANT_V)_V) + +LIBSUFFIX_OPTIMIZE_V = +LIBSUFFIX_DEBUG_V = _g +LIBSUFFIX_PROFILE_V = _p +LIBSUFFIX__V = $(LIBSUFFIX_OPTIMIZE_V) + +LIB_VARIANT = $(LIBSUFFIX_$(VARIANT_V)_V) +CFLAGS__V = $(CFLAGS_OPTIMIZE_V) + +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_OPTIMIZE_V = +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_DEBUG_V = -qrtems_debug -Wno-unused +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_PROFILE_V = -pg + +RTEMS_CFLAGS__V = $(RTEMS_CFLAGS_OPTIMIZE_V) +CXX = @CXX@ $(GCCSPECS) + +AM_CPPFLAGS = $(RTEMS_CPPFLAGS) +AM_CFLAGS = +AM_CXXFLAGS = +AM_CCASFLAGS = $(CPU_CFLAGS) $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS) + +ARFLAGS = ruv + +TMPINSTALL_FILES = $(PROJECT_RELEASE)/lib + +# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile +PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp $(PROJECT_INCLUDE)/bsp/GT64260eth.h $(PROJECT_INCLUDE)/bsp/GT64260ethreg.h + +PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools +subdir = network +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/bspopts.tmp +CONFIG_CLEAN_FILES = +DIST_SOURCES = +HEADERS = $(include_bsp_HEADERS) + +DIST_COMMON = $(include_bsp_HEADERS) \ + $(top_srcdir)/../../../../../../automake/compile.am \ + $(top_srcdir)/../../../../../../automake/lib.am \ + $(top_srcdir)/../../../../../../automake/local.am Makefile.am \ + Makefile.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/../../../../../../automake/compile.am $(top_srcdir)/../../../../../../automake/lib.am $(top_srcdir)/../../../../../../automake/local.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign network/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +uninstall-info-am: +include_bspHEADERS_INSTALL = $(INSTALL_HEADER) +install-include_bspHEADERS: $(include_bsp_HEADERS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(include_bspdir) + @list='$(include_bsp_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(include_bspHEADERS_INSTALL) $$d$$p $(DESTDIR)$(include_bspdir)/$$f"; \ + $(include_bspHEADERS_INSTALL) $$d$$p $(DESTDIR)$(include_bspdir)/$$f; \ + done + +uninstall-include_bspHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_bsp_HEADERS)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(include_bspdir)/$$f"; \ + rm -f $(DESTDIR)$(include_bspdir)/$$f; \ + done + +ETAGS = etags +ETAGSFLAGS = + +CTAGS = ctags +CTAGSFLAGS = + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + $(mkinstalldirs) $(distdir)/../../../../../../../automake + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(HEADERS) all-local + +installdirs: + $(mkinstalldirs) $(DESTDIR)$(include_bspdir) + +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-local mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: install-include_bspHEADERS + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-include_bspHEADERS uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ + clean-generic clean-local ctags distclean distclean-generic \ + distclean-tags distdir dvi dvi-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-include_bspHEADERS install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-include_bspHEADERS uninstall-info-am + +@RTEMS_USE_GCC_FALSE@include $(CONFIG.CC) + +${ARCH}/%.o: %.c + ${COMPILE} -o $@ -c $< + +${ARCH}/%.o: %.cc + ${CXXCOMPILE} -o $@ -c $< + +${ARCH}/%.o: %.S + ${CCASCOMPILE} -DASM -o $@ -c $< + +# We deliberately don't have anything depend on the +# $(DEPEND) file; otherwise it will get rebuilt even +# on 'make clean' +# + +@RTEMS_USE_GCC_TRUE@depend-gcc: $(C_FILES) $(CC_FILES) $(S_FILES) +@RTEMS_USE_GCC_TRUE@ $(COMPILE) -M $^ | \ +@RTEMS_USE_GCC_TRUE@ sed -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \ +@RTEMS_USE_GCC_TRUE@ -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp +@RTEMS_USE_GCC_TRUE@ mv $(DEPEND).tmp $(DEPEND) + +# pull in dependencies if they exist +@RTEMS_USE_GCC_TRUE@ifeq (${DEPEND},$(wildcard ${DEPEND})) +@RTEMS_USE_GCC_TRUE@include ${DEPEND} +@RTEMS_USE_GCC_TRUE@@ENDIF@ +depend: depend-am + +@RTEMS_USE_GCC_TRUE@define make-rel +@RTEMS_USE_GCC_TRUE@ $(LINK) -qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) $^ +@RTEMS_USE_GCC_TRUE@endef +@RTEMS_USE_GCC_FALSE@define make-rel +@RTEMS_USE_GCC_FALSE@ $(LINK) $(XLDFLAGS) $^ +@RTEMS_USE_GCC_FALSE@endef + +${ARCH}: + mkdir ${ARCH} + +clean-local: + $(RM) -r o-optimize o-debug o-profile $(CLEANDIRS) + $(RM) Depends-o-optimize.tmp Depends-o-debug.tmp Depends-o-profile.tmp + +define make-library +test -d $(ARCH) || mkdir $(ARCH) +$(RM) $@ +$(AR) $(ARFLAGS) $@ $^ +$(RANLIB) $@ +endef + +$(PROJECT_RELEASE)/lib: + @$(mkinstalldirs) $@ + +.PRECIOUS: $(LIB) + +# +# (OPTIONAL) Add local stuff here using += +# + +$(PROJECT_INCLUDE)/bsp: + $(mkinstalldirs) $< + +$(PROJECT_INCLUDE)/bsp/GT64260eth.h: GT64260eth.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/bsp/GT64260ethreg.h: GT64260ethreg.h + $(INSTALL_DATA) $< $@ + +all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) + +debug: + @echo + @echo "\"make debug\" is obsolete, instead use:" + @echo " make VARIANT=DEBUG" + @echo + +.PHONY: debug + +profile: + @echo + @echo "\"make profile\" is obsolete, instead use:" + @echo " make VARIANT=PROFILE" + @echo + +.PHONY: profile + +preinstall-am: $(PREINSTALL_FILES) +preinstall: preinstall-am +.PHONY: preinstall preinstall-am + +depend-am: depend-gcc +depend: depend-am +.PHONY: depend depend-am depend-gcc +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/c/src/lib/libbsp/powerpc/mvme5500/pci/Makefile.am b/c/src/lib/libbsp/powerpc/mvme5500/pci/Makefile.am new file mode 100644 index 0000000000..0bda6484ca --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/pci/Makefile.am @@ -0,0 +1,35 @@ +## +## Makefile.am,v 1.6 2002/05/14 17:10:16 joel Exp +## + +VPATH = @srcdir@: + +INCLUDES = -I @srcdir@/../pci +include_bspdir = $(includedir)/bsp +include_bsp_HEADERS = gtpcireg.h pci.h +H_FILES = gtpcireg.h pci.h + +C_FILES = pci.c pci_interface.c detect_host_bridge.c pcifinddevice.c +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) +EXTRA_DIST = pci.c pci_interface.c detect_host_bridge.c pcifinddevice.c + +OBJS = $(C_O_FILES) + +include $(top_srcdir)/../../../../../../automake/compile.am +include $(top_srcdir)/../../../../../../automake/lib.am + +$(PROJECT_INCLUDE)/bsp: + $(mkinstalldirs) $@ + +$(PROJECT_INCLUDE)/bsp/gtpcireg.h: gtpcireg.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/bsp/pci.h: pci.h + $(INSTALL_DATA) $< $@ + +PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp $(PROJECT_INCLUDE)/bsp/pci.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/gtpcireg.h + +all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) + +include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/lib/libbsp/powerpc/mvme5500/pci/Makefile.in b/c/src/lib/libbsp/powerpc/mvme5500/pci/Makefile.in new file mode 100644 index 0000000000..7e76c4c258 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/pci/Makefile.in @@ -0,0 +1,586 @@ +# Makefile.in generated by automake 1.7.2 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ + +VPATH = @srcdir@: +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ + +AR = @AR@ + +# OBSOLETE: Don't use +AS = $(CC) +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BARE_CPU_CFLAGS = @BARE_CPU_CFLAGS@ +BARE_CPU_MODEL = @BARE_CPU_MODEL@ + +CC = @CC@ $(GCCSPECS) + +CCAS = $(CC) +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @RTEMS_CFLAGS@ $(XCFLAGS) +CFLAGS_DEBUG_V = @CFLAGS_DEBUG_V@ +CFLAGS_OPTIMIZE_V = @CFLAGS_OPTIMIZE_V@ +CFLAGS_PROFILE_V = @CFLAGS_PROFILE_V@ +CPP = @CPP@ $(GCCSPECS) + +CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES) $(XCPPFLAGS) + +CPU_CFLAGS = @CPU_CFLAGS@ +CYGPATH_W = @CYGPATH_W@ + +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ENDIF = @ENDIF@ +EXEEXT = @EXEEXT@ +GCC_SPECS = @GCC_SPECS@ +HAS_MP = @HAS_MP@ +HAS_NETWORKING = @HAS_NETWORKING@ +HAS_NETWORKING_FALSE = @HAS_NETWORKING_FALSE@ +HAS_NETWORKING_TRUE = @HAS_NETWORKING_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKE = @MAKE@ +MAKEINFO = @MAKEINFO@ +MULTILIB_FALSE = @MULTILIB_FALSE@ +MULTILIB_TRUE = @MULTILIB_TRUE@ +NM = @NM@ +OBJCOPY = @OBJCOPY@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKHEX = @PACKHEX@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PROJECT_INCLUDE = @PROJECT_INCLUDE@ +PROJECT_RELEASE = @PROJECT_RELEASE@ +PROJECT_ROOT = @PROJECT_ROOT@ +PROJECT_TOPdir = @PROJECT_TOPdir@ +RANLIB = @RANLIB@ +RTEMS_BSP = @RTEMS_BSP@ +RTEMS_BSP_FAMILY = @RTEMS_BSP_FAMILY@ +RTEMS_BSP_SPECS = @RTEMS_BSP_SPECS@ +RTEMS_CFLAGS = @RTEMS_CFLAGS@ +RTEMS_CPPFLAGS = @RTEMS_CPPFLAGS@ +RTEMS_CPU = @RTEMS_CPU@ +RTEMS_CPU_MODEL = @RTEMS_CPU_MODEL@ +RTEMS_HAS_NETWORKING = @RTEMS_HAS_NETWORKING@ +RTEMS_HOST = @RTEMS_HOST@ +RTEMS_ROOT = @RTEMS_ROOT@ +RTEMS_TOPdir = @RTEMS_TOPdir@ +RTEMS_USE_GCC_FALSE = @RTEMS_USE_GCC_FALSE@ +RTEMS_USE_GCC_TRUE = @RTEMS_USE_GCC_TRUE@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIZE = @SIZE@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__include = @am__include@ +am__quote = @am__quote@ +bindir = @bindir@ +bsplibdir = @bsplibdir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exceptions = @exceptions@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ + +INCLUDES = -I @srcdir@/../pci +include_bspdir = $(includedir)/bsp +include_bsp_HEADERS = gtpcireg.h pci.h +H_FILES = gtpcireg.h pci.h + +C_FILES = pci.c pci_interface.c detect_host_bridge.c pcifinddevice.c +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) +EXTRA_DIST = pci.c pci_interface.c detect_host_bridge.c pcifinddevice.c + +OBJS = $(C_O_FILES) + +@RTEMS_USE_GCC_TRUE@GCCSPECS = $(GCC_SPECS) $(RTEMS_BSP_SPECS) +# CXXFLAGS = @RTEMS_CXXFLAGS@ $(XCXXFLAGS) +CXXFLAGS = @RTEMS_CFLAGS@ $(XCXXFLAGS) +ASFLAGS = $(CPU_ASFLAGS) $(CPU_CFLAGS) $(XASFLAGS) + +LINK_LIBS = $(LD_LIBS) + + +# +# Client compiler and support tools +# + +# +# How to compile stuff into ${ARCH} subdirectory +# +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + + +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + +CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) +ASCOMPILE = $(AS) $(AM_ASFLAGS) $(ASFLAGS) + + +# Dependency files for use by gmake +# NOTE: we don't put them into $(ARCH) +# so that 'make clean' doesn't blow it away +DEPEND = Depends-${ARCH} + + +# spell out all the LINK_FILE's, rather than using -lbsp, so +# that $(LINK_FILES) can be a dependency +LINK_OBJS = \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +LINK_FILES = \ + $(START_FILE) \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +VARIANT = OPTIMIZE + +VARIANT_OPTIMIZE_V = OPTIMIZE +VARIANT_DEBUG_V = DEBUG +VARIANT_PROFILE_V = PROFILE +VARIANT_optimize_V = OPTIMIZE +VARIANT_debug_V = DEBUG +VARIANT_profile_V = PROFILE + +VARIANT_V = $(VARIANT_$(VARIANT)_V) + +ARCH_OPTIMIZE_V = o-optimize +ARCH_DEBUG_V = o-debug +ARCH_PROFILE_V = o-profile + +ARCH__V = $(ARCH_OPTIMIZE_V) +ARCH = $(ARCH_$(VARIANT_V)_V) + +LIBSUFFIX_OPTIMIZE_V = +LIBSUFFIX_DEBUG_V = _g +LIBSUFFIX_PROFILE_V = _p +LIBSUFFIX__V = $(LIBSUFFIX_OPTIMIZE_V) + +LIB_VARIANT = $(LIBSUFFIX_$(VARIANT_V)_V) +CFLAGS__V = $(CFLAGS_OPTIMIZE_V) + +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_OPTIMIZE_V = +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_DEBUG_V = -qrtems_debug -Wno-unused +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_PROFILE_V = -pg + +RTEMS_CFLAGS__V = $(RTEMS_CFLAGS_OPTIMIZE_V) +CXX = @CXX@ $(GCCSPECS) + +AM_CPPFLAGS = $(RTEMS_CPPFLAGS) +AM_CFLAGS = +AM_CXXFLAGS = +AM_CCASFLAGS = $(CPU_CFLAGS) $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS) + +ARFLAGS = ruv + +TMPINSTALL_FILES = $(PROJECT_RELEASE)/lib + +PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp $(PROJECT_INCLUDE)/bsp/pci.h $(PROJECT_INCLUDE)/bsp/gtpcireg.h + +PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools +subdir = pci +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/bspopts.tmp +CONFIG_CLEAN_FILES = +DIST_SOURCES = +HEADERS = $(include_bsp_HEADERS) + +DIST_COMMON = $(include_bsp_HEADERS) \ + $(top_srcdir)/../../../../../../automake/compile.am \ + $(top_srcdir)/../../../../../../automake/lib.am \ + $(top_srcdir)/../../../../../../automake/local.am Makefile.am \ + Makefile.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/../../../../../../automake/compile.am $(top_srcdir)/../../../../../../automake/lib.am $(top_srcdir)/../../../../../../automake/local.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign pci/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +uninstall-info-am: +include_bspHEADERS_INSTALL = $(INSTALL_HEADER) +install-include_bspHEADERS: $(include_bsp_HEADERS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(include_bspdir) + @list='$(include_bsp_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(include_bspHEADERS_INSTALL) $$d$$p $(DESTDIR)$(include_bspdir)/$$f"; \ + $(include_bspHEADERS_INSTALL) $$d$$p $(DESTDIR)$(include_bspdir)/$$f; \ + done + +uninstall-include_bspHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_bsp_HEADERS)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(include_bspdir)/$$f"; \ + rm -f $(DESTDIR)$(include_bspdir)/$$f; \ + done + +ETAGS = etags +ETAGSFLAGS = + +CTAGS = ctags +CTAGSFLAGS = + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + $(mkinstalldirs) $(distdir)/../../../../../../../automake + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(HEADERS) all-local + +installdirs: + $(mkinstalldirs) $(DESTDIR)$(include_bspdir) + +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-local mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: install-include_bspHEADERS + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-include_bspHEADERS uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ + clean-generic clean-local ctags distclean distclean-generic \ + distclean-tags distdir dvi dvi-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-include_bspHEADERS install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-include_bspHEADERS uninstall-info-am + +@RTEMS_USE_GCC_FALSE@include $(CONFIG.CC) + +${ARCH}/%.o: %.c + ${COMPILE} -o $@ -c $< + +${ARCH}/%.o: %.cc + ${CXXCOMPILE} -o $@ -c $< + +${ARCH}/%.o: %.S + ${CCASCOMPILE} -DASM -o $@ -c $< + +# We deliberately don't have anything depend on the +# $(DEPEND) file; otherwise it will get rebuilt even +# on 'make clean' +# + +@RTEMS_USE_GCC_TRUE@depend-gcc: $(C_FILES) $(CC_FILES) $(S_FILES) +@RTEMS_USE_GCC_TRUE@ $(COMPILE) -M $^ | \ +@RTEMS_USE_GCC_TRUE@ sed -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \ +@RTEMS_USE_GCC_TRUE@ -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp +@RTEMS_USE_GCC_TRUE@ mv $(DEPEND).tmp $(DEPEND) + +# pull in dependencies if they exist +@RTEMS_USE_GCC_TRUE@ifeq (${DEPEND},$(wildcard ${DEPEND})) +@RTEMS_USE_GCC_TRUE@include ${DEPEND} +@RTEMS_USE_GCC_TRUE@@ENDIF@ +depend: depend-am + +@RTEMS_USE_GCC_TRUE@define make-rel +@RTEMS_USE_GCC_TRUE@ $(LINK) -qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) $^ +@RTEMS_USE_GCC_TRUE@endef +@RTEMS_USE_GCC_FALSE@define make-rel +@RTEMS_USE_GCC_FALSE@ $(LINK) $(XLDFLAGS) $^ +@RTEMS_USE_GCC_FALSE@endef + +${ARCH}: + mkdir ${ARCH} + +clean-local: + $(RM) -r o-optimize o-debug o-profile $(CLEANDIRS) + $(RM) Depends-o-optimize.tmp Depends-o-debug.tmp Depends-o-profile.tmp + +define make-library +test -d $(ARCH) || mkdir $(ARCH) +$(RM) $@ +$(AR) $(ARFLAGS) $@ $^ +$(RANLIB) $@ +endef + +$(PROJECT_RELEASE)/lib: + @$(mkinstalldirs) $@ + +.PRECIOUS: $(LIB) + +$(PROJECT_INCLUDE)/bsp: + $(mkinstalldirs) $@ + +$(PROJECT_INCLUDE)/bsp/gtpcireg.h: gtpcireg.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/bsp/pci.h: pci.h + $(INSTALL_DATA) $< $@ + +all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) + +debug: + @echo + @echo "\"make debug\" is obsolete, instead use:" + @echo " make VARIANT=DEBUG" + @echo + +.PHONY: debug + +profile: + @echo + @echo "\"make profile\" is obsolete, instead use:" + @echo " make VARIANT=PROFILE" + @echo + +.PHONY: profile + +preinstall-am: $(PREINSTALL_FILES) +preinstall: preinstall-am +.PHONY: preinstall preinstall-am + +depend-am: depend-gcc +depend: depend-am +.PHONY: depend depend-am depend-gcc +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/c/src/lib/libbsp/powerpc/mvme5500/pci/detect_host_bridge.c b/c/src/lib/libbsp/powerpc/mvme5500/pci/detect_host_bridge.c new file mode 100644 index 0000000000..c36191e33e --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/pci/detect_host_bridge.c @@ -0,0 +1,72 @@ +/* + * detect_host_bridge.c + * + * This code is inspired by detect_grackle_bridge.c of SVGM BSP + * written by Till Straumann + * Copyright (C) 2001, 2003 Till Straumann + * + * Copyright (C) 2004 S. Kate Feng, + * wrote it to support the MVME5500 board. + * + */ +#include +#include /* printk */ + +#include +#include +#include + +#include +#include + +#define PCI_DEBUG 0 + +#define PCI_INVALID_VENDORDEVICEID 0xffffffff +#define PCI_MULTI_FUNCTION 0x80 +#define HOSTBRIDGET_ERROR 0xf0000000 + +unsigned long _BSP_clear_hostbridge_errors(int enableMCP, int quiet) +{ + unsigned int pcidata, pcidata1; + int PciNumber; + + /* On the mvme5500 board, the GT64260B system controller had the MCP + * signal pulled up high. Thus, the MCP signal is not used as it is + * on other boards such as mvme2307. + */ + if (enableMCP) return(-1); + for (PciNumber=0; PciNumber<1; PciNumber++) { + PCIx_read_config_dword(PciNumber, 0, + 0, + 0, + PCI0_COMMAND+(PciNumber * 0x80), + &pcidata); + + if (!quiet) + printk("Before _BSP_clear_hostbridge_errors(): 0x%x, cause 0x%x\n", + pcidata, inl(0x1d58)); + + outl(0,0x1d58); + + /* Clear the error on the host bridge */ + pcidata1= pcidata; + pcidata1 |= PCI_STATUS_CLRERR_MASK; + pcidata1 |= 0x140; + PCIx_write_config_dword(PciNumber, 0, + 0, + 0, + PCI0_COMMAND+(PciNumber * 0x80), + pcidata1); + + PCIx_read_config_dword(PciNumber, 0, + 0, + 0, + PCI0_COMMAND+(PciNumber * 0x80), + &pcidata1); + + if (!quiet) printk("After _BSP_clear_hostbridge_errors(): sts 0x%x\n", + pcidata1); + if (pcidata1 & HOSTBRIDGET_ERROR) printk("BSP_clear_hostbridge_errors(): unable to clear pending hostbridge errors\n"); + } + return(pcidata & HOSTBRIDGET_ERROR); +} diff --git a/c/src/lib/libbsp/powerpc/mvme5500/pci/gtpcireg.h b/c/src/lib/libbsp/powerpc/mvme5500/pci/gtpcireg.h new file mode 100644 index 0000000000..d96defdb96 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/pci/gtpcireg.h @@ -0,0 +1,91 @@ +/* $NetBSD: gtpcireg.h,v 1.2 2003/03/24 17:03:18 matt Exp $ */ + +/* + * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed for the NetBSD Project by + * Allegro Networks, Inc., and Wasabi Systems, Inc. + * 4. The name of Allegro Networks, Inc. may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * 5. The name of Wasabi Systems, Inc. may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY ALLEGRO NETWORKS, INC. AND + * WASABI SYSTEMS, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL EITHER ALLEGRO NETWORKS, INC. OR WASABI SYSTEMS, INC. + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#define PCI_ARBCTL_EN (1<<31) + +#define PCI_BARE_IntMemEn 0x200 + +#define PCI_ACCCTLBASEL_PrefetchEn 0x0001000 +#define PCI_ACCCTLBASEL_RdPrefetch 0x0010000 +#define PCI_ACCCTLBASEL_RdLinePrefetch 0x0020000 +#define PCI_ACCCTLBASEL_RdMulPrefetch 0x0040000 +#define PCI_ACCCTLBASEL_WBurst_8_QW 0x0100000 +#define PCI_ACCCTLBASEL_PCISwap_NoSwap 0x1000000 + +#define PCI0_P2P_CONFIG 0x1d14 +#define PCI_SNOOP_BASE0_LOW 0x1f00 +#define PCI_SNOOP_BASE0_HIGH 0x1f04 +#define PCI_SNOOP_TOP0 0x1f08 + +#define PCI0_SCS0_BAR_SIZE 0x0c08 +#define PCI0_SCS1_BAR_SIZE 0x0d08 +#define PCI0_SCS2_BAR_SIZE 0x0c0c +#define PCI0_SCS3_BAR_SIZE 0x0d0c + +#define PCI0_BASE_ADDR_REG_ENABLE 0x0c3c +#define PCI0_ARBITER_CNTL 0x1d00 +#define PCI0_ACCESS_CNTL_BASE0_LOW 0x1e00 +#define PCI0_ACCESS_CNTL_BASE0_HIGH 0x1e04 +#define PCI0_ACCESS_CNTL_BASE0_TOP 0x1e08 + +#define PCI0_ACCESS_CNTL_BASE1_LOW 0x1e10 +#define PCI0_ACCESS_CNTL_BASE1_HIGH 0x1e14 +#define PCI0_ACCESS_CNTL_BASE1_TOP 0x1e18 + +#define PCI1_BASE_ADDR_REG_ENABLE 0x0cbc +#define PCI1_ARBITER_CNTL 0x1d80 +#define PCI1_ACCESS_CNTL_BASE0_LOW 0x1e80 +#define PCI1_ACCESS_CNTL_BASE0_HIGH 0x1e84 +#define PCI1_ACCESS_CNTL_BASE0_TOP 0x1e88 + +#define PCI1_ACCESS_CNTL_BASE1_LOW 0x1e90 +#define PCI1_ACCESS_CNTL_BASE1_HIGH 0x1e94 +#define PCI1_ACCESS_CNTL_BASE1_TOP 0x1e98 + +#define PCI_SNOOP_BASE1_LOW 0x1f10 +#define PCI_SNOOP_BASE1_HIGH 0x1f14 +#define PCI_SNOOP_TOP1 0x1f18 + +#define PCI0_CMD_CNTL 0xc00 +#define PCI0_CONFIG_ADDR 0xcf8 +#define PCI0_CONFIG_DATA 0xcfc + +#define PCI1_P2P_CONFIG 0x1d94 +#define PCI1_CMD_CNTL 0xc80 +#define PCI1_CONFIG_ADDR 0xc78 +#define PCI1_CONFIG_DATA 0xc7c diff --git a/c/src/lib/libbsp/powerpc/mvme5500/pci/pci.c b/c/src/lib/libbsp/powerpc/mvme5500/pci/pci.c new file mode 100644 index 0000000000..99edb3e4c3 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/pci/pci.c @@ -0,0 +1,378 @@ +/* + * pci.c : this file contains basic PCI Io functions. + * + * CopyRight (C) 1999 valette@crf.canon.fr + * + * This code is heavilly inspired by the public specification of STREAM V2 + * that can be found at : + * + * by following + * the STREAM API Specification Document link. + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * pci.c,v 1.2 2002/05/14 17:10:16 joel Exp + * + * Copyright 2004, Brookhaven National Laboratory and + * Shuchen K. Feng, , 2004 + * - modified and added support for MVME5500 board + * - added 2nd PCI support for the mvme5500/GT64260 PCI bridge + * + */ +#define PCI_MAIN + +#include +#include /* printk */ + +#include +#include +#include + +#include +#include + +#define PCI_DEBUG 0 +#define PCI_PRINT 1 + +#define PCI_INVALID_VENDORDEVICEID 0xffffffff +#define PCI_MULTI_FUNCTION 0x80 +#define HOSTBRIDGET_ERROR 0xf0000000 + +typedef unsigned char unchar; + +#define MAX_NUM_PCI_DEVICES 20 + +static int numPCIDevs=0; +extern void PCI_interface(), pciAccessInit(); + +/* Pack RegNum,FuncNum,DevNum,BusNum,and ConfigEnable for + * PCI Configuration Address Register + */ +#define pciConfigPack(bus,dev,func,offset)\ +(((func&7)<<8)|((dev&0x1f )<<11)|(( bus&0xff)<<16)|(offset&0xfc))|0x80000000 + +/* + * Bit encode for PCI_CONFIG_HEADER_TYPE register + */ +unchar ucMaxPCIBus=0; + +/* Please note that PCI0 and PCI1 does not correlate with the busNum 0 and 1. + */ +int PCIx_read_config_byte(int npci, unchar bus, unchar dev, +unchar func, unchar offset, unchar *val) +{ + *val = 0xff; + if (offset & ~0xff) return PCIBIOS_BAD_REGISTER_NUMBER; + outl(pciConfigPack(bus,dev,func,offset),BSP_pci_config[npci].pci_config_addr); + *val = inb(BSP_pci_config[npci].pci_config_data + (offset&3)); + return PCIBIOS_SUCCESSFUL; +} + +int PCIx_read_config_word(int npci, unchar bus, unchar dev, +unchar func, unchar offset, unsigned short *val) +{ + *val = 0xffff; + if ((offset&1)|| (offset & ~0xff)) return PCIBIOS_BAD_REGISTER_NUMBER; + outl(pciConfigPack(bus,dev,func,offset),BSP_pci_config[npci].pci_config_addr); + *val = inw(BSP_pci_config[npci].pci_config_data + (offset&2)); + return PCIBIOS_SUCCESSFUL; +} + +int PCIx_read_config_dword(int npci, unchar bus, unchar dev, +unchar func, unchar offset, unsigned int *val) +{ + *val = 0xffffffff; + if ((offset&3)|| (offset & ~0xff)) return PCIBIOS_BAD_REGISTER_NUMBER; +#if 0 + printk("addr %x, data %x, pack %x \n", BSP_pci_config[npci].pci_config_addr, + BSP_pci_config[npci].pci_config_data,pciConfigPack(bus,dev,func,offset)); +#endif + outl(pciConfigPack(bus,dev,func,offset),BSP_pci_config[npci].pci_config_addr); + *val = inl(BSP_pci_config[npci].pci_config_data); + return PCIBIOS_SUCCESSFUL; +} + +int PCIx_write_config_byte(int npci, unchar bus, unchar dev, +unchar func, unchar offset, unchar val) +{ + if (offset & ~0xff) return PCIBIOS_BAD_REGISTER_NUMBER; + + outl(pciConfigPack(bus,dev,func,offset),BSP_pci_config[npci].pci_config_addr); + outb(val, BSP_pci_config[npci].pci_config_data + (offset&3)); + return PCIBIOS_SUCCESSFUL; +} + +int PCIx_write_config_word(int npci, unchar bus, unchar dev, +unchar func, unchar offset, unsigned short val) +{ + if ((offset&1)|| (offset & ~0xff)) return PCIBIOS_BAD_REGISTER_NUMBER; + outl(pciConfigPack(bus,dev,func,offset),BSP_pci_config[npci].pci_config_addr); + outw(val, BSP_pci_config[npci].pci_config_data + (offset&3)); + return PCIBIOS_SUCCESSFUL; +} + +int PCIx_write_config_dword(int npci,unchar bus,unchar dev, +unchar func, unchar offset, unsigned int val) +{ + if ((offset&3)|| (offset & ~0xff)) return PCIBIOS_BAD_REGISTER_NUMBER; +#if 0 + printk("addr %x, data %x, pack %x \n", BSP_pci_config[npci].pci_config_addr, + BSP_pci_config[npci].pci_config_data,pciConfigPack(bus,dev,func,offset)); +#endif + outl(pciConfigPack(bus,dev,func,offset),BSP_pci_config[npci].pci_config_addr); + outl(val,BSP_pci_config[npci].pci_config_data); + return PCIBIOS_SUCCESSFUL; +} + +/* backwards compatible with other PPC board for the vmeUniverse.c */ +int pci_read_config_byte(unchar bus, unchar dev,unchar func,unchar offset, +unchar *val) +{ + return(PCIx_read_config_byte(0, bus, dev, func, offset, val)); +} + +int pci_read_config_word(unchar bus, unchar dev, +unchar func, unchar offset, unsigned short *val) +{ + return(PCIx_read_config_word(0, bus, dev, func, offset, val)); +} + +int pci_read_config_dword(unchar bus, unchar dev, +unchar func, unchar offset, unsigned int *val) +{ + return(PCIx_read_config_dword(0, bus, dev, func, offset, val)); +} + +int pci_write_config_byte(unchar bus, unchar dev, +unchar func, unchar offset, unchar val) +{ + return(PCIx_write_config_byte(0, bus, dev, func, offset, val)); +} + +int pci_write_config_word(unchar bus, unchar dev, +unchar func, unchar offset, unsigned short val) +{ + return(PCIx_write_config_word(0, bus, dev, func, offset, val)); +} + +int pci_write_config_dword(unchar bus,unchar dev, +unchar func, unchar offset, unsigned int val) +{ + return(PCIx_write_config_dword(0, bus, dev, func, offset, val)); +} + + +pci_config BSP_pci_config[2] = { + {PCI0_CONFIG_ADDR,PCI0_CONFIG_DATA/*,&pci_functions*/}, + {PCI1_CONFIG_ADDR,PCI1_CONFIG_DATA/*,&pci_functions*/} +}; + +/* + * This routine determines the maximum bus number in the system + */ +void InitializePCI() +{ + int PciNumber; + unchar ucBusNumber, ucSlotNumber, ucFnNumber, ucNumFuncs; + unchar ucMaxSubordinate; + unsigned long ulHeader; + unsigned int data, datal, datah, pcidata, ulClass, ulDeviceID; + unsigned short sdata; + + PCI_interface(); + + /* + * Scan PCI0 and PCI1 bus0 + */ + for (PciNumber=0; PciNumber < 2; PciNumber++) { + pciAccessInit(PciNumber); + for (ucBusNumber=0; ucBusNumber< 2; ucBusNumber++) { + for (ucSlotNumber=0;ucSlotNumber MAX_NUM_PCI_DEVICES) { + BSP_panic("Too many PCI devices found; increase MAX_NUM_PCI_DEVICES in pcicache.c\n"); + } + + switch(ulDeviceID) { + case (PCI_VENDOR_ID_MARVELL+(PCI_DEVICE_ID_MARVELL_GT6426xAB<<16)): +#if PCI_PRINT + printk("Marvell GT6426xA/B hostbridge detected at PCI%d bus%d slot%d\n", + PciNumber,ucBusNumber,ucSlotNumber); +#endif + ucMaxPCIBus ++; + break; + case (PCI_VENDOR_ID_PLX2+(PCI_DEVICE_ID_PLX2_PCI6154_HB2<<16)): +#if PCI_PRINT + printk("PLX PCI6154 PCI-PCI bridge detected at PCI%d bus%d slot%d\n", + PciNumber,ucBusNumber,ucSlotNumber); +#endif + ucMaxPCIBus ++; + break; + case PCI_VENDOR_ID_TUNDRA: +#if PCI_PRINT + printk("TUNDRA PCI-VME bridge detected at PCI%d bus%d slot%d\n", + PciNumber,ucBusNumber,ucSlotNumber); +#endif + ucMaxPCIBus ++; + break; + case (PCI_VENDOR_ID_INTEL+(PCI_DEVICE_INTEL_82544EI_COPPER<<16)): +#if PCI_PRINT + printk("INTEL 82544EI COPPER network controller detected at PCI%d bus%d slot%d\n", + PciNumber,ucBusNumber,ucSlotNumber); +#endif + ucMaxPCIBus ++; + break; + default : +#if PCI_PRINT + printk("PCI%d Bus%d Slot%d DeviceID 0x%x \n", + PciNumber,ucBusNumber,ucSlotNumber, ulDeviceID); +#endif + break; + } +#if PCI_DEBUG + PCIx_read_config_dword(PciNumber, ucBusNumber, + ucSlotNumber, + 0, + PCI0_BASE_ADDRESS_0, + &data); + printk("PCI%d_BASE_ADDRESS_0 0x%x \n",PciNumber, data); + PCIx_read_config_dword(PciNumber, ucBusNumber, + ucSlotNumber, + 0, + PCI0_BASE_ADDRESS_1, + &data); + printk("PCI%d_BASE_ADDRESS_1 0x%x \n",PciNumber, data); + PCIx_read_config_dword(PciNumber, ucBusNumber, + ucSlotNumber, + 0, + PCI0_BASE_ADDRESS_2, + &data); + printk("PCI%d_BASE_ADDRESS_2 0x%x \n",PciNumber, data); + + PCIx_read_config_dword(PciNumber, ucBusNumber, + ucSlotNumber, + 0, + PCI0_BASE_ADDRESS_3, + &data); + printk("PCI%d_BASE_ADDRESS_3 0x%x \n",PciNumber, data); + + PCIx_read_config_word(PciNumber, ucBusNumber, + ucSlotNumber, + 0, + PCI0_INTERRUPT_LINE, + &sdata); + printk("PCI%d_INTERRUPT_LINE 0x%x \n",PciNumber, sdata); + + /* We always enable internal memory. */ + PCIx_read_config_dword(PciNumber, ucBusNumber, + ucSlotNumber, + 0, + PCI0_MEM_BASE_ADDR, + &pcidata); + printk("PCI%d_MEM_BASE_ADDR 0x%x \n", PciNumber,pcidata); + + /* We always enable internal IO. */ + PCIx_read_config_dword(PciNumber, ucBusNumber, + ucSlotNumber, + 0, + PCI0_IO_BASE_ADDR, + &pcidata); + printk("PCI%d_IO_BASE_ADDR 0x%x \n", PciNumber,pcidata); +#endif + + PCIx_read_config_dword(PciNumber, ucBusNumber, + ucSlotNumber, + 0, + PCI0_CACHE_LINE_SIZE, + &ulHeader); + if ((ulHeader>>16)&PCI_MULTI_FUNCTION) + ucNumFuncs=PCI_MAX_FUNCTIONS; + else + ucNumFuncs=1; + +#if PCI_DEBUG + printk("PCI%d Slot 0x%x HEADER/LAT/CACHE 0x%x \n", + PciNumber,ucSlotNumber, ulHeader); + + for (ucFnNumber=1;ucFnNumber MAX_NUM_PCI_DEVICES) { + BSP_panic("Too many PCI devices found; increase MAX_NUM_PCI_DEVICES in pcicache.c\n"); + } + + /* This slot/function has a device fitted.*/ + PCIx_read_config_dword(PciNumber, ucBusNumber, + ucSlotNumber, + ucFnNumber, + PCI0_CLASS_REVISION, + &ulClass); + printk("PCI%d Slot 0x%x Func %d classID 0x%x \n",PciNumber,ucSlotNumber, + ucFnNumber, ulClass); + + ulClass >>= 16; + if (ulClass == PCI_CLASS_GT6426xAB) + printk("GT64260-PCI%d bridge found \n", PciNumber); + } +#endif + PCIx_read_config_dword(PciNumber, ucBusNumber, + ucSlotNumber, + 0, + PCI0_COMMAND, + &pcidata); +#if PCI_DEBUG + printk("MOTLoad command staus 0x%x, ", pcidata); +#endif + /* Clear the error on the host bridge */ + if ( (ucBusNumber==0) && (ucSlotNumber==0)) + pcidata |= PCI_STATUS_CLRERR_MASK; + /* Enable bus,I/O and memory master access. */ + pcidata |= (PCI_COMMAND_MASTER|PCI_COMMAND_IO|PCI_COMMAND_MEMORY); + PCIx_write_config_dword(PciNumber, ucBusNumber, + ucSlotNumber, + 0, + PCI0_COMMAND, + pcidata); + + PCIx_read_config_dword(PciNumber, ucBusNumber, + ucSlotNumber, + 0, + PCI0_COMMAND, + &pcidata); +#if PCI_DEBUG + printk("Now command/staus 0x%x\n", pcidata); +#endif + + } + } + } /* PCI number */ +} + +/* + * Return the number of PCI buses in the system + */ +unsigned char BusCountPCI() +{ + return(ucMaxPCIBus); +} + diff --git a/c/src/lib/libbsp/powerpc/mvme5500/pci/pci.h b/c/src/lib/libbsp/powerpc/mvme5500/pci/pci.h new file mode 100644 index 0000000000..57d4980bc9 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/pci/pci.h @@ -0,0 +1,1200 @@ +/* + * + * PCI defines and function prototypes + * Copyright 1994, Drew Eckhardt + * Copyright 1997, 1998 Martin Mares + * + * For more information, please consult the following manuals (look at + * http://www.pcisig.com/ for how to get them): + * + * PCI BIOS Specification + * PCI Local Bus Specification + * PCI to PCI Bridge Specification + * PCI System Design Guide + * + * pci.h,v 1.2 2002/05/14 17:10:16 joel Exp + * + * S. Kate Feng : Added vendor/device support for + * Marvell and PLX. 3/5/2004 + * + */ + +#ifndef RTEMS_PCI_H +#define RTEMS_PCI_H + +/* + * Under PCI0, each device has 256 bytes of configuration address space, + * of which the first 64 bytes are standardized as follows: + */ +#define PCI0_VENDOR_ID 0x00 /* 16 bits */ +#define PCI0_DEVICE_ID 0x02 /* 16 bits */ +#define PCI0_COMMAND 0x04 /* 16 bits */ +#define PCI_COMMAND_IO 0x1 /* Enable response in I/O space */ +#define PCI_COMMAND_MEMORY 0x2 /* Enable response in Memory space */ +#define PCI_COMMAND_MASTER 0x4 /* Enable bus mastering */ +#define PCI_COMMAND_SPECIAL 0x8 /* Enable response to special cycles */ +#define PCI_COMMAND_INVALIDATE 0x10 /* Use memory write and invalidate */ +#define PCI_COMMAND_VGA_PALETTE 0x20 /* Enable palette snooping */ +#define PCI_COMMAND_PARITY 0x40 /* Enable parity checking */ +#define PCI_COMMAND_WAIT 0x80 /* Enable address/data stepping */ +#define PCI_COMMAND_SERR 0x100 /* Enable SERR */ +#define PCI_COMMAND_FAST_BACK 0x200 /* Enable back-to-back writes */ +#define PCI_COMMAND_SB_DIS 0x2000 /* PCI configuration read will stop + * acting as sync barrier transaction + */ +#define PCI0_STATUS 0x06 /* 16 bits */ +#define PCI_STATUS_66MHZ 0x20 /* Support 66 Mhz PCI 2.1 bus */ +#define PCI_STATUS_UDF 0x40 /* Support User Definable Features */ + +#define PCI_STATUS_FAST_BACK 0x80 /* Accept fast-back to back */ +#define PCI_STATUS_PARITY 0x100 /* Detected parity error */ +#define PCI_STATUS_DEVSEL_MASK 0x600 /* DEVSEL timing */ +#define PCI_STATUS_DEVSEL_FAST 0x000 +#define PCI_STATUS_DEVSEL_MEDIUM 0x200 +#define PCI_STATUS_DEVSEL_SLOW 0x400 +#define PCI_STATUS_SIG_TARGET_ABORT 0x800 /* Set on target abort */ +#define PCI_STATUS_REC_TARGET_ABORT 0x1000 /* Master ack of " */ +#define PCI_STATUS_REC_MASTER_ABORT 0x2000 /* Set on master abort */ +#define PCI_STATUS_SIG_SYSTEM_ERROR 0x4000 /* Set when we drive SERR */ +#define PCI_STATUS_DETECTED_PARITY 0x8000 /* Set on parity error */ +#define PCI_STATUS_CLRERR_MASK 0xf9000000 /* */ + +#define PCI0_CLASS_REVISION 0x08 /* High 24 bits are class, low 8 + revision */ +#define PCI0_REVISION_ID 0x08 /* Revision ID */ +#define PCI0_CLASS_PROG 0x09 /* Reg. Level Programming Interface */ +#define PCI0_CLASS_DEVICE 0x0a /* Device class */ + +#define PCI0_CACHE_LINE_SIZE 0x0c /* 8 bits */ +#define PCI0_LATENCY_TIMER 0x0d /* 8 bits */ +#define PCI0_HEADER_TYPE 0x0e /* 8 bits */ +#define PCI_HEADER_TYPE_NORMAL 0 +#define PCI_HEADER_TYPE_BRIDGE 1 +#define PCI_HEADER_TYPE_CARDBUS 2 + +#define PCI0_BIST 0x0f /* 8 bits */ +#define PCI_BIST_CODE_MASK 0x0f /* Return result */ +#define PCI_BIST_START 0x40 /* 1 to start BIST, 2 secs or less */ +#define PCI_BIST_CAPABLE 0x80 /* 1 if BIST capable */ + +/* + * Base addresses specify locations in memory or I/O space. + * Decoded size can be determined by writing a value of + * 0xffffffff to the register, and reading it back. Only + * 1 bits are decoded. + */ +#define PCI0_BASE_ADDRESS_0 0x10 /* 32 bits */ +#define PCI0_BASE_ADDRESS_1 0x14 /* 32 bits [htype 0,1 only] */ +#define PCI0_BASE_ADDRESS_2 0x18 /* 32 bits [htype 0 only] */ +#define PCI0_BASE_ADDRESS_3 0x1c /* 32 bits */ +#define PCI0_MEM_BASE_ADDR 0x20 /* 32 bits */ +#define PCI0_IO_BASE_ADDR 0x24 /* 32 bits */ +#define PCI_BASE_ADDRESS_SPACE 0x01 /* 0 = memory, 1 = I/O */ +#define PCI_BASE_ADDRESS_SPACE_IO 0x01 +#define PCI_BASE_ADDRESS_SPACE_MEMORY 0x00 +#define PCI_BASE_ADDRESS_MEM_TYPE_MASK 0x06 +#define PCI_BASE_ADDRESS_MEM_TYPE_32 0x00 /* 32 bit address */ +#define PCI_BASE_ADDRESS_MEM_TYPE_1M 0x02 /* Below 1M */ +#define PCI_BASE_ADDRESS_MEM_TYPE_64 0x04 /* 64 bit address */ +#define PCI_BASE_ADDRESS_MEM_PREFETCH 0x08 /* prefetchable? */ +#define PCI_BASE_ADDRESS_MEM_MASK (~0x0fUL) +#define PCI_BASE_ADDRESS_IO_MASK (~0x03UL) +/* bit 1 is reserved if address_space = 1 */ + +/* Header type 0 (normal devices) */ +#define PCI0_CARDBUS_CIS 0x28 +#define PCI0_SUBSYSTEM_VENDOR_ID 0x2c +#define PCI0_SUBSYSTEM_ID 0x2e +#define PCI0_ROM_ADDRESS 0x30 /* Bits 31..11 are address, 10..1 reserved */ +#define PCI_ROM_ADDRESS_ENABLE 0x01 +#define PCI_ROM_ADDRESS_MASK (~0x7ffUL) + +#define PCI0_CAPABILITY_LIST_POINTER 0x34 + +/* 0x38-0x3b are reserved */ +#define PCI0_INTERRUPT_LINE 0x3c /* 8 bits */ +#define PCI0_INTERRUPT_PIN 0x3d /* 8 bits */ +#define PCI0_MIN_GNT 0x3e /* 8 bits */ +#define PCI0_MAX_LAT 0x3f /* 8 bits */ + +/* + * Under PCI1, each device has 256 bytes of configuration address space, + * of which the first 64 bytes are standardized as follows: + */ +#define PCI1_VENDOR_ID 0x80 /* 16 bits */ +#define PCI1_DEVICE_ID 0x82 /* 16 bits */ +#define PCI1_COMMAND 0x84 /* 16 bits */ +#define PCI1_STATUS 0x86 /* 16 bits */ +#define PCI1_CLASS_REVISION 0x88 /* High 24 bits are class, low 8 + revision */ +#define PCI1_REVISION_ID 0x88 /* Revision ID */ +#define PCI1_CLASS_PROG 0x89 /* Reg. Level Programming Interface */ +#define PCI1_CLASS_DEVICE 0x8a /* Device class */ + +#define PCI1_CACHE_LINE_SIZE 0x8c /* 8 bits */ +#define PCI1_LATENCY_TIMER 0x8d /* 8 bits */ +#define PCI1_HEADER_TYPE 0x8e /* 8 bits */ +#define PCI1_BIST 0x8f /* 8 bits */ + +#define PCI1_BASE_ADDRESS_0 0x90 /* 32 bits */ +#define PCI1_BASE_ADDRESS_1 0x94 /* 32 bits [htype 0,1 only] */ +#define PCI1_BASE_ADDRESS_2 0x98 /* 32 bits [htype 0 only] */ +#define PCI1_BASE_ADDRESS_3 0x9c /* 32 bits */ +#define PCI1_MEM_BASE_ADDR 0xa0 /* 32 bits */ +#define PCI1_IO_BASE_ADDR 0xa4 /* 32 bits */ + +/* Header type 0 (normal devices) */ +#define PCI1_CARDBUS_CIS 0xa8 +#define PCI1_SUBSYSTEM_VENDOR_ID 0xac +#define PCI1_SUBSYSTEM_ID 0xae +#define PCI1_ROM_ADDRESS 0xb0 /* Bits 31..11 are address, 10..1 reserved */ +#define PCI1_CAPABILITY_LIST_POINTER 0xb4 + +/* 0xb8-0xbb are reserved */ +#define PCI1_INTERRUPT_LINE 0xbc /* 8 bits */ +#define PCI1_INTERRUPT_PIN 0xbd /* 8 bits */ +#define PCI1_MIN_GNT 0xbe /* 8 bits */ +#define PCI1_MAX_LAT 0xbf /* 8 bits */ + +/* Header type 1 (PCI-to-PCI bridges) */ +#define PCI_PRIMARY_BUS 0x18 /* Primary bus number */ +#define PCI_SECONDARY_BUS 0x19 /* Secondary bus number */ +#define PCI_SUBORDINATE_BUS 0x1a /* Highest bus number behind the bridge */ +#define PCI_SEC_LATENCY_TIMER 0x1b /* Latency timer for secondary interface */ +#define PCI_IO_BASE 0x1c /* I/O range behind the bridge */ +#define PCI_IO_LIMIT 0x1d +#define PCI_IO_RANGE_TYPE_MASK 0x0f /* I/O bridging type */ +#define PCI_IO_RANGE_TYPE_16 0x00 +#define PCI_IO_RANGE_TYPE_32 0x01 +#define PCI_IO_RANGE_MASK ~0x0f +#define PCI_SEC_STATUS 0x1e /* Secondary status register, only bit 14 used */ +#define PCI_MEMORY_BASE 0x20 /* Memory range behind */ +#define PCI_MEMORY_LIMIT 0x22 +#define PCI_MEMORY_RANGE_TYPE_MASK 0x0f +#define PCI_MEMORY_RANGE_MASK ~0x0f +#define PCI_PREF_MEMORY_BASE 0x24 /* Prefetchable memory range behind */ +#define PCI_PREF_MEMORY_LIMIT 0x26 +#define PCI_PREF_RANGE_TYPE_MASK 0x0f +#define PCI_PREF_RANGE_TYPE_32 0x00 +#define PCI_PREF_RANGE_TYPE_64 0x01 +#define PCI_PREF_RANGE_MASK ~0x0f +#define PCI_PREF_BASE_UPPER32 0x28 /* Upper half of prefetchable memory range */ +#define PCI_PREF_LIMIT_UPPER32 0x2c +#define PCI_IO_BASE_UPPER16 0x30 /* Upper half of I/O addresses */ +#define PCI_IO_LIMIT_UPPER16 0x32 +/* 0x34-0x3b is reserved */ +#define PCI_ROM_ADDRESS1 0x38 /* Same as PCI_ROM_ADDRESS, but for htype 1 */ +/* 0x3c-0x3d are same as for htype 0 */ +#define PCI_BRIDGE_CONTROL 0x3e +#define PCI_BRIDGE_CTL_PARITY 0x01 /* Enable parity detection on secondary interface */ +#define PCI_BRIDGE_CTL_SERR 0x02 /* The same for SERR forwarding */ +#define PCI_BRIDGE_CTL_NO_ISA 0x04 /* Disable bridging of ISA ports */ +#define PCI_BRIDGE_CTL_VGA 0x08 /* Forward VGA addresses */ +#define PCI_BRIDGE_CTL_MASTER_ABORT 0x20 /* Report master aborts */ +#define PCI_BRIDGE_CTL_BUS_RESET 0x40 /* Secondary bus reset */ +#define PCI_BRIDGE_CTL_FAST_BACK 0x80 /* Fast Back2Back enabled on secondary interface */ + +/* Header type 2 (CardBus bridges) */ +/* 0x14-0x15 reserved */ +#define PCI_CB_SEC_STATUS 0x16 /* Secondary status */ +#define PCI_CB_PRIMARY_BUS 0x18 /* PCI bus number */ +#define PCI_CB_CARD_BUS 0x19 /* CardBus bus number */ +#define PCI_CB_SUBORDINATE_BUS 0x1a /* Subordinate bus number */ +#define PCI_CB_LATENCY_TIMER 0x1b /* CardBus latency timer */ +#define PCI_CB_MEMORY_BASE_0 0x1c +#define PCI_CB_MEMORY_LIMIT_0 0x20 +#define PCI_CB_MEMORY_BASE_1 0x24 +#define PCI_CB_MEMORY_LIMIT_1 0x28 +#define PCI_CB_IO_BASE_0 0x2c +#define PCI_CB_IO_BASE_0_HI 0x2e +#define PCI_CB_IO_LIMIT_0 0x30 +#define PCI_CB_IO_LIMIT_0_HI 0x32 +#define PCI_CB_IO_BASE_1 0x34 +#define PCI_CB_IO_BASE_1_HI 0x36 +#define PCI_CB_IO_LIMIT_1 0x38 +#define PCI_CB_IO_LIMIT_1_HI 0x3a +#define PCI_CB_IO_RANGE_MASK ~0x03 +/* 0x3c-0x3d are same as for htype 0 */ +#define PCI_CB_BRIDGE_CONTROL 0x3e +#define PCI_CB_BRIDGE_CTL_PARITY 0x01 /* Similar to standard bridge control register */ +#define PCI_CB_BRIDGE_CTL_SERR 0x02 +#define PCI_CB_BRIDGE_CTL_ISA 0x04 +#define PCI_CB_BRIDGE_CTL_VGA 0x08 +#define PCI_CB_BRIDGE_CTL_MASTER_ABORT 0x20 +#define PCI_CB_BRIDGE_CTL_CB_RESET 0x40 /* CardBus reset */ +#define PCI_CB_BRIDGE_CTL_16BIT_INT 0x80 /* Enable interrupt for 16-bit cards */ +#define PCI_CB_BRIDGE_CTL_PREFETCH_MEM0 0x100 /* Prefetch enable for both memory regions */ +#define PCI_CB_BRIDGE_CTL_PREFETCH_MEM1 0x200 +#define PCI_CB_BRIDGE_CTL_POST_WRITES 0x400 +#define PCI_CB_SUBSYSTEM_VENDOR_ID 0x40 +#define PCI_CB_SUBSYSTEM_ID 0x42 +#define PCI_CB_LEGACY_MODE_BASE 0x44 /* 16-bit PC Card legacy mode base address (ExCa) */ +/* 0x48-0x7f reserved */ + +/* Device classes and subclasses */ +#define PCI_CLASS_GT6426xAB 0x0580 /* */ + +#define PCI_CLASS_NOT_DEFINED 0x0000 +#define PCI_CLASS_NOT_DEFINED_VGA 0x0001 + +#define PCI_BASE_CLASS_STORAGE 0x01 +#define PCI_CLASS_STORAGE_SCSI 0x0100 +#define PCI_CLASS_STORAGE_IDE 0x0101 +#define PCI_CLASS_STORAGE_FLOPPY 0x0102 +#define PCI_CLASS_STORAGE_IPI 0x0103 +#define PCI_CLASS_STORAGE_RAID 0x0104 +#define PCI_CLASS_STORAGE_OTHER 0x0180 + +#define PCI_BASE_CLASS_NETWORK 0x02 +#define PCI_CLASS_NETWORK_ETHERNET 0x0200 +#define PCI_CLASS_NETWORK_TOKEN_RING 0x0201 +#define PCI_CLASS_NETWORK_FDDI 0x0202 +#define PCI_CLASS_NETWORK_ATM 0x0203 +#define PCI_CLASS_NETWORK_OTHER 0x0280 + +#define PCI_BASE_CLASS_DISPLAY 0x03 +#define PCI_CLASS_DISPLAY_VGA 0x0300 +#define PCI_CLASS_DISPLAY_XGA 0x0301 +#define PCI_CLASS_DISPLAY_OTHER 0x0380 + +#define PCI_BASE_CLASS_MULTIMEDIA 0x04 +#define PCI_CLASS_MULTIMEDIA_VIDEO 0x0400 +#define PCI_CLASS_MULTIMEDIA_AUDIO 0x0401 +#define PCI_CLASS_MULTIMEDIA_OTHER 0x0480 + +#define PCI_BASE_CLASS_MEMORY 0x05 +#define PCI_CLASS_MEMORY_RAM 0x0500 +#define PCI_CLASS_MEMORY_FLASH 0x0501 +#define PCI_CLASS_MEMORY_OTHER 0x0580 + +#define PCI_BASE_CLASS_BRIDGE 0x06 +#define PCI_CLASS_BRIDGE_HOST 0x0600 +#define PCI_CLASS_BRIDGE_ISA 0x0601 +#define PCI_CLASS_BRIDGE_EISA 0x0602 +#define PCI_CLASS_BRIDGE_MC 0x0603 +#define PCI_CLASS_BRIDGE_PCI 0x0604 +#define PCI_CLASS_BRIDGE_PCMCIA 0x0605 +#define PCI_CLASS_BRIDGE_NUBUS 0x0606 +#define PCI_CLASS_BRIDGE_CARDBUS 0x0607 +#define PCI_CLASS_BRIDGE_OTHER 0x0680 + +#define PCI_BASE_CLASS_COMMUNICATION 0x07 +#define PCI_CLASS_COMMUNICATION_SERIAL 0x0700 +#define PCI_CLASS_COMMUNICATION_PARALLEL 0x0701 +#define PCI_CLASS_COMMUNICATION_OTHER 0x0780 + +#define PCI_BASE_CLASS_SYSTEM 0x08 +#define PCI_CLASS_SYSTEM_PIC 0x0800 +#define PCI_CLASS_SYSTEM_DMA 0x0801 +#define PCI_CLASS_SYSTEM_TIMER 0x0802 +#define PCI_CLASS_SYSTEM_RTC 0x0803 +#define PCI_CLASS_SYSTEM_OTHER 0x0880 + +#define PCI_BASE_CLASS_INPUT 0x09 +#define PCI_CLASS_INPUT_KEYBOARD 0x0900 +#define PCI_CLASS_INPUT_PEN 0x0901 +#define PCI_CLASS_INPUT_MOUSE 0x0902 +#define PCI_CLASS_INPUT_OTHER 0x0980 + +#define PCI_BASE_CLASS_DOCKING 0x0a +#define PCI_CLASS_DOCKING_GENERIC 0x0a00 +#define PCI_CLASS_DOCKING_OTHER 0x0a01 + +#define PCI_BASE_CLASS_PROCESSOR 0x0b +#define PCI_CLASS_PROCESSOR_386 0x0b00 +#define PCI_CLASS_PROCESSOR_486 0x0b01 +#define PCI_CLASS_PROCESSOR_PENTIUM 0x0b02 +#define PCI_CLASS_PROCESSOR_ALPHA 0x0b10 +#define PCI_CLASS_PROCESSOR_POWERPC 0x0b20 +#define PCI_CLASS_PROCESSOR_CO 0x0b40 + +#define PCI_BASE_CLASS_SERIAL 0x0c +#define PCI_CLASS_SERIAL_FIREWIRE 0x0c00 +#define PCI_CLASS_SERIAL_ACCESS 0x0c01 +#define PCI_CLASS_SERIAL_SSA 0x0c02 +#define PCI_CLASS_SERIAL_USB 0x0c03 +#define PCI_CLASS_SERIAL_FIBER 0x0c04 + +#define PCI_CLASS_OTHERS 0xff + +/* + * Vendor and card ID's: sort these numerically according to vendor + * (and according to card ID within vendor). Send all updates to + * . + */ +#define PCI_VENDOR_ID_MARVELL 0x11ab /* */ +#define PCI_DEVICE_ID_MARVELL_GT6426xAB 0x6430 /* */ + +/* Note : The PLX Technology Inc. had the old VENDOR_ID. + * See PCI_VENDOR_ID_PLX, PCI_VENDOR_ID_PLX_9050, ..etc. + */ +#define PCI_VENDOR_ID_PLX2 0x3388 /* */ +#define PCI_DEVICE_ID_PLX2_PCI6154_HB2 0x26 /* */ + +#define PCI_VENDOR_ID_COMPAQ 0x0e11 +#define PCI_DEVICE_ID_COMPAQ_1280 0x3033 +#define PCI_DEVICE_ID_COMPAQ_TRIFLEX 0x4000 +#define PCI_DEVICE_ID_COMPAQ_SMART2P 0xae10 +#define PCI_DEVICE_ID_COMPAQ_NETEL100 0xae32 +#define PCI_DEVICE_ID_COMPAQ_NETEL10 0xae34 +#define PCI_DEVICE_ID_COMPAQ_NETFLEX3I 0xae35 +#define PCI_DEVICE_ID_COMPAQ_NETEL100D 0xae40 +#define PCI_DEVICE_ID_COMPAQ_NETEL100PI 0xae43 +#define PCI_DEVICE_ID_COMPAQ_NETEL100I 0xb011 +#define PCI_DEVICE_ID_COMPAQ_THUNDER 0xf130 +#define PCI_DEVICE_ID_COMPAQ_NETFLEX3B 0xf150 + +#define PCI_VENDOR_ID_NCR 0x1000 +#define PCI_DEVICE_ID_NCR_53C810 0x0001 +#define PCI_DEVICE_ID_NCR_53C820 0x0002 +#define PCI_DEVICE_ID_NCR_53C825 0x0003 +#define PCI_DEVICE_ID_NCR_53C815 0x0004 +#define PCI_DEVICE_ID_NCR_53C860 0x0006 +#define PCI_DEVICE_ID_NCR_53C896 0x000b +#define PCI_DEVICE_ID_NCR_53C895 0x000c +#define PCI_DEVICE_ID_NCR_53C885 0x000d +#define PCI_DEVICE_ID_NCR_53C875 0x000f +#define PCI_DEVICE_ID_NCR_53C875J 0x008f + +#define PCI_VENDOR_ID_ATI 0x1002 +#define PCI_DEVICE_ID_ATI_68800 0x4158 +#define PCI_DEVICE_ID_ATI_215CT222 0x4354 +#define PCI_DEVICE_ID_ATI_210888CX 0x4358 +#define PCI_DEVICE_ID_ATI_215GB 0x4742 +#define PCI_DEVICE_ID_ATI_215GD 0x4744 +#define PCI_DEVICE_ID_ATI_215GI 0x4749 +#define PCI_DEVICE_ID_ATI_215GP 0x4750 +#define PCI_DEVICE_ID_ATI_215GQ 0x4751 +#define PCI_DEVICE_ID_ATI_215GT 0x4754 +#define PCI_DEVICE_ID_ATI_215GTB 0x4755 +#define PCI_DEVICE_ID_ATI_210888GX 0x4758 +#define PCI_DEVICE_ID_ATI_215LG 0x4c47 +#define PCI_DEVICE_ID_ATI_264LT 0x4c54 +#define PCI_DEVICE_ID_ATI_264VT 0x5654 + +#define PCI_VENDOR_ID_VLSI 0x1004 +#define PCI_DEVICE_ID_VLSI_82C592 0x0005 +#define PCI_DEVICE_ID_VLSI_82C593 0x0006 +#define PCI_DEVICE_ID_VLSI_82C594 0x0007 +#define PCI_DEVICE_ID_VLSI_82C597 0x0009 +#define PCI_DEVICE_ID_VLSI_82C541 0x000c +#define PCI_DEVICE_ID_VLSI_82C543 0x000d +#define PCI_DEVICE_ID_VLSI_82C532 0x0101 +#define PCI_DEVICE_ID_VLSI_82C534 0x0102 +#define PCI_DEVICE_ID_VLSI_82C535 0x0104 +#define PCI_DEVICE_ID_VLSI_82C147 0x0105 +#define PCI_DEVICE_ID_VLSI_VAS96011 0x0702 + +#define PCI_VENDOR_ID_ADL 0x1005 +#define PCI_DEVICE_ID_ADL_2301 0x2301 + +#define PCI_VENDOR_ID_NS 0x100b +#define PCI_DEVICE_ID_NS_87415 0x0002 +#define PCI_DEVICE_ID_NS_87410 0xd001 + +#define PCI_VENDOR_ID_TSENG 0x100c +#define PCI_DEVICE_ID_TSENG_W32P_2 0x3202 +#define PCI_DEVICE_ID_TSENG_W32P_b 0x3205 +#define PCI_DEVICE_ID_TSENG_W32P_c 0x3206 +#define PCI_DEVICE_ID_TSENG_W32P_d 0x3207 +#define PCI_DEVICE_ID_TSENG_ET6000 0x3208 + +#define PCI_VENDOR_ID_WEITEK 0x100e +#define PCI_DEVICE_ID_WEITEK_P9000 0x9001 +#define PCI_DEVICE_ID_WEITEK_P9100 0x9100 + +#define PCI_VENDOR_ID_DEC 0x1011 +#define PCI_DEVICE_ID_DEC_BRD 0x0001 +#define PCI_DEVICE_ID_DEC_TULIP 0x0002 +#define PCI_DEVICE_ID_DEC_TGA 0x0004 +#define PCI_DEVICE_ID_DEC_TULIP_FAST 0x0009 +#define PCI_DEVICE_ID_DEC_TGA2 0x000D +#define PCI_DEVICE_ID_DEC_FDDI 0x000F +#define PCI_DEVICE_ID_DEC_TULIP_PLUS 0x0014 +#define PCI_DEVICE_ID_DEC_21142 0x0019 +#define PCI_DEVICE_ID_DEC_21052 0x0021 +#define PCI_DEVICE_ID_DEC_21150 0x0022 +#define PCI_DEVICE_ID_DEC_21152 0x0024 + +#define PCI_VENDOR_ID_CIRRUS 0x1013 +#define PCI_DEVICE_ID_CIRRUS_7548 0x0038 +#define PCI_DEVICE_ID_CIRRUS_5430 0x00a0 +#define PCI_DEVICE_ID_CIRRUS_5434_4 0x00a4 +#define PCI_DEVICE_ID_CIRRUS_5434_8 0x00a8 +#define PCI_DEVICE_ID_CIRRUS_5436 0x00ac +#define PCI_DEVICE_ID_CIRRUS_5446 0x00b8 +#define PCI_DEVICE_ID_CIRRUS_5480 0x00bc +#define PCI_DEVICE_ID_CIRRUS_5464 0x00d4 +#define PCI_DEVICE_ID_CIRRUS_5465 0x00d6 +#define PCI_DEVICE_ID_CIRRUS_6729 0x1100 +#define PCI_DEVICE_ID_CIRRUS_6832 0x1110 +#define PCI_DEVICE_ID_CIRRUS_7542 0x1200 +#define PCI_DEVICE_ID_CIRRUS_7543 0x1202 +#define PCI_DEVICE_ID_CIRRUS_7541 0x1204 + +#define PCI_VENDOR_ID_IBM 0x1014 +#define PCI_DEVICE_ID_IBM_FIRE_CORAL 0x000a +#define PCI_DEVICE_ID_IBM_TR 0x0018 +#define PCI_DEVICE_ID_IBM_82G2675 0x001d +#define PCI_DEVICE_ID_IBM_MCA 0x0020 +#define PCI_DEVICE_ID_IBM_82351 0x0022 +#define PCI_DEVICE_ID_IBM_SERVERAID 0x002e +#define PCI_DEVICE_ID_IBM_TR_WAKE 0x003e +#define PCI_DEVICE_ID_IBM_MPIC 0x0046 +#define PCI_DEVICE_ID_IBM_3780IDSP 0x007d +#define PCI_DEVICE_ID_IBM_MPIC_2 0xffff + +#define PCI_VENDOR_ID_WD 0x101c +#define PCI_DEVICE_ID_WD_7197 0x3296 + +#define PCI_VENDOR_ID_AMD 0x1022 +#define PCI_DEVICE_ID_AMD_LANCE 0x2000 +#define PCI_DEVICE_ID_AMD_SCSI 0x2020 + +#define PCI_VENDOR_ID_TRIDENT 0x1023 +#define PCI_DEVICE_ID_TRIDENT_9397 0x9397 +#define PCI_DEVICE_ID_TRIDENT_9420 0x9420 +#define PCI_DEVICE_ID_TRIDENT_9440 0x9440 +#define PCI_DEVICE_ID_TRIDENT_9660 0x9660 +#define PCI_DEVICE_ID_TRIDENT_9750 0x9750 + +#define PCI_VENDOR_ID_AI 0x1025 +#define PCI_DEVICE_ID_AI_M1435 0x1435 + +#define PCI_VENDOR_ID_MATROX 0x102B +#define PCI_DEVICE_ID_MATROX_MGA_2 0x0518 +#define PCI_DEVICE_ID_MATROX_MIL 0x0519 +#define PCI_DEVICE_ID_MATROX_MYS 0x051A +#define PCI_DEVICE_ID_MATROX_MIL_2 0x051b +#define PCI_DEVICE_ID_MATROX_MIL_2_AGP 0x051f +#define PCI_DEVICE_ID_MATROX_MGA_IMP 0x0d10 + +#define PCI_VENDOR_ID_CT 0x102c +#define PCI_DEVICE_ID_CT_65545 0x00d8 +#define PCI_DEVICE_ID_CT_65548 0x00dc +#define PCI_DEVICE_ID_CT_65550 0x00e0 +#define PCI_DEVICE_ID_CT_65554 0x00e4 +#define PCI_DEVICE_ID_CT_65555 0x00e5 + +#define PCI_VENDOR_ID_MIRO 0x1031 +#define PCI_DEVICE_ID_MIRO_36050 0x5601 + +#define PCI_VENDOR_ID_NEC 0x1033 +#define PCI_DEVICE_ID_NEC_PCX2 0x0046 + +#define PCI_VENDOR_ID_FD 0x1036 +#define PCI_DEVICE_ID_FD_36C70 0x0000 + +#define PCI_VENDOR_ID_SI 0x1039 +#define PCI_DEVICE_ID_SI_5591_AGP 0x0001 +#define PCI_DEVICE_ID_SI_6202 0x0002 +#define PCI_DEVICE_ID_SI_503 0x0008 +#define PCI_DEVICE_ID_SI_ACPI 0x0009 +#define PCI_DEVICE_ID_SI_5597_VGA 0x0200 +#define PCI_DEVICE_ID_SI_6205 0x0205 +#define PCI_DEVICE_ID_SI_501 0x0406 +#define PCI_DEVICE_ID_SI_496 0x0496 +#define PCI_DEVICE_ID_SI_601 0x0601 +#define PCI_DEVICE_ID_SI_5107 0x5107 +#define PCI_DEVICE_ID_SI_5511 0x5511 +#define PCI_DEVICE_ID_SI_5513 0x5513 +#define PCI_DEVICE_ID_SI_5571 0x5571 +#define PCI_DEVICE_ID_SI_5591 0x5591 +#define PCI_DEVICE_ID_SI_5597 0x5597 +#define PCI_DEVICE_ID_SI_7001 0x7001 + +#define PCI_VENDOR_ID_HP 0x103c +#define PCI_DEVICE_ID_HP_J2585A 0x1030 +#define PCI_DEVICE_ID_HP_J2585B 0x1031 + +#define PCI_VENDOR_ID_PCTECH 0x1042 +#define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000 +#define PCI_DEVICE_ID_PCTECH_RZ1001 0x1001 +#define PCI_DEVICE_ID_PCTECH_SAMURAI_0 0x3000 +#define PCI_DEVICE_ID_PCTECH_SAMURAI_1 0x3010 +#define PCI_DEVICE_ID_PCTECH_SAMURAI_IDE 0x3020 + +#define PCI_VENDOR_ID_DPT 0x1044 +#define PCI_DEVICE_ID_DPT 0xa400 + +#define PCI_VENDOR_ID_OPTI 0x1045 +#define PCI_DEVICE_ID_OPTI_92C178 0xc178 +#define PCI_DEVICE_ID_OPTI_82C557 0xc557 +#define PCI_DEVICE_ID_OPTI_82C558 0xc558 +#define PCI_DEVICE_ID_OPTI_82C621 0xc621 +#define PCI_DEVICE_ID_OPTI_82C700 0xc700 +#define PCI_DEVICE_ID_OPTI_82C701 0xc701 +#define PCI_DEVICE_ID_OPTI_82C814 0xc814 +#define PCI_DEVICE_ID_OPTI_82C822 0xc822 +#define PCI_DEVICE_ID_OPTI_82C825 0xd568 + +#define PCI_VENDOR_ID_SGS 0x104a +#define PCI_DEVICE_ID_SGS_2000 0x0008 +#define PCI_DEVICE_ID_SGS_1764 0x0009 + +#define PCI_VENDOR_ID_BUSLOGIC 0x104B +#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140 +#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040 +#define PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT 0x8130 + +#define PCI_VENDOR_ID_TI 0x104c +#define PCI_DEVICE_ID_TI_TVP4010 0x3d04 +#define PCI_DEVICE_ID_TI_TVP4020 0x3d07 +#define PCI_DEVICE_ID_TI_PCI1130 0xac12 +#define PCI_DEVICE_ID_TI_PCI1031 0xac13 +#define PCI_DEVICE_ID_TI_PCI1131 0xac15 +#define PCI_DEVICE_ID_TI_PCI1250 0xac16 +#define PCI_DEVICE_ID_TI_PCI1220 0xac17 + +#define PCI_VENDOR_ID_OAK 0x104e +#define PCI_DEVICE_ID_OAK_OTI107 0x0107 + +/* Winbond have two vendor IDs! See 0x10ad as well */ +#define PCI_VENDOR_ID_WINBOND2 0x1050 +#define PCI_DEVICE_ID_WINBOND2_89C940 0x0940 + +#define PCI_VENDOR_ID_MOTOROLA 0x1057 +#define PCI_DEVICE_ID_MOTOROLA_MPC105 0x0001 +#define PCI_DEVICE_ID_MOTOROLA_MPC106 0x0002 +#define PCI_DEVICE_ID_MOTOROLA_RAVEN 0x4801 + +#define PCI_VENDOR_ID_PROMISE 0x105a +#define PCI_DEVICE_ID_PROMISE_20246 0x4d33 +#define PCI_DEVICE_ID_PROMISE_5300 0x5300 + +#define PCI_VENDOR_ID_N9 0x105d +#define PCI_DEVICE_ID_N9_I128 0x2309 +#define PCI_DEVICE_ID_N9_I128_2 0x2339 +#define PCI_DEVICE_ID_N9_I128_T2R 0x493d + +#define PCI_VENDOR_ID_UMC 0x1060 +#define PCI_DEVICE_ID_UMC_UM8673F 0x0101 +#define PCI_DEVICE_ID_UMC_UM8891A 0x0891 +#define PCI_DEVICE_ID_UMC_UM8886BF 0x673a +#define PCI_DEVICE_ID_UMC_UM8886A 0x886a +#define PCI_DEVICE_ID_UMC_UM8881F 0x8881 +#define PCI_DEVICE_ID_UMC_UM8886F 0x8886 +#define PCI_DEVICE_ID_UMC_UM9017F 0x9017 +#define PCI_DEVICE_ID_UMC_UM8886N 0xe886 +#define PCI_DEVICE_ID_UMC_UM8891N 0xe891 + +#define PCI_VENDOR_ID_X 0x1061 +#define PCI_DEVICE_ID_X_AGX016 0x0001 + +#define PCI_VENDOR_ID_PICOP 0x1066 +#define PCI_DEVICE_ID_PICOP_PT86C52X 0x0001 +#define PCI_DEVICE_ID_PICOP_PT80C524 0x8002 + +#define PCI_VENDOR_ID_APPLE 0x106b +#define PCI_DEVICE_ID_APPLE_BANDIT 0x0001 +#define PCI_DEVICE_ID_APPLE_GC 0x0002 +#define PCI_DEVICE_ID_APPLE_HYDRA 0x000e + +#define PCI_VENDOR_ID_NEXGEN 0x1074 +#define PCI_DEVICE_ID_NEXGEN_82C501 0x4e78 + +#define PCI_VENDOR_ID_QLOGIC 0x1077 +#define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020 +#define PCI_DEVICE_ID_QLOGIC_ISP1022 0x1022 + +#define PCI_VENDOR_ID_CYRIX 0x1078 +#define PCI_DEVICE_ID_CYRIX_5510 0x0000 +#define PCI_DEVICE_ID_CYRIX_PCI_MASTER 0x0001 +#define PCI_DEVICE_ID_CYRIX_5520 0x0002 +#define PCI_DEVICE_ID_CYRIX_5530_LEGACY 0x0100 +#define PCI_DEVICE_ID_CYRIX_5530_SMI 0x0101 +#define PCI_DEVICE_ID_CYRIX_5530_IDE 0x0102 +#define PCI_DEVICE_ID_CYRIX_5530_AUDIO 0x0103 +#define PCI_DEVICE_ID_CYRIX_5530_VIDEO 0x0104 + +#define PCI_VENDOR_ID_LEADTEK 0x107d +#define PCI_DEVICE_ID_LEADTEK_805 0x0000 + +#define PCI_VENDOR_ID_CONTAQ 0x1080 +#define PCI_DEVICE_ID_CONTAQ_82C599 0x0600 +#define PCI_DEVICE_ID_CONTAQ_82C693 0xc693 + +#define PCI_VENDOR_ID_FOREX 0x1083 + +#define PCI_VENDOR_ID_OLICOM 0x108d +#define PCI_DEVICE_ID_OLICOM_OC3136 0x0001 +#define PCI_DEVICE_ID_OLICOM_OC2315 0x0011 +#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 +#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 +#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014 +#define PCI_DEVICE_ID_OLICOM_OC6151 0x0021 + +#define PCI_VENDOR_ID_SUN 0x108e +#define PCI_DEVICE_ID_SUN_EBUS 0x1000 +#define PCI_DEVICE_ID_SUN_HAPPYMEAL 0x1001 +#define PCI_DEVICE_ID_SUN_SIMBA 0x5000 +#define PCI_DEVICE_ID_SUN_PBM 0x8000 +#define PCI_DEVICE_ID_SUN_SABRE 0xa000 + +#define PCI_VENDOR_ID_CMD 0x1095 +#define PCI_DEVICE_ID_CMD_640 0x0640 +#define PCI_DEVICE_ID_CMD_643 0x0643 +#define PCI_DEVICE_ID_CMD_646 0x0646 +#define PCI_DEVICE_ID_CMD_647 0x0647 +#define PCI_DEVICE_ID_CMD_670 0x0670 + +#define PCI_VENDOR_ID_VISION 0x1098 +#define PCI_DEVICE_ID_VISION_QD8500 0x0001 +#define PCI_DEVICE_ID_VISION_QD8580 0x0002 + +#define PCI_VENDOR_ID_BROOKTREE 0x109e +#define PCI_DEVICE_ID_BROOKTREE_848 0x0350 +#define PCI_DEVICE_ID_BROOKTREE_849A 0x0351 +#define PCI_DEVICE_ID_BROOKTREE_8474 0x8474 + +#define PCI_VENDOR_ID_SIERRA 0x10a8 +#define PCI_DEVICE_ID_SIERRA_STB 0x0000 + +#define PCI_VENDOR_ID_ACC 0x10aa +#define PCI_DEVICE_ID_ACC_2056 0x0000 + +#define PCI_VENDOR_ID_WINBOND 0x10ad +#define PCI_DEVICE_ID_WINBOND_83769 0x0001 +#define PCI_DEVICE_ID_WINBOND_82C105 0x0105 +#define PCI_DEVICE_ID_WINBOND_83C553 0x0565 + +#define PCI_VENDOR_ID_DATABOOK 0x10b3 +#define PCI_DEVICE_ID_DATABOOK_87144 0xb106 + +#define PCI_VENDOR_ID_PLX 0x10b5 +#define PCI_DEVICE_ID_PLX_9050 0x9050 +#define PCI_DEVICE_ID_PLX_9060 0x9060 +#define PCI_DEVICE_ID_PLX_9060ES 0x906E +#define PCI_DEVICE_ID_PLX_9060SD 0x906D +#define PCI_DEVICE_ID_PLX_9080 0x9080 + +#define PCI_VENDOR_ID_MADGE 0x10b6 +#define PCI_DEVICE_ID_MADGE_MK2 0x0002 +#define PCI_DEVICE_ID_MADGE_C155S 0x1001 + +#define PCI_VENDOR_ID_3COM 0x10b7 +#define PCI_DEVICE_ID_3COM_3C339 0x3390 +#define PCI_DEVICE_ID_3COM_3C590 0x5900 +#define PCI_DEVICE_ID_3COM_3C595TX 0x5950 +#define PCI_DEVICE_ID_3COM_3C595T4 0x5951 +#define PCI_DEVICE_ID_3COM_3C595MII 0x5952 +#define PCI_DEVICE_ID_3COM_3C900TPO 0x9000 +#define PCI_DEVICE_ID_3COM_3C900COMBO 0x9001 +#define PCI_DEVICE_ID_3COM_3C905TX 0x9050 +#define PCI_DEVICE_ID_3COM_3C905T4 0x9051 +#define PCI_DEVICE_ID_3COM_3C905B_TX 0x9055 + +#define PCI_VENDOR_ID_SMC 0x10b8 +#define PCI_DEVICE_ID_SMC_EPIC100 0x0005 + +#define PCI_VENDOR_ID_AL 0x10b9 +#define PCI_DEVICE_ID_AL_M1445 0x1445 +#define PCI_DEVICE_ID_AL_M1449 0x1449 +#define PCI_DEVICE_ID_AL_M1451 0x1451 +#define PCI_DEVICE_ID_AL_M1461 0x1461 +#define PCI_DEVICE_ID_AL_M1489 0x1489 +#define PCI_DEVICE_ID_AL_M1511 0x1511 +#define PCI_DEVICE_ID_AL_M1513 0x1513 +#define PCI_DEVICE_ID_AL_M1521 0x1521 +#define PCI_DEVICE_ID_AL_M1523 0x1523 +#define PCI_DEVICE_ID_AL_M1531 0x1531 +#define PCI_DEVICE_ID_AL_M1533 0x1533 +#define PCI_DEVICE_ID_AL_M3307 0x3307 +#define PCI_DEVICE_ID_AL_M4803 0x5215 +#define PCI_DEVICE_ID_AL_M5219 0x5219 +#define PCI_DEVICE_ID_AL_M5229 0x5229 +#define PCI_DEVICE_ID_AL_M5237 0x5237 +#define PCI_DEVICE_ID_AL_M7101 0x7101 + +#define PCI_VENDOR_ID_MITSUBISHI 0x10ba + +#define PCI_VENDOR_ID_SURECOM 0x10bd +#define PCI_DEVICE_ID_SURECOM_NE34 0x0e34 + +#define PCI_VENDOR_ID_NEOMAGIC 0x10c8 +#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_NM2070 0x0001 +#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128V 0x0002 +#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128ZV 0x0003 +#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_NM2160 0x0004 + +#define PCI_VENDOR_ID_ASP 0x10cd +#define PCI_DEVICE_ID_ASP_ABP940 0x1200 +#define PCI_DEVICE_ID_ASP_ABP940U 0x1300 +#define PCI_DEVICE_ID_ASP_ABP940UW 0x2300 + +#define PCI_VENDOR_ID_MACRONIX 0x10d9 +#define PCI_DEVICE_ID_MACRONIX_MX98713 0x0512 +#define PCI_DEVICE_ID_MACRONIX_MX987x5 0x0531 + +#define PCI_VENDOR_ID_CERN 0x10dc +#define PCI_DEVICE_ID_CERN_SPSB_PMC 0x0001 +#define PCI_DEVICE_ID_CERN_SPSB_PCI 0x0002 +#define PCI_DEVICE_ID_CERN_HIPPI_DST 0x0021 +#define PCI_DEVICE_ID_CERN_HIPPI_SRC 0x0022 + +#define PCI_VENDOR_ID_NVIDIA 0x10de + +#define PCI_VENDOR_ID_IMS 0x10e0 +#define PCI_DEVICE_ID_IMS_8849 0x8849 + +#define PCI_VENDOR_ID_TEKRAM2 0x10e1 +#define PCI_DEVICE_ID_TEKRAM2_690c 0x690c + +#define PCI_VENDOR_ID_TUNDRA 0x10e3 +#define PCI_DEVICE_ID_TUNDRA_CA91C042 0x0000 + +#define PCI_VENDOR_ID_AMCC 0x10e8 +#define PCI_DEVICE_ID_AMCC_MYRINET 0x8043 +#define PCI_DEVICE_ID_AMCC_PARASTATION 0x8062 +#define PCI_DEVICE_ID_AMCC_S5933 0x807d +#define PCI_DEVICE_ID_AMCC_S5933_HEPC3 0x809c + +#define PCI_VENDOR_ID_INTERG 0x10ea +#define PCI_DEVICE_ID_INTERG_1680 0x1680 +#define PCI_DEVICE_ID_INTERG_1682 0x1682 + +#define PCI_VENDOR_ID_REALTEK 0x10ec +#define PCI_DEVICE_ID_REALTEK_8029 0x8029 +#define PCI_DEVICE_ID_REALTEK_8129 0x8129 +#define PCI_DEVICE_ID_REALTEK_8139 0x8139 + +#define PCI_VENDOR_ID_TRUEVISION 0x10fa +#define PCI_DEVICE_ID_TRUEVISION_T1000 0x000c + +#define PCI_VENDOR_ID_INIT 0x1101 +#define PCI_DEVICE_ID_INIT_320P 0x9100 +#define PCI_DEVICE_ID_INIT_360P 0x9500 + +#define PCI_VENDOR_ID_TTI 0x1103 +#define PCI_DEVICE_ID_TTI_HPT343 0x0003 + +#define PCI_VENDOR_ID_VIA 0x1106 +#define PCI_DEVICE_ID_VIA_82C505 0x0505 +#define PCI_DEVICE_ID_VIA_82C561 0x0561 +#define PCI_DEVICE_ID_VIA_82C586_1 0x0571 +#define PCI_DEVICE_ID_VIA_82C576 0x0576 +#define PCI_DEVICE_ID_VIA_82C585 0x0585 +#define PCI_DEVICE_ID_VIA_82C586_0 0x0586 +#define PCI_DEVICE_ID_VIA_82C595 0x0595 +#define PCI_DEVICE_ID_VIA_82C597_0 0x0597 +#define PCI_DEVICE_ID_VIA_82C926 0x0926 +#define PCI_DEVICE_ID_VIA_82C416 0x1571 +#define PCI_DEVICE_ID_VIA_82C595_97 0x1595 +#define PCI_DEVICE_ID_VIA_82C586_2 0x3038 +#define PCI_DEVICE_ID_VIA_82C586_3 0x3040 +#define PCI_DEVICE_ID_VIA_86C100A 0x6100 +#define PCI_DEVICE_ID_VIA_82C597_1 0x8597 + +#define PCI_VENDOR_ID_VORTEX 0x1119 +#define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000 +#define PCI_DEVICE_ID_VORTEX_GDT6000B 0x0001 +#define PCI_DEVICE_ID_VORTEX_GDT6x10 0x0002 +#define PCI_DEVICE_ID_VORTEX_GDT6x20 0x0003 +#define PCI_DEVICE_ID_VORTEX_GDT6530 0x0004 +#define PCI_DEVICE_ID_VORTEX_GDT6550 0x0005 +#define PCI_DEVICE_ID_VORTEX_GDT6x17 0x0006 +#define PCI_DEVICE_ID_VORTEX_GDT6x27 0x0007 +#define PCI_DEVICE_ID_VORTEX_GDT6537 0x0008 +#define PCI_DEVICE_ID_VORTEX_GDT6557 0x0009 +#define PCI_DEVICE_ID_VORTEX_GDT6x15 0x000a +#define PCI_DEVICE_ID_VORTEX_GDT6x25 0x000b +#define PCI_DEVICE_ID_VORTEX_GDT6535 0x000c +#define PCI_DEVICE_ID_VORTEX_GDT6555 0x000d +#define PCI_DEVICE_ID_VORTEX_GDT6x17RP 0x0100 +#define PCI_DEVICE_ID_VORTEX_GDT6x27RP 0x0101 +#define PCI_DEVICE_ID_VORTEX_GDT6537RP 0x0102 +#define PCI_DEVICE_ID_VORTEX_GDT6557RP 0x0103 +#define PCI_DEVICE_ID_VORTEX_GDT6x11RP 0x0104 +#define PCI_DEVICE_ID_VORTEX_GDT6x21RP 0x0105 +#define PCI_DEVICE_ID_VORTEX_GDT6x17RP1 0x0110 +#define PCI_DEVICE_ID_VORTEX_GDT6x27RP1 0x0111 +#define PCI_DEVICE_ID_VORTEX_GDT6537RP1 0x0112 +#define PCI_DEVICE_ID_VORTEX_GDT6557RP1 0x0113 +#define PCI_DEVICE_ID_VORTEX_GDT6x11RP1 0x0114 +#define PCI_DEVICE_ID_VORTEX_GDT6x21RP1 0x0115 +#define PCI_DEVICE_ID_VORTEX_GDT6x17RP2 0x0120 +#define PCI_DEVICE_ID_VORTEX_GDT6x27RP2 0x0121 +#define PCI_DEVICE_ID_VORTEX_GDT6537RP2 0x0122 +#define PCI_DEVICE_ID_VORTEX_GDT6557RP2 0x0123 +#define PCI_DEVICE_ID_VORTEX_GDT6x11RP2 0x0124 +#define PCI_DEVICE_ID_VORTEX_GDT6x21RP2 0x0125 + +#define PCI_VENDOR_ID_EF 0x111a +#define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000 +#define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002 + +#define PCI_VENDOR_ID_FORE 0x1127 +#define PCI_DEVICE_ID_FORE_PCA200PC 0x0210 +#define PCI_DEVICE_ID_FORE_PCA200E 0x0300 + +#define PCI_VENDOR_ID_IMAGINGTECH 0x112f +#define PCI_DEVICE_ID_IMAGINGTECH_ICPCI 0x0000 + +#define PCI_VENDOR_ID_PHILIPS 0x1131 +#define PCI_DEVICE_ID_PHILIPS_SAA7145 0x7145 +#define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146 + +#define PCI_VENDOR_ID_CYCLONE 0x113c +#define PCI_DEVICE_ID_CYCLONE_SDK 0x0001 + +#define PCI_VENDOR_ID_ALLIANCE 0x1142 +#define PCI_DEVICE_ID_ALLIANCE_PROMOTIO 0x3210 +#define PCI_DEVICE_ID_ALLIANCE_PROVIDEO 0x6422 +#define PCI_DEVICE_ID_ALLIANCE_AT24 0x6424 +#define PCI_DEVICE_ID_ALLIANCE_AT3D 0x643d + +#define PCI_VENDOR_ID_SK 0x1148 +#define PCI_DEVICE_ID_SK_FP 0x4000 +#define PCI_DEVICE_ID_SK_TR 0x4200 +#define PCI_DEVICE_ID_SK_GE 0x4300 + +#define PCI_VENDOR_ID_VMIC 0x114a +#define PCI_DEVICE_ID_VMIC_VME 0x7587 + +#define PCI_VENDOR_ID_DIGI 0x114f +#define PCI_DEVICE_ID_DIGI_EPC 0x0002 +#define PCI_DEVICE_ID_DIGI_RIGHTSWITCH 0x0003 +#define PCI_DEVICE_ID_DIGI_XEM 0x0004 +#define PCI_DEVICE_ID_DIGI_XR 0x0005 +#define PCI_DEVICE_ID_DIGI_CX 0x0006 +#define PCI_DEVICE_ID_DIGI_XRJ 0x0009 +#define PCI_DEVICE_ID_DIGI_EPCJ 0x000a +#define PCI_DEVICE_ID_DIGI_XR_920 0x0027 + +#define PCI_VENDOR_ID_MUTECH 0x1159 +#define PCI_DEVICE_ID_MUTECH_MV1000 0x0001 + +#define PCI_VENDOR_ID_RENDITION 0x1163 +#define PCI_DEVICE_ID_RENDITION_VERITE 0x0001 +#define PCI_DEVICE_ID_RENDITION_VERITE2100 0x2000 + +#define PCI_VENDOR_ID_TOSHIBA 0x1179 +#define PCI_DEVICE_ID_TOSHIBA_601 0x0601 +#define PCI_DEVICE_ID_TOSHIBA_TOPIC95 0x060a +#define PCI_DEVICE_ID_TOSHIBA_TOPIC97 0x060f + +#define PCI_VENDOR_ID_RICOH 0x1180 +#define PCI_DEVICE_ID_RICOH_RL5C465 0x0465 +#define PCI_DEVICE_ID_RICOH_RL5C466 0x0466 +#define PCI_DEVICE_ID_RICOH_RL5C475 0x0475 +#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478 + +#define PCI_VENDOR_ID_ARTOP 0x1191 +#define PCI_DEVICE_ID_ARTOP_ATP8400 0x0004 +#define PCI_DEVICE_ID_ARTOP_ATP850UF 0x0005 + +#define PCI_VENDOR_ID_ZEITNET 0x1193 +#define PCI_DEVICE_ID_ZEITNET_1221 0x0001 +#define PCI_DEVICE_ID_ZEITNET_1225 0x0002 + +#define PCI_VENDOR_ID_OMEGA 0x119b +#define PCI_DEVICE_ID_OMEGA_82C092G 0x1221 + +#define PCI_VENDOR_ID_LITEON 0x11ad +#define PCI_DEVICE_ID_LITEON_LNE100TX 0x0002 + +#define PCI_VENDOR_ID_NP 0x11bc +#define PCI_DEVICE_ID_NP_PCI_FDDI 0x0001 + +#define PCI_VENDOR_ID_ATT 0x11c1 +#define PCI_DEVICE_ID_ATT_L56XMF 0x0440 + +#define PCI_VENDOR_ID_SPECIALIX 0x11cb +#define PCI_DEVICE_ID_SPECIALIX_IO8 0x2000 +#define PCI_DEVICE_ID_SPECIALIX_XIO 0x4000 +#define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000 + +#define PCI_VENDOR_ID_AURAVISION 0x11d1 +#define PCI_DEVICE_ID_AURAVISION_VXP524 0x01f7 + +#define PCI_VENDOR_ID_IKON 0x11d5 +#define PCI_DEVICE_ID_IKON_10115 0x0115 +#define PCI_DEVICE_ID_IKON_10117 0x0117 + +#define PCI_VENDOR_ID_ZORAN 0x11de +#define PCI_DEVICE_ID_ZORAN_36057 0x6057 +#define PCI_DEVICE_ID_ZORAN_36120 0x6120 + +#define PCI_VENDOR_ID_KINETIC 0x11f4 +#define PCI_DEVICE_ID_KINETIC_2915 0x2915 + +#define PCI_VENDOR_ID_COMPEX 0x11f6 +#define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112 +#define PCI_DEVICE_ID_COMPEX_RL2000 0x1401 + +#define PCI_VENDOR_ID_RP 0x11fe +#define PCI_DEVICE_ID_RP32INTF 0x0001 +#define PCI_DEVICE_ID_RP8INTF 0x0002 +#define PCI_DEVICE_ID_RP16INTF 0x0003 +#define PCI_DEVICE_ID_RP4QUAD 0x0004 +#define PCI_DEVICE_ID_RP8OCTA 0x0005 +#define PCI_DEVICE_ID_RP8J 0x0006 +#define PCI_DEVICE_ID_RPP4 0x000A +#define PCI_DEVICE_ID_RPP8 0x000B +#define PCI_DEVICE_ID_RP8M 0x000C + +#define PCI_VENDOR_ID_CYCLADES 0x120e +#define PCI_DEVICE_ID_CYCLOM_Y_Lo 0x0100 +#define PCI_DEVICE_ID_CYCLOM_Y_Hi 0x0101 +#define PCI_DEVICE_ID_CYCLOM_Z_Lo 0x0200 +#define PCI_DEVICE_ID_CYCLOM_Z_Hi 0x0201 + +#define PCI_VENDOR_ID_ESSENTIAL 0x120f +#define PCI_DEVICE_ID_ESSENTIAL_ROADRUNNER 0x0001 + +#define PCI_VENDOR_ID_O2 0x1217 +#define PCI_DEVICE_ID_O2_6729 0x6729 +#define PCI_DEVICE_ID_O2_6730 0x673a +#define PCI_DEVICE_ID_O2_6832 0x6832 +#define PCI_DEVICE_ID_O2_6836 0x6836 + +#define PCI_VENDOR_ID_3DFX 0x121a +#define PCI_DEVICE_ID_3DFX_VOODOO 0x0001 +#define PCI_DEVICE_ID_3DFX_VOODOO2 0x0002 + +#define PCI_VENDOR_ID_SIGMADES 0x1236 +#define PCI_DEVICE_ID_SIGMADES_6425 0x6401 + +#define PCI_VENDOR_ID_CCUBE 0x123f + +#define PCI_VENDOR_ID_DIPIX 0x1246 + +#define PCI_VENDOR_ID_STALLION 0x124d +#define PCI_DEVICE_ID_STALLION_ECHPCI832 0x0000 +#define PCI_DEVICE_ID_STALLION_ECHPCI864 0x0002 +#define PCI_DEVICE_ID_STALLION_EIOPCI 0x0003 + +#define PCI_VENDOR_ID_OPTIBASE 0x1255 +#define PCI_DEVICE_ID_OPTIBASE_FORGE 0x1110 +#define PCI_DEVICE_ID_OPTIBASE_FUSION 0x1210 +#define PCI_DEVICE_ID_OPTIBASE_VPLEX 0x2110 +#define PCI_DEVICE_ID_OPTIBASE_VPLEXCC 0x2120 +#define PCI_DEVICE_ID_OPTIBASE_VQUEST 0x2130 + +#define PCI_VENDOR_ID_SATSAGEM 0x1267 +#define PCI_DEVICE_ID_SATSAGEM_PCR2101 0x5352 +#define PCI_DEVICE_ID_SATSAGEM_TELSATTURBO 0x5a4b + +#define PCI_VENDOR_ID_HUGHES 0x1273 +#define PCI_DEVICE_ID_HUGHES_DIRECPC 0x0002 + +#define PCI_VENDOR_ID_ENSONIQ 0x1274 +#define PCI_DEVICE_ID_ENSONIQ_AUDIOPCI 0x5000 + +#define PCI_VENDOR_ID_ALTEON 0x12ae +#define PCI_DEVICE_ID_ALTEON_ACENIC 0x0001 + +#define PCI_VENDOR_ID_PICTUREL 0x12c5 +#define PCI_DEVICE_ID_PICTUREL_PCIVST 0x0081 + +#define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2 +#define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018 + +#define PCI_VENDOR_ID_CBOARDS 0x1307 +#define PCI_DEVICE_ID_CBOARDS_DAS1602_16 0x0001 + +#define PCI_VENDOR_ID_SYMPHONY 0x1c1c +#define PCI_DEVICE_ID_SYMPHONY_101 0x0001 + +#define PCI_VENDOR_ID_TEKRAM 0x1de1 +#define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 + +#define PCI_VENDOR_ID_3DLABS 0x3d3d +#define PCI_DEVICE_ID_3DLABS_300SX 0x0001 +#define PCI_DEVICE_ID_3DLABS_500TX 0x0002 +#define PCI_DEVICE_ID_3DLABS_DELTA 0x0003 +#define PCI_DEVICE_ID_3DLABS_PERMEDIA 0x0004 +#define PCI_DEVICE_ID_3DLABS_MX 0x0006 + +#define PCI_VENDOR_ID_AVANCE 0x4005 +#define PCI_DEVICE_ID_AVANCE_ALG2064 0x2064 +#define PCI_DEVICE_ID_AVANCE_2302 0x2302 + +#define PCI_VENDOR_ID_NETVIN 0x4a14 +#define PCI_DEVICE_ID_NETVIN_NV5000SC 0x5000 + +#define PCI_VENDOR_ID_S3 0x5333 +#define PCI_DEVICE_ID_S3_PLATO_PXS 0x0551 +#define PCI_DEVICE_ID_S3_ViRGE 0x5631 +#define PCI_DEVICE_ID_S3_TRIO 0x8811 +#define PCI_DEVICE_ID_S3_AURORA64VP 0x8812 +#define PCI_DEVICE_ID_S3_TRIO64UVP 0x8814 +#define PCI_DEVICE_ID_S3_ViRGE_VX 0x883d +#define PCI_DEVICE_ID_S3_868 0x8880 +#define PCI_DEVICE_ID_S3_928 0x88b0 +#define PCI_DEVICE_ID_S3_864_1 0x88c0 +#define PCI_DEVICE_ID_S3_864_2 0x88c1 +#define PCI_DEVICE_ID_S3_964_1 0x88d0 +#define PCI_DEVICE_ID_S3_964_2 0x88d1 +#define PCI_DEVICE_ID_S3_968 0x88f0 +#define PCI_DEVICE_ID_S3_TRIO64V2 0x8901 +#define PCI_DEVICE_ID_S3_PLATO_PXG 0x8902 +#define PCI_DEVICE_ID_S3_ViRGE_DXGX 0x8a01 +#define PCI_DEVICE_ID_S3_ViRGE_GX2 0x8a10 +#define PCI_DEVICE_ID_S3_ViRGE_MX 0x8c01 +#define PCI_DEVICE_ID_S3_ViRGE_MXP 0x8c02 +#define PCI_DEVICE_ID_S3_ViRGE_MXPMV 0x8c03 +#define PCI_DEVICE_ID_S3_SONICVIBES 0xca00 + +#define PCI_VENDOR_ID_INTEL 0x8086 +#define PCI_DEVICE_INTEL_82544EI_COPPER 0x1008 /* */ +#define PCI_DEVICE_ID_INTEL_82375 0x0482 +#define PCI_DEVICE_ID_INTEL_82424 0x0483 +#define PCI_DEVICE_ID_INTEL_82378 0x0484 +#define PCI_DEVICE_ID_INTEL_82430 0x0486 +#define PCI_DEVICE_ID_INTEL_82434 0x04a3 +#define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221 +#define PCI_DEVICE_ID_INTEL_82092AA_1 0x1222 +#define PCI_DEVICE_ID_INTEL_7116 0x1223 +#define PCI_DEVICE_ID_INTEL_82596 0x1226 +#define PCI_DEVICE_ID_INTEL_82865 0x1227 +#define PCI_DEVICE_ID_INTEL_82557 0x1229 +#define PCI_DEVICE_ID_INTEL_82437 0x122d +#define PCI_DEVICE_ID_INTEL_82371FB_0 0x122e +#define PCI_DEVICE_ID_INTEL_82371FB_1 0x1230 +#define PCI_DEVICE_ID_INTEL_82371MX 0x1234 +#define PCI_DEVICE_ID_INTEL_82437MX 0x1235 +#define PCI_DEVICE_ID_INTEL_82441 0x1237 +#define PCI_DEVICE_ID_INTEL_82380FB 0x124b +#define PCI_DEVICE_ID_INTEL_82439 0x1250 +#define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000 +#define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010 +#define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020 +#define PCI_DEVICE_ID_INTEL_82437VX 0x7030 +#define PCI_DEVICE_ID_INTEL_82439TX 0x7100 +#define PCI_DEVICE_ID_INTEL_82371AB_0 0x7110 +#define PCI_DEVICE_ID_INTEL_82371AB 0x7111 +#define PCI_DEVICE_ID_INTEL_82371AB_2 0x7112 +#define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113 +#define PCI_DEVICE_ID_INTEL_82443LX_0 0x7180 +#define PCI_DEVICE_ID_INTEL_82443LX_1 0x7181 +#define PCI_DEVICE_ID_INTEL_82443BX_0 0x7190 +#define PCI_DEVICE_ID_INTEL_82443BX_1 0x7191 +#define PCI_DEVICE_ID_INTEL_82443BX_2 0x7192 +#define PCI_DEVICE_ID_INTEL_P6 0x84c4 +#define PCI_DEVICE_ID_INTEL_82450GX 0x84c5 + +#define PCI_VENDOR_ID_KTI 0x8e2e +#define PCI_DEVICE_ID_KTI_ET32P2 0x3000 + +#define PCI_VENDOR_ID_ADAPTEC 0x9004 +#define PCI_DEVICE_ID_ADAPTEC_7810 0x1078 +#define PCI_DEVICE_ID_ADAPTEC_7850 0x5078 +#define PCI_DEVICE_ID_ADAPTEC_7855 0x5578 +#define PCI_DEVICE_ID_ADAPTEC_5800 0x5800 +#define PCI_DEVICE_ID_ADAPTEC_1480A 0x6075 +#define PCI_DEVICE_ID_ADAPTEC_7860 0x6078 +#define PCI_DEVICE_ID_ADAPTEC_7861 0x6178 +#define PCI_DEVICE_ID_ADAPTEC_7870 0x7078 +#define PCI_DEVICE_ID_ADAPTEC_7871 0x7178 +#define PCI_DEVICE_ID_ADAPTEC_7872 0x7278 +#define PCI_DEVICE_ID_ADAPTEC_7873 0x7378 +#define PCI_DEVICE_ID_ADAPTEC_7874 0x7478 +#define PCI_DEVICE_ID_ADAPTEC_7895 0x7895 +#define PCI_DEVICE_ID_ADAPTEC_7880 0x8078 +#define PCI_DEVICE_ID_ADAPTEC_7881 0x8178 +#define PCI_DEVICE_ID_ADAPTEC_7882 0x8278 +#define PCI_DEVICE_ID_ADAPTEC_7883 0x8378 +#define PCI_DEVICE_ID_ADAPTEC_7884 0x8478 +#define PCI_DEVICE_ID_ADAPTEC_1030 0x8b78 + +#define PCI_VENDOR_ID_ADAPTEC2 0x9005 +#define PCI_DEVICE_ID_ADAPTEC2_2940U2 0x0010 +#define PCI_DEVICE_ID_ADAPTEC2_7890 0x001f +#define PCI_DEVICE_ID_ADAPTEC2_3940U2 0x0050 +#define PCI_DEVICE_ID_ADAPTEC2_7896 0x005f + +#define PCI_VENDOR_ID_ATRONICS 0x907f +#define PCI_DEVICE_ID_ATRONICS_2015 0x2015 + +#define PCI_VENDOR_ID_HOLTEK 0x9412 +#define PCI_DEVICE_ID_HOLTEK_6565 0x6565 + +#define PCI_VENDOR_ID_TIGERJET 0xe159 +#define PCI_DEVICE_ID_TIGERJET_300 0x0001 + +#define PCI_VENDOR_ID_ARK 0xedd8 +#define PCI_DEVICE_ID_ARK_STING 0xa091 +#define PCI_DEVICE_ID_ARK_STINGARK 0xa099 +#define PCI_DEVICE_ID_ARK_2000MT 0xa0a1 + +/* + * The PCI interface treats multi-function devices as independent + * devices. The slot/function address of each device is encoded + * in a single byte as follows: + * + * 7:3 = slot + * 2:0 = function + */ +#define PCI_DEVFN(slot,func) ((((slot) & 0x1f) << 3) | ((func) & 0x07)) +#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) +#define PCI_FUNC(devfn) ((devfn) & 0x07) + +/* + * Error values that may be returned by the PCI bios. + */ +#define PCIBIOS_SUCCESSFUL 0x00 +#define PCIBIOS_FUNC_NOT_SUPPORTED 0x81 +#define PCIBIOS_BAD_VENDOR_ID 0x83 +#define PCIBIOS_DEVICE_NOT_FOUND 0x86 +#define PCIBIOS_BAD_REGISTER_NUMBER 0x87 +#define PCIBIOS_SET_FAILED 0x88 +#define PCIBIOS_BUFFER_TOO_SMALL 0x89 + +/* T. Straumann, 7/31/2001: increased to 32 - PMC slots are not + * scanned on mvme2306 otherwise + */ +#define PCI_MAX_DEVICES 32 +#define PCI_MAX_FUNCTIONS 8 + +typedef struct { + int (*read_config_byte)(unsigned char, unsigned char, unsigned char, + unsigned char, unsigned char *); + int (*read_config_word)(unsigned char, unsigned char, unsigned char, + unsigned char, unsigned short *); + int (*read_config_dword)(unsigned char, unsigned char, unsigned char, + unsigned char, unsigned int *); + int (*write_config_byte)(unsigned char, unsigned char, unsigned char, + unsigned char, unsigned char); + int (*write_config_word)(unsigned char, unsigned char, unsigned char, + unsigned char, unsigned short); + int (*write_config_dword)(unsigned char, unsigned char, unsigned char, + unsigned char, unsigned int); +}pci_config_access_functions; + +typedef struct { + unsigned int pci_config_addr; + unsigned int pci_config_data; + /* const pci_config_access_functions* pci_functions;*/ +} pci_config; + +extern pci_config BSP_pci_config[2]; + +#ifndef PCI_MAIN +extern int PCIx_read_config_byte(); +extern int PCIx_read_config_word(); +extern int PCIx_read_config_dword(); +extern int PCIx_write_config_byte(); +extern int PCIx_write_config_word(); +extern int PCIx_write_config_dword(); + +extern int pci_read_config_byte(unsigned char bus, unsigned char dev,unsigned char func,unsigned char offset,unsigned char *val); +extern int pci_read_config_word(unsigned char bus, unsigned char dev,unsigned char func, unsigned char offset, unsigned short *val); +extern int pci_read_config_dword(unsigned char bus, unsigned char dev,unsigned char func, unsigned char offset, unsigned int *val); +extern int pci_write_config_byte(); +extern int pci_write_config_word(); +extern int pci_write_config_dword(); + +/* + * Return the number of PCI busses in the system + */ +extern unsigned char BusCountPCI(); +extern void InitializePCI(); +#endif + +int BSP_PCIxFindDevice(unsigned short vendorid, unsigned short deviceid, + int instance, int pciNum, int *pbus, int *pdev, int *pfun ); +int BSP_pciFindDevice(unsigned short vendorid, unsigned short deviceid, + int instance, int *pbus, int *pdev, int *pfun); + +#endif /* RTEMS_PCI_H */ diff --git a/c/src/lib/libbsp/powerpc/mvme5500/pci/pci_interface.c b/c/src/lib/libbsp/powerpc/mvme5500/pci/pci_interface.c new file mode 100644 index 0000000000..b44d5d3f78 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/pci/pci_interface.c @@ -0,0 +1,171 @@ +/* pci_interface.c + * + * Copyright 2004, Brookhaven National Laboratory and + * Shuchen Kate Feng + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution. + * + */ +#include +#include /* printk */ + +#include +#include +#include +#include + +#define PCI_DEBUG 0 + +/* Please reference the GT64260B datasheet, for the PCI interface, + * Synchronization Barriers and PCI ordering. + * + * Some PCI devices require Synchronization Barriers or PCI ordering + * for synchronization. For example, the VME-OMS58 motor controller we + * used at NSLS requires either enhanced CPU Synchronization Barrier + * or PCI-ordering (only one mechanism allowed. See section 11.1.2). + * To use the former mechanism(default), one needs to call + * CPU0_PciEnhanceSync() or CPU1_PciEnhanceSync() to perform software + * synchronization between the CPU and PCI activities. + * + * To use the PCI-ordering, one can call pciToCpuSync() to trigger + * the PCI-to-CPU sync barrier after the out_xx(). In this mode, + * PCI configuration reads suffer sync barrier latency. Please reference + * the datasheet to explore other options. + * + * Note : If PCI_ORDERING is needed for the PCI0, while disabling the + * deadlock for the PCI0, one should keep the CommDLEn bit enabled + * for the deadlock mechanism so that the 10/100 MB ethernet will + * function correctly. + * + */ +#define PCI_ORDERING + +/*#define PCI_DEADLOCK*/ + +/* So far, I do not see the need to disable the address pipelining. +#define DIS_ADDR_PIPELINE*/ + +#ifdef PCI_ORDERING +#define PCI_ACCCTLBASEL_VALUE 0x01009000 +#else +#define PCI_ACCCTLBASEL_VALUE 0x01001000 +#endif + +#define ConfSBDis 0x10000000 /* 1: disable, 0: enable */ +#define IOSBDis 0x20000000 /* 1: disable, 0: enable */ +#define ConfIOSBDis 0x30000000 +#define CpuPipeline 0x00002000 /* optional, 1:enable, 0:disable */ + +#define CPU0_SYNC_TRIGGER 0xD0 /* CPU0 Sync Barrier trigger */ +#define CPU0_SYNC_VIRTUAL 0xC0 /* CPU0 Sync Barrier Virtual */ + +#define CPU1_SYNC_TRIGGER 0xD8 /* CPU1 Sync Barrier trigger */ +#define CPU1_SYNC_VIRTUAL 0xC8 /* CPU1 Sync Barrier Virtual */ + + +/* CPU to PCI ordering register */ +#define DLOCK_ORDER_REG 0x2D0 /* Deadlock and Ordering register */ +#define PCI0OrEn 0x00000001 +#define PCI1OrEn 0x00000020 +#define PCIOrEn 0x40000000 +#define PCIOrEnMASK 0x40000021 + +#define CNT_SYNC_REG 0x2E0 /* Counters and Sync Barrier register */ +#define L0SyncBar 0x00001000 +#define L1SyncBar 0x00002000 +#define DSyncBar 0x00004000 +#define SyncBarMode 0x00008000 +#define SyncBarMASK 0x0000f000 + +#define WRTBK_PRIO_BUFFER 0x2d8 /* writback priority and buffer depth */ + +#define ADDR_PIPELINE 0x00020000 + +void PCI_interface() +{ + unsigned int data; + +#if (defined(PCI_ORDERING)||defined(DIS_ADDR_PIPELINE)) + data = inl(0); /* needed : read to flush */ + /* MOTLOad default disables Configuration and I/O Read Sync Barrier + * which is needed for enhanced CPU sync. barrier */ +#ifdef PCI_ORDERING + /* enable Configuration Read Sync Barrier and IO read Sync Barrier*/ + data &= ~ConfIOSBDis; +#endif +#ifdef DIS_ADDR_PIPELINE + data &= ~ADDR_PIPELINE; + +#if PCI_DEBUG + printk("data %x\n", data); +#endif +#endif + outl(data, 0); + /* read polling of the register until the new data is being read */ + while ( inl(0)!=data); +#endif + +#ifdef PCI_DEADLOCK + outl(0x07fff600, CNT_SYNC_REG); +#endif +#ifdef PCI_ORDERING + outl(0xc0060002, DLOCK_ORDER_REG); + outl(0x07fff600, CNT_SYNC_REG); +#else + outl(inl(PCI0_CMD_CNTL)|PCI_COMMAND_SB_DIS, PCI0_CMD_CNTL); +#endif + + /* asserts SERR upon various detection */ + outl(0x3fffff, 0xc28); + +} + +/* Use MOTLoad default for Writeback Priority and Buffer Depth + */ +void pciAccessInit(int PciNum) +{ + unsigned int data; + + /* MOTLoad combines the two banks of SDRAM into + * one PCI access control because the top = 0x1ff + */ + data = inl(GT_SCS0_Low_Decode) & 0xfff; + data |= PCI_ACCCTLBASEL_VALUE; + data &= ~0x300000; + outl(data, PCI0_ACCESS_CNTL_BASE0_LOW+(PciNum * 0x80)); +#if PCI_DEBUG + printk("PCI%d_ACCESS_CNTL_BASE0_LOW 0x%x\n",PciNum,inl(PCI0_ACCESS_CNTL_BASE0_LOW+(PciNum * 0x80))); +#endif + +} + +/* Sync Barrier Trigger. A write to the CPU_SYNC_TRIGGER register triggers + * the sync barrier process. The three bits, define which buffers should + * be flushed. + * Bit 0 = PCI0 slave write buffer. + * Bit 1 = PCI1 slave write buffer. + * Bit 2 = SDRAM snoop queue. + */ +void CPU0_PciEnhanceSync(unsigned int syncVal) +{ + outl(syncVal,CPU0_SYNC_TRIGGER); + while (inl(CPU0_SYNC_VIRTUAL)); +} + +void CPU1_PciEnhanceSync(unsigned int syncVal) +{ + outl(syncVal,CPU1_SYNC_TRIGGER); + while (inl(CPU1_SYNC_VIRTUAL)); +} + +/* Currently, if PCI_ordering is used for synchronization, configuration + * reads is programmed to be the PCI slave "synchronization barrier" + * cycles. + */ +void pciToCpuSync(int pci_num) +{ + unsigned char data; + + PCIx_read_config_byte(pci_num, 0,0,0,4, &data); +} diff --git a/c/src/lib/libbsp/powerpc/mvme5500/pci/pcifinddevice.c b/c/src/lib/libbsp/powerpc/mvme5500/pci/pcifinddevice.c new file mode 100644 index 0000000000..dc430eb08c --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/pci/pcifinddevice.c @@ -0,0 +1,66 @@ +/* pcifinddevice.c + * + * Copyright 2001, Till Straumann + * + * find a particular PCI device + * (we assume, the firmware configured the PCI bus[es] for us) + * + * + * Kate Feng , modified it to support + * the mvme5500 board and provided glues to Till's vmeUniverse.c. + * + */ + +#define PCI_INVALID_VENDORDEVICEID 0xffffffff +#define PCI_MULTI_FUNCTION 0x80 + +/*#define PCI_DEBUG*/ + +#include +#include + +int BSP_PCIxFindDevice(unsigned short vendorid, unsigned short deviceid, + int instance, int pciNum, int *pbus, int *pdev, int *pfun ) +{ + unsigned int d; + unsigned short s; + unsigned char bus,dev,fun,hd; + + for (bus=0; bus<2; bus++) { + for (dev=0; dev$(DEPEND).tmp +@RTEMS_USE_GCC_TRUE@ mv $(DEPEND).tmp $(DEPEND) + +# pull in dependencies if they exist +@RTEMS_USE_GCC_TRUE@ifeq (${DEPEND},$(wildcard ${DEPEND})) +@RTEMS_USE_GCC_TRUE@include ${DEPEND} +@RTEMS_USE_GCC_TRUE@@ENDIF@ +depend: depend-am + +@RTEMS_USE_GCC_TRUE@define make-rel +@RTEMS_USE_GCC_TRUE@ $(LINK) -qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) $^ +@RTEMS_USE_GCC_TRUE@endef +@RTEMS_USE_GCC_FALSE@define make-rel +@RTEMS_USE_GCC_FALSE@ $(LINK) $(XLDFLAGS) $^ +@RTEMS_USE_GCC_FALSE@endef + +${ARCH}: + mkdir ${ARCH} + +clean-local: + $(RM) -r o-optimize o-debug o-profile $(CLEANDIRS) + $(RM) Depends-o-optimize.tmp Depends-o-debug.tmp Depends-o-profile.tmp + +define make-library +test -d $(ARCH) || mkdir $(ARCH) +$(RM) $@ +$(AR) $(ARFLAGS) $@ $^ +$(RANLIB) $@ +endef + +$(PROJECT_RELEASE)/lib: + @$(mkinstalldirs) $@ + +.PRECIOUS: $(LIB) + +$(PROJECT_RELEASE)/lib/$(MVME5500_PREFIX)start$(LIB_VARIANT).$(OBJEXT): $(PGM) + $(INSTALL_DATA) $< $@ + +$(PROJECT_RELEASE)/lib/rtems_crti.$(OBJEXT): $(ARCH)/rtems_crti.$(OBJEXT) + $(INSTALL_DATA) $< $@ + +all-local: $(ARCH) $(S_O_FILES) $(PGM) $(TMPINSTALL_FILES) + +$(OBJS):$(ARCH) + +$(PGM): $(OBJS) + $(LD) -r -o $@ $^ + +debug: + @echo + @echo "\"make debug\" is obsolete, instead use:" + @echo " make VARIANT=DEBUG" + @echo + +.PHONY: debug + +profile: + @echo + @echo "\"make profile\" is obsolete, instead use:" + @echo " make VARIANT=PROFILE" + @echo + +.PHONY: profile + +preinstall-am: $(PREINSTALL_FILES) +preinstall: preinstall-am +.PHONY: preinstall preinstall-am + +depend-am: depend-gcc +depend: depend-am +.PHONY: depend depend-am depend-gcc +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/c/src/lib/libbsp/powerpc/mvme5500/start/preload.S b/c/src/lib/libbsp/powerpc/mvme5500/start/preload.S new file mode 100644 index 0000000000..4d03910170 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/start/preload.S @@ -0,0 +1,287 @@ +/* + * Mini-loader for the SVGM and MVME5500 BSP. + * + * $Id$ + * + * Copyright (C) 2003, 2004 + * Author: Till Straumann, 10/2001 + * + * Some ideas are borrowed from the powerpc/shared/bootloader + * by + * Copyright (C) 1998, 1999 Gabriel Paubert, paubert@iram.es + * Copyright (C) 1999 Eric Valette. valette@crf.canon.fr + * + * + * The SVGM firmware is unable to load the RTEMS image below + * 0x2000 (I believe their stack is growing below 0x1000) ? + * + * The code provided by this file is responsible for the performing + * the following steps: + * + * 1) Save commandline parameters to an area that is + * a) not covered by the downloaded image + * b) will not be overwritten by the moved image + * nor the final BSS segment (rtems clears BSS + * before saving the command line). + * 2) Initialize and setup the memory controller to prepare the + * SDRAM before moving the image to it. + * 3) Move the entire image (including this very file) to + * its final location starting at 0x0000. + * It is important to note that _NO_STACK_ is available + * during this step. Also, there is probably no return to + * Monitor because relocating RTEMS will destroy vital Monitor + * data (such as its stack). + * 3) Flush the cache to make sure the relocated image is actually + * in memory. + * 4) setup RTEMS environment (initial register values), most + * notably an initial STACK. The initial stack may be small and + * is used by RTEMS only at a very early stage. + * A safe place for the stack seems to be the 00..0x7f area. + * NOTE: we should respect the MAILBOX area 0x80..0xff! + * 5) switch the MMU off (because that's what RTEMS is expecting + * it to be at startup). + * 6) fire up rtems... + * + * + * Calling convention: + * R1: Monitor SP + * R3: command line string start + * R4: command line string end + 1 + * R5: where Monitor put the image + * if R5 is 0, the preloader will use its entry point + * as the image starting address. + * See NOTE below. + * R6: end of the image (i.e. R6-R5 is the image length) + * if R6 is 0, _edata will be used as the image length + * See NOTE below. + * + * NOTE: if the symbol DONT_USE_R5_ENTRY is defined, + * R5/R6 are never used and the necessary parameters are + * determined at runtime (R5) / linkage (R6) [_edata] + * + * ASSUMPTIONS: + * The code RELIES on the assumption that the image will be + * moved DOWNWARDS in memory and that the this loader is + * prepended to the image, i.e. it is safe to do + * codemove(codemove,0,codemove_end - codemove); + * (*0)(codemove_end, codemove_end-codemove, __rtems_end-codemove_end); + * where codemove(from, to, nbytes) is defined as + * codemove(from, to, nbytes) { while (nbytes--) *(to++)=*(from++); } + * Implicit to these assumptions is the assumption that the destination + * address is cache block aligned. + * Furthermore, the byte count is assumed to be a multiple + * of four + * + */ +#if 0 +/* TODO: I dont know where the appropriate CPU model is to be defined + * when including this to get PPC_CACHE_ALIGNMENT I get an error... + */ +#include +#else +#ifndef PPC_CACHE_ALIGNMENT +#define PPC_CACHE_ALIGNMENT 32 +#endif +#endif + +#include +#include + +/* Note that major modifications may be needed + * if DESTINATION_ADDR is not 0 + */ +#define KERNELBASE 0x0 +#define INITIAL_STACK 0x78 /* 8-byte aligned */ +#define CACHE_LINE_SIZE PPC_CACHE_ALIGNMENT /* autodetect doesn't work, see below */ +#define ASSUME_RTEMS_INSTALLS_VECTORS /* assume we need not load vectors */ +#define DONT_USE_R5_ENTRY /* always dynamically determine the address we're running from */ + + /* put this into its own section which we want to + * be loaded at the very beginning. We should probably + * not use more than 255 bytes. + */ + PUBLIC_VAR(__rtems_start) + PUBLIC_VAR(__rtems_entry_point) + PUBLIC_VAR(__rtems_end) + .section .mvme5500_preloader_section,"awx",@progbits +preload: + /* find out where we are */ + bl here +here: + /* MOTLoad had MSR_EE turned on. Disable it.*/ + mfmsr r0 + xori r0, r0, MSR_EE + mtmsr r0 + mflr r5 + addi r5,r5,-(here-preload) + lis r27,_edata@h + ori r27,r27,_edata@l + + /* at this point the register contents are + * R3: command line start + * R4: R3 + command line length + * R5: address we are running from / loaded to + * R27: image end + */ + + /* save command line start */ + mr r6, r3 + /* save the command line parameters if they are to be overwritten */ + sub. r17, r4, r3 /* string length */ + ble leaveparms /* <=0 -> no parameters */ + /* copy has to be out of the way of the bss; therefore we must + * put the string out of the way of both, the current end of + * the image (without bss) AND the end of the loaded image + * (including bss): + * |......image.........| downloaded image + * |image_bss...........| loaded image with bss appended + * + * ^ safe place for string + * + * the alternative scenario looks like this: + * |..image.............| downloaded image + * |image_bss...........| loaded image with bss appended + * ^ safe place for string + */ + lis r18, __rtems_end+0x10000@h /* round up, save one instruction */ + add r16, r5, r27 /* image end + 1 */ + cmpw r16, r18 + bge ishighenough + mr r16,r18 /* __rtems_end is higher than + * the image end + * (without bss) + */ +ishighenough: + cmpw r16, r3 /* destination start > current string start ? */ + ble leaveparms /* string already after dst, leave it */ + /* copy string from the last byte downwards */ + add r6, r16, r17 /* last byte of destination + 1 */ + mtctr r17 +1: + lbzu r3, -1(r4) + stbu r3, -1(r6) + bdnz 1b +leaveparms: + add r7, r6, r17 /* destination + strlen */ + +#ifndef CACHE_LINE_SIZE + /* Oh well, Monitor firmware has inhibited the cache, so this + * nice routine doesn't work... + */ + /* figure out the cache line size */ + li r16, 0x80 + cmpw r5, r16 /* 'from' must be > 0x80 */ + blt panic + +1: /* store some arbitrary, nonzero stuff in 0..0x7c */ + stwu r16,-4(r16) + cmpwi r16,0 + bne 1b + dcbz 0,r16 /* zero out one cache line */ + subi r16,r16,4 +2: lwzu r0,4(r16) /* search for a non-zero word */ + cmpwi r0,0 + beq 2b + /* OK, r16 now hold the size of a cache line in bytes */ +#else + li r16,CACHE_LINE_SIZE +#endif + + lis r3,preload@h + ori r3,r3,preload@l + mr r4,r5 /* from-addr */ + li r5,_preload_size/* this is never > 16k */ + /* now move ourselves to the link address ('preload'). + * We set up the LR, so domove() 'returns' to the + * relocated copy + */ + lis r0,return_here@h + ori r0,r0,return_here@l + mtlr r0 + b domove /* move the preloader itself */ +return_here: + /* now we move the entire rest of the image */ +#ifdef ASSUME_RTEMS_INSTALLS_VECTORS + lis r3,__rtems_start@h + ori r3,r3,__rtems_start@l + lis r0,preload@h /* calculate/adjust from address */ + ori r0,r0,preload@l + sub r0,r3,r0 + add r4,r4,r0 + sub r5,r27,r3 +#else + add r3,r3,r5 /* add preloader size to destination */ + add r4,r4,r5 /* and source addresses */ + sub r5,r27,r5 /* length of the remaining rest */ +#endif + bl domove + /* OK, now everything should be in place. + * we are ready to start... + */ + /* R6: start of command line */ + /* R7: end of command line +1 */ + + /* setup initial stack for rtems early boot */ + lis r1, INITIAL_STACK + /* disable the MMU and fire up rtems */ + mfmsr r0 + ori r0,r0,MSR_IR|MSR_DR|MSR_IP + xori r0,r0,MSR_IR|MSR_DR + mtsrr1 r0 + lis r0,__rtems_entry_point@h + ori r0,r0,__rtems_entry_point@l + mtsrr0 r0 + rfi + + /* domove(to, from, nbytes): + * + * move a R5 bytes from R4 to R3 and flush + * the caches for the destination memory + * region. R16 provides the cache line size. + * DESTROYS: R0, R17, R18, CTR, CR + */ +domove: + addi r0,r5,3 /* convert to word count */ + srwi. r0,r0,2 + beq 3f /* nothing to do */ + cmpw r3,r4 /* from == to ? */ + beq 3f + mtctr r0 + la r18,-4(r4) + la r17,-4(r3) +1: lwzu r0,4(r18) + stwu r0,4(r17) + bdnz 1b /* move data */ + /* now, we must flush the destination cache region */ +#ifndef CACHE_LINE_SIZE + cmpwi r16,0 + beq 3f /* nothing to do */ +#endif +#if defined(CACHE_LINE_SIZE) && CACHE_LINE_SIZE > 0 + add r17,r3,r5 /* target end pointer */ + subi r0,r16,1 + add r17,r17,r0 + andc r17,r17,r0 /* cache aligned target end pointer */ + mr r18,r3 +2: cmpw r18,r17 + dcbst 0,r18 /* write out data cache line */ + icbi 0,r18 /* invalidate corresponding i-cache line */ + add r18,r18,r16 + blt 2b + sync /* make sure data is written back */ + isync /* invalidate possibly preloaded instructions */ +#endif +3: + blr + +#if !defined(CACHE_LINE_SIZE) +panic: + li r10,0x63 + mfmsr r0 + ori r0,r0,MSR_IP + mtmsr r0 + sc +#endif + +/* DONT PUT ANY CODE BELOW HERE */ +_preload_size = . - preload diff --git a/c/src/lib/libbsp/powerpc/mvme5500/start/start.S b/c/src/lib/libbsp/powerpc/mvme5500/start/start.S new file mode 100644 index 0000000000..e3a3588b3c --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/start/start.S @@ -0,0 +1,219 @@ +/* + * start.S : RTEMS entry point + * + * Copyright (C) 1999 Eric Valette. valette@crf.canon.fr + * + * S. Kate Feng , April 2004 + * Mapped the 2nd 256MB of RAM to support the MVME5500 boards. + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * + */ + +#include +#include +#include + +#define SYNC \ + sync; \ + isync + +#define KERNELBASE 0x0 +#define MEM256MB 0x10000000 + +#define MONITOR_ENTER \ + mfmsr r10 ; \ + ori r10,r10,MSR_IP ; \ + mtmsr r10 ; \ + li r10,0x63 ; \ + sc + + + .text + .globl __rtems_entry_point + .type __rtems_entry_point,@function +__rtems_entry_point: +#ifdef DEBUG_EARLY_START + MONITOR_ENTER +#endif + +/* + * PREP + * This is jumped to on prep systems right after the kernel is relocated + * to its proper place in memory by the boot loader. The expected layout + * of the regs is: + * r3: ptr to residual data + * r4: initrd_start or if no initrd then 0 + * r5: initrd_end - unused if r4 is 0 + * r6: Start of command line string + * r7: End of command line string + * + * The Prep boot loader insure that the MMU is currently off... + * + */ + + mr r31,r3 /* save parameters */ + mr r30,r4 + mr r29,r5 + mr r28,r6 + mr r27,r7 + /* + * Make sure we have nothing in BATS and TLB + */ + bl clear_bats + bl flush_tlbs +/* + * Use the first pair of BAT registers to map the 1st 256MB + * of RAM to KERNELBASE. + */ + lis r11,KERNELBASE@h + ori r11,r11,0x1ffe /* set up BAT0 registers for 604+ */ + li r8,2 /* R/W access */ + isync + mtspr DBAT0L,r8 /* N.B. 6xx (not 601) have valid */ + mtspr DBAT0U,r11 /* bit in upper BAT register */ + mtspr IBAT0L,r8 + mtspr IBAT0U,r11 + isync +/* + * Use the 2nd pair of BAT registers to map the 2nd 256MB + * of RAM to 0x10000000. + */ + lis r11,MEM256MB@h + ori r11,r11,0x1ffe /* set up BAT1 registers for 604+ */ + lis r8,MEM256MB@h + ori r8,r8,2 + isync + mtspr DBAT1L,r8 /* N.B. 6xx (not 601) have valid */ + mtspr DBAT1U,r11 /* bit in upper BAT register */ + mtspr IBAT1L,r8 + mtspr IBAT1U,r11 + isync + +/* + * we now have the two 256M of ram mapped with the bats. We are still + * running on the bootloader stack and cannot switch to an RTEMS allocated + * init stack before copying the residual data that may have been set just + * after rtems_end address. This bug has been experienced on MVME2304. Thank + * to Till Straumann for hunting it and + * suggesting the appropriate code. + */ + +enter_C_code: + bl MMUon + bl __eabi /* setup EABI and SYSV environment */ + bl zero_bss + /* + * restore prep boot params + */ + mr r3,r31 + mr r4,r30 + mr r5,r29 + mr r6,r28 + mr r7,r27 + bl save_boot_params + /* + * stack = &__rtems_end + 4096 + */ + addis r9,r0, __rtems_end+(4096-CPU_MINIMUM_STACK_FRAME_SIZE)@ha + addi r9,r9, __rtems_end+(4096-CPU_MINIMUM_STACK_FRAME_SIZE)@l + mr r1, r9 + /* + * We are know in a environment that is totally independent from bootloader setup. + */ + lis r5,environ@ha + la r5,environ@l(r5) /* environp */ + li r4, 0 /* argv */ + li r3, 0 /* argc */ + bl boot_card + bl _return_to_ppcbug + + .globl MMUon + .type MMUon,@function +MMUon: + mfmsr r0 +#if (PPC_HAS_FPU == 0) + ori r0,r0, MSR_IP | MSR_RI | MSR_IR | MSR_DR | MSR_EE | MSR_FE0 | MSR_FE1 | MSR_FP + xori r0, r0, MSR_EE | MSR_IP | MSR_FP +#else + ori r0,r0, MSR_IP | MSR_RI | MSR_IR | MSR_DR | MSR_EE | MSR_FE0 | MSR_FE1 | MSR_FP + xori r0, r0, MSR_EE | MSR_IP | MSR_FE0 | MSR_FE1 +#endif + mflr r11 + mtsrr0 r11 + mtsrr1 r0 + SYNC + rfi + + .globl MMUoff + .type MMUoff,@function +MMUoff: + mfmsr r0 + ori r0,r0,MSR_IR| MSR_DR | MSR_IP + mflr r11 + xori r0,r0,MSR_IR|MSR_DR + mtsrr0 r11 + mtsrr1 r0 + SYNC + rfi + + .globl _return_to_ppcbug + .type _return_to_ppcbug,@function + + +_return_to_ppcbug: + mflr r30 + bl MMUoff + MONITOR_ENTER + bl MMUon + mtctr r30 + bctr + +/* + * An undocumented "feature" of 604e requires that the v bit + * be cleared before changing BAT values. + * + * Also, newer IBM firmware does not clear bat3 and 4 so + * this makes sure it's done. + * -- Cort + */ +clear_bats: + li r20,0 + mfspr r9,PVR + rlwinm r9,r9,16,16,31 /* r9 = 1 for 601, 4 for 604 */ + cmpwi r9, 1 + SYNC + beq 1f + mtspr DBAT0U,r20 + mtspr DBAT0L,r20 + mtspr DBAT1U,r20 + mtspr DBAT1L,r20 + mtspr DBAT2U,r20 + mtspr DBAT2L,r20 + mtspr DBAT3U,r20 + mtspr DBAT3L,r20 +1: + mtspr IBAT0U,r20 + mtspr IBAT0L,r20 + mtspr IBAT1U,r20 + mtspr IBAT1L,r20 + mtspr IBAT2U,r20 + mtspr IBAT2L,r20 + mtspr IBAT3U,r20 + mtspr IBAT3L,r20 + SYNC + blr + +flush_tlbs: + lis r20, 0x1000 +1: addic. r20, r20, -0x1000 + tlbie r20 + bgt 1b + sync + blr + + + .comm environ,4,4 diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/Makefile.am b/c/src/lib/libbsp/powerpc/mvme5500/startup/Makefile.am new file mode 100644 index 0000000000..e09bba1133 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/Makefile.am @@ -0,0 +1,37 @@ +## +## $Id$ +## + +VPATH = @srcdir@:@srcdir@/../../shared/startup:@srcdir@/../../../shared + +INCLUDES = -I @srcdir@/../GT64260 + +C_FILES = bootcard.c main.c bspstart.c bspclean.c bsppost.c bsplibc.c \ + sbrk.c gnatinstallhandler.c builddate.c pgtbl_setup.c \ + pgtbl_activate.c reboot.c + +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) + +builddate.c:: + echo 'char *BSP_build_date="'`date +%Y%m%d%Z%T`'";' > builddate.c + +OBJS = $(C_O_FILES) + +include $(top_srcdir)/../../../../../../automake/compile.am +include $(top_srcdir)/../../../../../../automake/lib.am + +# +# (OPTIONAL) Add local stuff here using += +# +bsplib_DATA = linkcmds + +$(PROJECT_RELEASE)/lib/linkcmds: linkcmds + $(INSTALL_DATA) $< $@ + +TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/linkcmds + +all-local: $(ARCH) $(OBJS) $(TMPINSTALL_FILES) + +EXTRA_DIST = linkcmds bspstart.c bspclean.c bootpstuff.c reboot.c + +include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/Makefile.in b/c/src/lib/libbsp/powerpc/mvme5500/startup/Makefile.in new file mode 100644 index 0000000000..497d9bb787 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/Makefile.in @@ -0,0 +1,538 @@ +# Makefile.in generated by automake 1.7.2 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ + +VPATH = @srcdir@:@srcdir@/../../shared/startup:@srcdir@/../../../shared +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ + +AR = @AR@ + +# OBSOLETE: Don't use +AS = $(CC) +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BARE_CPU_CFLAGS = @BARE_CPU_CFLAGS@ +BARE_CPU_MODEL = @BARE_CPU_MODEL@ + +CC = @CC@ $(GCCSPECS) + +CCAS = $(CC) +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @RTEMS_CFLAGS@ $(XCFLAGS) +CFLAGS_DEBUG_V = @CFLAGS_DEBUG_V@ +CFLAGS_OPTIMIZE_V = @CFLAGS_OPTIMIZE_V@ +CFLAGS_PROFILE_V = @CFLAGS_PROFILE_V@ +CPP = @CPP@ $(GCCSPECS) + +CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES) $(XCPPFLAGS) + +CPU_CFLAGS = @CPU_CFLAGS@ +CYGPATH_W = @CYGPATH_W@ + +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ENDIF = @ENDIF@ +EXEEXT = @EXEEXT@ +GCC_SPECS = @GCC_SPECS@ +HAS_MP = @HAS_MP@ +HAS_NETWORKING = @HAS_NETWORKING@ +HAS_NETWORKING_FALSE = @HAS_NETWORKING_FALSE@ +HAS_NETWORKING_TRUE = @HAS_NETWORKING_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKE = @MAKE@ +MAKEINFO = @MAKEINFO@ +MULTILIB_FALSE = @MULTILIB_FALSE@ +MULTILIB_TRUE = @MULTILIB_TRUE@ +NM = @NM@ +OBJCOPY = @OBJCOPY@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKHEX = @PACKHEX@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PROJECT_INCLUDE = @PROJECT_INCLUDE@ +PROJECT_RELEASE = @PROJECT_RELEASE@ +PROJECT_ROOT = @PROJECT_ROOT@ +PROJECT_TOPdir = @PROJECT_TOPdir@ +RANLIB = @RANLIB@ +RTEMS_BSP = @RTEMS_BSP@ +RTEMS_BSP_FAMILY = @RTEMS_BSP_FAMILY@ +RTEMS_BSP_SPECS = @RTEMS_BSP_SPECS@ +RTEMS_CFLAGS = @RTEMS_CFLAGS@ +RTEMS_CPPFLAGS = @RTEMS_CPPFLAGS@ +RTEMS_CPU = @RTEMS_CPU@ +RTEMS_CPU_MODEL = @RTEMS_CPU_MODEL@ +RTEMS_HAS_NETWORKING = @RTEMS_HAS_NETWORKING@ +RTEMS_HOST = @RTEMS_HOST@ +RTEMS_ROOT = @RTEMS_ROOT@ +RTEMS_TOPdir = @RTEMS_TOPdir@ +RTEMS_USE_GCC_FALSE = @RTEMS_USE_GCC_FALSE@ +RTEMS_USE_GCC_TRUE = @RTEMS_USE_GCC_TRUE@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIZE = @SIZE@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__include = @am__include@ +am__quote = @am__quote@ +bindir = @bindir@ +bsplibdir = @bsplibdir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exceptions = @exceptions@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ + +INCLUDES = -I @srcdir@/../GT64260 + +C_FILES = bootcard.c main.c bspstart.c bspclean.c bsppost.c bsplibc.c \ + sbrk.c gnatinstallhandler.c builddate.c pgtbl_setup.c \ + pgtbl_activate.c reboot.c + + +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) + +OBJS = $(C_O_FILES) + +@RTEMS_USE_GCC_TRUE@GCCSPECS = $(GCC_SPECS) $(RTEMS_BSP_SPECS) +# CXXFLAGS = @RTEMS_CXXFLAGS@ $(XCXXFLAGS) +CXXFLAGS = @RTEMS_CFLAGS@ $(XCXXFLAGS) +ASFLAGS = $(CPU_ASFLAGS) $(CPU_CFLAGS) $(XASFLAGS) + +LINK_LIBS = $(LD_LIBS) + + +# +# Client compiler and support tools +# + +# +# How to compile stuff into ${ARCH} subdirectory +# +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + + +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + +CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) +ASCOMPILE = $(AS) $(AM_ASFLAGS) $(ASFLAGS) + + +# Dependency files for use by gmake +# NOTE: we don't put them into $(ARCH) +# so that 'make clean' doesn't blow it away +DEPEND = Depends-${ARCH} + + +# spell out all the LINK_FILE's, rather than using -lbsp, so +# that $(LINK_FILES) can be a dependency +LINK_OBJS = \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +LINK_FILES = \ + $(START_FILE) \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +VARIANT = OPTIMIZE + +VARIANT_OPTIMIZE_V = OPTIMIZE +VARIANT_DEBUG_V = DEBUG +VARIANT_PROFILE_V = PROFILE +VARIANT_optimize_V = OPTIMIZE +VARIANT_debug_V = DEBUG +VARIANT_profile_V = PROFILE + +VARIANT_V = $(VARIANT_$(VARIANT)_V) + +ARCH_OPTIMIZE_V = o-optimize +ARCH_DEBUG_V = o-debug +ARCH_PROFILE_V = o-profile + +ARCH__V = $(ARCH_OPTIMIZE_V) +ARCH = $(ARCH_$(VARIANT_V)_V) + +LIBSUFFIX_OPTIMIZE_V = +LIBSUFFIX_DEBUG_V = _g +LIBSUFFIX_PROFILE_V = _p +LIBSUFFIX__V = $(LIBSUFFIX_OPTIMIZE_V) + +LIB_VARIANT = $(LIBSUFFIX_$(VARIANT_V)_V) +CFLAGS__V = $(CFLAGS_OPTIMIZE_V) + +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_OPTIMIZE_V = +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_DEBUG_V = -qrtems_debug -Wno-unused +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_PROFILE_V = -pg + +RTEMS_CFLAGS__V = $(RTEMS_CFLAGS_OPTIMIZE_V) +CXX = @CXX@ $(GCCSPECS) + +AM_CPPFLAGS = $(RTEMS_CPPFLAGS) +AM_CFLAGS = +AM_CXXFLAGS = +AM_CCASFLAGS = $(CPU_CFLAGS) $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS) + +ARFLAGS = ruv + +TMPINSTALL_FILES = $(PROJECT_RELEASE)/lib $(PROJECT_RELEASE)/lib/linkcmds + +# +# (OPTIONAL) Add local stuff here using += +# +bsplib_DATA = linkcmds + +EXTRA_DIST = linkcmds bspstart.c bspclean.c bootpstuff.c reboot.c + +PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools +subdir = startup +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/bspopts.tmp +CONFIG_CLEAN_FILES = +DIST_SOURCES = +DATA = $(bsplib_DATA) + +DIST_COMMON = $(top_srcdir)/../../../../../../automake/compile.am \ + $(top_srcdir)/../../../../../../automake/lib.am \ + $(top_srcdir)/../../../../../../automake/local.am Makefile.am \ + Makefile.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/../../../../../../automake/compile.am $(top_srcdir)/../../../../../../automake/lib.am $(top_srcdir)/../../../../../../automake/local.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign startup/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +uninstall-info-am: +bsplibDATA_INSTALL = $(INSTALL_DATA) +install-bsplibDATA: $(bsplib_DATA) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(bsplibdir) + @list='$(bsplib_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(bsplibDATA_INSTALL) $$d$$p $(DESTDIR)$(bsplibdir)/$$f"; \ + $(bsplibDATA_INSTALL) $$d$$p $(DESTDIR)$(bsplibdir)/$$f; \ + done + +uninstall-bsplibDATA: + @$(NORMAL_UNINSTALL) + @list='$(bsplib_DATA)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(bsplibdir)/$$f"; \ + rm -f $(DESTDIR)$(bsplibdir)/$$f; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + $(mkinstalldirs) $(distdir)/../../../../../../../automake + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) all-local + +installdirs: + $(mkinstalldirs) $(DESTDIR)$(bsplibdir) + +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-local mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: install-bsplibDATA + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-bsplibDATA uninstall-info-am + +.PHONY: all all-am all-local check check-am clean clean-generic \ + clean-local distclean distclean-generic distdir dvi dvi-am info \ + info-am install install-am install-bsplibDATA install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am uninstall uninstall-am uninstall-bsplibDATA \ + uninstall-info-am + + +builddate.c:: + echo 'char *BSP_build_date="'`date +%Y%m%d%Z%T`'";' > builddate.c +@RTEMS_USE_GCC_FALSE@include $(CONFIG.CC) + +${ARCH}/%.o: %.c + ${COMPILE} -o $@ -c $< + +${ARCH}/%.o: %.cc + ${CXXCOMPILE} -o $@ -c $< + +${ARCH}/%.o: %.S + ${CCASCOMPILE} -DASM -o $@ -c $< + +# We deliberately don't have anything depend on the +# $(DEPEND) file; otherwise it will get rebuilt even +# on 'make clean' +# + +@RTEMS_USE_GCC_TRUE@depend-gcc: $(C_FILES) $(CC_FILES) $(S_FILES) +@RTEMS_USE_GCC_TRUE@ $(COMPILE) -M $^ | \ +@RTEMS_USE_GCC_TRUE@ sed -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \ +@RTEMS_USE_GCC_TRUE@ -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp +@RTEMS_USE_GCC_TRUE@ mv $(DEPEND).tmp $(DEPEND) + +# pull in dependencies if they exist +@RTEMS_USE_GCC_TRUE@ifeq (${DEPEND},$(wildcard ${DEPEND})) +@RTEMS_USE_GCC_TRUE@include ${DEPEND} +@RTEMS_USE_GCC_TRUE@@ENDIF@ +depend: depend-am + +@RTEMS_USE_GCC_TRUE@define make-rel +@RTEMS_USE_GCC_TRUE@ $(LINK) -qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) $^ +@RTEMS_USE_GCC_TRUE@endef +@RTEMS_USE_GCC_FALSE@define make-rel +@RTEMS_USE_GCC_FALSE@ $(LINK) $(XLDFLAGS) $^ +@RTEMS_USE_GCC_FALSE@endef + +${ARCH}: + mkdir ${ARCH} + +clean-local: + $(RM) -r o-optimize o-debug o-profile $(CLEANDIRS) + $(RM) Depends-o-optimize.tmp Depends-o-debug.tmp Depends-o-profile.tmp + +define make-library +test -d $(ARCH) || mkdir $(ARCH) +$(RM) $@ +$(AR) $(ARFLAGS) $@ $^ +$(RANLIB) $@ +endef + +$(PROJECT_RELEASE)/lib: + @$(mkinstalldirs) $@ + +.PRECIOUS: $(LIB) + +$(PROJECT_RELEASE)/lib/linkcmds: linkcmds + $(INSTALL_DATA) $< $@ + +all-local: $(ARCH) $(OBJS) $(TMPINSTALL_FILES) + +debug: + @echo + @echo "\"make debug\" is obsolete, instead use:" + @echo " make VARIANT=DEBUG" + @echo + +.PHONY: debug + +profile: + @echo + @echo "\"make profile\" is obsolete, instead use:" + @echo " make VARIANT=PROFILE" + @echo + +.PHONY: profile + +preinstall-am: $(PREINSTALL_FILES) +preinstall: preinstall-am +.PHONY: preinstall preinstall-am + +depend-am: depend-gcc +depend: depend-am +.PHONY: depend depend-am depend-gcc +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/bootpstuff.c b/c/src/lib/libbsp/powerpc/mvme5500/startup/bootpstuff.c new file mode 100644 index 0000000000..fdc94b851f --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/bootpstuff.c @@ -0,0 +1,71 @@ + +#define FLAG_MAND 1 +#define FLAG_NOUSE 2 /* dont put into the commandline at all */ +#define FLAG_CLRBP 4 /* field needs to be cleared for bootp */ + +typedef struct ParmRec_ { + char *name; + char **pval; + int flags; +} ParmRec, *Parm; + + +static char *boot_filename=0; +static char *boot_srvname=0; +static char *boot_use_bootp=0; +static char *boot_my_ip=0; +static char *boot_my_netmask=0; + +#define boot_cmdline BSP_commandline_string + +static ParmRec parmList[]={ + { "BP_FILE=", &boot_filename, + FLAG_MAND, + }, + { "BP_PARM=", &boot_cmdline, + 0, + }, + { "BP_SRVR=", &boot_srvname, + FLAG_MAND, + }, + { "BP_GTWY=", &net_config.gateway, + FLAG_CLRBP, + }, + { "BP_MYIP=", &boot_my_ip, + FLAG_MAND | FLAG_CLRBP, + }, + { "BP_MYMK=", &boot_my_netmask, + FLAG_MAND | FLAG_CLRBP, + }, + { "BP_MYNM=", &net_config.hostname, + FLAG_CLRBP, + }, + { "BP_MYDN=", &net_config.domainname, + FLAG_CLRBP, + }, + { "BP_LOGH=", &net_config.log_host, + FLAG_CLRBP, + }, + { "BP_DNS1=", &net_config.name_server[0], + FLAG_CLRBP, + }, + { "BP_DNS2=", &net_config.name_server[1], + FLAG_CLRBP, + }, + { "BP_DNS3=", &net_config.name_server[2], + FLAG_CLRBP, + }, + { "BP_NTP1=", &net_config.ntp_server[0], + FLAG_CLRBP, + }, + { "BP_NTP2=", &net_config.ntp_server[1], + FLAG_CLRBP, + }, + { "BP_NTP3=", &net_config.ntp_server[2], + FLAG_CLRBP, + }, + { "BP_ENBL=", &boot_use_bootp, + 0, + }, + { 0, } +}; diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspclean.c b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspclean.c new file mode 100644 index 0000000000..d8746b51bf --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspclean.c @@ -0,0 +1,18 @@ +#include +#include +#include + +#define AUTO_BOOT 0 + +void bsp_cleanup(void) +{ +#if AUTO_BOOT + void rtemsReboot(); + + rtemsReboot(); +#else + printk("\Printing a stack trace for your convenience :-)\n"); + CPU_print_stack(); + printk("RTEMS terminated; Boot manually or turn on AUTO_BOOT.\n"); +#endif +} diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c new file mode 100644 index 0000000000..6e74233acd --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c @@ -0,0 +1,625 @@ +/* + * This routine starts the application. It includes application, + * board, and monitor specific initialization and configuration. + * The generic CPU dependent initialization has been performed + * before this routine is invoked. + * + * COPYRIGHT (c) 1989-1998. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * Modified to support the MCP750. + * Modifications Copyright (C) 1999 Eric Valette. valette@crf.canon.fr + * + * Modified to support the Synergy VGM & Motorola PowerPC boards. + * Many thanks to Till Straumann for providing assistance to port the + * BSP_pgtbl_xxx(). + * (C) by Till Straumann, , 2002, 2004 + * + * Modified to support the MVME5500 board + * (C) by S. Kate Feng , 2003, 2004 + * + */ +#include +#include +#include + +#include +#include +#include +/*#include */ +#include /* registers.h is included here */ +#include +#include +#include +#include +#include +#include +#include +#include + +/* for RTEMS_VERSION :-( I dont like the preassembled string */ +#include + +#ifdef __RTEMS_APPLICATION__ +#undef __RTEMS_APPLICATION__ +#endif + +/* +#define SHOW_MORE_INIT_SETTINGS +#define SHOW_LCR1_REGISTER +#define SHOW_LCR2_REGISTER +#define SHOW_LCR3_REGISTER +#define CONF_VPD +*/ + +/* there is no public Workspace_Free() variant :-( */ +#include + +rtems_unsigned32 +_bsp_sbrk_init(rtems_unsigned32 heap_start, rtems_unsigned32 *heap_size_p); + +/* provide access to the command line parameters */ +char *BSP_commandline_string = 0; + +BSP_output_char_function_type BSP_output_char = BSP_output_char_via_serial; + +extern char *BSP_build_date; +extern void _return_to_ppcbug(); +extern unsigned long __rtems_end[]; +extern void L1_caches_enables(); +extern unsigned get_L1CR(), get_L2CR(), get_L3CR(); +extern unsigned set_L2CR(unsigned); +extern void bsp_cleanup(void); +extern Triv121PgTbl BSP_pgtbl_setup(); +extern void BSP_pgtbl_activate(); +extern int I2Cread_eeprom(); +extern void BSP_vme_config(void); + +SPR_RW(SPRG0) +SPR_RW(SPRG1) + +typedef struct CmdLineRec_ { + unsigned long size; + char buf[0]; +} CmdLineRec, *CmdLine; + + +#define mtspr(reg, val) \ + __asm __volatile("mtspr %0,%1" : : "K"(reg), "r"(val)) + + +#define mfspr(reg) \ + ( { unsigned val; \ + __asm __volatile("mfspr %0,%1" : "=r"(val) : "K"(reg)); \ + val; } ) + +/* + * Copy Additional boot param passed by boot loader + */ +#define MAX_LOADER_ADD_PARM 80 +char loaderParam[MAX_LOADER_ADD_PARM]; + +/* + * Total memory using RESIDUAL DATA + */ +unsigned int BSP_mem_size; +/* + * PCI Bus Frequency + */ +unsigned int BSP_bus_frequency; +/* + * processor clock frequency + */ +unsigned int BSP_processor_frequency; +/* + * Time base divisior (how many tick for 1 second). + */ +unsigned int BSP_time_base_divisor; +unsigned char ConfVPD_buff[200]; + +/* + * system init stack and soft ir stack size + */ +#define INIT_STACK_SIZE 0x1000 +#define INTR_STACK_SIZE CONFIGURE_INTERRUPT_STACK_MEMORY + +/* calculate the heap start */ +static unsigned long +heapStart(void) +{ +unsigned long rval; + rval = ((rtems_unsigned32) __rtems_end) +INIT_STACK_SIZE + INTR_STACK_SIZE; + if (rval & (CPU_ALIGNMENT-1)) + rval = (rval + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1); + return rval; +} + +void BSP_panic(char *s) +{ + printk("%s PANIC %s\n",_RTEMS_version, s); + __asm__ __volatile ("sc"); +} + +void _BSP_Fatal_error(unsigned int v) +{ + printk("%s PANIC ERROR %x\n",_RTEMS_version, v); + __asm__ __volatile ("sc"); +} + +/* + * The original table from the application and our copy of it with + * some changes. + */ + +extern rtems_configuration_table Configuration; + +rtems_configuration_table BSP_Configuration; + +rtems_cpu_table Cpu_table; + +char *rtems_progname; + +/* + * Use the shared implementations of the following routines + */ + +extern void bsp_postdriver_hook(void); /* see c/src/lib/libbsp/shared/bsppost.c */ + +extern void bsp_libc_init( void *, unsigned32, int ); + +/* + * Function: bsp_pretasking_hook + * Created: 95/03/10 + * + * Description: + * BSP pretasking hook. Called just before drivers are initialized. + * Used to setup libc and install any BSP extensions. + * + * NOTES: + * Must not use libc (to do io) from here, since drivers are + * not yet initialized. + * + */ + +void bsp_pretasking_hook(void) +{ + rtems_unsigned32 heap_start=heapStart(); + rtems_unsigned32 heap_size,heap_sbrk_spared; + char *buf; + extern rtems_unsigned32 _bsp_sbrk_init(rtems_unsigned32, rtems_unsigned32*); + + heap_size = (BSP_mem_size - heap_start) - BSP_Configuration.work_space_size; + + heap_sbrk_spared=_bsp_sbrk_init(heap_start, &heap_size); + +#ifdef SHOW_MORE_INIT_SETTINGS + printk(" HEAP start %x size %x (%x bytes spared for sbrk)\n", heap_start, heap_size, heap_sbrk_spared); +#endif + + bsp_libc_init((void *) 0, heap_size, heap_sbrk_spared); + +#ifdef RTEMS_DEBUG + rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); +#endif +} + +void zero_bss() +{ + /* prevent these from being accessed in the short data areas */ + extern unsigned long __bss_start[], __sbss_start[], __sbss_end[]; + extern unsigned long __sbss2_start[], __sbss2_end[]; + memset(__sbss_start, 0, ((unsigned) __sbss_end) - ((unsigned)__sbss_start)); + memset(__sbss2_start, 0, ((unsigned) __sbss2_end) - ((unsigned)__sbss2_start)); + memset(__bss_start, 0, ((unsigned) __rtems_end) - ((unsigned)__bss_start)); +} + +/* NOTE: we cannot simply malloc the commandline string; + * save_boot_params() is called during a very early stage when + * libc/malloc etc. are not yet initialized! + * + * Here's what we do: + * + * initial layout setup by the loader (preload.S): + * + * 0..RTEMS...__rtems_end | cmdline ....... TOP + * + * After the save_boot_params() routine returns, the stack area will be + * set up (start.S): + * + * 0..RTEMS..__rtems_end | INIT_STACK | IRQ_STACK | ..... TOP + * + * initialize_executive_early() [called from boot_card()] + * will initialize the workspace: + * + * 0..RTEMS..__rtems_end | INIT_STACK | IRQ_STACK | ...... | workspace | TOP + * + * and later calls our pretasking_hook() which ends up initializing + * libc which in turn initializes the heap + * + * 0..RTEMS..__rtems_end | INIT_STACK | IRQ_STACK | heap | workspace | TOP + * + * The idea here is to first move the commandline to the future 'heap' area + * from where it will be picked up by our pretasking_hook(). + * pretasking_hook() then moves it either to INIT_STACK or the workspace + * area using proper allocation, initializes libc and finally moves + * the data to the environment / malloced areas... + */ + +/* this routine is called early at shared/start/start.S + * and must be safe with a not properly aligned stack + */ +void +save_boot_params(void *r3, void *r4, void* r5, char *cmdline_start, char *cmdline_end) +{ +int i=cmdline_end-cmdline_start; +CmdLine future_heap=(CmdLine)heapStart(); + + /* get the string out of the stack area into the future heap region; + * assume there's enough memory... + */ + memmove(future_heap->buf,cmdline_start,i); + /* make sure there's an end of string marker */ + future_heap->buf[i++]=0; + future_heap->size=i; +} + + +/* Configure and enable the L3CR */ +void config_enable_L3CR(unsigned l3cr) +{ + unsigned x; + + /* By The Book (numbered steps from section 3.7.3.1 of MPC7450UM) */ + /* + * 1: Set all L3CR bits for final config except L3E, L3I, L3PE, and + * L3CLKEN. (also mask off reserved bits in case they were included + * in L3CR_CONFIG) + */ + l3cr &= ~(L3CR_L3E|L3CR_L3I|L3CR_LOCK_745x|L3CR_L3PE|L3CR_L3CLKEN|L3CR_RESERVED); + mtspr(L3CR, l3cr); + + /* 2: Set L3CR[5] (otherwise reserved bit) to 1 */ + l3cr |= 0x04000000; + mtspr(L3CR, l3cr); + + /* 3: Set L3CLKEN to 1*/ + l3cr |= L3CR_L3CLKEN; + mtspr(L3CR, l3cr); + + /* 4/5: Perform a global cache invalidate (ref section 3.7.3.6) */ + __asm __volatile("dssall;sync"); + /* L3 cache is already disabled, no need to clear L3E */ + mtspr(L3CR, l3cr|L3CR_L3I); + + do { + x = mfspr(L3CR); + } while (x & L3CR_L3I); + + /* 6: Clear L3CLKEN to 0 */ + l3cr &= ~L3CR_L3CLKEN; + mtspr(L3CR, l3cr); + + /* 7: Perform a 'sync' and wait at least 100 CPU cycles */ + __asm __volatile("sync"); + rtems_bsp_delay_in_bus_cycles(100); + + /* 8: Set L3E and L3CLKEN */ + l3cr |= (L3CR_L3E|L3CR_L3CLKEN); + mtspr(L3CR, l3cr); + + /* 9: Perform a 'sync' and wait at least 100 CPU cycles */ + __asm __volatile("sync"); + + rtems_bsp_delay_in_bus_cycles(100); +} + +/* + * bsp_start + * + * This routine does the bulk of the system initialization. + */ + +void bsp_start( void ) +{ + int i; + unsigned char *stack; + unsigned long *r1sp; + unsigned l1cr, l2cr, l3cr; + register unsigned char* intrStack; + register unsigned int intrNestingLevel = 0; + unsigned char *work_space_start; + ppc_cpu_id_t myCpu; + ppc_cpu_revision_t myCpuRevision; + Triv121PgTbl pt=0; + /* + * Get CPU identification dynamically. Note that the get_ppc_cpu_type() function + * store the result in global variables so that it can be used latter... + */ + myCpu = get_ppc_cpu_type(); + myCpuRevision = get_ppc_cpu_revision(); + + /* + * enables L1 Cache. Note that the L1_caches_enables() codes checks for + * relevant CPU type so that the reason why there is no use of myCpu... + * + * MOTLoad default is good. Otherwise, one would have to disable L2, L3 + * first before settting L1. Then L1->L2->L3. + * + L1_caches_enables();*/ + +#ifdef SHOW_LCR1_REGISTER + l1cr = get_L1CR(); + printk("Initial L1CR value = %x\n", l1cr); +#endif + + /* + * the initial stack has aready been set to this value in start.S + * so there is no need to set it in r1 again... It is just for info + * so that it can be printed without accessing R1. + */ + stack = ((unsigned char*) __rtems_end) + INIT_STACK_SIZE - CPU_MINIMUM_STACK_FRAME_SIZE; + + /* tag the bottom (T. Straumann 6/36/2001 ) */ + *((unsigned32 *)stack) = 0; + + /* fill stack with pattern for debugging */ + __asm__ __volatile__("mr %0, %%r1":"=r"(r1sp)); + while (--r1sp >= (unsigned long*)__rtems_end) + *r1sp=0xeeeeeeee; + + /* + * Initialize the interrupt related settings + * SPRG0 = interrupt nesting level count + * SPRG1 = software managed IRQ stack + * + * This could be done latter (e.g in IRQ_INIT) but it helps to understand + * some settings below... + */ + intrStack = ((unsigned char*) __rtems_end) + INIT_STACK_SIZE + INTR_STACK_SIZE - CPU_MINIMUM_STACK_FRAME_SIZE; + + /* make sure it's properly aligned */ + (unsigned32)intrStack &= ~(CPU_STACK_ALIGNMENT-1); + + /* tag the bottom (T. Straumann 6/36/2001 ) */ + *((unsigned32 *)intrStack) = 0; + + _write_SPRG1((unsigned int)intrStack); + _write_SPRG0(PPC_BSP_HAS_FIXED_PR288); + + /* + * Initialize default raw exception hanlders. See vectors/vectors_init.c + */ + initialize_exceptions(); + /* + * Init MMU block address translation to enable hardware + * access + * More PCI1 memory mapping to be done after BSP_pgtbl_activate. + */ + /* + * PCI 0 domain memory space, want to leave room for the VME window + */ + setdbat(2, PCI0_MEM_BASE, PCI0_MEM_BASE, 0x10000000, IO_PAGE); + + /* map the PCI 0, 1 Domain I/O space, GT64260B registers + * and the reserved area so that the size is the power of 2. + */ + setdbat(3,PCI0_IO_BASE, PCI0_IO_BASE, 0x2000000, IO_PAGE); + + printk("-----------------------------------------\n"); + printk("Welcome to %s on MVME5500-0163\n", _RTEMS_version ); + printk("Build Date: %s\n",BSP_build_date); + printk("-----------------------------------------\n"); + +#ifdef TEST_RETURN_TO_PPCBUG + printk("Hit to return to PPCBUG monitor\n"); + printk("When Finished hit GO. It should print \n"); + debug_getc(); + _return_to_ppcbug(); + printk("Back from monitor\n"); + _return_to_ppcbug(); +#endif /* TEST_RETURN_TO_PPCBUG */ + +#ifdef TEST_RAW_EXCEPTION_CODE + printk("Testing exception handling Part 1\n"); + /* + * Cause a software exception + */ + __asm__ __volatile ("sc"); + /* + * Check we can still catch exceptions and returned coorectly. + */ + printk("Testing exception handling Part 2\n"); + __asm__ __volatile ("sc"); +#endif + + BSP_mem_size = _512M; + /* TODO: calculate the BSP_bus_frequency using the REF_CLK bit of System Status register */ + /* rtems_bsp_delay_in_bus_cycles are defined in registers.h */ + BSP_bus_frequency = 133333333; + BSP_processor_frequency = 1000000000; + BSP_time_base_divisor = 4000;/* P94 : 7455 clocks the TB/DECR at 1/4 of the system bus clock frequency */ + + + /* Maybe not setup yet becuase of the warning message */ + /* Allocate and set up the page table mappings + * This is only available on >604 CPUs. + * + * NOTE: This setup routine may modify the available memory + * size. It is essential to call it before + * calculating the workspace etc. + */ + pt = BSP_pgtbl_setup(&BSP_mem_size); + if (!pt) + printk("WARNING: unable to setup page tables.\n"); + + printk("Now BSP_mem_size = 0x%x\n",BSP_mem_size); + + /* + * Set up our hooks + * Make sure libc_init is done before drivers initialized so that + * they can use atexit() + */ + + Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */ + Cpu_table.postdriver_hook = bsp_postdriver_hook; + Cpu_table.do_zero_of_workspace = TRUE; + Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY; + /* P94 : 7455 TB/DECR is clocked by the system bus clock frequency */ + Cpu_table.clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000); + Cpu_table.exceptions_in_RAM = TRUE; + _CPU_Table = Cpu_table;/* for rtems_bsp_delay() */ + + printk("BSP_Configuration.work_space_size = %x\n", BSP_Configuration.work_space_size); + work_space_start = + (unsigned char *)BSP_mem_size - BSP_Configuration.work_space_size; + + if ( work_space_start <= ((unsigned char *)__rtems_end) + INIT_STACK_SIZE + INTR_STACK_SIZE) { + printk( "bspstart: Not enough RAM!!!\n" ); + bsp_cleanup(); + } + + BSP_Configuration.work_space_start = work_space_start; + + /* + * Initalize RTEMS IRQ system + */ + BSP_rtems_irq_mng_init(0); + + /* + * Enable L2 Cache. Note that the set_L2CR(L2CR) codes checks for + * relevant CPU type (mpc750)... + * + * It also takes care of flushing the cache under certain conditions: + * current going to (E==enable, I==invalidate) + * E E | I -> __NOT_FLUSHED_, invalidated, stays E + * E I -> flush & disable, invalidate + * E E -> nothing, stays E + * 0 E | I -> not flushed, invalidated, enabled + * 0 | I -> not flushed, invalidated, stays off + * 0 E -> not flushed, _NO_INVALIDATE, enabled + * + * The first and the last combinations are potentially dangerous! + * + * NOTE: we assume the essential cache parameters (speed, size etc.) + * have been set correctly by the firmware! + * + */ +#ifdef SHOW_LCR2_REGISTER + l2cr = get_L2CR(); + printk("Initial L2CR value = %x\n", l2cr); +#endif +#if 0 + /* Again, MOTload setup seems to be fine. Otherwise, one would + * have to disable the L3 cahce, then R2 ->R3 + */ + if ( -1 != (int)l2cr ) { + /* -1 would mean that this machine doesn't support L2 */ + + l2cr &= ~( L2CR_LOCK_745x); /* clear 'data only' and 'instruction only' */ + l2cr |= L2CR_L3OH0; /* L3 output hold 0 should be set */ + if ( ! (l2cr & L2CR_L2E) ) { + /* we are going to enable the L2 - hence we + * MUST invalidate it first; however, if + * it was enabled already, we MUST NOT + * invalidate it!! + */ + l2cr |= L2CR_L2E | L2CR_L2I; + l2cr=set_L2CR(l2cr); + } + l2cr=set_L2CR(l2cr); + } +#endif + +#ifdef SHOW_LCR3_REGISTER + /* L3CR needs DEC int. handler installed for bsp_delay()*/ + l3cr = get_L3CR(); + printk("Initial L3CR value = %x\n", l3cr); +#endif + +#if 0 + /* Again, use the MOTLoad default for L3CR again */ + if ( -1 != (int)l3cr ) { + /* -1 would mean that this machine doesn't support L3 */ + /* BSD : %2 , SDRAM late wirte + l3cr |= L3SIZ_2M|L3CLK_20|L3RT_PIPELINE_LATE; */ + /* MOTLOad :0xDF826000-> %5, 4 clocks sample point,3 p-clocks SP */ + l3cr |= L3CR_L3PE| L3SIZ_2M|L3CLK_50|L3CKSP_4|L3PSP_3; + + /* TOCHECK MOTload had L2 cache enabled, try to set nothing first */ + if ( !(l3cr & L3CR_L3E)) { + l3cr |= L3CR_L3E | L3CR_L3I; + config_enable_L3CR(l3cr); + } + } +#endif + + /* Activate the page table mappings only after + * initializing interrupts because the irq_mng_init() + * routine needs to modify the text + */ + if (pt) { +#ifdef SHOW_MORE_INIT_SETTINGS + printk("Page table setup finished; will activate it NOW...\n"); +#endif + BSP_pgtbl_activate(pt); + } + + /* + * PCI 1 domain memory space + */ + setdbat(1, PCI1_MEM_BASE, PCI1_MEM_BASE, 0x10000000, IO_PAGE); + + +#ifdef SHOW_MORE_INIT_SETTINGS + printk("Going to start PCI buses scanning and initialization\n"); +#endif + InitializePCI(); +#ifdef SHOW_MORE_INIT_SETTINGS + printk("Number of PCI buses found is : %d\n", BusCountPCI()); +#endif + + /* Install our own exception handler (needs PCI) */ + globalExceptHdl = BSP_exceptionHandler; + + /* clear hostbridge errors. MCP signal is not used on the MVME5500 + * PCI config space scanning code will trip otherwise :-( + */ + _BSP_clear_hostbridge_errors(0, 1 /*quiet*/); + + /* + * Initialize VME bridge - needs working PCI + * and IRQ subsystems... + */ +#ifdef SHOW_MORE_INIT_SETTINGS + printk("Going to initialize VME bridge\n"); +#endif + /* VME initialization is in a separate file so apps which don't use + * VME or want a different configuration may link against a customized + * routine. + */ + BSP_vme_config(); + + /* Read Configuration Vital Product Data (VPD) */ + if ( I2Cread_eeprom(0xa8, 4,2, &ConfVPD_buff[0], 150)) + printk("I2Cread_eeprom() error \n"); + else { +#ifdef CONF_VPD + printk("\n"); + for (i=0; i<150; i++) { + printk("%2x ", ConfVPD_buff[i]); + if ((i % 20)==0 ) printk("\n"); + } + printk("\n"); +#endif + } + +#ifdef SHOW_MORE_INIT_SETTINGS + printk("MSR %x \n", _read_MSR()); + printk("Exit from bspstart\n"); +#endif + +} diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/linkcmds b/c/src/lib/libbsp/powerpc/mvme5500/startup/linkcmds new file mode 100644 index 0000000000..68d5c5d010 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/linkcmds @@ -0,0 +1,302 @@ +OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", + "elf32-powerpc") +OUTPUT_ARCH(powerpc) +ENTRY(_start) +/* Do we need any of these for elf? + __DYNAMIC = 0; */ +PROVIDE (__stack = 0); + + +MEMORY { + BOTTOM : ORIGIN = 0, LENGTH = 0x100 + VECTORS : ORIGIN = 0x100 , LENGTH = 0x3000-0x100 + CODE : ORIGIN = 0x3000 , LENGTH = 0x400000 +} +SECTIONS +{ + /* discard the 'shared/vector.S' entry point section */ + /DISCARD/ : + { + *(.entry_point_section) + } + + + .vectors : + { + /* should be the first thing... */ + *(.mvme5500_preloader_section) + + /* + * This section is used only if NO_DYNAMIC_EXCEPTION_VECTOR_INSTALL + * is defined in vectors/vectors.S + * *(.vectors) + * We actually RELY on dynamic vector installation since we need + * this space for the preloader... + */ + } > VECTORS + + + /* START OF THE LOADED IMAGE (parts moved by the preloader) */ + .image_start : + { + __rtems_start = ABSOLUTE(.); + } > CODE + + /* Read-only sections, merged into text segment: */ + .interp : { *(.interp) } > CODE + .hash : { *(.hash) } > CODE + .dynsym : { *(.dynsym) } > CODE + .dynstr : { *(.dynstr) } > CODE + .gnu.version : { *(.gnu.version) } > CODE + .gnu.version_d : { *(.gnu.version_d) } > CODE + .gnu.version_r : { *(.gnu.version_r) } > CODE + .rela.text : + { *(.rela.text) *(.rela.gnu.linkonce.t*) } > CODE + .rela.data : + { *(.rela.data) *(.rela.gnu.linkonce.d*) } > CODE + .rela.rodata : + { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } > CODE + .rela.got : { *(.rela.got) } > CODE + .rela.got1 : { *(.rela.got1) } > CODE + .rela.got2 : { *(.rela.got2) } > CODE + .rela.ctors : { *(.rela.ctors) } > CODE + .rela.dtors : { *(.rela.dtors) } > CODE + .rela.init : { *(.rela.init) } > CODE + .rela.fini : { *(.rela.fini) } > CODE + .rela.bss : { *(.rela.bss) } > CODE + .rela.plt : { *(.rela.plt) } > CODE + .rela.sdata : { *(.rela.sdata) } > CODE + .rela.sbss : { *(.rela.sbss) } > CODE + .rela.sdata2 : { *(.rela.sdata2) } > CODE + .rela.sbss2 : { *(.rela.sbss2) } > CODE + + .init : { *(.init) } >CODE + + .text : + { + *(.text) + + /* + * Special FreeBSD sysctl sections. + */ + . = ALIGN (16); + __start_set_sysctl_set = .; + *(set_sysctl_*); + __stop_set_sysctl_set = ABSOLUTE(.); + *(set_domain_*); + *(set_pseudo_*); + + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.gnu.linkonce.t*) + } > CODE + + .fini : { _fini = .; *(.fini) } >CODE + .rodata : { *(.rodata*) *(.gnu.linkonce.r*) } > CODE + .rodata1 : { *(.rodata1) } > CODE +_SDA2_BASE_ = __SDATA2_START__ + 0x8000; + .sdata2 : { *(.sdata2) *(.gnu.linkonce.s2.*) } > CODE + .sbss2 : { + PROVIDE (__sbss2_start = .); + *(.sbss2) *(.gnu.linkonce.sb2.*) + PROVIDE (__sbss2_end = .); + } > CODE + .eh_frame : { *.(eh_frame) } >CODE + _etext = .; + PROVIDE (etext = .); + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. It would + be more correct to do this: + . = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1)); + The current expression does not correctly handle the case of a + text segment ending precisely at the end of a page; it causes the + data segment to skip a page. The above expression does not have + this problem, but it will currently (2/95) cause BFD to allocate + a single segment, combining both text and data, for this case. + This will prevent the text segment from being shared among + multiple executions of the program; I think that is more + important than losing a page of the virtual address space (note + that no actual memory is lost; the page which is skipped can not + be referenced). */ + .data ALIGN(0x1000) : + { + PROVIDE(__DATA_START__ = ABSOLUTE(.) ); + *(.data) + *(.gnu.linkonce.d*) + CONSTRUCTORS + } > CODE + .data1 : { *(.data1) } > CODE + PROVIDE (__EXCEPT_START__ = .); + .gcc_except_table : { *(.gcc_except_table) } > CODE + PROVIDE (__EXCEPT_END__ = .); + .got1 : { *(.got1) } > CODE + .dynamic : { *(.dynamic) } > CODE + /* Put .ctors and .dtors next to the .got2 section, so that the pointers + get relocated with -mrelocatable. Also put in the .fixup pointers. + The current compiler no longer needs this, but keep it around for 2.7.2 */ + PROVIDE (_GOT2_START_ = .); + .got2 : { *(.got2) } > CODE +/* + PROVIDE (__CTOR_LIST__ = .); + .ctors : { *(.ctors) } > CODE + PROVIDE (__CTOR_END__ = .); +*/ + .ctors : + { + KEEP(*crtbegin.o(.ctors)) + KEEP(*(EXCLUDE_FILE(*crtend.o) .ctors)) + KEEP(*(SORT(.ctors.*))) + KEEP(*(.ctors)) + } > CODE + .dtors : + { + KEEP(*crtbegin.o(.dtors)) + KEEP(*(EXCLUDE_FILE(*crtend.o) .dtors)) + KEEP(*(SORT(.dtors.*))) + KEEP(*(.dtors)) + } > CODE +/* + PROVIDE (__DTOR_LIST__ = .); + .dtors : { *(.dtors) } > CODE + PROVIDE (__DTOR_END__ = .); +*/ + PROVIDE (_FIXUP_START_ = .); + .fixup : { *(.fixup) } > CODE + PROVIDE (_FIXUP_END_ = .); + PROVIDE (_GOT2_END_ = .); + PROVIDE (_GOT_START_ = .); + .got : { *(.got) } > CODE + .got.plt : { *(.got.plt) } > CODE + PROVIDE (_GOT_END_ = .); + + .jcr : { KEEP (*(.jcr)) } > CODE + + /* We want the small data sections together, so single-instruction offsets + can access them all, and initialized data all before uninitialized, so + we can shorten the on-disk segment size. */ +_SDA_BASE_ = __SDATA_START__ + 0x8000; + .sdata : { *(.sdata) *(.gnu.linkonce.s.*) } > CODE + _edata = .; + PROVIDE (edata = .); +/* END OF THE LOADED IMAGE (parts moved by the preloader) */ +/* BELOW THIS POINT, NO LOADABLE ITEMS MUST APPEAR */ + .sbss : + { + PROVIDE (__sbss_start = ABSOLUTE(.)); + *(.sbss) + *(.scommon) + *(.dynsbss) + PROVIDE (__sbss_end = ABSOLUTE(.)); + } > CODE + .plt : { *(.plt) } > CODE + .bss : + { + PROVIDE (__bss_start = ABSOLUTE(.)); + *(.dynbss) + *(.bss) + *(COMMON) + . = ALIGN(16); + } > CODE + /* proper alignment for SYSV stack + * (init stack is allocated just after __rtems_end + */ + . = ALIGN(16); + _end = . ; + __rtems_end = . ; + PROVIDE (end = .); + /DISCARD/ : + { + *(.comment) + } + + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + + /* DWARF debug sections. + Symbols in the DWARF debugging sections are relative to the beginning + of the section so we begin them at 0. */ + /* DWARF 1 */ + .debug 0 : { *(.debug) } + .line 0 : { *(.line) } + + /* GNU DWARF 1 extensions */ + .debug_srcinfo 0 : { *(.debug_srcinfo) } + .debug_sfnames 0 : { *(.debug_sfnames) } + + /* DWARF 1.1 and DWARF 2 */ + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + + /* DWARF 2 */ + .debug_info 0 : { *(.debug_info) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + + /* SGI/MIPS DWARF 2 extensions */ + .debug_weaknames 0 : { *(.debug_weaknames) } + .debug_funcnames 0 : { *(.debug_funcnames) } + .debug_typenames 0 : { *(.debug_typenames) } + .debug_varnames 0 : { *(.debug_varnames) } + /* These must appear regardless of . */ +} + +/* "Conditional linking" is not supported, unfortunately. + * This BSP supports getting a network configuration + * from NVRAM settings. Hence, the startup code must + * access the 'rtems_bsdnet_config' structure. + * However, that symbol (and a couple of other networking + * related symbols) should only be referenced if the application + * actually does networking - otherwise a lot of + * code would pulled in from the libnetworking.a under + * all circumstances. + * + * bspstart.c uses these alias names and determines + * at runtime if they are void or valid (by comparing + * against the NULL address). + * + * Unfortunately, it is not possible to conditionally + * declare a symbol 'EXTERN' - hence we must rely on + * other code (probably cross-references within + * libnetworking itself) causing a reference to the + * 'real' symbols... + */ + +__BSP_wrap_rtems_bsdnet_bootp_boot_file_name = + DEFINED(rtems_bsdnet_bootp_boot_file_name) ? + rtems_bsdnet_bootp_boot_file_name + : 0 ; +__BSP_wrap_rtems_bsdnet_bootp_cmdline = + DEFINED(rtems_bsdnet_bootp_cmdline) ? + rtems_bsdnet_bootp_cmdline + : 0 ; +__BSP_wrap_rtems_bsdnet_bootp_server_address = + DEFINED(rtems_bsdnet_bootp_server_address) ? + rtems_bsdnet_bootp_server_address + : 0 ; +__BSP_wrap_rtems_bsdnet_config = + DEFINED(rtems_bsdnet_config) ? + rtems_bsdnet_config + : 0 ; +__BSP_wrap_rtems_bsdnet_do_bootp = + DEFINED(rtems_bsdnet_do_bootp) ? + rtems_bsdnet_do_bootp + : 0 ; +__BSP_wrap_inet_pton = + DEFINED(inet_pton) ? + inet_pton + : 0 ; +__BSP_wrap_rtems_bsdnet_loopattach = + DEFINED(rtems_bsdnet_loopattach) ? + rtems_bsdnet_loopattach + : 0 ; diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/pgtbl_activate.c b/c/src/lib/libbsp/powerpc/mvme5500/startup/pgtbl_activate.c new file mode 100644 index 0000000000..8b14f9923e --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/pgtbl_activate.c @@ -0,0 +1,37 @@ +/* pgtbl_activate.c,v 1.1.2.1 2003/02/20 21:45:49 joel Exp */ + +#include +#include +#include + +/* Default activation of the page tables. This is a weak + * alias, so applications may easily override this + * default activation procedure. + */ + +/* Author: Till Straumann, , 4/2002 + * Kate Feng ported it to MVME5500, 4/2004 + */ + +void +BSP_pgtbl_activate(Triv121PgTbl) __attribute__ (( weak, alias("__BSP_default_pgtbl_activate") )); + +void +__BSP_default_pgtbl_activate(Triv121PgTbl pt) +{ + if (!pt) return; + + /* switch the text/ro sements to RO only after + * initializing the interrupts because the irq_mng + * installs some code... + * + * activate the page table; it is still masked by the + * DBAT0, however + */ + triv121PgTblActivate(pt); + + /* finally, switch off DBAT0 & DBAT1 */ + setdbat(0,0,0,0,0); + setdbat(1,0,0,0,0); /* */ + /* At this point, DBAT0 is available for other use... */ +} diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/reboot.c b/c/src/lib/libbsp/powerpc/mvme5500/startup/reboot.c new file mode 100644 index 0000000000..be8872a324 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/reboot.c @@ -0,0 +1,16 @@ +#include +#include +#include +#include +#include + +void rtemsReboot() +{ + + printk("\Printing a stack trace for your convenience :-)\n"); + CPU_print_stack(); + + printk("RTEMS terminated; Rebooting ...\n"); + /* Mvme5500 board reset */ + out_8((volatile unsigned char*) (GT64260_DEV1_BASE +2), 0x80); +} diff --git a/c/src/lib/libbsp/powerpc/mvme5500/tod/Makefile.am b/c/src/lib/libbsp/powerpc/mvme5500/tod/Makefile.am new file mode 100644 index 0000000000..77accdeeba --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/tod/Makefile.am @@ -0,0 +1,24 @@ +## +## Makefile.am,v 1.6 2002/12/17 15:10:31 ralf Exp +## + + +VPATH = @srcdir@:@srcdir@/../../../shared + +C_FILES = todcfg.c tod.c +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) + +OBJS = $(C_O_FILES) + +include $(top_srcdir)/../../../../../../automake/compile.am +include $(top_srcdir)/../../../../../../automake/lib.am + +# +# (OPTIONAL) Add local stuff here using += +# + +# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile + +all-local: $(ARCH) $(OBJS) + +include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/lib/libbsp/powerpc/mvme5500/tod/todcfg.c b/c/src/lib/libbsp/powerpc/mvme5500/tod/todcfg.c new file mode 100644 index 0000000000..72f5f8ce7a --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/tod/todcfg.c @@ -0,0 +1,36 @@ +/* + * This file contains the RTC driver table for Motorola shared BSPs. + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include +#include +#include + +/* The following table configures the RTC drivers used in this BSP */ +rtc_tbl RTC_Table[] = { + { + "/dev/rtc", /* sDeviceName */ + RTC_M48T08, /* deviceType */ + &m48t08_fns, /* pDeviceFns */ + rtc_probe, /* deviceProbe */ + NULL, /* pDeviceParams */ + 0xF1117FF8, /* ulCtrlPort1 */ + 0x00, /* ulDataPort */ + m48t08_get_register, /* getRegister */ + m48t08_set_register /* setRegister */ + } +}; + +/* Some information used by the RTC driver */ + +#define NUM_RTCS (sizeof(RTC_Table)/sizeof(rtc_tbl)) + +unsigned long RTC_Count = NUM_RTCS; + +rtems_device_minor_number RTC_Minor; diff --git a/c/src/lib/libbsp/powerpc/mvme5500/vectors/Makefile.am b/c/src/lib/libbsp/powerpc/mvme5500/vectors/Makefile.am new file mode 100644 index 0000000000..d62b94615f --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/vectors/Makefile.am @@ -0,0 +1,47 @@ +## +## $Id$ +## + +VPATH = @srcdir@:@srcdir@/../console:@srcdir@/../../shared/vectors + +C_FILES = vectors_init.c exceptionhandler.c +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) + +H_FILES = ../../shared/vectors/vectors.h bspException.h + +include_bspdir = $(includedir)/bsp +include_bsp_HEADERS = ../../shared/vectors/vectors.h bspException.h + +S_FILES = vectors.S +S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.$(OBJEXT)) + +OBJS = $(S_O_FILES) $(C_O_FILES) + +include $(top_srcdir)/../../../../../../automake/compile.am +include $(top_srcdir)/../../../../../../automake/lib.am + +# +# (OPTIONAL) Add local stuff here using += +# + +EXTRA_DIST = bspException.h exceptionhandler.c + +$(PGM): $(OBJS) + $(make-rel) + +$(PROJECT_INCLUDE)/bsp: + $(mkinstalldirs) $@ + +$(PROJECT_INCLUDE)/bsp/vectors.h: ../../shared/vectors/vectors.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/bsp/bspException.h: bspException.h + $(INSTALL_DATA) $< $@ + +PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/vectors.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bspException.h + +all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) + +include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/lib/libbsp/powerpc/mvme5500/vectors/Makefile.in b/c/src/lib/libbsp/powerpc/mvme5500/vectors/Makefile.in new file mode 100644 index 0000000000..f0705701f5 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/vectors/Makefile.in @@ -0,0 +1,597 @@ +# Makefile.in generated by automake 1.7.2 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ + +VPATH = @srcdir@:@srcdir@/../console:@srcdir@/../../shared/vectors +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ + +AR = @AR@ + +# OBSOLETE: Don't use +AS = $(CC) +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BARE_CPU_CFLAGS = @BARE_CPU_CFLAGS@ +BARE_CPU_MODEL = @BARE_CPU_MODEL@ + +CC = @CC@ $(GCCSPECS) + +CCAS = $(CC) +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @RTEMS_CFLAGS@ $(XCFLAGS) +CFLAGS_DEBUG_V = @CFLAGS_DEBUG_V@ +CFLAGS_OPTIMIZE_V = @CFLAGS_OPTIMIZE_V@ +CFLAGS_PROFILE_V = @CFLAGS_PROFILE_V@ +CPP = @CPP@ $(GCCSPECS) + +CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES) $(XCPPFLAGS) + +CPU_CFLAGS = @CPU_CFLAGS@ +CYGPATH_W = @CYGPATH_W@ + +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ENDIF = @ENDIF@ +EXEEXT = @EXEEXT@ +GCC_SPECS = @GCC_SPECS@ +HAS_MP = @HAS_MP@ +HAS_NETWORKING = @HAS_NETWORKING@ +HAS_NETWORKING_FALSE = @HAS_NETWORKING_FALSE@ +HAS_NETWORKING_TRUE = @HAS_NETWORKING_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKE = @MAKE@ +MAKEINFO = @MAKEINFO@ +MULTILIB_FALSE = @MULTILIB_FALSE@ +MULTILIB_TRUE = @MULTILIB_TRUE@ +NM = @NM@ +OBJCOPY = @OBJCOPY@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKHEX = @PACKHEX@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PROJECT_INCLUDE = @PROJECT_INCLUDE@ +PROJECT_RELEASE = @PROJECT_RELEASE@ +PROJECT_ROOT = @PROJECT_ROOT@ +PROJECT_TOPdir = @PROJECT_TOPdir@ +RANLIB = @RANLIB@ +RTEMS_BSP = @RTEMS_BSP@ +RTEMS_BSP_FAMILY = @RTEMS_BSP_FAMILY@ +RTEMS_BSP_SPECS = @RTEMS_BSP_SPECS@ +RTEMS_CFLAGS = @RTEMS_CFLAGS@ +RTEMS_CPPFLAGS = @RTEMS_CPPFLAGS@ +RTEMS_CPU = @RTEMS_CPU@ +RTEMS_CPU_MODEL = @RTEMS_CPU_MODEL@ +RTEMS_HAS_NETWORKING = @RTEMS_HAS_NETWORKING@ +RTEMS_HOST = @RTEMS_HOST@ +RTEMS_ROOT = @RTEMS_ROOT@ +RTEMS_TOPdir = @RTEMS_TOPdir@ +RTEMS_USE_GCC_FALSE = @RTEMS_USE_GCC_FALSE@ +RTEMS_USE_GCC_TRUE = @RTEMS_USE_GCC_TRUE@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIZE = @SIZE@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__include = @am__include@ +am__quote = @am__quote@ +bindir = @bindir@ +bsplibdir = @bsplibdir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exceptions = @exceptions@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ + +C_FILES = vectors_init.c exceptionhandler.c +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) + +H_FILES = ../../shared/vectors/vectors.h bspException.h + +include_bspdir = $(includedir)/bsp +include_bsp_HEADERS = ../../shared/vectors/vectors.h bspException.h + +S_FILES = vectors.S +S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.$(OBJEXT)) + +OBJS = $(S_O_FILES) $(C_O_FILES) + +@RTEMS_USE_GCC_TRUE@GCCSPECS = $(GCC_SPECS) $(RTEMS_BSP_SPECS) +# CXXFLAGS = @RTEMS_CXXFLAGS@ $(XCXXFLAGS) +CXXFLAGS = @RTEMS_CFLAGS@ $(XCXXFLAGS) +ASFLAGS = $(CPU_ASFLAGS) $(CPU_CFLAGS) $(XASFLAGS) + +LINK_LIBS = $(LD_LIBS) + + +# +# Client compiler and support tools +# + +# +# How to compile stuff into ${ARCH} subdirectory +# +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + + +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + +CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) +ASCOMPILE = $(AS) $(AM_ASFLAGS) $(ASFLAGS) + + +# Dependency files for use by gmake +# NOTE: we don't put them into $(ARCH) +# so that 'make clean' doesn't blow it away +DEPEND = Depends-${ARCH} + + +# spell out all the LINK_FILE's, rather than using -lbsp, so +# that $(LINK_FILES) can be a dependency +LINK_OBJS = \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +LINK_FILES = \ + $(START_FILE) \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +VARIANT = OPTIMIZE + +VARIANT_OPTIMIZE_V = OPTIMIZE +VARIANT_DEBUG_V = DEBUG +VARIANT_PROFILE_V = PROFILE +VARIANT_optimize_V = OPTIMIZE +VARIANT_debug_V = DEBUG +VARIANT_profile_V = PROFILE + +VARIANT_V = $(VARIANT_$(VARIANT)_V) + +ARCH_OPTIMIZE_V = o-optimize +ARCH_DEBUG_V = o-debug +ARCH_PROFILE_V = o-profile + +ARCH__V = $(ARCH_OPTIMIZE_V) +ARCH = $(ARCH_$(VARIANT_V)_V) + +LIBSUFFIX_OPTIMIZE_V = +LIBSUFFIX_DEBUG_V = _g +LIBSUFFIX_PROFILE_V = _p +LIBSUFFIX__V = $(LIBSUFFIX_OPTIMIZE_V) + +LIB_VARIANT = $(LIBSUFFIX_$(VARIANT_V)_V) +CFLAGS__V = $(CFLAGS_OPTIMIZE_V) + +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_OPTIMIZE_V = +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_DEBUG_V = -qrtems_debug -Wno-unused +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_PROFILE_V = -pg + +RTEMS_CFLAGS__V = $(RTEMS_CFLAGS_OPTIMIZE_V) +CXX = @CXX@ $(GCCSPECS) + +AM_CPPFLAGS = $(RTEMS_CPPFLAGS) +AM_CFLAGS = +AM_CXXFLAGS = +AM_CCASFLAGS = $(CPU_CFLAGS) $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS) + +ARFLAGS = ruv + +TMPINSTALL_FILES = $(PROJECT_RELEASE)/lib + + +# +# (OPTIONAL) Add local stuff here using += +# +EXTRA_DIST = bspException.h exceptionhandler.c + +PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp $(PROJECT_INCLUDE)/bsp/vectors.h $(PROJECT_INCLUDE)/bsp/bspException.h + +PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools +subdir = vectors +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/bspopts.tmp +CONFIG_CLEAN_FILES = +DIST_SOURCES = +HEADERS = $(include_bsp_HEADERS) + +DIST_COMMON = $(include_bsp_HEADERS) \ + $(top_srcdir)/../../../../../../automake/compile.am \ + $(top_srcdir)/../../../../../../automake/lib.am \ + $(top_srcdir)/../../../../../../automake/local.am Makefile.am \ + Makefile.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/../../../../../../automake/compile.am $(top_srcdir)/../../../../../../automake/lib.am $(top_srcdir)/../../../../../../automake/local.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign vectors/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +uninstall-info-am: +include_bspHEADERS_INSTALL = $(INSTALL_HEADER) +install-include_bspHEADERS: $(include_bsp_HEADERS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(include_bspdir) + @list='$(include_bsp_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(include_bspHEADERS_INSTALL) $$d$$p $(DESTDIR)$(include_bspdir)/$$f"; \ + $(include_bspHEADERS_INSTALL) $$d$$p $(DESTDIR)$(include_bspdir)/$$f; \ + done + +uninstall-include_bspHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_bsp_HEADERS)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(include_bspdir)/$$f"; \ + rm -f $(DESTDIR)$(include_bspdir)/$$f; \ + done + +ETAGS = etags +ETAGSFLAGS = + +CTAGS = ctags +CTAGSFLAGS = + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + $(mkinstalldirs) $(distdir)/../../../../../../../automake $(distdir)/../../shared/vectors + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(HEADERS) all-local + +installdirs: + $(mkinstalldirs) $(DESTDIR)$(include_bspdir) + +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-local mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: install-include_bspHEADERS + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-include_bspHEADERS uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ + clean-generic clean-local ctags distclean distclean-generic \ + distclean-tags distdir dvi dvi-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-include_bspHEADERS install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-include_bspHEADERS uninstall-info-am + +@RTEMS_USE_GCC_FALSE@include $(CONFIG.CC) + +${ARCH}/%.o: %.c + ${COMPILE} -o $@ -c $< + +${ARCH}/%.o: %.cc + ${CXXCOMPILE} -o $@ -c $< + +${ARCH}/%.o: %.S + ${CCASCOMPILE} -DASM -o $@ -c $< + +# We deliberately don't have anything depend on the +# $(DEPEND) file; otherwise it will get rebuilt even +# on 'make clean' +# + +@RTEMS_USE_GCC_TRUE@depend-gcc: $(C_FILES) $(CC_FILES) $(S_FILES) +@RTEMS_USE_GCC_TRUE@ $(COMPILE) -M $^ | \ +@RTEMS_USE_GCC_TRUE@ sed -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \ +@RTEMS_USE_GCC_TRUE@ -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp +@RTEMS_USE_GCC_TRUE@ mv $(DEPEND).tmp $(DEPEND) + +# pull in dependencies if they exist +@RTEMS_USE_GCC_TRUE@ifeq (${DEPEND},$(wildcard ${DEPEND})) +@RTEMS_USE_GCC_TRUE@include ${DEPEND} +@RTEMS_USE_GCC_TRUE@@ENDIF@ +depend: depend-am + +@RTEMS_USE_GCC_TRUE@define make-rel +@RTEMS_USE_GCC_TRUE@ $(LINK) -qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) $^ +@RTEMS_USE_GCC_TRUE@endef +@RTEMS_USE_GCC_FALSE@define make-rel +@RTEMS_USE_GCC_FALSE@ $(LINK) $(XLDFLAGS) $^ +@RTEMS_USE_GCC_FALSE@endef + +${ARCH}: + mkdir ${ARCH} + +clean-local: + $(RM) -r o-optimize o-debug o-profile $(CLEANDIRS) + $(RM) Depends-o-optimize.tmp Depends-o-debug.tmp Depends-o-profile.tmp + +define make-library +test -d $(ARCH) || mkdir $(ARCH) +$(RM) $@ +$(AR) $(ARFLAGS) $@ $^ +$(RANLIB) $@ +endef + +$(PROJECT_RELEASE)/lib: + @$(mkinstalldirs) $@ + +.PRECIOUS: $(LIB) + +$(PGM): $(OBJS) + $(make-rel) + +$(PROJECT_INCLUDE)/bsp: + $(mkinstalldirs) $@ + +$(PROJECT_INCLUDE)/bsp/vectors.h: ../../shared/vectors/vectors.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/bsp/bspException.h: bspException.h + $(INSTALL_DATA) $< $@ + +all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) + +debug: + @echo + @echo "\"make debug\" is obsolete, instead use:" + @echo " make VARIANT=DEBUG" + @echo + +.PHONY: debug + +profile: + @echo + @echo "\"make profile\" is obsolete, instead use:" + @echo " make VARIANT=PROFILE" + @echo + +.PHONY: profile + +preinstall-am: $(PREINSTALL_FILES) +preinstall: preinstall-am +.PHONY: preinstall preinstall-am + +depend-am: depend-gcc +depend: depend-am +.PHONY: depend depend-am depend-gcc +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/c/src/lib/libbsp/powerpc/mvme5500/vectors/bspException.h b/c/src/lib/libbsp/powerpc/mvme5500/vectors/bspException.h new file mode 100644 index 0000000000..0b03fb8f6c --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/vectors/bspException.h @@ -0,0 +1,57 @@ +#ifndef BSP_EXCEPTION_HANDLER_H +#define BSP_EXCEPTION_HANDLER_H +/* $Id$ */ + +/* A slightly improved exception 'default' exception handler for RTEMS / SVGM */ + +/* Author: Till Straumann , 2002/5 */ + +#include + +/* Two types of exception intercepting / catching is supported: + * + * - lowlevel handling (runs at IRQ level, before restoring any + * task context). + * - highlevel handling. + * + * A lowlevel user hook is invoked twice, before and after processing + * (printing) the exception. + * If the user hook returns a nonzero value, normal processing + * is skipped (including the second call to the hook) + * + * If the hook returns nonzero to the second call, no default + * 'panic' occurs. + * + * Default 'panic': + * - if a task context is available: + * - if a highlevel handler is installed, pass control + * to the highlevel handler when returning from the + * exception (the highlevel handler should probably + * do a longjmp()). Otherwise: + * - try to suspend interrupted task. + * - hang if no task context is available. + * + */ + +typedef struct BSP_ExceptionExtensionRec_ *BSP_ExceptionExtension; + +typedef int (*BSP_ExceptionHookProc)(BSP_Exception_frame *frame, BSP_ExceptionExtension ext, int after); + +typedef struct BSP_ExceptionExtensionRec_ { + BSP_ExceptionHookProc lowlevelHook; + int quiet; /* silence the exception handler */ + void (*highlevelHook)(BSP_ExceptionExtension); + /* user fields may be added after this */ +} BSP_ExceptionExtensionRec; + +#define SRR1_TEA_EXC (1<<(31-13)) +#define SRR1_MCP_EXC (1<<(31-12)) + +void +BSP_exceptionHandler(BSP_Exception_frame* excPtr); + +/* install an exception handler to the current task context */ +BSP_ExceptionExtension +BSP_exceptionHandlerInstall(BSP_ExceptionExtension e); + +#endif diff --git a/c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c b/c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c new file mode 100644 index 0000000000..a9f513288d --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c @@ -0,0 +1,201 @@ +/* $Id$ */ + +/* Copyright : + * (C) Author: Till Straumann , 2002/5 + * (C) S. Kate Feng 4/2004 modified it for MVME5500 + */ + +#include +#include +#include +#include +#include +#include + +#include + +#define SRR1_TEA_EXC (1<<(31-13)) +#define SRR1_MCP_EXC (1<<(31-12)) + +void +BSP_printStackTrace(); + + +void +rtemsReboot(void); + +static volatile BSP_ExceptionExtension BSP_exceptionExtension = 0; + +BSP_ExceptionExtension +BSP_exceptionHandlerInstall(BSP_ExceptionExtension e) +{ +volatile BSP_ExceptionExtension test; + if ( RTEMS_SUCCESSFUL != rtems_task_variable_get(RTEMS_SELF, (void*)&BSP_exceptionExtension, (void**)&test) ) { + /* not yet added */ + rtems_task_variable_add(RTEMS_SELF, (void*)&BSP_exceptionExtension, 0); + } + test = BSP_exceptionExtension; + BSP_exceptionExtension = e; + return test; +} + +void +BSP_exceptionHandler(BSP_Exception_frame* excPtr) +{ +rtems_unsigned32 note; +BSP_ExceptionExtension ext=0; +rtems_id id=0; +int recoverable = 0; +char *fmt="Uhuuuh, Exception %d in unknown task???\n"; +int quiet=0; + + if (!quiet) printk("In BSP_exceptionHandler()\n"); + /* If we are in interrupt context, we are in trouble - skip the user + * hook and panic + */ + if (rtems_interrupt_is_in_progress()) { + fmt="Aieeh, Exception %d in interrupt handler\n"; + } else if ( !_Thread_Executing) { + fmt="Aieeh, Exception %d in initialization code\n"; + } else { + /* retrieve the notepad which possibly holds an extention pointer */ + if (RTEMS_SUCCESSFUL==rtems_task_ident(RTEMS_SELF,RTEMS_LOCAL,&id) && +#if 0 +/* Must not use a notepad due to unknown initial value (notepad memory is allocated from the + * workspace)! + */ + RTEMS_SUCCESSFUL==rtems_task_get_note(id, BSP_EXCEPTION_NOTEPAD, ¬e) +#else + RTEMS_SUCCESSFUL==rtems_task_variable_get(id, (void*)&BSP_exceptionExtension, (void**)¬e) +#endif + ) { + ext = (BSP_ExceptionExtension)note; + if (ext) + quiet=ext->quiet; + if (!quiet) { + printk("Task (Id 0x%08x) got ",id); + } + fmt="exception %d\n"; + } + } + + if (ext && ext->lowlevelHook && ext->lowlevelHook(excPtr,ext,0)) { + /* they did all the work and want us to do nothing! */ + printk("they did all the work and want us to do nothing!\n"); + return; + } + + if (!quiet) { + /* message about exception */ + printk(fmt, excPtr->_EXC_number); + /* register dump */ + printk("\t Next PC or Address of fault = %x, ", excPtr->EXC_SRR0); + printk("Mvme5500 Saved MSR = %x\n", excPtr->EXC_SRR1); + printk("\t R0 = %08x", excPtr->GPR0); + printk(" R1 = %08x", excPtr->GPR1); + printk(" R2 = %08x", excPtr->GPR2); + printk(" R3 = %08x\n", excPtr->GPR3); + printk("\t R4 = %08x", excPtr->GPR4); + printk(" R5 = %08x", excPtr->GPR5); + printk(" R6 = %08x", excPtr->GPR6); + printk(" R7 = %08x\n", excPtr->GPR7); + printk("\t R8 = %08x", excPtr->GPR8); + printk(" R9 = %08x", excPtr->GPR9); + printk(" R10 = %08x", excPtr->GPR10); + printk(" R11 = %08x\n", excPtr->GPR11); + printk("\t R12 = %08x", excPtr->GPR12); + printk(" R13 = %08x", excPtr->GPR13); + printk(" R14 = %08x", excPtr->GPR14); + printk(" R15 = %08x\n", excPtr->GPR15); + printk("\t R16 = %08x", excPtr->GPR16); + printk(" R17 = %08x", excPtr->GPR17); + printk(" R18 = %08x", excPtr->GPR18); + printk(" R19 = %08x\n", excPtr->GPR19); + printk("\t R20 = %08x", excPtr->GPR20); + printk(" R21 = %08x", excPtr->GPR21); + printk(" R22 = %08x", excPtr->GPR22); + printk(" R23 = %08x\n", excPtr->GPR23); + printk("\t R24 = %08x", excPtr->GPR24); + printk(" R25 = %08x", excPtr->GPR25); + printk(" R26 = %08x", excPtr->GPR26); + printk(" R27 = %08x\n", excPtr->GPR27); + printk("\t R28 = %08x", excPtr->GPR28); + printk(" R29 = %08x", excPtr->GPR29); + printk(" R30 = %08x", excPtr->GPR30); + printk(" R31 = %08x\n", excPtr->GPR31); + printk("\t CR = %08x\n", excPtr->EXC_CR); + printk("\t CTR = %08x\n", excPtr->EXC_CTR); + printk("\t XER = %08x\n", excPtr->EXC_XER); + printk("\t LR = %08x\n", excPtr->EXC_LR); + printk("\t DAR = %08x\n", excPtr->EXC_DAR); + + BSP_printStackTrace(excPtr); + } + + if (ASM_MACH_VECTOR == excPtr->_EXC_number) { + /* ollah , we got a machine check - this could either + * be a TEA, MCP or internal; let's see and provide more info + */ + if (!quiet) + printk("Machine check; reason:"); + if ( ! (excPtr->EXC_SRR1 & (SRR1_TEA_EXC | SRR1_MCP_EXC)) ) { + if (!quiet) + printk("SRR1\n"); + } else { + if (excPtr->EXC_SRR1 & (SRR1_TEA_EXC)) { + if (!quiet) + printk(" TEA"); + } + if (excPtr->EXC_SRR1 & (SRR1_MCP_EXC)) { + unsigned char c1,c2; + unsigned int l; + unsigned long gerr; + + if (!quiet) printk(" MCP\n"); + + /* it's MCP; gather info from the host bridge */ + gerr=_BSP_clear_hostbridge_errors(0,0); + if (gerr&0x80000000) printk("GT64260 Parity error\n"); + if (gerr&0x40000000) printk("GT64260 SysErr\n"); + if ((!quiet) && (!gerr)) printk("GT64260 host bridge seems OK\n"); + } + } + } else if (ASM_DEC_VECTOR == excPtr->_EXC_number) { + recoverable = 1; + } else if (ASM_SYS_VECTOR == excPtr->_EXC_number) { +#ifdef TEST_RAW_EXCEPTION_CODE + recoverable = 1; +#else + recoverable = 0; +#endif + } + + /* call them for a second time giving a chance to intercept + * the task_suspend + */ + if (ext && ext->lowlevelHook && ext->lowlevelHook(excPtr, ext, 1)) + return; + + if (!recoverable) { + if (id) { + /* if there's a highlevel hook, install it */ + if (ext && ext->highlevelHook) { + excPtr->EXC_SRR0 = (rtems_unsigned32)ext->highlevelHook; + excPtr->GPR3 = (rtems_unsigned32)ext; + return; + } + if (excPtr->EXC_SRR1 & MSR_FP) { + /* thread dispatching is _not_ disabled at this point; hence + * we must make sure we have the FPU enabled... + */ + _write_MSR( _read_MSR() | MSR_FP ); + __asm__ __volatile__("isync"); + } + printk("unrecoverable exception!!! task %08x suspended\n",id); + rtems_task_suspend(id); + } else { + printk("PANIC, rebooting...\n"); + rtemsReboot(); + } + } +} diff --git a/c/src/lib/libbsp/powerpc/mvme5500/vme/Makefile.am b/c/src/lib/libbsp/powerpc/mvme5500/vme/Makefile.am new file mode 100644 index 0000000000..bbd8ee6a1a --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/vme/Makefile.am @@ -0,0 +1,51 @@ +## +## $Id$ +## Kate Feng modified it for the MVME5500 board +## + +VPATH = @srcdir@:@srcdir@/../../../shared/vmeUniverse: + +INCLUDES = -I @srcdir@/../vme + +H_FILES = VME.h VMEConfig.h + +C_FILES = vmeUniverse.c vmeconfig.c + + +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) + +OBJS = $(C_O_FILES) + +include $(top_srcdir)/../../../../../../automake/compile.am +include $(top_srcdir)/../../../../../../automake/lib.am + +include_bspdir = $(includedir)/bsp +include_bsp_HEADERS = VMEConfig.h +include_bsp_HEADERS += VME.h +include_bsp_HEADERS += ../../../shared/vmeUniverse/vmeUniverse.h + +$(PROJECT_INCLUDE)/bsp: + $(mkinstalldirs) $@ + +$(PROJECT_INCLUDE)/bsp/vmeUniverse.h: vmeUniverse.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/bsp/VME.h: VME.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/bsp/VMEConfig.h: VMEConfig.h + $(INSTALL_DATA) $< $@ + +PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/VME.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/VMEConfig.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/vmeUniverse.h + +all-local: $(PREINSTALL_FILES) $(ARCH) $(OBJS) + +# +# (OPTIONAL) Add local stuff here using += +# +EXTRA_DIST = vmeconfig.c + +include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/lib/libbsp/powerpc/mvme5500/vme/Makefile.in b/c/src/lib/libbsp/powerpc/mvme5500/vme/Makefile.in new file mode 100644 index 0000000000..cd36d5871b --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/vme/Makefile.in @@ -0,0 +1,596 @@ +# Makefile.in generated by automake 1.7.2 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ + +VPATH = @srcdir@:@srcdir@/../../../shared/vmeUniverse: +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ + +AR = @AR@ + +# OBSOLETE: Don't use +AS = $(CC) +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BARE_CPU_CFLAGS = @BARE_CPU_CFLAGS@ +BARE_CPU_MODEL = @BARE_CPU_MODEL@ + +CC = @CC@ $(GCCSPECS) + +CCAS = $(CC) +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @RTEMS_CFLAGS@ $(XCFLAGS) +CFLAGS_DEBUG_V = @CFLAGS_DEBUG_V@ +CFLAGS_OPTIMIZE_V = @CFLAGS_OPTIMIZE_V@ +CFLAGS_PROFILE_V = @CFLAGS_PROFILE_V@ +CPP = @CPP@ $(GCCSPECS) + +CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES) $(XCPPFLAGS) + +CPU_CFLAGS = @CPU_CFLAGS@ +CYGPATH_W = @CYGPATH_W@ + +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ENDIF = @ENDIF@ +EXEEXT = @EXEEXT@ +GCC_SPECS = @GCC_SPECS@ +HAS_MP = @HAS_MP@ +HAS_NETWORKING = @HAS_NETWORKING@ +HAS_NETWORKING_FALSE = @HAS_NETWORKING_FALSE@ +HAS_NETWORKING_TRUE = @HAS_NETWORKING_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKE = @MAKE@ +MAKEINFO = @MAKEINFO@ +MULTILIB_FALSE = @MULTILIB_FALSE@ +MULTILIB_TRUE = @MULTILIB_TRUE@ +NM = @NM@ +OBJCOPY = @OBJCOPY@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKHEX = @PACKHEX@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PROJECT_INCLUDE = @PROJECT_INCLUDE@ +PROJECT_RELEASE = @PROJECT_RELEASE@ +PROJECT_ROOT = @PROJECT_ROOT@ +PROJECT_TOPdir = @PROJECT_TOPdir@ +RANLIB = @RANLIB@ +RTEMS_BSP = @RTEMS_BSP@ +RTEMS_BSP_FAMILY = @RTEMS_BSP_FAMILY@ +RTEMS_BSP_SPECS = @RTEMS_BSP_SPECS@ +RTEMS_CFLAGS = @RTEMS_CFLAGS@ +RTEMS_CPPFLAGS = @RTEMS_CPPFLAGS@ +RTEMS_CPU = @RTEMS_CPU@ +RTEMS_CPU_MODEL = @RTEMS_CPU_MODEL@ +RTEMS_HAS_NETWORKING = @RTEMS_HAS_NETWORKING@ +RTEMS_HOST = @RTEMS_HOST@ +RTEMS_ROOT = @RTEMS_ROOT@ +RTEMS_TOPdir = @RTEMS_TOPdir@ +RTEMS_USE_GCC_FALSE = @RTEMS_USE_GCC_FALSE@ +RTEMS_USE_GCC_TRUE = @RTEMS_USE_GCC_TRUE@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIZE = @SIZE@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__include = @am__include@ +am__quote = @am__quote@ +bindir = @bindir@ +bsplibdir = @bsplibdir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exceptions = @exceptions@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ + +INCLUDES = -I @srcdir@/../vme + +H_FILES = VME.h VMEConfig.h + +C_FILES = vmeUniverse.c vmeconfig.c + +C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT)) + +OBJS = $(C_O_FILES) + +@RTEMS_USE_GCC_TRUE@GCCSPECS = $(GCC_SPECS) $(RTEMS_BSP_SPECS) +# CXXFLAGS = @RTEMS_CXXFLAGS@ $(XCXXFLAGS) +CXXFLAGS = @RTEMS_CFLAGS@ $(XCXXFLAGS) +ASFLAGS = $(CPU_ASFLAGS) $(CPU_CFLAGS) $(XASFLAGS) + +LINK_LIBS = $(LD_LIBS) + + +# +# Client compiler and support tools +# + +# +# How to compile stuff into ${ARCH} subdirectory +# +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + + +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + +CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) +ASCOMPILE = $(AS) $(AM_ASFLAGS) $(ASFLAGS) + + +# Dependency files for use by gmake +# NOTE: we don't put them into $(ARCH) +# so that 'make clean' doesn't blow it away +DEPEND = Depends-${ARCH} + + +# spell out all the LINK_FILE's, rather than using -lbsp, so +# that $(LINK_FILES) can be a dependency +LINK_OBJS = \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +LINK_FILES = \ + $(START_FILE) \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +VARIANT = OPTIMIZE + +VARIANT_OPTIMIZE_V = OPTIMIZE +VARIANT_DEBUG_V = DEBUG +VARIANT_PROFILE_V = PROFILE +VARIANT_optimize_V = OPTIMIZE +VARIANT_debug_V = DEBUG +VARIANT_profile_V = PROFILE + +VARIANT_V = $(VARIANT_$(VARIANT)_V) + +ARCH_OPTIMIZE_V = o-optimize +ARCH_DEBUG_V = o-debug +ARCH_PROFILE_V = o-profile + +ARCH__V = $(ARCH_OPTIMIZE_V) +ARCH = $(ARCH_$(VARIANT_V)_V) + +LIBSUFFIX_OPTIMIZE_V = +LIBSUFFIX_DEBUG_V = _g +LIBSUFFIX_PROFILE_V = _p +LIBSUFFIX__V = $(LIBSUFFIX_OPTIMIZE_V) + +LIB_VARIANT = $(LIBSUFFIX_$(VARIANT_V)_V) +CFLAGS__V = $(CFLAGS_OPTIMIZE_V) + +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_OPTIMIZE_V = +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_DEBUG_V = -qrtems_debug -Wno-unused +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_PROFILE_V = -pg + +RTEMS_CFLAGS__V = $(RTEMS_CFLAGS_OPTIMIZE_V) +CXX = @CXX@ $(GCCSPECS) + +AM_CPPFLAGS = $(RTEMS_CPPFLAGS) +AM_CFLAGS = +AM_CXXFLAGS = +AM_CCASFLAGS = $(CPU_CFLAGS) $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS) + +ARFLAGS = ruv + +TMPINSTALL_FILES = $(PROJECT_RELEASE)/lib + +include_bspdir = $(includedir)/bsp +include_bsp_HEADERS = VMEConfig.h VME.h ../../../shared/vmeUniverse/vmeUniverse.h + +PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp $(PROJECT_INCLUDE)/bsp/VME.h $(PROJECT_INCLUDE)/bsp/VMEConfig.h $(PROJECT_INCLUDE)/bsp/vmeUniverse.h + +# +# (OPTIONAL) Add local stuff here using += +# +EXTRA_DIST = vmeconfig.c + +PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools +subdir = vme +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/bspopts.tmp +CONFIG_CLEAN_FILES = +DIST_SOURCES = +HEADERS = $(include_bsp_HEADERS) + +DIST_COMMON = $(include_bsp_HEADERS) \ + $(top_srcdir)/../../../../../../automake/compile.am \ + $(top_srcdir)/../../../../../../automake/lib.am \ + $(top_srcdir)/../../../../../../automake/local.am Makefile.am \ + Makefile.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/../../../../../../automake/compile.am $(top_srcdir)/../../../../../../automake/lib.am $(top_srcdir)/../../../../../../automake/local.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign vme/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +uninstall-info-am: +include_bspHEADERS_INSTALL = $(INSTALL_HEADER) +install-include_bspHEADERS: $(include_bsp_HEADERS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(include_bspdir) + @list='$(include_bsp_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(include_bspHEADERS_INSTALL) $$d$$p $(DESTDIR)$(include_bspdir)/$$f"; \ + $(include_bspHEADERS_INSTALL) $$d$$p $(DESTDIR)$(include_bspdir)/$$f; \ + done + +uninstall-include_bspHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_bsp_HEADERS)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(include_bspdir)/$$f"; \ + rm -f $(DESTDIR)$(include_bspdir)/$$f; \ + done + +ETAGS = etags +ETAGSFLAGS = + +CTAGS = ctags +CTAGSFLAGS = + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + $(mkinstalldirs) $(distdir)/../../../../../../../automake $(distdir)/../../../shared/vmeUniverse + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(HEADERS) all-local + +installdirs: + $(mkinstalldirs) $(DESTDIR)$(include_bspdir) + +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-local mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: install-include_bspHEADERS + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-include_bspHEADERS uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ + clean-generic clean-local ctags distclean distclean-generic \ + distclean-tags distdir dvi dvi-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-include_bspHEADERS install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-include_bspHEADERS uninstall-info-am + +@RTEMS_USE_GCC_FALSE@include $(CONFIG.CC) + +${ARCH}/%.o: %.c + ${COMPILE} -o $@ -c $< + +${ARCH}/%.o: %.cc + ${CXXCOMPILE} -o $@ -c $< + +${ARCH}/%.o: %.S + ${CCASCOMPILE} -DASM -o $@ -c $< + +# We deliberately don't have anything depend on the +# $(DEPEND) file; otherwise it will get rebuilt even +# on 'make clean' +# + +@RTEMS_USE_GCC_TRUE@depend-gcc: $(C_FILES) $(CC_FILES) $(S_FILES) +@RTEMS_USE_GCC_TRUE@ $(COMPILE) -M $^ | \ +@RTEMS_USE_GCC_TRUE@ sed -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \ +@RTEMS_USE_GCC_TRUE@ -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp +@RTEMS_USE_GCC_TRUE@ mv $(DEPEND).tmp $(DEPEND) + +# pull in dependencies if they exist +@RTEMS_USE_GCC_TRUE@ifeq (${DEPEND},$(wildcard ${DEPEND})) +@RTEMS_USE_GCC_TRUE@include ${DEPEND} +@RTEMS_USE_GCC_TRUE@@ENDIF@ +depend: depend-am + +@RTEMS_USE_GCC_TRUE@define make-rel +@RTEMS_USE_GCC_TRUE@ $(LINK) -qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) $^ +@RTEMS_USE_GCC_TRUE@endef +@RTEMS_USE_GCC_FALSE@define make-rel +@RTEMS_USE_GCC_FALSE@ $(LINK) $(XLDFLAGS) $^ +@RTEMS_USE_GCC_FALSE@endef + +${ARCH}: + mkdir ${ARCH} + +clean-local: + $(RM) -r o-optimize o-debug o-profile $(CLEANDIRS) + $(RM) Depends-o-optimize.tmp Depends-o-debug.tmp Depends-o-profile.tmp + +define make-library +test -d $(ARCH) || mkdir $(ARCH) +$(RM) $@ +$(AR) $(ARFLAGS) $@ $^ +$(RANLIB) $@ +endef + +$(PROJECT_RELEASE)/lib: + @$(mkinstalldirs) $@ + +.PRECIOUS: $(LIB) + +$(PROJECT_INCLUDE)/bsp: + $(mkinstalldirs) $@ + +$(PROJECT_INCLUDE)/bsp/vmeUniverse.h: vmeUniverse.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/bsp/VME.h: VME.h + $(INSTALL_DATA) $< $@ + +$(PROJECT_INCLUDE)/bsp/VMEConfig.h: VMEConfig.h + $(INSTALL_DATA) $< $@ + +all-local: $(PREINSTALL_FILES) $(ARCH) $(OBJS) + +debug: + @echo + @echo "\"make debug\" is obsolete, instead use:" + @echo " make VARIANT=DEBUG" + @echo + +.PHONY: debug + +profile: + @echo + @echo "\"make profile\" is obsolete, instead use:" + @echo " make VARIANT=PROFILE" + @echo + +.PHONY: profile + +preinstall-am: $(PREINSTALL_FILES) +preinstall: preinstall-am +.PHONY: preinstall preinstall-am + +depend-am: depend-gcc +depend: depend-am +.PHONY: depend depend-am depend-gcc +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/c/src/lib/libbsp/powerpc/mvme5500/vme/VME.h b/c/src/lib/libbsp/powerpc/mvme5500/vme/VME.h new file mode 100644 index 0000000000..95bf0d2e25 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/vme/VME.h @@ -0,0 +1,97 @@ +#ifndef RTEMS_BSP_VME_UNIVERSE_H +#define RTEMS_BSP_VME_UNIVERSE_H +/* VME.h,v 1.1.2.2 2003/03/25 16:46:01 joel Exp */ + +/* SVGM et al. BSP's VME support */ +/* Author: Till Straumann, */ + +/* pull in bsp.h */ +#include +/* our VME bridge */ +#include +/* our address space configuration */ +#include + +/* VME related declarations */ +/* how to map a VME address to the CPU local bus. + * Note that this traverses two bridges: + * the grackle and the universe. For the + * Universe, there is a lookup procedure while + * we assume a 1:1 mapping for the grackle... + */ + +/* NOTE about the fast mapping macros: + * using these macros is only safe if the user app + * does _NOT_ change the universe mappings! + * While changing the PCI windows probably doesn't + * make much sense (involves changing the MMU/DBATs as well), + * The user might wish to change the VME address + * layout, i.e. by remapping _VME_A32_WIN0_ON_VME + * and _VME_DRAM_OFFSET... + * Hence, using the A24 and A16 macros is probably safe. + */ + +#define BSP_vme_init() \ + vmeUniverseInit + +/* translate through host bridge and vme master window of vme bridge */ +static inline int +BSP_vme2local_adrs(unsigned am, unsigned long vmeaddr, unsigned long *plocaladdr) +{ +int rval=vmeUniverseXlateAddr(1,0,am,vmeaddr,plocaladdr); + *plocaladdr+=PCI_MEM_BASE; + return rval; +} + +/* when using this macro, the universe setup MUST NOT BE + * CHANGED by the application... + */ +#define BSP_vme2local_A32_fast(vmeaddr) \ + ((vmeaddr)-_VME_A32_WIN0_ON_VME + _VME_A32_WIN0_ON_PCI + PCI_MEM_BASE) +#define BSP_vme2local_A24_fast(vmeaddr) \ + (((vmeaddr)&0x7ffffff)+_VME_A24_ON_PCI + PCI_MEM_BASE) +#define BSP_vme2local_A16_fast(vmeaddr) \ + (((vmeaddr)&0xffff)+_VME_A16_ON_PCI + PCI_MEM_BASE) + +/* how a CPU address is mapped to the VME bus (if at all) + */ +static inline int +BSP_local2vme_adrs(unsigned am, unsigned long localaddr, unsigned long *pvmeaddr) +{ +return vmeUniverseXlateAddr(0, 0, am,localaddr+PCI_DRAM_OFFSET,pvmeaddr); +} + +#define BSP_localdram2vme_fast(localaddr) \ + ((localaddr)+_VME_DRAM_OFFSET) + +/* interrupt handlers and levels */ +typedef void (*BSP_VME_ISR_t)(void *usrArg, unsigned long vector); + +#define BSP_installVME_isr(vector, handler, arg) \ + vmeUniverseInstallISR(vector, handler, arg) + +#define BSP_removeVME_isr(vector, handler, arg) \ + vmeUniverseRemoveISR(vector, handler, arg) + +/* retrieve the currently installed ISR for a given vector */ +#define BSP_getVME_isr(vector, parg) \ + vmeUniverseISRGet(vector, parg) + +#define BSP_enableVME_int_lvl(level) \ + vmeUniverseIntEnable(level) + +#define BSP_disableVME_int_lvl(level) \ + vmeUniverseIntDisable(level) + +/* Tell the interrupt manager that the universe driver + * already called openpic_eoi() and that this step hence + * must be omitted. + */ +#define BSP_PCI_VME_DRIVER_DOES_EOI +/* don't reference vmeUniverse0PciIrqLine directly here - leave it up to + * bspstart() to set BSP_vme_bridge_irq. That way, we can generate variants + * of the BSP with / without the universe driver... + */ +extern int _BSP_vme_bridge_irq; + +#endif diff --git a/c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h b/c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h new file mode 100644 index 0000000000..7bc0c8e44a --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h @@ -0,0 +1,28 @@ +#ifndef RTEMS_BSP_VME_CONFIG_H +#define RTEMS_BSP_VME_CONFIG_H +/* VMEConfig.h, S. Kate Feng modified it for MVME5500 3/04 */ +/* BSP specific address space configuration parameters */ + +/* + * The BSP maps VME address ranges into + * one BAT. + * NOTE: the BSP (startup/bspstart.c) uses + * hardcoded window lengths that match this + * layout: + */ +#define _VME_A32_WIN0_ON_PCI 0x90000000 +#define _VME_A24_ON_PCI 0x9f000000 +#define _VME_A16_ON_PCI 0x9fff0000 + +/* start of the A32 window on the VME bus + * TODO: this should perhaps be a configuration option + */ +#define _VME_A32_WIN0_ON_VME 0x20000000 + +/* if _VME_DRAM_OFFSET is defined, the BSP + * will map our RAM onto the VME bus, starting + * at _VME_DRAM_OFFSET + */ +#define _VME_DRAM_OFFSET 0x90000000 + +#endif diff --git a/c/src/lib/libbsp/powerpc/mvme5500/vme/vmeconfig.c b/c/src/lib/libbsp/powerpc/mvme5500/vme/vmeconfig.c new file mode 100644 index 0000000000..436f89643f --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/vme/vmeconfig.c @@ -0,0 +1,85 @@ +/* vmeconfig.c,v 1.1.2.2 2003/03/25 16:46:01 joel Exp */ + +/* Standard VME bridge configuration for PPC boards */ + +/* Copyright Author: Till Straumann , 3/2002 */ + +/* Copyright 2004, Brookhaven National Lab. and S. Kate Feng + * Modified to support the MVME5500, 3/2004 + */ + +#include +#include +#include +#include + +/* Use a weak alias for the VME configuration. + * This permits individual applications to override + * this routine. + * They may even create an 'empty' + * + * void BSP_vme_config(void) {} + * + * which will avoid linking in the Universe driver + * at all :-). + */ + +void BSP_vme_config(void) __attribute__ (( weak, alias("__BSP_default_vme_config") )); + +void +__BSP_default_vme_config(void) +{ + + vmeUniverseInit(); + vmeUniverseReset(); + + /* setup a PCI0 area to map the VME bus */ + setdbat(0,_VME_A32_WIN0_ON_PCI, _VME_A32_WIN0_ON_PCI, 0x10000000, IO_PAGE); + + /* map VME address ranges */ + vmeUniverseMasterPortCfg( + 0, + VME_AM_EXT_SUP_DATA, + _VME_A32_WIN0_ON_VME, + _VME_A32_WIN0_ON_PCI, + 0x0F000000); + vmeUniverseMasterPortCfg( + 1, + VME_AM_STD_SUP_DATA, + 0x00000000, + _VME_A24_ON_PCI, + 0x00ff0000); + vmeUniverseMasterPortCfg( + 2, + VME_AM_SUP_SHORT_IO, + 0x00000000, + _VME_A16_ON_PCI, + 0x00010000); + +#ifdef _VME_DRAM_OFFSET + /* map our memory to VME */ + vmeUniverseSlavePortCfg( + 0, + VME_AM_EXT_SUP_DATA, + _VME_DRAM_OFFSET, + PCI_DRAM_OFFSET, + BSP_mem_size); + + /* make sure the host bridge PCI master is enabled */ + vmeUniverseWriteReg( + vmeUniverseReadReg(UNIV_REGOFF_PCI_CSR) | UNIV_PCI_CSR_BM, + UNIV_REGOFF_PCI_CSR); +#endif + + /* stdio is not yet initialized; the driver will revert to printk */ + vmeUniverseMasterPortsShow(0); + vmeUniverseSlavePortsShow(0); + + /* install the VME insterrupt manager */ + vmeUniverseInstallIrqMgr(0,12,1,13); + if (vmeUniverse0PciIrqLine<0) + BSP_panic("Unable to get interrupt line info from PCI config"); + _BSP_vme_bridge_irq= BSP_GPP_IRQ_LOWEST_OFFSET+vmeUniverse0PciIrqLine; + /* install alternate resetter TODO + __BSP_alternate_reset = vmeUniverseResetBus;*/ +} diff --git a/c/src/lib/libbsp/powerpc/mvme5500/wrapup/Makefile.am b/c/src/lib/libbsp/powerpc/mvme5500/wrapup/Makefile.am new file mode 100644 index 0000000000..006597c7c7 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/wrapup/Makefile.am @@ -0,0 +1,27 @@ +## +## Makefile.am,v 1.12.2.1 2003/02/20 21:57:21 joel Exp +## + +BSP_PIECES = clock console irq pci startup tod vectors GT64260 network vme + +# bummer; have to use $foreach since % pattern subst rules only replace 1x +OBJS = $(foreach piece, $(BSP_PIECES), ../$(piece)/$(ARCH)/*.$(OBJEXT)) \ + $(wildcard ../../../../libcpu/$(RTEMS_CPU)/shared/*/$(ARCH)/*.$(OBJEXT)) \ + $(wildcard ../../../../libcpu/$(RTEMS_CPU)/mpc6xx/*/$(ARCH)/*.$(OBJEXT)) \ + ../@exceptions@/$(ARCH)/rtems-cpu.rel \ + $(wildcard ../../../../libcpu/$(RTEMS_CPU)/$(RTEMS_CPU_MODEL)/*/$(ARCH)/*.$(OBJEXT)) +LIB = $(ARCH)/libbsp.a + +include $(top_srcdir)/../../../../../../automake/compile.am +include $(top_srcdir)/../../../../../../automake/lib.am + +# +# (OPTIONAL) Add local stuff here using += +# + +$(LIB): $(OBJS) + $(make-library) + +all-local: $(ARCH) $(LIB) + +include $(top_srcdir)/../../../../../../automake/local.am diff --git a/c/src/lib/libbsp/powerpc/mvme5500/wrapup/Makefile.in b/c/src/lib/libbsp/powerpc/mvme5500/wrapup/Makefile.in new file mode 100644 index 0000000000..a46d33f56b --- /dev/null +++ b/c/src/lib/libbsp/powerpc/mvme5500/wrapup/Makefile.in @@ -0,0 +1,509 @@ +# Makefile.in generated by automake 1.7.2 from Makefile.am. +# @configure_input@ + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ + +AR = @AR@ + +# OBSOLETE: Don't use +AS = $(CC) +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BARE_CPU_CFLAGS = @BARE_CPU_CFLAGS@ +BARE_CPU_MODEL = @BARE_CPU_MODEL@ + +CC = @CC@ $(GCCSPECS) + +CCAS = $(CC) +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @RTEMS_CFLAGS@ $(XCFLAGS) +CFLAGS_DEBUG_V = @CFLAGS_DEBUG_V@ +CFLAGS_OPTIMIZE_V = @CFLAGS_OPTIMIZE_V@ +CFLAGS_PROFILE_V = @CFLAGS_PROFILE_V@ +CPP = @CPP@ $(GCCSPECS) + +CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES) $(XCPPFLAGS) + +CPU_CFLAGS = @CPU_CFLAGS@ +CYGPATH_W = @CYGPATH_W@ + +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +ENDIF = @ENDIF@ +EXEEXT = @EXEEXT@ +GCC_SPECS = @GCC_SPECS@ +HAS_MP = @HAS_MP@ +HAS_NETWORKING = @HAS_NETWORKING@ +HAS_NETWORKING_FALSE = @HAS_NETWORKING_FALSE@ +HAS_NETWORKING_TRUE = @HAS_NETWORKING_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKE = @MAKE@ +MAKEINFO = @MAKEINFO@ +MULTILIB_FALSE = @MULTILIB_FALSE@ +MULTILIB_TRUE = @MULTILIB_TRUE@ +NM = @NM@ +OBJCOPY = @OBJCOPY@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKHEX = @PACKHEX@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PROJECT_INCLUDE = @PROJECT_INCLUDE@ +PROJECT_RELEASE = @PROJECT_RELEASE@ +PROJECT_ROOT = @PROJECT_ROOT@ +PROJECT_TOPdir = @PROJECT_TOPdir@ +RANLIB = @RANLIB@ +RTEMS_BSP = @RTEMS_BSP@ +RTEMS_BSP_FAMILY = @RTEMS_BSP_FAMILY@ +RTEMS_BSP_SPECS = @RTEMS_BSP_SPECS@ +RTEMS_CFLAGS = @RTEMS_CFLAGS@ +RTEMS_CPPFLAGS = @RTEMS_CPPFLAGS@ +RTEMS_CPU = @RTEMS_CPU@ +RTEMS_CPU_MODEL = @RTEMS_CPU_MODEL@ +RTEMS_HAS_NETWORKING = @RTEMS_HAS_NETWORKING@ +RTEMS_HOST = @RTEMS_HOST@ +RTEMS_ROOT = @RTEMS_ROOT@ +RTEMS_TOPdir = @RTEMS_TOPdir@ +RTEMS_USE_GCC_FALSE = @RTEMS_USE_GCC_FALSE@ +RTEMS_USE_GCC_TRUE = @RTEMS_USE_GCC_TRUE@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIZE = @SIZE@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__include = @am__include@ +am__quote = @am__quote@ +bindir = @bindir@ +bsplibdir = @bsplibdir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exceptions = @exceptions@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ + +BSP_PIECES = clock console irq pci startup vectors GT64260 network vme + +# bummer; have to use $foreach since % pattern subst rules only replace 1x +OBJS = $(foreach piece, $(BSP_PIECES), ../$(piece)/$(ARCH)/*.$(OBJEXT)) \ + $(wildcard ../../../../libcpu/$(RTEMS_CPU)/shared/*/$(ARCH)/*.$(OBJEXT)) \ + $(wildcard ../../../../libcpu/$(RTEMS_CPU)/mpc6xx/*/$(ARCH)/*.$(OBJEXT)) \ + ../@exceptions@/$(ARCH)/rtems-cpu.rel \ + $(wildcard ../../../../libcpu/$(RTEMS_CPU)/$(RTEMS_CPU_MODEL)/*/$(ARCH)/*.$(OBJEXT)) + +LIB = $(ARCH)/libbsp.a + +@RTEMS_USE_GCC_TRUE@GCCSPECS = $(GCC_SPECS) $(RTEMS_BSP_SPECS) +# CXXFLAGS = @RTEMS_CXXFLAGS@ $(XCXXFLAGS) +CXXFLAGS = @RTEMS_CFLAGS@ $(XCXXFLAGS) +ASFLAGS = $(CPU_ASFLAGS) $(CPU_CFLAGS) $(XASFLAGS) + +LINK_LIBS = $(LD_LIBS) + + +# +# Client compiler and support tools +# + +# +# How to compile stuff into ${ARCH} subdirectory +# +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + + +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + +CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) +ASCOMPILE = $(AS) $(AM_ASFLAGS) $(ASFLAGS) + + +# Dependency files for use by gmake +# NOTE: we don't put them into $(ARCH) +# so that 'make clean' doesn't blow it away +DEPEND = Depends-${ARCH} + + +# spell out all the LINK_FILE's, rather than using -lbsp, so +# that $(LINK_FILES) can be a dependency +LINK_OBJS = \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +LINK_FILES = \ + $(START_FILE) \ + $(OBJS) \ + $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) + + +VARIANT = OPTIMIZE + +VARIANT_OPTIMIZE_V = OPTIMIZE +VARIANT_DEBUG_V = DEBUG +VARIANT_PROFILE_V = PROFILE +VARIANT_optimize_V = OPTIMIZE +VARIANT_debug_V = DEBUG +VARIANT_profile_V = PROFILE + +VARIANT_V = $(VARIANT_$(VARIANT)_V) + +ARCH_OPTIMIZE_V = o-optimize +ARCH_DEBUG_V = o-debug +ARCH_PROFILE_V = o-profile + +ARCH__V = $(ARCH_OPTIMIZE_V) +ARCH = $(ARCH_$(VARIANT_V)_V) + +LIBSUFFIX_OPTIMIZE_V = +LIBSUFFIX_DEBUG_V = _g +LIBSUFFIX_PROFILE_V = _p +LIBSUFFIX__V = $(LIBSUFFIX_OPTIMIZE_V) + +LIB_VARIANT = $(LIBSUFFIX_$(VARIANT_V)_V) +CFLAGS__V = $(CFLAGS_OPTIMIZE_V) + +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_OPTIMIZE_V = +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_DEBUG_V = -qrtems_debug -Wno-unused +@RTEMS_USE_GCC_TRUE@RTEMS_CFLAGS_PROFILE_V = -pg + +RTEMS_CFLAGS__V = $(RTEMS_CFLAGS_OPTIMIZE_V) +CXX = @CXX@ $(GCCSPECS) + +AM_CPPFLAGS = $(RTEMS_CPPFLAGS) +AM_CFLAGS = +AM_CXXFLAGS = +AM_CCASFLAGS = $(CPU_CFLAGS) $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS) + +ARFLAGS = ruv + +TMPINSTALL_FILES = $(PROJECT_RELEASE)/lib + +PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools +subdir = wrapup +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/bspopts.tmp +CONFIG_CLEAN_FILES = +DIST_SOURCES = +DIST_COMMON = $(top_srcdir)/../../../../../../automake/compile.am \ + $(top_srcdir)/../../../../../../automake/lib.am \ + $(top_srcdir)/../../../../../../automake/local.am Makefile.am \ + Makefile.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/../../../../../../automake/compile.am $(top_srcdir)/../../../../../../automake/lib.am $(top_srcdir)/../../../../../../automake/local.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign wrapup/Makefile +Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + $(mkinstalldirs) $(distdir)/../../../../../../../automake + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile all-local + +installdirs: + +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-local mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am all-local check check-am clean clean-generic \ + clean-local distclean distclean-generic distdir dvi dvi-am info \ + info-am install install-am install-data install-data-am \ + install-exec install-exec-am install-info install-info-am \ + install-man install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ + uninstall-am uninstall-info-am + +@RTEMS_USE_GCC_FALSE@include $(CONFIG.CC) + +${ARCH}/%.o: %.c + ${COMPILE} -o $@ -c $< + +${ARCH}/%.o: %.cc + ${CXXCOMPILE} -o $@ -c $< + +${ARCH}/%.o: %.S + ${CCASCOMPILE} -DASM -o $@ -c $< + +# We deliberately don't have anything depend on the +# $(DEPEND) file; otherwise it will get rebuilt even +# on 'make clean' +# + +@RTEMS_USE_GCC_TRUE@depend-gcc: $(C_FILES) $(CC_FILES) $(S_FILES) +@RTEMS_USE_GCC_TRUE@ $(COMPILE) -M $^ | \ +@RTEMS_USE_GCC_TRUE@ sed -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \ +@RTEMS_USE_GCC_TRUE@ -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp +@RTEMS_USE_GCC_TRUE@ mv $(DEPEND).tmp $(DEPEND) + +# pull in dependencies if they exist +@RTEMS_USE_GCC_TRUE@ifeq (${DEPEND},$(wildcard ${DEPEND})) +@RTEMS_USE_GCC_TRUE@include ${DEPEND} +@RTEMS_USE_GCC_TRUE@@ENDIF@ +depend: depend-am + +@RTEMS_USE_GCC_TRUE@define make-rel +@RTEMS_USE_GCC_TRUE@ $(LINK) -qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) $^ +@RTEMS_USE_GCC_TRUE@endef +@RTEMS_USE_GCC_FALSE@define make-rel +@RTEMS_USE_GCC_FALSE@ $(LINK) $(XLDFLAGS) $^ +@RTEMS_USE_GCC_FALSE@endef + +${ARCH}: + mkdir ${ARCH} + +clean-local: + $(RM) -r o-optimize o-debug o-profile $(CLEANDIRS) + $(RM) Depends-o-optimize.tmp Depends-o-debug.tmp Depends-o-profile.tmp + +define make-library +test -d $(ARCH) || mkdir $(ARCH) +$(RM) $@ +$(AR) $(ARFLAGS) $@ $^ +$(RANLIB) $@ +endef + +$(PROJECT_RELEASE)/lib: + @$(mkinstalldirs) $@ + +.PRECIOUS: $(LIB) + +# +# (OPTIONAL) Add local stuff here using += +# + +$(LIB): $(OBJS) + $(make-library) + +all-local: $(ARCH) $(LIB) + +debug: + @echo + @echo "\"make debug\" is obsolete, instead use:" + @echo " make VARIANT=DEBUG" + @echo + +.PHONY: debug + +profile: + @echo + @echo "\"make profile\" is obsolete, instead use:" + @echo " make VARIANT=PROFILE" + @echo + +.PHONY: profile + +preinstall-am: $(PREINSTALL_FILES) +preinstall: preinstall-am +.PHONY: preinstall preinstall-am + +depend-am: depend-gcc +depend: depend-am +.PHONY: depend depend-am depend-gcc +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: -- cgit v1.2.3