forked from Imagelibrary/rtems
Add MVME550 BSP
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2004-10-20 Eric Norum <norume@aps.anl.gov>
|
||||
|
||||
* acinclude.m4: Add mvme5500 BSP
|
||||
* configure.ac
|
||||
* mvme5500/.......
|
||||
|
||||
2004-09-24 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* configure.ac: Require automake > 1.9.
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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
|
||||
|
||||
210
c/src/lib/libbsp/powerpc/mvme5500/GT64260/GT64260TWSI.c
Normal file
210
c/src/lib/libbsp/powerpc/mvme5500/GT64260/GT64260TWSI.c
Normal file
@@ -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 <feng1@bnl.gov>
|
||||
* 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 <libcpu/spr.h> /*registers.h included here for rtems_bsp_delay()*/
|
||||
#include <libcpu/io.h>
|
||||
#include <rtems/bspIo.h> /* 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<MAX_LOOP; loop++ ) {
|
||||
/* if (start condition transmitted) ||
|
||||
* (repeated start condition transmitted )
|
||||
*/
|
||||
if (((status= inl( TWSI_STATUS)) == 8) || (status == 0x10)) {
|
||||
#if TWSI_DEBUG
|
||||
printk(")");
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
rtems_bsp_delay(1000);
|
||||
}
|
||||
}
|
||||
/* if loop ends or intFlag ==0 */
|
||||
GT64260TWSIstop();
|
||||
return(-1);
|
||||
}
|
||||
|
||||
int GT64260TWSIread(unsigned char * pData,int lastByte)
|
||||
{
|
||||
unsigned int loop;
|
||||
|
||||
#if TWSI_DEBUG
|
||||
printk("GT64260TWSIread(");
|
||||
#endif
|
||||
/* Clear INTFLG and set ACK and ENABLE bits */
|
||||
outl((TWSI_ACK | TWSI_TWSIEN), TWSI_CTRL);
|
||||
rtems_bsp_delay(1000);
|
||||
|
||||
if (GT64260TWSIintFlag()) {
|
||||
for (loop = 0; loop< MAX_LOOP; loop++) {
|
||||
/* if Master received read data, acknowledge transmitted */
|
||||
if ( (inl( TWSI_STATUS) == 0x50)) {
|
||||
*pData = (unsigned char) inl( TWSI_DATA);
|
||||
rtems_bsp_delay(1500);
|
||||
|
||||
/* Clear INTFLAG and set Enable bit only */
|
||||
if (lastByte) outl(TWSI_TWSIEN, TWSI_CTRL);
|
||||
rtems_bsp_delay(1500);
|
||||
#if TWSI_DEBUG
|
||||
printk(")\n");
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
rtems_bsp_delay(1000);
|
||||
} /* end for */
|
||||
}
|
||||
/* if loop ends or intFlag ==0 */
|
||||
GT64260TWSIstop();
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/* do a TWSI write cycle on the TWSI bus*/
|
||||
int GT64260TWSIwrite(unsigned char Data)
|
||||
{
|
||||
unsigned int loop;
|
||||
unsigned int status;
|
||||
|
||||
#if TWSI_DEBUG
|
||||
printk("GT64260TWSIwrite(");
|
||||
#endif
|
||||
/* Write data into the TWSI data register */
|
||||
outl(((unsigned int) Data), TWSI_DATA);
|
||||
rtems_bsp_delay(1000);
|
||||
|
||||
/* Clear INTFLG in the control register to drive data onto TWSI bus */
|
||||
outl(0, TWSI_CTRL);
|
||||
rtems_bsp_delay(1000);
|
||||
|
||||
if (GT64260TWSIintFlag() ) {
|
||||
for (loop = 0; loop< MAX_LOOP; loop++) {
|
||||
rtems_bsp_delay(1000);
|
||||
/* if address + write bit transmitted, acknowledge not received */
|
||||
if ( (status = inl( TWSI_STATUS)) == 0x20) {
|
||||
/* No device responding, generate STOP and return -1 */
|
||||
printk("no device responding\n");
|
||||
GT64260TWSIstop();
|
||||
return(-1);
|
||||
}
|
||||
/* if (address + write bit transmitted, acknowledge received)
|
||||
* (Master transmmitted data byte, acknowledge received)
|
||||
* (address + read bit transmitted, acknowledge received)
|
||||
*/
|
||||
if ((status == 0x18)||(status == 0x28)||(status == 0x40)) {
|
||||
#if TWSI_DEBUG
|
||||
printk(")\n");
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
rtems_bsp_delay(1000);
|
||||
} /* end for */
|
||||
}
|
||||
printk("No correct status, timeout\n");
|
||||
GT64260TWSIstop();
|
||||
return(-1);
|
||||
}
|
||||
9
c/src/lib/libbsp/powerpc/mvme5500/GT64260/GT64260TWSI.h
Normal file
9
c/src/lib/libbsp/powerpc/mvme5500/GT64260/GT64260TWSI.h
Normal file
@@ -0,0 +1,9 @@
|
||||
/* GT64260TWSI.h - header for the GT64260 Two-Wire Serial Interface */
|
||||
|
||||
/* TWSI Control Register Bits */
|
||||
#define TWSI_ACK 4
|
||||
#define TWSI_INTFLG 8
|
||||
#define TWSI_STOP 0x10
|
||||
#define TWSI_START 0x20
|
||||
#define TWSI_TWSIEN 0x40
|
||||
#define TWSI_INTEN 0x80
|
||||
100
c/src/lib/libbsp/powerpc/mvme5500/GT64260/MVME5500I2C.c
Normal file
100
c/src/lib/libbsp/powerpc/mvme5500/GT64260/MVME5500I2C.c
Normal file
@@ -0,0 +1,100 @@
|
||||
/* MVME5500I2C.c
|
||||
*
|
||||
* Copyright (c) 2003, 2004 Brookhaven National Laboratory
|
||||
* Author: S. Kate Feng <feng1@bnl.gov>
|
||||
* 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 <rtems/bspIo.h> /* 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);
|
||||
}
|
||||
|
||||
52
c/src/lib/libbsp/powerpc/mvme5500/GT64260/Makefile.am
Normal file
52
c/src/lib/libbsp/powerpc/mvme5500/GT64260/Makefile.am
Normal file
@@ -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
|
||||
601
c/src/lib/libbsp/powerpc/mvme5500/GT64260/Makefile.in
Normal file
601
c/src/lib/libbsp/powerpc/mvme5500/GT64260/Makefile.in
Normal file
@@ -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:
|
||||
11
c/src/lib/libbsp/powerpc/mvme5500/GT64260/VPD.h
Normal file
11
c/src/lib/libbsp/powerpc/mvme5500/GT64260/VPD.h
Normal file
@@ -0,0 +1,11 @@
|
||||
/* The mapping of the Configuration VPD
|
||||
*
|
||||
* (C) 2004, NSLS, Brookhaven National Laboratory,
|
||||
* S. Kate Feng, <feng1@bnl.gov>
|
||||
*
|
||||
*/
|
||||
|
||||
extern unsigned char ConfVPD_buff[200];
|
||||
|
||||
#define VPD_ENET0_OFFSET 0x3c
|
||||
#define VPD_ENET1_OFFSET 0x45
|
||||
15
c/src/lib/libbsp/powerpc/mvme5500/GT64260/bspMvme5500.h
Normal file
15
c/src/lib/libbsp/powerpc/mvme5500/GT64260/bspMvme5500.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/* GT64260 register base mapping on the MVME5500
|
||||
*
|
||||
* (C) Shuchen K. Feng <feng1@bnl.gov>,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 */
|
||||
811
c/src/lib/libbsp/powerpc/mvme5500/GT64260/gtreg.h
Normal file
811
c/src/lib/libbsp/powerpc/mvme5500/GT64260/gtreg.h
Normal file
@@ -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
|
||||
|
||||
/* <skf> 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 /*<skf>*/
|
||||
/*
|
||||
* 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 <skf> */
|
||||
#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 <skf> */
|
||||
|
||||
#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 */
|
||||
112
c/src/lib/libbsp/powerpc/mvme5500/LICENSE
Normal file
112
c/src/lib/libbsp/powerpc/mvme5500/LICENSE
Normal file
@@ -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 <20> 2004, Brookhaven National Laboratory and
|
||||
Shuchen K. Feng <feng1@bnl.gov>
|
||||
|
||||
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.
|
||||
17
c/src/lib/libbsp/powerpc/mvme5500/Makefile.am
Normal file
17
c/src/lib/libbsp/powerpc/mvme5500/Makefile.am
Normal file
@@ -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
|
||||
105
c/src/lib/libbsp/powerpc/mvme5500/README
Normal file
105
c/src/lib/libbsp/powerpc/mvme5500/README
Normal file
@@ -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 <strauman@slac.stanford.edu> 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
|
||||
|
||||
|
||||
19
c/src/lib/libbsp/powerpc/mvme5500/README.VME
Normal file
19
c/src/lib/libbsp/powerpc/mvme5500/README.VME
Normal file
@@ -0,0 +1,19 @@
|
||||
README.VME: written by S. Kate Feng <feng1@bnl.gov> , 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.
|
||||
|
||||
|
||||
62
c/src/lib/libbsp/powerpc/mvme5500/README.booting
Normal file
62
c/src/lib/libbsp/powerpc/mvme5500/README.booting
Normal file
@@ -0,0 +1,62 @@
|
||||
README.booting: written by S. Kate Feng <feng1@bnl.gov>, 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.
|
||||
|
||||
52
c/src/lib/libbsp/powerpc/mvme5500/README.irq
Normal file
52
c/src/lib/libbsp/powerpc/mvme5500/README.irq
Normal file
@@ -0,0 +1,52 @@
|
||||
README.irq : Shuchen Kate Feng <feng1@bnl.gov>, 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)
|
||||
|
||||
25
c/src/lib/libbsp/powerpc/mvme5500/bsp_specs
Normal file
25
c/src/lib/libbsp/powerpc/mvme5500/bsp_specs
Normal file
@@ -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}
|
||||
24
c/src/lib/libbsp/powerpc/mvme5500/clock/Makefile.am
Normal file
24
c/src/lib/libbsp/powerpc/mvme5500/clock/Makefile.am
Normal file
@@ -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
|
||||
503
c/src/lib/libbsp/powerpc/mvme5500/clock/Makefile.in
Normal file
503
c/src/lib/libbsp/powerpc/mvme5500/clock/Makefile.in
Normal file
@@ -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:
|
||||
5586
c/src/lib/libbsp/powerpc/mvme5500/configure
vendored
Normal file
5586
c/src/lib/libbsp/powerpc/mvme5500/configure
vendored
Normal file
File diff suppressed because it is too large
Load Diff
51
c/src/lib/libbsp/powerpc/mvme5500/configure.ac
Normal file
51
c/src/lib/libbsp/powerpc/mvme5500/configure.ac
Normal file
@@ -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
|
||||
33
c/src/lib/libbsp/powerpc/mvme5500/console/Makefile.am
Normal file
33
c/src/lib/libbsp/powerpc/mvme5500/console/Makefile.am
Normal file
@@ -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
|
||||
582
c/src/lib/libbsp/powerpc/mvme5500/console/Makefile.in
Normal file
582
c/src/lib/libbsp/powerpc/mvme5500/console/Makefile.in
Normal file
@@ -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:
|
||||
26
c/src/lib/libbsp/powerpc/mvme5500/include/Makefile.am
Normal file
26
c/src/lib/libbsp/powerpc/mvme5500/include/Makefile.am
Normal file
@@ -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
|
||||
437
c/src/lib/libbsp/powerpc/mvme5500/include/Makefile.in
Normal file
437
c/src/lib/libbsp/powerpc/mvme5500/include/Makefile.in
Normal file
@@ -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:
|
||||
109
c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h
Normal file
109
c/src/lib/libbsp/powerpc/mvme5500/include/bsp.h
Normal file
@@ -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 <bspopts.h>
|
||||
|
||||
#include <rtems.h>
|
||||
#include <console.h>
|
||||
#include <clockdrv.h>
|
||||
#include <libcpu/io.h>
|
||||
#include <bsp/vectors.h>
|
||||
|
||||
#include <bsp/bspMvme5500.h>
|
||||
|
||||
/* 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
|
||||
23
c/src/lib/libbsp/powerpc/mvme5500/include/bspopts.h.in
Normal file
23
c/src/lib/libbsp/powerpc/mvme5500/include/bspopts.h.in
Normal file
@@ -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
|
||||
245
c/src/lib/libbsp/powerpc/mvme5500/irq/GT64260Int.c
Normal file
245
c/src/lib/libbsp/powerpc/mvme5500/irq/GT64260Int.c
Normal file
@@ -0,0 +1,245 @@
|
||||
/* GT64260Int.c - GT64260 Interrupt controller support functions
|
||||
*
|
||||
* Copyright 2003, 2004, Brookhaven National Laboratory and
|
||||
* Shuchen Kate Feng <feng1@bnl.gov>
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution.
|
||||
*
|
||||
*/
|
||||
#include <libcpu/io.h>
|
||||
#include <rtems/bspIo.h> /* 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<MainIrqTblPtr; j++)
|
||||
mainIrqTbl[j]=mainIrqTbl[j+1];
|
||||
MainIrqInTbl &= ~(1LLU << irqNum);
|
||||
MainIrqTblPtr--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* BSP_enable_main_irq enables the corresponding bit in the low or high
|
||||
* "main cause cpu int mask register".
|
||||
*
|
||||
*/
|
||||
void BSP_enable_main_irq(const rtems_irq_symbolic_name irqNum)
|
||||
{
|
||||
unsigned bitNum, mask;
|
||||
unsigned int level;
|
||||
|
||||
bitNum = ((int)irqNum) - BSP_MICL_IRQ_LOWEST_OFFSET;
|
||||
|
||||
_CPU_ISR_Disable(level);
|
||||
|
||||
#if DynamicIrqTbl
|
||||
UpdateMainIrqTbl((int) irqNum);
|
||||
#endif
|
||||
if (bitNum <32) {
|
||||
GT_MAINirqLO_cache |= (1 << bitNum);
|
||||
outl(GT_MAINirqLO_cache, GT_CPU_INT_MASK_LO);
|
||||
}
|
||||
else {
|
||||
bitNum-=32;
|
||||
GT_MAINirqHI_cache |= (1 << bitNum);
|
||||
outl(GT_MAINirqHI_cache, GT_CPU_INT_MASK_HI);
|
||||
}
|
||||
_CPU_ISR_Enable (level);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* BSP_disable_main_irq disables the corresponding bit in the low or high
|
||||
* main cause cpu int mask register.
|
||||
*
|
||||
*/
|
||||
void BSP_disable_main_irq(const rtems_irq_symbolic_name irqNum)
|
||||
{
|
||||
unsigned bitNum;
|
||||
unsigned int mask, level;
|
||||
|
||||
bitNum = ((int)irqNum) - BSP_MICL_IRQ_LOWEST_OFFSET;
|
||||
|
||||
_CPU_ISR_Disable(level);
|
||||
|
||||
#if DynamicIrqTbl
|
||||
CleanMainIrqTbl((int) irqNum);
|
||||
#endif
|
||||
if (bitNum <32) {
|
||||
GT_MAINirqLO_cache &= ~(1 << bitNum);
|
||||
outl(GT_MAINirqLO_cache, GT_CPU_INT_MASK_LO);
|
||||
}
|
||||
else {
|
||||
bitNum-=32;
|
||||
GT_MAINirqHI_cache &= ~(1 << bitNum);
|
||||
outl(GT_MAINirqHI_cache, GT_CPU_INT_MASK_HI);
|
||||
}
|
||||
_CPU_ISR_Enable (level);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* BSP_enable_gpp_irq enables the corresponding bit in the GPP interrupt
|
||||
* mask register. The interrupt level is numerically equivalent to the
|
||||
* corresponding interrupt vector.
|
||||
*
|
||||
*/
|
||||
void BSP_enable_gpp_irq(const rtems_irq_symbolic_name irqNum)
|
||||
{
|
||||
unsigned bitNum;
|
||||
unsigned int mask, level;
|
||||
int group, bit;
|
||||
|
||||
bitNum = ((int)irqNum) - BSP_GPP_IRQ_LOWEST_OFFSET;
|
||||
|
||||
_CPU_ISR_Disable(level);
|
||||
|
||||
#if DynamicIrqTbl
|
||||
group = bitNum/8;
|
||||
if ( !GPPinMainIrqTbl[group]) /* avoid duplicated entry */
|
||||
UpdateMainIrqTbl(BSP_MAIN_GPP7_0_IRQ+group);
|
||||
bit = bitNum%8;
|
||||
GPPinMainIrqTbl[group] |= (1<<bit);
|
||||
#endif
|
||||
|
||||
mask = 1 << bitNum;
|
||||
GT_GPPirq_cache |= mask;
|
||||
outl(GT_GPPirq_cache, GT_GPP_Interrupt_Mask);
|
||||
#ifdef SHOW_MORE_INIT_SETTINGS
|
||||
printk("enable irqNum %d, bitnum %d \n", irqNum, bitNum);
|
||||
printk("GPP mask %d \n", inl(GT_GPP_Interrupt_Mask));
|
||||
#endif
|
||||
|
||||
_CPU_ISR_Enable (level);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* BSP_disable_gpp_irq disables the corresponding bit in the General Purpose
|
||||
* Port Interrupt. The interrupt level is numerically equivalent to the
|
||||
* corresponding interrupt vector.
|
||||
*
|
||||
*/
|
||||
void BSP_disable_gpp_irq(const rtems_irq_symbolic_name irqNum)
|
||||
{
|
||||
unsigned bitNum;
|
||||
unsigned int mask, level;
|
||||
int group, bit;
|
||||
|
||||
bitNum = ((int)irqNum) - BSP_GPP_IRQ_LOWEST_OFFSET;
|
||||
|
||||
_CPU_ISR_Disable(level);
|
||||
#if DynamicIrqTbl
|
||||
group = bitNum/8;
|
||||
bit = bitNum%8;
|
||||
GPPinMainIrqTbl[group] &= ~(1<<bit);
|
||||
if ( !GPPinMainIrqTbl[group])/* If it's really the last one */
|
||||
CleanMainIrqTbl(BSP_MAIN_GPP7_0_IRQ+group);
|
||||
#endif
|
||||
#ifdef SHOW_MORE_INIT_SETTINGS
|
||||
printk("disable irqNum %d, bitnum %d \n", irqNum, bitNum);
|
||||
#endif
|
||||
mask = ~ (1 << bitNum);
|
||||
GT_GPPirq_cache &= mask;
|
||||
outl(GT_GPPirq_cache, GT_GPP_Interrupt_Mask);
|
||||
_CPU_ISR_Enable (level);
|
||||
}
|
||||
|
||||
/* Only print ten entries for now */
|
||||
void BSP_printMainIrqTbl()
|
||||
{
|
||||
int i;
|
||||
|
||||
printk("mainIrqTbl[10]={");
|
||||
for (i=0; i<10; i++)
|
||||
printk("%d,", mainIrqTbl[i]);
|
||||
printk("}\n");
|
||||
printk("GPPinMainIrqTbl 0x%x 0x%x 0x%x 0x%x\n",
|
||||
GPPinMainIrqTbl[0], GPPinMainIrqTbl[1],
|
||||
GPPinMainIrqTbl[2], GPPinMainIrqTbl[3]);
|
||||
}
|
||||
43
c/src/lib/libbsp/powerpc/mvme5500/irq/Makefile.am
Normal file
43
c/src/lib/libbsp/powerpc/mvme5500/irq/Makefile.am
Normal file
@@ -0,0 +1,43 @@
|
||||
##
|
||||
## $Id: Makefile.am S. Kate Feng, 12/03
|
||||
##
|
||||
|
||||
VPATH = @srcdir@:@srcdir@/../../shared/irq
|
||||
INCLUDES = -I @srcdir@/../irq
|
||||
|
||||
C_FILES = irq_init.c GT64260Int.c irq.c
|
||||
|
||||
include_bspdir = $(includedir)/bsp
|
||||
include_bsp_HEADERS = irq.h
|
||||
|
||||
H_FILES = irq.h
|
||||
|
||||
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
|
||||
|
||||
S_FILES = irq_asm.S
|
||||
S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.$(OBJEXT))
|
||||
|
||||
EXTRA_DIST = irq_init.c GT64260Int.c irq.c
|
||||
|
||||
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 +=
|
||||
#
|
||||
|
||||
$(PROJECT_INCLUDE)/bsp:
|
||||
$(mkinstalldirs) $<
|
||||
|
||||
$(PROJECT_INCLUDE)/bsp/irq.h: irq.h
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
|
||||
PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
|
||||
|
||||
all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS)
|
||||
|
||||
include $(top_srcdir)/../../../../../../automake/local.am
|
||||
594
c/src/lib/libbsp/powerpc/mvme5500/irq/Makefile.in
Normal file
594
c/src/lib/libbsp/powerpc/mvme5500/irq/Makefile.in
Normal file
@@ -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@:@srcdir@/../../shared/irq
|
||||
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@/../irq
|
||||
|
||||
C_FILES = irq_init.c GT64260Int.c irq.c
|
||||
|
||||
include_bspdir = $(includedir)/bsp
|
||||
include_bsp_HEADERS = irq.h
|
||||
|
||||
H_FILES = irq.h
|
||||
|
||||
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
|
||||
|
||||
S_FILES = irq_asm.S
|
||||
S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.$(OBJEXT))
|
||||
|
||||
EXTRA_DIST = irq_init.c GT64260Int.c irq.c
|
||||
|
||||
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
|
||||
|
||||
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
|
||||
PREINSTALL_FILES = $(PROJECT_INCLUDE)/bsp $(PROJECT_INCLUDE)/bsp/irq.h
|
||||
|
||||
PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools
|
||||
subdir = irq
|
||||
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 irq/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/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:
|
||||
544
c/src/lib/libbsp/powerpc/mvme5500/irq/irq.c
Normal file
544
c/src/lib/libbsp/powerpc/mvme5500/irq/irq.c
Normal file
@@ -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 <strauman@slac.stanford.edu>
|
||||
* for providing inputs to the IRQ handling and optimization.
|
||||
*
|
||||
* Modified and added support for the MVME5500 board
|
||||
* Copyright 2003, 2004, Shuchen Kate Feng <feng1@bnl.gov>,
|
||||
* NSLS,Brookhaven National Laboratory
|
||||
*
|
||||
*/
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <bsp.h>
|
||||
#include <bsp/irq.h>
|
||||
#include <rtems/score/thread.h>
|
||||
#include <rtems/score/apiext.h>
|
||||
#include <libcpu/raw_exception.h>
|
||||
#include <libcpu/io.h>
|
||||
#include <bsp/vectors.h>
|
||||
|
||||
#include <rtems/bspIo.h> /* 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<<bitNum)) {
|
||||
/* Clear the GPP interrupt cause bit */
|
||||
outb( ~(1<<bitNum), GT_GPP_Interrupt_Cause);/* Till Straumann */
|
||||
found = 1;
|
||||
irqNum = bitNum+BSP_GPP_IRQ_LOWEST_OFFSET;
|
||||
/* call the necessary interrupt handlers */
|
||||
if (rtems_hdl_tbl[irqNum].hdl != default_rtems_entry.hdl)
|
||||
rtems_hdl_tbl[irqNum].hdl();
|
||||
else
|
||||
gpp_int_error= bitNum; /*GPP interrupt bitNum not connected */
|
||||
}
|
||||
}
|
||||
if ( !found) gpp_int_error = 33; /* spurious GPP interrupt */
|
||||
}
|
||||
|
||||
void GT_GPP_IntHandler1()
|
||||
{
|
||||
unsigned gppCause, irqNum, bitNum;
|
||||
int i, found=0;
|
||||
|
||||
gppCause = inb(GT_GPP_Int1_Cause) & (GT_GPPirq_cache>>8);
|
||||
|
||||
for (i=0; GPP15_8IrqTbl[i]!=-1;i++){
|
||||
bitNum =GPP15_8IrqTbl[i];
|
||||
if (gppCause & (1<<bitNum)) {
|
||||
/* Clear the GPP interrupt cause bit */
|
||||
outb( ~(1<<bitNum), GT_GPP_Int1_Cause); /* Till Straumann */
|
||||
found = 1;
|
||||
irqNum = bitNum+BSP_GPP8_IRQ_OFFSET;
|
||||
/* call the necessary interrupt handlers */
|
||||
if (rtems_hdl_tbl[irqNum].hdl != default_rtems_entry.hdl)
|
||||
rtems_hdl_tbl[irqNum].hdl();
|
||||
else
|
||||
gpp_int_error= bitNum+8; /*GPP interrupt bitNum not connected */
|
||||
}
|
||||
}
|
||||
if ( !found) gpp_int_error = 33; /* spurious GPP interrupt */
|
||||
}
|
||||
void GT_GPP_IntHandler2()
|
||||
{
|
||||
unsigned gppCause, irqNum, bitNum;
|
||||
int i, found=0;
|
||||
|
||||
gppCause = inb(GT_GPP_Int2_Cause) & (GT_GPPirq_cache>>16);
|
||||
|
||||
for (i=0; GPP23_16IrqTbl[i]!=-1;i++){
|
||||
bitNum =GPP23_16IrqTbl[i];
|
||||
if (gppCause & (1<<bitNum)) {
|
||||
/* Clear the GPP interrupt cause bit */
|
||||
outb( ~(1<<bitNum), GT_GPP_Int2_Cause);
|
||||
found = 1;
|
||||
irqNum = bitNum+BSP_GPP16_IRQ_OFFSET;
|
||||
/* call the necessary interrupt handlers */
|
||||
if (rtems_hdl_tbl[irqNum].hdl != default_rtems_entry.hdl)
|
||||
rtems_hdl_tbl[irqNum].hdl();
|
||||
else
|
||||
gpp_int_error= bitNum+16; /*GPP interrupt bitNum not connected */
|
||||
}
|
||||
}
|
||||
if ( !found) gpp_int_error = 33; /* spurious GPP interrupt */
|
||||
}
|
||||
|
||||
void GT_GPP_IntHandler3()
|
||||
{
|
||||
unsigned gppCause, irqNum, bitNum;
|
||||
int i, found=0;
|
||||
|
||||
gppCause = inb(GT_GPP_Int3_Cause) & (GT_GPPirq_cache>>24);
|
||||
|
||||
for (i=0; GPP31_24IrqTbl[i]!=-1;i++){
|
||||
bitNum=GPP31_24IrqTbl[i];
|
||||
if (gppCause & (1<<bitNum)) {
|
||||
/* Clear the GPP interrupt cause bit */
|
||||
outb(~(1<<bitNum), GT_GPP_Int3_Cause);
|
||||
found = 1;
|
||||
irqNum = bitNum+BSP_GPP24_IRQ_OFFSET;
|
||||
/* call the necessary interrupt handlers */
|
||||
if (rtems_hdl_tbl[irqNum].hdl != default_rtems_entry.hdl)
|
||||
rtems_hdl_tbl[irqNum].hdl();
|
||||
else
|
||||
gpp_int_error= bitNum+24; /*GPP interrupt bitNum not connected */
|
||||
}
|
||||
}
|
||||
if ( !found) gpp_int_error = 33; /* spurious GPP interrupt */
|
||||
}
|
||||
|
||||
/*
|
||||
* ------------------------ RTEMS Irq helper functions ----------------
|
||||
*/
|
||||
|
||||
/*
|
||||
* Caution : this function assumes the variable "internal_config"
|
||||
* is already set and that the tables it contains are still valid
|
||||
* and accessible.
|
||||
*/
|
||||
static void compute_GT64260int_masks_from_prio ()
|
||||
{
|
||||
int i,j;
|
||||
unsigned long long irq_prio_mask=0;
|
||||
|
||||
/*
|
||||
* Always mask at least current interrupt to prevent re-entrance
|
||||
*/
|
||||
for (i=0; i <BSP_MAIN_IRQ_NUMBER; i++) {
|
||||
irq_prio_mask = (unsigned long long) (1LLU << i);
|
||||
for (j = 0; j <BSP_MAIN_IRQ_NUMBER; j++) {
|
||||
/*
|
||||
* Mask interrupts at GT64260int level that have a lower priority
|
||||
* or <Till Straumann> 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<BSP_PROCESSOR_IRQ_LOWEST_OFFSET; i++) {
|
||||
if (rtems_hdl_tbl[i].hdl != default_rtems_entry.hdl) {
|
||||
BSP_enable_gpp_irq(i);
|
||||
rtems_hdl_tbl[i].on(&rtems_hdl_tbl[i]);
|
||||
}
|
||||
else {
|
||||
rtems_hdl_tbl[i].off(&rtems_hdl_tbl[i]);
|
||||
BSP_disable_gpp_irq(i);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* finish with Processor exceptions handled like IRQ
|
||||
*/
|
||||
for (i=BSP_PROCESSOR_IRQ_LOWEST_OFFSET; i < BSP_PROCESSOR_IRQ_MAX_OFFSET+1; i++) {
|
||||
if (rtems_hdl_tbl[i].hdl != default_rtems_entry.hdl) {
|
||||
rtems_hdl_tbl[i].on(&rtems_hdl_tbl[i]);
|
||||
}
|
||||
else {
|
||||
rtems_hdl_tbl[i].off(&rtems_hdl_tbl[i]);
|
||||
}
|
||||
}
|
||||
_CPU_ISR_Enable(level);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int BSP_rtems_irq_mngt_get(rtems_irq_global_settings** config)
|
||||
{
|
||||
*config = internal_config;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _BSP_vme_bridge_irq = -1;
|
||||
|
||||
/*
|
||||
* High level IRQ handler called from shared_raw_irq_code_entry
|
||||
*/
|
||||
void C_dispatch_irq_handler (CPU_Interrupt_frame *frame, unsigned int excNum)
|
||||
{
|
||||
register unsigned msr;
|
||||
register unsigned new_msr;
|
||||
register unsigned mainCause[2], selectCause;
|
||||
register unsigned oldMask[2]={0,0};
|
||||
unsigned i, regNum, irq, bitNum, startIrqNum=0;
|
||||
|
||||
if (excNum == ASM_DEC_VECTOR) {
|
||||
_CPU_MSR_GET(msr);
|
||||
new_msr = msr | MSR_EE;
|
||||
_CPU_MSR_SET(new_msr);
|
||||
|
||||
rtems_hdl_tbl[BSP_DECREMENTER].hdl();
|
||||
|
||||
_CPU_MSR_SET(msr);
|
||||
return;
|
||||
|
||||
}
|
||||
selectCause = inl( GT_CPU_SEL_CAUSE);
|
||||
if (selectCause & HI_INT_CAUSE ) {
|
||||
mainCause[1]= selectCause & inl(GT_CPU_INT_MASK_HI);
|
||||
startIrqNum=32;
|
||||
}
|
||||
else {
|
||||
mainCause[0] =inl(GT_MAIN_INT_CAUSE_LO)&inl(GT_CPU_INT_MASK_LO);
|
||||
mainCause[1] =inl(GT_MAIN_INT_CAUSE_HI)&inl(GT_CPU_INT_MASK_HI);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* very bad practice to put printk here, use only if for debug */
|
||||
printk("main 0 %x, main 1 %x \n", mainCause[0],mainCause[1]);
|
||||
#endif
|
||||
oldMask[0]= GT_MAINirqLO_cache;
|
||||
oldMask[1]= GT_MAINirqHI_cache;
|
||||
|
||||
for (i=0;mainIrqTbl[i]!=-1;i++) {
|
||||
irq=mainIrqTbl[i];
|
||||
if ( irq < startIrqNum ) continue;
|
||||
regNum = irq/32;
|
||||
bitNum = irq % 32;
|
||||
if ( mainCause[regNum] & (1<<bitNum)) {
|
||||
GT_MAINirqLO_cache=oldMask[0]&(~irq_prio_maskLO_tbl[irq]);
|
||||
outl(GT_MAINirqLO_cache, GT_CPU_INT_MASK_LO);
|
||||
__asm __volatile("sync");
|
||||
GT_MAINirqHI_cache=oldMask[1]&(~irq_prio_maskHI_tbl[irq]);
|
||||
outl(GT_MAINirqHI_cache, GT_CPU_INT_MASK_HI);
|
||||
__asm __volatile("sync");
|
||||
|
||||
/* <skf> 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]);
|
||||
}
|
||||
331
c/src/lib/libbsp/powerpc/mvme5500/irq/irq.h
Normal file
331
c/src/lib/libbsp/powerpc/mvme5500/irq/irq.h
Normal file
@@ -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 :
|
||||
*
|
||||
* <http://www.chorus.com/Documentation/index.html> 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 <feng1@bnl.gov>
|
||||
*
|
||||
* - 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
|
||||
242
c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c
Normal file
242
c/src/lib/libbsp/powerpc/mvme5500/irq/irq_init.c
Normal file
@@ -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 <strauman@slac.stanford.edu>
|
||||
* for providing inputs to the IRQ optimization.
|
||||
*
|
||||
* Modified and added support for the MVME5500.
|
||||
* Copyright 2003, 2004, Brookhaven National Laboratory and
|
||||
* Shuchen Kate Feng <feng1@bnl.gov>
|
||||
*
|
||||
* 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 <libcpu/io.h>
|
||||
#include <libcpu/spr.h>
|
||||
#include <bsp/irq.h>
|
||||
#include <bsp.h>
|
||||
#include <libcpu/raw_exception.h> /* 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
|
||||
}
|
||||
1649
c/src/lib/libbsp/powerpc/mvme5500/network/GT64260eth.c
Normal file
1649
c/src/lib/libbsp/powerpc/mvme5500/network/GT64260eth.c
Normal file
File diff suppressed because it is too large
Load Diff
135
c/src/lib/libbsp/powerpc/mvme5500/network/GT64260eth.h
Normal file
135
c/src/lib/libbsp/powerpc/mvme5500/network/GT64260eth.h
Normal file
@@ -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, <feng1@bnl.gov>,
|
||||
* 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;
|
||||
};
|
||||
879
c/src/lib/libbsp/powerpc/mvme5500/network/GT64260ethreg.h
Normal file
879
c/src/lib/libbsp/powerpc/mvme5500/network/GT64260ethreg.h
Normal file
@@ -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 */
|
||||
|
||||
/* <skf> */
|
||||
#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
|
||||
* <PRIOrx> 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_ */
|
||||
43
c/src/lib/libbsp/powerpc/mvme5500/network/Makefile.am
Normal file
43
c/src/lib/libbsp/powerpc/mvme5500/network/Makefile.am
Normal file
@@ -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
|
||||
594
c/src/lib/libbsp/powerpc/mvme5500/network/Makefile.in
Normal file
594
c/src/lib/libbsp/powerpc/mvme5500/network/Makefile.in
Normal file
@@ -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:
|
||||
35
c/src/lib/libbsp/powerpc/mvme5500/pci/Makefile.am
Normal file
35
c/src/lib/libbsp/powerpc/mvme5500/pci/Makefile.am
Normal file
@@ -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
|
||||
586
c/src/lib/libbsp/powerpc/mvme5500/pci/Makefile.in
Normal file
586
c/src/lib/libbsp/powerpc/mvme5500/pci/Makefile.in
Normal file
@@ -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:
|
||||
72
c/src/lib/libbsp/powerpc/mvme5500/pci/detect_host_bridge.c
Normal file
72
c/src/lib/libbsp/powerpc/mvme5500/pci/detect_host_bridge.c
Normal file
@@ -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 <strauman@slac.stanford.edu>
|
||||
*
|
||||
* Copyright (C) 2004 S. Kate Feng, <feng1@bnl.gov>
|
||||
* wrote it to support the MVME5500 board.
|
||||
*
|
||||
*/
|
||||
#include <libcpu/io.h>
|
||||
#include <rtems/bspIo.h> /* printk */
|
||||
|
||||
#include <bsp/pci.h>
|
||||
#include <bsp/gtreg.h>
|
||||
#include <bsp/gtpcireg.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#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);
|
||||
}
|
||||
91
c/src/lib/libbsp/powerpc/mvme5500/pci/gtpcireg.h
Normal file
91
c/src/lib/libbsp/powerpc/mvme5500/pci/gtpcireg.h
Normal file
@@ -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
|
||||
378
c/src/lib/libbsp/powerpc/mvme5500/pci/pci.c
Normal file
378
c/src/lib/libbsp/powerpc/mvme5500/pci/pci.c
Normal file
@@ -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 :
|
||||
*
|
||||
* <http://www.chorus.com/Documentation/index.html> 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, <feng1@bnl.gov>, 2004
|
||||
* - modified and added support for MVME5500 board
|
||||
* - added 2nd PCI support for the mvme5500/GT64260 PCI bridge
|
||||
*
|
||||
*/
|
||||
#define PCI_MAIN
|
||||
|
||||
#include <libcpu/io.h>
|
||||
#include <rtems/bspIo.h> /* printk */
|
||||
|
||||
#include <bsp/pci.h>
|
||||
#include <bsp/gtreg.h>
|
||||
#include <bsp/gtpcireg.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#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<PCI_MAX_DEVICES;ucSlotNumber++) {
|
||||
ucFnNumber = 0;
|
||||
PCIx_read_config_dword(PciNumber, ucBusNumber,
|
||||
ucSlotNumber,
|
||||
0,
|
||||
PCI0_VENDOR_ID,
|
||||
&ulDeviceID);
|
||||
|
||||
if( ulDeviceID==PCI_INVALID_VENDORDEVICEID) {
|
||||
/* This slot is empty */
|
||||
continue;
|
||||
}
|
||||
|
||||
if (++numPCIDevs > 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<ucNumFuncs;ucFnNumber++) {
|
||||
PCIx_read_config_dword(PciNumber, ucBusNumber,
|
||||
ucSlotNumber,
|
||||
ucFnNumber,
|
||||
PCI0_VENDOR_ID,
|
||||
&ulDeviceID);
|
||||
if (ulDeviceID==PCI_INVALID_VENDORDEVICEID) {
|
||||
/* This slot/function is empty */
|
||||
continue;
|
||||
}
|
||||
if (++numPCIDevs > 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);
|
||||
}
|
||||
|
||||
1200
c/src/lib/libbsp/powerpc/mvme5500/pci/pci.h
Normal file
1200
c/src/lib/libbsp/powerpc/mvme5500/pci/pci.h
Normal file
File diff suppressed because it is too large
Load Diff
171
c/src/lib/libbsp/powerpc/mvme5500/pci/pci_interface.c
Normal file
171
c/src/lib/libbsp/powerpc/mvme5500/pci/pci_interface.c
Normal file
@@ -0,0 +1,171 @@
|
||||
/* pci_interface.c
|
||||
*
|
||||
* Copyright 2004, Brookhaven National Laboratory and
|
||||
* Shuchen Kate Feng <feng1@bnl.gov>
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution.
|
||||
*
|
||||
*/
|
||||
#include <libcpu/io.h>
|
||||
#include <rtems/bspIo.h> /* printk */
|
||||
|
||||
#include <bsp.h>
|
||||
#include <bsp/pci.h>
|
||||
#include <bsp/gtreg.h>
|
||||
#include <bsp/gtpcireg.h>
|
||||
|
||||
#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);
|
||||
}
|
||||
66
c/src/lib/libbsp/powerpc/mvme5500/pci/pcifinddevice.c
Normal file
66
c/src/lib/libbsp/powerpc/mvme5500/pci/pcifinddevice.c
Normal file
@@ -0,0 +1,66 @@
|
||||
/* pcifinddevice.c
|
||||
*
|
||||
* Copyright 2001, Till Straumann <strauman@slac.stanford.edu>
|
||||
*
|
||||
* find a particular PCI device
|
||||
* (we assume, the firmware configured the PCI bus[es] for us)
|
||||
*
|
||||
*
|
||||
* Kate Feng <feng1@bnl.gov>, 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 <bsp/pci.h>
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
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<PCI_MAX_DEVICES; dev++) {
|
||||
PCIx_read_config_byte(pciNum, bus, dev, 0, PCI0_HEADER_TYPE, &hd);
|
||||
hd = (hd & PCI_MULTI_FUNCTION ? PCI_MAX_FUNCTIONS : 1);
|
||||
for (fun=0; fun<hd; fun++) {
|
||||
/*
|
||||
* The last devfn id/slot is special; must skip it
|
||||
*/
|
||||
if (PCI_MAX_DEVICES-1==dev && PCI_MAX_FUNCTIONS-1 == fun)
|
||||
break;
|
||||
(void)PCIx_read_config_dword(pciNum, bus,dev,fun,PCI0_VENDOR_ID,&d);
|
||||
if (PCI_INVALID_VENDORDEVICEID == d)
|
||||
continue;
|
||||
#ifdef PCI_DEBUG
|
||||
printk("BSP_pciFindDevice: found 0x%08x at %d/%d/%d\n",d,bus,dev,fun);
|
||||
#endif
|
||||
(void)PCIx_read_config_word(pciNum, bus,dev,fun,PCI0_VENDOR_ID,&s);
|
||||
if (vendorid != s)
|
||||
continue;
|
||||
(void)PCIx_read_config_word(pciNum, bus,dev,fun,PCI0_DEVICE_ID,&s);
|
||||
if (deviceid == s) {
|
||||
if (instance--) continue;
|
||||
*pbus=bus; *pdev=dev; *pfun=fun;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* end for bus */
|
||||
return -1;
|
||||
}
|
||||
|
||||
int BSP_pciFindDevice( unsigned short vendorid, unsigned short deviceid,
|
||||
int instance, int *pbus, int *pdev, int *pfun )
|
||||
{
|
||||
return(BSP_PCIxFindDevice(vendorid,deviceid,instance,0,pbus,pdev,pfun));
|
||||
}
|
||||
|
||||
/* eof */
|
||||
46
c/src/lib/libbsp/powerpc/mvme5500/start/Makefile.am
Normal file
46
c/src/lib/libbsp/powerpc/mvme5500/start/Makefile.am
Normal file
@@ -0,0 +1,46 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
## use a prefix for sake of clarity.
|
||||
## mvme5500start contains both, the preloader and the
|
||||
## start file
|
||||
MVME5500_PREFIX = mvme5500
|
||||
|
||||
VPATH = @srcdir@:@srcdir@/../../shared/start
|
||||
|
||||
PGM = $(ARCH)/$(MVME5500_PREFIX)start.$(OBJEXT)
|
||||
|
||||
S_FILES = preload.S start.S rtems_crti.S
|
||||
S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.$(OBJEXT))
|
||||
|
||||
EXTRA_DIST = preload.S
|
||||
|
||||
OBJS = $(ARCH)/preload.$(OBJEXT) $(ARCH)/start.$(OBJEXT)
|
||||
|
||||
include $(top_srcdir)/../../../../../../automake/compile.am
|
||||
include $(top_srcdir)/../../../../../../automake/lib.am
|
||||
|
||||
#
|
||||
# (OPTIONAL) Add local stuff here using +=
|
||||
#
|
||||
bsplib_DATA = $(PROJECT_RELEASE)/lib/$(MVME5500_PREFIX)start$(LIB_VARIANT).$(OBJEXT)
|
||||
bsplib_DATA += $(PROJECT_RELEASE)/lib/rtems_crti.$(OBJEXT)
|
||||
|
||||
$(PROJECT_RELEASE)/lib/$(MVME5500_PREFIX)start$(LIB_VARIANT).$(OBJEXT): $(PGM)
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
$(PROJECT_RELEASE)/lib/rtems_crti.$(OBJEXT): $(ARCH)/rtems_crti.$(OBJEXT)
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/$(MVME5500_PREFIX)start$(LIB_VARIANT).$(OBJEXT)
|
||||
TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/rtems_crti.$(OBJEXT)
|
||||
|
||||
all-local: $(ARCH) $(S_O_FILES) $(PGM) $(TMPINSTALL_FILES)
|
||||
|
||||
$(OBJS):$(ARCH)
|
||||
|
||||
$(PGM): $(OBJS)
|
||||
$(LD) -r -o $@ $^
|
||||
|
||||
include $(top_srcdir)/../../../../../../automake/local.am
|
||||
541
c/src/lib/libbsp/powerpc/mvme5500/start/Makefile.in
Normal file
541
c/src/lib/libbsp/powerpc/mvme5500/start/Makefile.in
Normal file
@@ -0,0 +1,541 @@
|
||||
# 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/start
|
||||
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@
|
||||
|
||||
MVME5500_PREFIX = mvme5500
|
||||
|
||||
PGM = $(ARCH)/$(MVME5500_PREFIX)start.$(OBJEXT)
|
||||
|
||||
S_FILES = preload.S start.S rtems_crti.S
|
||||
S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.$(OBJEXT))
|
||||
|
||||
EXTRA_DIST = preload.S
|
||||
|
||||
OBJS = $(ARCH)/preload.$(OBJEXT) $(ARCH)/start.$(OBJEXT)
|
||||
|
||||
@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/$(MVME5500_PREFIX)start$(LIB_VARIANT).$(OBJEXT) $(PROJECT_RELEASE)/lib/rtems_crti.$(OBJEXT)
|
||||
|
||||
#
|
||||
# (OPTIONAL) Add local stuff here using +=
|
||||
#
|
||||
bsplib_DATA = $(PROJECT_RELEASE)/lib/$(MVME5500_PREFIX)start$(LIB_VARIANT).$(OBJEXT) $(PROJECT_RELEASE)/lib/rtems_crti.$(OBJEXT)
|
||||
|
||||
PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools
|
||||
subdir = start
|
||||
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 start/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
|
||||
|
||||
@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/$(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:
|
||||
287
c/src/lib/libbsp/powerpc/mvme5500/start/preload.S
Normal file
287
c/src/lib/libbsp/powerpc/mvme5500/start/preload.S
Normal file
@@ -0,0 +1,287 @@
|
||||
/*
|
||||
* Mini-loader for the SVGM and MVME5500 BSP.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2003, 2004
|
||||
* Author: Till Straumann, 10/2001 <strauman@slac.stanford.edu>
|
||||
*
|
||||
* 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 <rtems/score/ppc.h>
|
||||
#else
|
||||
#ifndef PPC_CACHE_ALIGNMENT
|
||||
#define PPC_CACHE_ALIGNMENT 32
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <rtems/score/cpu.h>
|
||||
#include <asm.h>
|
||||
|
||||
/* 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
|
||||
219
c/src/lib/libbsp/powerpc/mvme5500/start/start.S
Normal file
219
c/src/lib/libbsp/powerpc/mvme5500/start/start.S
Normal file
@@ -0,0 +1,219 @@
|
||||
/*
|
||||
* start.S : RTEMS entry point
|
||||
*
|
||||
* Copyright (C) 1999 Eric Valette. valette@crf.canon.fr
|
||||
*
|
||||
* S. Kate Feng <feng1@bnl.gov>, 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 <asm.h>
|
||||
#include <rtems/score/cpu.h>
|
||||
#include <libcpu/io.h>
|
||||
|
||||
#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. <SKF>
|
||||
*/
|
||||
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 <strauman@SLAC.Stanford.EDU> 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
|
||||
37
c/src/lib/libbsp/powerpc/mvme5500/startup/Makefile.am
Normal file
37
c/src/lib/libbsp/powerpc/mvme5500/startup/Makefile.am
Normal file
@@ -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
|
||||
538
c/src/lib/libbsp/powerpc/mvme5500/startup/Makefile.in
Normal file
538
c/src/lib/libbsp/powerpc/mvme5500/startup/Makefile.in
Normal file
@@ -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:
|
||||
71
c/src/lib/libbsp/powerpc/mvme5500/startup/bootpstuff.c
Normal file
71
c/src/lib/libbsp/powerpc/mvme5500/startup/bootpstuff.c
Normal file
@@ -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, }
|
||||
};
|
||||
18
c/src/lib/libbsp/powerpc/mvme5500/startup/bspclean.c
Normal file
18
c/src/lib/libbsp/powerpc/mvme5500/startup/bspclean.c
Normal file
@@ -0,0 +1,18 @@
|
||||
#include <bsp.h>
|
||||
#include <rtems/bspIo.h>
|
||||
#include <libcpu/stackTrace.h>
|
||||
|
||||
#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
|
||||
}
|
||||
625
c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c
Normal file
625
c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c
Normal file
@@ -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, <strauman@slac.stanford.edu>, 2002, 2004
|
||||
*
|
||||
* Modified to support the MVME5500 board
|
||||
* (C) by S. Kate Feng <feng1@bnl.gov>, 2003, 2004
|
||||
*
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/libio.h>
|
||||
#include <rtems/libcsupport.h>
|
||||
/*#include <bsp/consoleIo.h>*/
|
||||
#include <libcpu/spr.h> /* registers.h is included here */
|
||||
#include <bsp.h>
|
||||
#include <bsp/uart.h>
|
||||
#include <bsp/pci.h>
|
||||
#include <libcpu/bat.h>
|
||||
#include <libcpu/pte121.h>
|
||||
#include <libcpu/cpuIdent.h>
|
||||
#include <bsp/vectors.h>
|
||||
#include <bsp/bspException.h>
|
||||
|
||||
/* for RTEMS_VERSION :-( I dont like the preassembled string */
|
||||
#include <rtems/sptables.h>
|
||||
|
||||
#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/score/wkspace.h>
|
||||
|
||||
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 <strauman@slac.stanford.edu>) */
|
||||
*((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 <strauman@slac.stanford.edu>) */
|
||||
*((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 <Enter> to return to PPCBUG monitor\n");
|
||||
printk("When Finished hit GO. It should print <Back from monitor>\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;/* <skf> 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
|
||||
|
||||
}
|
||||
302
c/src/lib/libbsp/powerpc/mvme5500/startup/linkcmds
Normal file
302
c/src/lib/libbsp/powerpc/mvme5500/startup/linkcmds
Normal file
@@ -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 ;
|
||||
37
c/src/lib/libbsp/powerpc/mvme5500/startup/pgtbl_activate.c
Normal file
37
c/src/lib/libbsp/powerpc/mvme5500/startup/pgtbl_activate.c
Normal file
@@ -0,0 +1,37 @@
|
||||
/* pgtbl_activate.c,v 1.1.2.1 2003/02/20 21:45:49 joel Exp */
|
||||
|
||||
#include <rtems.h>
|
||||
#include <libcpu/pte121.h>
|
||||
#include <libcpu/bat.h>
|
||||
|
||||
/* Default activation of the page tables. This is a weak
|
||||
* alias, so applications may easily override this
|
||||
* default activation procedure.
|
||||
*/
|
||||
|
||||
/* Author: Till Straumann, <strauman@slac.stanford.edu>, 4/2002
|
||||
* Kate Feng <feng1@bnl.gov> 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); /* <skf> */
|
||||
/* At this point, DBAT0 is available for other use... */
|
||||
}
|
||||
16
c/src/lib/libbsp/powerpc/mvme5500/startup/reboot.c
Normal file
16
c/src/lib/libbsp/powerpc/mvme5500/startup/reboot.c
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <rtems.h>
|
||||
#include <bsp.h>
|
||||
#include <rtems/bspIo.h>
|
||||
#include <libcpu/io.h>
|
||||
#include <libcpu/stackTrace.h>
|
||||
|
||||
void rtemsReboot()
|
||||
{
|
||||
|
||||
printk("\Printing a stack trace for your convenience :-)\n");
|
||||
CPU_print_stack();
|
||||
|
||||
printk("RTEMS terminated; Rebooting ...\n");
|
||||
/* Mvme5500 board reset <skf> */
|
||||
out_8((volatile unsigned char*) (GT64260_DEV1_BASE +2), 0x80);
|
||||
}
|
||||
24
c/src/lib/libbsp/powerpc/mvme5500/tod/Makefile.am
Normal file
24
c/src/lib/libbsp/powerpc/mvme5500/tod/Makefile.am
Normal file
@@ -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
|
||||
36
c/src/lib/libbsp/powerpc/mvme5500/tod/todcfg.c
Normal file
36
c/src/lib/libbsp/powerpc/mvme5500/tod/todcfg.c
Normal file
@@ -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 <bsp.h>
|
||||
#include <libchip/rtc.h>
|
||||
#include <libchip/m48t08.h>
|
||||
|
||||
/* 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;
|
||||
47
c/src/lib/libbsp/powerpc/mvme5500/vectors/Makefile.am
Normal file
47
c/src/lib/libbsp/powerpc/mvme5500/vectors/Makefile.am
Normal file
@@ -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
|
||||
597
c/src/lib/libbsp/powerpc/mvme5500/vectors/Makefile.in
Normal file
597
c/src/lib/libbsp/powerpc/mvme5500/vectors/Makefile.in
Normal file
@@ -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:
|
||||
57
c/src/lib/libbsp/powerpc/mvme5500/vectors/bspException.h
Normal file
57
c/src/lib/libbsp/powerpc/mvme5500/vectors/bspException.h
Normal file
@@ -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 <strauman@slac.stanford.edu>, 2002/5 */
|
||||
|
||||
#include <bsp/vectors.h>
|
||||
|
||||
/* 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
|
||||
201
c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c
Normal file
201
c/src/lib/libbsp/powerpc/mvme5500/vectors/exceptionhandler.c
Normal file
@@ -0,0 +1,201 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright :
|
||||
* (C) Author: Till Straumann <strauman@slac.stanford.edu>, 2002/5
|
||||
* (C) S. Kate Feng <feng1@bnl.gov> 4/2004 modified it for MVME5500
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <bsp/vectors.h>
|
||||
#include <libcpu/raw_exception.h>
|
||||
#include <libcpu/spr.h>
|
||||
#include <bsp/pci.h>
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
#include <bsp/bspException.h>
|
||||
|
||||
#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();
|
||||
}
|
||||
}
|
||||
}
|
||||
51
c/src/lib/libbsp/powerpc/mvme5500/vme/Makefile.am
Normal file
51
c/src/lib/libbsp/powerpc/mvme5500/vme/Makefile.am
Normal file
@@ -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
|
||||
596
c/src/lib/libbsp/powerpc/mvme5500/vme/Makefile.in
Normal file
596
c/src/lib/libbsp/powerpc/mvme5500/vme/Makefile.in
Normal file
@@ -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:
|
||||
97
c/src/lib/libbsp/powerpc/mvme5500/vme/VME.h
Normal file
97
c/src/lib/libbsp/powerpc/mvme5500/vme/VME.h
Normal file
@@ -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, <strauman@slac.stanford.edu> */
|
||||
|
||||
/* pull in bsp.h */
|
||||
#include <bsp.h>
|
||||
/* our VME bridge */
|
||||
#include <bsp/vmeUniverse.h>
|
||||
/* our address space configuration */
|
||||
#include <bsp/VMEConfig.h>
|
||||
|
||||
/* 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
|
||||
28
c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h
Normal file
28
c/src/lib/libbsp/powerpc/mvme5500/vme/VMEConfig.h
Normal file
@@ -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
|
||||
85
c/src/lib/libbsp/powerpc/mvme5500/vme/vmeconfig.c
Normal file
85
c/src/lib/libbsp/powerpc/mvme5500/vme/vmeconfig.c
Normal file
@@ -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 <strauman@slac.stanford.edu>, 3/2002 */
|
||||
|
||||
/* Copyright 2004, Brookhaven National Lab. and S. Kate Feng <feng1@bnl.gov>
|
||||
* Modified to support the MVME5500, 3/2004
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <bsp/VME.h>
|
||||
#include <bsp/irq.h>
|
||||
#include <libcpu/bat.h>
|
||||
|
||||
/* 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;*/
|
||||
}
|
||||
27
c/src/lib/libbsp/powerpc/mvme5500/wrapup/Makefile.am
Normal file
27
c/src/lib/libbsp/powerpc/mvme5500/wrapup/Makefile.am
Normal file
@@ -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
|
||||
509
c/src/lib/libbsp/powerpc/mvme5500/wrapup/Makefile.in
Normal file
509
c/src/lib/libbsp/powerpc/mvme5500/wrapup/Makefile.in
Normal file
@@ -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:
|
||||
Reference in New Issue
Block a user