Changeset e2d79559 in rtems for c/src/lib/libbsp/m68k/gen68360


Ignore:
Timestamp:
Apr 9, 1997, 2:05:50 PM (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
48d6de3
Parents:
bed475e
Message:

Added ka9q tcpip stack and network driver for the gen68360. This effort
was done based on the 3.6.0 release and had to be autoconf'ed locally.
It is turned on is the bsp enables it and it is not explicitly disabled
via the configure option --disable-tcpip. As many warnings as possible
were removed locally after the code was merged. Only the gen68360
and mvme136 bsps were compiled this way.

The ka9q port and network driver were submitted by Eric Norum
(eric@…).

The network demo programs are not included in the tree at this point.

Location:
c/src/lib/libbsp/m68k/gen68360
Files:
3 added
11 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/gen68360/Makefile.in

    rbed475e re2d79559  
    1313SRCS=README
    1414
     15# We only build the ka9q device driver if HAS_KA9Q was defined
     16LIBKA9Q_yes_V = network
     17LIBKA9Q = $(LIBKA9Q_$(HAS_KA9Q)_V)
     18
    1519all: $(SRCS)
    1620
    1721# wrapup is the one that actually builds and installs the library
    1822#  from the individual .rel files built in other directories
    19 SUB_DIRS=include start360 startup clock console timer wrapup
     23SUB_DIRS=include start360 startup clock console timer $(LIBKA9Q) wrapup
  • c/src/lib/libbsp/m68k/gen68360/README

    rbed475e re2d79559  
    44
    55#
    6 # This package requires a version of GCC that has been modified
     6# This package works best with a version of GCC that has been modified
    77# to support the `-mcpu32' argument.  I have submitted the required
    88# changes to the GCC maintainers.
     
    2020#
    2121
     22#
     23# This board support package works with several different versions of
     24# MC68360 systems.  The choice of hardware is made at the final link-edit
     25# phase by setting the Makefile LDFLAGS definition appropriately.
     26#
     27# Decisions to be made a link-edit time include:
     28#       - The version of hardware on which the application is to run.
     29#         This is selected by defining the MC68360HardwareType variable.
     30#         Supported values are:
     31#                       MC68360HardwareTypeMotorolaGeneric (default)
     32#                       MC68360HardwareTypeAtlasHSB
     33#         To select the Atlas Computer Equipment HSB,
     34#               --defsym MC68360HardwareType=MC68360HardwareTypeAtlasHSB
     35#
     36#       - The amount of dynamic RAM in the system.  This value applies
     37#         only to hardware versions which support different sizes of RAM.
     38#         The default value is 4 Mbytes.  To specify 16 Mbytes of memory,
     39#               --defsym RamSize=0x1000000
     40#
     41#       - The size of the memory allocator heap.  The default value is
     42#         64 kbytes.  If the KA9Q network package is used the heap
     43#         should be at least 256 kbytes.  If your network is large, or
     44#         busy, the heap should be even larger.
     45#         To choose a heap size of 256 kbytes,
     46#               --defsym HeapSize=0x40000
     47#         
     48
    2249BSP NAME:           gen68360
    23 BOARD:              home-built
     50BOARD:              Generic 68360 as described in Motorola MC68360 User's Manual
     51BOARD:              Atlas Computer Equipment Inc. High Speed Bridge (HSB)
     52BOARD:              Atlas Computer Equipment Inc. Advanced Communication Engine (ACE)
    2453BUS:                none
    2554CPU FAMILY:         Motorola CPU32+
     
    6493bus width:      8-bit PROM, 32-bit DRAM
    6594ROM:            To 1 MByte, 180 nsec (3 wait states), chip select 0
    66 RAM:            4 MByte DRAM SIMM, 60 nsec (0 wait states), parity
     95RAM:            1 to 64 MByte DRAM SIMM, 60 nsec (0 wait states), parity or nonparity
    6796
    6897Host System
     
    253282This board support package is written for a 68360 system similar to that
    254283described in chapter 9 of the Motorola MC68360 Quad Integrated Communication
    255 Processor Users' Manual.  The salient details of this hardware are:
     284Processor Users' Manual.  The salient features of this hardware are:
    256285
    257286        25 MHz external clock
     
    260289        4 MBytes of 60 nsec parity DRAM (1Mx36) to RAS1*/CAS1*
    261290        Console serial port on SMC1
     291        Ethernet interface on SCC1
    262292
    263293The board support package has been tested with a home-built board and with an
  • c/src/lib/libbsp/m68k/gen68360/console/console.c

    rbed475e re2d79559  
    4343
    4444/*
    45  * Place buffer descriptors at end of User Data/BD space in dual-port RAM
    46  */
    47 #define consoleRxBd ((volatile m360BufferDescriptor_t *)((char *)m360.dpram1 + \
    48                 (sizeof(m360.dpram2) - 2*sizeof(m360BufferDescriptor_t))))
    49 #define consoleTxBd ((volatile m360BufferDescriptor_t *)((char *)m360.dpram1 + \
    50                 (sizeof(m360.dpram2) - sizeof(m360BufferDescriptor_t))))
    51 
    52 /*
    5345 * I/O buffers can be in ordindary RAM
    5446 */
    5547static volatile char rxBuf, txBuf;
     48static volatile m360BufferDescriptor_t *consoleRxBd, *consoleTxBd;
    5649
    5750rtems_device_driver console_initialize(
     
    6255{
    6356        rtems_status_code status;
     57
     58        /*
     59         * Allocate buffer descriptors
     60         */
     61        consoleRxBd = M360AllocateBufferDescriptors (1);
     62        consoleTxBd = M360AllocateBufferDescriptors (1);
    6463
    6564        /*
     
    122121         * Send "Init parameters" command
    123122         */
    124         m360.cr = M360_CR_OP_INIT_RX_TX | M360_CR_CHAN_SMC1 | M360_CR_FLG;
    125         while (m360.cr & M360_CR_FLG)
    126                 continue;
     123        M360ExecuteRISC (M360_CR_OP_INIT_RX_TX | M360_CR_CHAN_SMC1);
    127124
    128125        /*
  • c/src/lib/libbsp/m68k/gen68360/include/bsp.h

    rbed475e re2d79559  
    120120
    121121void M360ExecuteRISC( rtems_unsigned16 command );
     122void *M360AllocateBufferDescriptors( int count );
     123void *M360AllocateRiscTimers( int count );
    122124
    123125m68k_isr_entry set_vector(
     
    127129);
    128130
     131/*
     132 * Values assigned by link editor
     133 */
     134extern void *_RomBase, *_RamBase, *_RamSize;
     135extern void *_MC68360HardwareType;
     136extern void *_MC68360HardwareTypeMotorolaGeneric;
     137extern void *_MC68360HardwareTypeAtlasHSB;
     138
     139/*
     140 * Definitions for Atlas Computer Equipment Inc. High Speed Bridge (HSB)
     141 */
     142#define ATLASHSB_ESR    0x20010000L
     143#define ATLASHSB_USICR  0x20010001L
     144#define ATLASHSB_DSRR   0x20010002L
     145#define ATLASHSB_LED4   0x20010004L
     146#define ATLASHSB_ROM_U6 0xFF080000L     /* U6 flash ROM socket */
     147
    129148#ifdef __cplusplus
    130149}
  • c/src/lib/libbsp/m68k/gen68360/start/start360.s

    rbed475e re2d79559  
    5757        .long   uhoh                    |  22:
    5858        .long   uhoh                    |  23:
    59         .long   uhoh                    |  24: Spurious interrupt
     59        .long   spurious_interrupt      |  24: Spurious interrupt
    6060        .long   uhoh                    |  25: Level 1 interrupt autovector
    6161        .long   uhoh                    |  26: Level 2 interrupt autovector
     
    299299
    300300/*
     301 * Log, but otherwise ignore, spurious interrupts
     302 */
     303spurious_interrupt:
     304        addql   #1,SYM(_M68kSpuriousInterruptCount)
     305        rte
     306
     307/*
    301308 * Place the low-order 3 octets of the board's ethernet address at
    302309 * a `well-known' fixed location relative to the beginning of ROM.
     
    308315 * Initial PC
    309316 */
    310         .global start
     317         .global start
    311318start: 
    312319        /*
     
    387394                                        | Should this just force a reset?
    388395mainDone:       nop                     | Leave spot for breakpoint
     396        movew   #1,a7                   | Force a double bus error
     397        movel   d0,a7@-                 | This should cause a RESET
    389398        stop    #0x2700                 | Stop with interrupts disabled
    390399        bra.s   mainDone                | Stuck forever
     
    399408END_CODE
    400409
    401 BEGIN_BSS
     410BEGIN_DATA_DCL
    402411        .align 2
    403412        PUBLIC (environ)
    404413SYM (environ):
    405414        .long   0
     415        PUBLIC (_M68kSpuriousInterruptCount)
     416SYM (_M68kSpuriousInterruptCount):
     417        .long   0
     418END_DATA_DCL
     419
    406420END
  • c/src/lib/libbsp/m68k/gen68360/start360/start360.s

    rbed475e re2d79559  
    5757        .long   uhoh                    |  22:
    5858        .long   uhoh                    |  23:
    59         .long   uhoh                    |  24: Spurious interrupt
     59        .long   spurious_interrupt      |  24: Spurious interrupt
    6060        .long   uhoh                    |  25: Level 1 interrupt autovector
    6161        .long   uhoh                    |  26: Level 2 interrupt autovector
     
    299299
    300300/*
     301 * Log, but otherwise ignore, spurious interrupts
     302 */
     303spurious_interrupt:
     304        addql   #1,SYM(_M68kSpuriousInterruptCount)
     305        rte
     306
     307/*
    301308 * Place the low-order 3 octets of the board's ethernet address at
    302309 * a `well-known' fixed location relative to the beginning of ROM.
     
    308315 * Initial PC
    309316 */
    310         .global start
     317         .global start
    311318start: 
    312319        /*
     
    387394                                        | Should this just force a reset?
    388395mainDone:       nop                     | Leave spot for breakpoint
     396        movew   #1,a7                   | Force a double bus error
     397        movel   d0,a7@-                 | This should cause a RESET
    389398        stop    #0x2700                 | Stop with interrupts disabled
    390399        bra.s   mainDone                | Stuck forever
     
    399408END_CODE
    400409
    401 BEGIN_BSS
     410BEGIN_DATA_DCL
    402411        .align 2
    403412        PUBLIC (environ)
    404413SYM (environ):
    405414        .long   0
     415        PUBLIC (_M68kSpuriousInterruptCount)
     416SYM (_M68kSpuriousInterruptCount):
     417        .long   0
     418END_DATA_DCL
     419
    406420END
  • c/src/lib/libbsp/m68k/gen68360/startup/Makefile.in

    rbed475e re2d79559  
    1111
    1212# C source names, if any, go here -- minus the .c
    13 C_PIECES=bspstart bspclean init68360 sbrk setvec
     13C_PIECES=alloc360 bspstart bspclean init68360 sbrk setvec
    1414C_FILES=$(C_PIECES:%=%.c)
    1515C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
     
    1717H_FILES=
    1818
    19 SRCS=$(srcdir)/linkcmds $(srcdir)/linkcmds.prom $(C_FILES) $(H_FILES)
     19SRCS=$(srcdir)/linkcmds $(srcdir)/linkcmds.prom $(srcdir)/linkcmds.bootp \
     20     $(C_FILES) $(H_FILES)
    2021OBJS=$(C_O_FILES) $(CC_O_FILES)
    2122
  • c/src/lib/libbsp/m68k/gen68360/startup/init68360.c

    rbed475e re2d79559  
    3737{
    3838        int i;
    39         extern void *_RomBase, *_RamBase;
     39        unsigned long l;
    4040        m68k_isr_entry *vbr;
    4141        extern void _CopyDataClearBSSAndStart (void);
     
    5959         */
    6060        m360.clkocr = 0x8F;     /* No more writes, no clock outputs */
    61         m360.pllcr = 0xD000;    /* PLL, no writes, no prescale,  */
    62                                         /* no LPSTOP slowdown, PLL X1 */
     61        m360.pllcr = 0xD000;    /* PLL, no writes, no prescale,
     62                                  no LPSTOP slowdown, PLL X1 */
    6363        m360.cdvcr = 0x8000;    /* No more writes, no clock division */
    6464
     
    6767         *      Disable watchdog FIXME: Should use watchdog!!!!
    6868         *      Watchdog causes system reset
    69          *      Fastest watchdog timeout
     69         *      Slowest watchdog timeout
    7070         *      Enable double bus fault monitor
    7171         *      Enable bus monitor external
    7272         *      128 clocks for external timeout
    7373         */
    74         m360.sypcr = 0x4F;
     74        m360.sypcr = 0x7F;
    7575
    7676        /*
     
    9090         *      CF1MODE=00 (CONFIG1 input)
    9191         *      RAS1* double drive
    92          *      A31-A28
     92         *      WE0* - WE3*
    9393         *      OE* output
    94          *      CAS2* / CAS3*
    95          *      CAS0* / CAS1*
     94         *      CAS2* - CAS3*
     95         *      CAS0* - CAS1*
    9696         *      CS7*
    9797         *      AVEC*
     
    100100         *      (static RAM, external address multiplexing, etc).
    101101         */
    102         m360.pepar = 0x0100;
     102        m360.pepar = 0x0180;
    103103
    104104        /*
    105105         * Step 11: Remap Chip Select 0 (CS0*), set up GMR
    106          *      1024 addresses per DRAM page (1M DRAM chips)
    107          *      60 nsec DRAM
    108          *      180 nsec ROM (3 wait states)
    109          * HARDWARE:
    110          *      Change if you are using a different memory configuration
    111          */
    112         m360.gmr = M360_GMR_RCNT(24) | M360_GMR_RFEN | M360_GMR_RCYC(0) |
    113                         M360_GMR_PGS(3) | M360_GMR_DPS_32BIT | M360_GMR_NCS |
    114                         M360_GMR_GAMX;
    115         m360.memc[0].br = (unsigned long)&_RomBase | M360_MEMC_BR_WP |
    116                                                         M360_MEMC_BR_V;
    117         m360.memc[0].or = M360_MEMC_OR_WAITS(3) | M360_MEMC_OR_512KB |
     106         */
     107        if (&_MC68360HardwareType == &_MC68360HardwareTypeAtlasHSB) {
     108                m360.gmr = M360_GMR_RCNT(12) | M360_GMR_RFEN |
     109                                M360_GMR_RCYC(0) | M360_GMR_PGS(1) |
     110                                M360_GMR_DPS_32BIT | M360_GMR_DWQ |
     111                                M360_GMR_GAMX;
     112                m360.memc[0].br = (unsigned long)&_RomBase | M360_MEMC_BR_WP |
     113                                                                M360_MEMC_BR_V;
     114                m360.memc[0].or = M360_MEMC_OR_WAITS(3) | M360_MEMC_OR_1MB |
    118115                                                        M360_MEMC_OR_8BIT;
     116        }
     117        else {
     118                /*
     119                 * 1024/2048/4096 addresses per DRAM page (1M/4M/16M DRAM chips)
     120                 * 60 nsec DRAM
     121                 * 180 nsec ROM (3 wait states)
     122                 */
     123                switch ((unsigned long)&_RamSize) {
     124                default:
     125                case 4*1024*1024:
     126                        m360.gmr = M360_GMR_RCNT(24) | M360_GMR_RFEN |
     127                                        M360_GMR_RCYC(0) | M360_GMR_PGS(3) |
     128                                        M360_GMR_DPS_32BIT | M360_GMR_NCS |
     129                                        M360_GMR_GAMX;
     130                        break;
     131
     132                case 16*1024*1024:
     133                        m360.gmr = M360_GMR_RCNT(24) | M360_GMR_RFEN |
     134                                        M360_GMR_RCYC(0) | M360_GMR_PGS(5) |
     135                                        M360_GMR_DPS_32BIT | M360_GMR_NCS |
     136                                        M360_GMR_GAMX;
     137                        break;
     138
     139                case 64*1024*1024:
     140                        m360.gmr = M360_GMR_RCNT(24) | M360_GMR_RFEN |
     141                                        M360_GMR_RCYC(0) | M360_GMR_PGS(7) |
     142                                        M360_GMR_DPS_32BIT | M360_GMR_NCS |
     143                                        M360_GMR_GAMX;
     144                        break;
     145                }
     146                m360.memc[0].br = (unsigned long)&_RomBase | M360_MEMC_BR_WP |
     147                                                                M360_MEMC_BR_V;
     148                m360.memc[0].or = M360_MEMC_OR_WAITS(3) | M360_MEMC_OR_1MB |
     149                                                        M360_MEMC_OR_8BIT;
     150        }
    119151
    120152        /*
    121153         * Step 12: Initialize the system RAM
    122          *      Set up option/base registers
    123          *              4 MB DRAM
    124          *              60 nsec DRAM
    125          *      Wait for chips to power up
    126          *      Perform 8 read cycles
    127          *      Set all parity bits to correct state
    128          *      Enable parity checking
    129          * HARDWARE:
    130          *      Change if you are using a different memory configuration
    131          */
    132         m360.memc[1].or = M360_MEMC_OR_TCYC(0) | M360_MEMC_OR_4MB |
    133                                 M360_MEMC_OR_DRAM;
    134         m360.memc[1].br = (unsigned long)&_RamBase | M360_MEMC_BR_V;
    135         for (i = 0; i < 50000; i++)
    136                 continue;
    137         for (i = 0; i < 8; ++i)
    138                 *((volatile unsigned long *)(unsigned long)&_RamBase);
    139         for (i = 0 ; i < 4*1024*1024 ; i += sizeof (unsigned long)) {
    140                 volatile unsigned long *lp;
    141                 lp = (unsigned long *)((unsigned char *)&_RamBase + i);
    142                 *lp = *lp;
    143         }
    144         m360.memc[1].br = (unsigned long)&_RamBase | M360_MEMC_BR_PAREN |
     154         */
     155        if (&_MC68360HardwareType == &_MC68360HardwareTypeAtlasHSB) {
     156                /* first bank 1MByte DRAM */
     157                m360.memc[1].or = M360_MEMC_OR_TCYC(2) | M360_MEMC_OR_1MB |
     158                                        M360_MEMC_OR_PGME | M360_MEMC_OR_DRAM;
     159                m360.memc[1].br = (unsigned long)&_RamBase | M360_MEMC_BR_V;
     160
     161                /* second bank 1MByte DRAM */
     162                m360.memc[2].or = M360_MEMC_OR_TCYC(2) | M360_MEMC_OR_1MB |
     163                                        M360_MEMC_OR_PGME | M360_MEMC_OR_DRAM;
     164                m360.memc[2].br = ((unsigned long)&_RamBase + 0x100000) |
     165                                        M360_MEMC_BR_V;
     166
     167                /* flash rom socket U6 on CS5 */
     168                m360.memc[5].br = (unsigned long)ATLASHSB_ROM_U6 | M360_MEMC_BR_WP |
    145169                                                                M360_MEMC_BR_V;
     170                m360.memc[5].or = M360_MEMC_OR_WAITS(2) | M360_MEMC_OR_512KB |
     171                                                                M360_MEMC_OR_8BIT;
     172
     173                /* CSRs on CS7 */
     174                m360.memc[7].or = M360_MEMC_OR_TCYC(4) | M360_MEMC_OR_64KB |
     175                                        M360_MEMC_OR_8BIT;
     176                m360.memc[7].br = ATLASHSB_ESR | 0x01;
     177                for (i = 0; i < 50000; i++)
     178                        continue;
     179                for (i = 0; i < 8; ++i)
     180                        *((volatile unsigned long *)(unsigned long)&_RamBase);
     181        }
     182        else {
     183                /*
     184                 *      Set up option/base registers
     185                 *              4M/16M/64M DRAM
     186                 *              60 nsec DRAM
     187                 *      Wait for chips to power up
     188                 *      Perform 8 read cycles
     189                 *      Set all parity bits to correct state
     190                 *      Enable parity checking
     191                 */
     192                switch ((unsigned long)&_RamSize) {
     193                default:
     194                case 4*1024*1024:
     195                        m360.memc[1].or = M360_MEMC_OR_TCYC(0) |
     196                                                M360_MEMC_OR_4MB |
     197                                                M360_MEMC_OR_DRAM;
     198                        break;
     199
     200                case 16*1024*1024:
     201                        m360.memc[1].or = M360_MEMC_OR_TCYC(0) |
     202                                                M360_MEMC_OR_16MB |
     203                                                M360_MEMC_OR_DRAM;
     204                        break;
     205
     206                case 64*1024*1024:
     207                        m360.memc[1].or = M360_MEMC_OR_TCYC(0) |
     208                                                M360_MEMC_OR_64MB |
     209                                                M360_MEMC_OR_DRAM;
     210                        break;
     211                }
     212                m360.memc[1].br = (unsigned long)&_RamBase | M360_MEMC_BR_V;
     213                for (i = 0; i < 50000; i++)
     214                        continue;
     215                for (i = 0; i < 8; ++i)
     216                        *((volatile unsigned long *)(unsigned long)&_RamBase);
     217                for (l = 0 ; l < (unsigned long)&_RamSize ; l += sizeof (unsigned long)) {
     218                        volatile unsigned long *lp;
     219                        lp = (unsigned long *)((unsigned char *)&_RamBase + i);
     220                        *lp = *lp;
     221                }
     222                m360.memc[1].br = (unsigned long)&_RamBase |
     223                                        M360_MEMC_BR_PAREN | M360_MEMC_BR_V;
     224        }
    146225
    147226        /*
     
    156235         * Step 14: More system initialization
    157236         * SDCR (Serial DMA configuration register)
     237         *      Disable SDMA during FREEZE
    158238         *      Give SDMA priority over all interrupt handlers
    159239         *      Set DMA arbiration level to 4
     
    168248         *      SCCs priority grouped at top of table
    169249         */
    170         m360.sdcr = M360_SDMA_SISM_7 | M360_SDMA_SAID_4;
     250        m360.sdcr = M360_SDMA_FREEZE | M360_SDMA_SISM_7 | M360_SDMA_SAID_4;
    171251        m360.cicr = (3 << 22) | (2 << 20) | (1 << 18) | (0 << 16) |
    172252                                                (4 << 13) | (0x1F << 8) | (128);
     
    179259         *      No show cycles
    180260         *      User/supervisor access
    181          *      Bus clear interupt service level 7
     261         *      Bus clear interrupt service level 7
    182262         *      SIM60 interrupt sources higher priority than CPM
    183263         */
  • c/src/lib/libbsp/m68k/gen68360/startup/linkcmds

    rbed475e re2d79559  
    11/*
    2  *  This file contains GNU linker directives for a generic MC68360 board.
     2 * This file contains GNU linker directives for a generic MC68360 board.
     3 * Variations in hardware type and dynamic memory size can be made
     4 * by overriding some values with linker command-line arguments.
    35 *
    46 * Saskatchewan Accelerator Laboratory
     
    1113
    1214/*
    13  * Declare on-board memory
     15 * Declare some sizes.
     16 * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
     17 *      number used there is not constant.  If this happens to you, edit
     18 *      the lines marked XXX below to use a constant value.
     19 */
     20RamSize = DEFINED(RamSize) ? RamSize : 4M;
     21HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
     22StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
     23
     24/*
     25 * Declare hardware type
     26 */
     27MC68360HardwareTypeMotorolaGeneric = 0;
     28MC68360HardwareTypeAtlasHSB = 1;
     29MC68360HardwareType = DEFINED(MC68360HardwareType) ? MC68360HardwareType : 0;
     30
     31/*
     32 * Declare on-board memory.
     33 * It would be nice if the ram length could be given as
     34 * LENGTH=RamSize, but gld doesn't allow non-constant
     35 * values in the LENGTH expression. 
    1436 */
    1537MEMORY {
    16           ram : ORIGIN = 0x00000000, LENGTH = 4M
     38          ram : ORIGIN = 0x00000000, LENGTH = 64M
    1739          rom : ORIGIN = 0xFF000000, LENGTH = 1M
    1840        dpram : ORIGIN = 0xFE000000, LENGTH = 8k
     
    2042
    2143/*
    22  * Declare some sizes
    23  * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
    24  *      number used there is not constant.  If this happens to you, edit
    25  *      the lines marked below to use a constant value.
     44 * Declare low-order three octets of Ethernet address.
    2645 */
    27 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
    28 StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
     46ETHERNET_ADDRESS = DEFINED(ETHERNET_ADDRESS) ? ETHERNET_ADDRESS : 0xDEAD12;
    2947
    3048/*
    31  * Declare low-order three octets of Ethernet address
     49 * Declare hardware type.
     50 * Acceptable values are:
     51 *      0 - Generic system as described in the MC68360 User's Manual
     52 *          (MC68360UM/AD Rev. 1).
     53 *      1 - ATLAS Computer Equipment Incorporated ACE360/HSB.
    3254 */
    33 ETHERNET_ADDRESS = DEFINED(ETHERNET_ADDRESS) ? ETHERNET_ADDRESS : 0xDEAD12;
     55MC68360HardwareType = DEFINED(MC68360HardwareType) ? MC68360HardwareType : 0;
    3456
    3557/*
     
    3759 */
    3860SECTIONS {
     61        /*
     62         * Hardware variations
     63         */
     64        _RamSize = RamSize;
     65        __RamSize = RamSize;
     66        _MC68360HardwareType = MC68360HardwareType;
     67        __MC68360HardwareType = MC68360HardwareType;
     68        _MC68360HardwareTypeMotorolaGeneric = MC68360HardwareTypeMotorolaGeneric;
     69        __MC68360HardwareTypeMotorolaGeneric = MC68360HardwareTypeMotorolaGeneric;
     70        _MC68360HardwareTypeAtlasHSB = MC68360HardwareTypeAtlasHSB;
     71        __MC68360HardwareTypeAtlasHSB = MC68360HardwareTypeAtlasHSB;
     72
    3973        /*
    4074         * Boot PROM
  • c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom

    rbed475e re2d79559  
    11/*
    22 * This file contains GNU linker directives for a generic MC68360 board.
    3  * These linker directives are for producing a PROM version..
    4  * To create the PROM image from the linkter output you must use objcopy
     3 * Variations in hardware type and dynamic memory size can be made
     4 * by overriding some values with linker command-line arguments.
     5 *
     6 * These linker directives are for producing a BOOTP PROM.
     7 * To create the PROM image from the linker output you must use objcopy
    58 * (--adjust-section-vma) to place the data segment at the end of the text
    69 * segment in the PROM.  The start-up code takes care of copying this region
     
    2124
    2225/*
    23  * Declare on-board memory
     26 * Declare some sizes.
     27 * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
     28 *      number used there is not constant.  If this happens to you, edit
     29 *      the lines marked XXX below to use a constant value.
     30 */
     31RamSize = DEFINED(RamSize) ? RamSize : 4M;
     32HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
     33StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
     34
     35/*
     36 * Declare hardware type
     37 */
     38MC68360HardwareTypeMotorolaGeneric = 0;
     39MC68360HardwareTypeAtlasHSB = 1;
     40MC68360HardwareType = DEFINED(MC68360HardwareType) ? MC68360HardwareType : 0;
     41
     42/*
     43 * Declare on-board memory.
     44 * It would be nice if the ram length could be given as
     45 * LENGTH=RamSize, but gld doesn't allow non-constant
     46 * values in the LENGTH expression. 
    2447 */
    2548MEMORY {
    26           ram : ORIGIN = 0x00000000, LENGTH = 4M
     49          ram : ORIGIN = 0x00000000, LENGTH = 64M
    2750          rom : ORIGIN = 0xFF000000, LENGTH = 1M
    2851        dpram : ORIGIN = 0xFE000000, LENGTH = 8k
     
    3053
    3154/*
    32  * Declare some sizes
     55 * Declare low-order three octets of Ethernet address.
    3356 */
    34 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000;
    35 StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
     57ETHERNET_ADDRESS = DEFINED(ETHERNET_ADDRESS) ? ETHERNET_ADDRESS : 0xDEAD12;
    3658
    3759/*
    38  * Declare low-order three octets of Ethernet address
     60 * Declare hardware type.
     61 * Acceptable values are:
     62 *      0 - Generic system as described in the MC68360 User's Manual
     63 *          (MC68360UM/AD Rev. 1).
     64 *      1 - ATLAS Computer Equipment Incorporated ACE360/HSB.
    3965 */
    40 ETHERNET_ADDRESS = DEFINED(ETHERNET_ADDRESS) ? ETHERNET_ADDRESS : 0xDEAD12;
     66MC68360HardwareType = DEFINED(MC68360HardwareType) ? MC68360HardwareType : 0;
    4167
    4268/*
     
    4470 */
    4571SECTIONS {
     72        /*
     73         * Hardware variations
     74         */
     75        _RamSize = RamSize;
     76        __RamSize = RamSize;
     77        _MC68360HardwareType = MC68360HardwareType;
     78        __MC68360HardwareType = MC68360HardwareType;
     79        _MC68360HardwareTypeMotorolaGeneric = MC68360HardwareTypeMotorolaGeneric;
     80        __MC68360HardwareTypeMotorolaGeneric = MC68360HardwareTypeMotorolaGeneric;
     81        _MC68360HardwareTypeAtlasHSB = MC68360HardwareTypeAtlasHSB;
     82        __MC68360HardwareTypeAtlasHSB = MC68360HardwareTypeAtlasHSB;
     83
    4684        /*
    4785         * Boot PROM
     
    89127                _HeapStart = .;
    90128                __HeapStart = .;
    91                 . += HeapSize;
    92                 . += StackSize;
     129                . += HeapSize;  /* XXX -- Old gld can't handle this */
     130                . += StackSize; /* XXX -- Old gld can't handle this */
     131                /* . += 0x10000; */ /* HeapSize for old gld */
     132                /* . += 0x1000;  */ /* StackSize for old gld */
    93133                . = ALIGN (16);
    94134                stack_init = .;
     
    108148
    109149        } >dpram
    110 
    111150}
  • c/src/lib/libbsp/m68k/gen68360/wrapup/Makefile.in

    rbed475e re2d79559  
    88VPATH=@srcdir@
    99
    10 BSP_PIECES=startup clock console timer
     10# We only build the ka9q device driver if HAS_KA9Q was defined
     11LIBKA9Q_yes_V = network
     12LIBKA9Q = $(LIBKA9Q_$(HAS_KA9Q)_V)
     13
     14BSP_PIECES=startup clock console $(LIBKA9Q) timer
     15CPU_PIECES=
    1116GENERIC_PIECES=
    1217
    1318# bummer; have to use $foreach since % pattern subst rules only replace 1x
    1419OBJS=$(foreach piece, $(BSP_PIECES), ../$(piece)/$(ARCH)/$(piece).rel) \
     20     $(foreach piece, $(CPU_PIECES), \
     21         ../../../../libcpu/$(RTEMS_CPU)/$(piece)/$(ARCH)/$(piece).rel) \
    1522     $(foreach piece, $(GENERIC_PIECES), ../../../$(piece)/$(ARCH)/$(piece).rel)
    1623LIB=$(ARCH)/libbsp.a
Note: See TracChangeset for help on using the changeset viewer.