Changeset dbab462 in rtems


Ignore:
Timestamp:
Jul 24, 1998, 4:09:51 PM (23 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
03c0961
Parents:
1501809
Message:

Patch from Eric Valette <valette@…> and Emmanuel Raguet
<raguet@…> to make their patches work together.

Files:
10 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/Makefile.in

    r1501809 rdbab462  
    1212include $(RTEMS_ROOT)/make/directory.cfg
    1313
     14# We only build the Network library if HAS_KA9Q was defined
     15NETWORK_yes_V = network
     16NETWORK = $(NETWORK_$(HAS_KA9Q)_V)
     17
    1418# wrapup is the one that actually builds and installs the library
    1519#  from the individual .rel files built in other directories
    16 SUB_DIRS=include tools start startup clock console timer pc386dev network \
     20SUB_DIRS=include tools start startup clock console timer pc386dev $(NETWORK) \
    1721          wrapup
  • c/src/lib/libbsp/i386/pc386/include/Makefile.in

    r1501809 rdbab462  
    99PROJECT_ROOT = @PROJECT_ROOT@
    1010
     11# We only install wd80x3.h if HAS_KA9Q was defined
     12WD80X3_yes_V = $(srcdir)/wd80x3.h
     13WD80X3 = $(WD80X3_$(HAS_KA9Q)_V)
     14
    1115H_FILES = $(srcdir)/bsp.h $(srcdir)/coverhd.h  $(srcdir)/crt.h \
    12         $(srcdir)/pc386uart.h $(srcdir)/pcibios.h $(srcdir)/wd80x3.h
     16          $(srcdir)/pc386uart.h $(srcdir)/pcibios.h \
     17          $(WD80X3)
    1318
    1419#
  • c/src/lib/libbsp/i386/pc386/network/network.c

    r1501809 rdbab462  
    1616#include <ka9q/commands.h>
    1717#include <ka9q/domain.h>
    18 #include "irq.h"
     18#include <irq.h>
    1919
    2020#define ET_MINLEN 60            /* minimum message length */
     
    5050 */
    5151typedef struct  {
    52   struct mbuf           **rxMbuf;
    53   struct mbuf           **txMbuf;
    54   unsigned int          port;
    55   char                  *base;
    56   unsigned long         bpar;
    57   unsigned int          irno;
    58   int                   rxBdCount;
    59   int                   txBdCount;
    60   int                   txBdHead;
    61   int                   txBdTail;
    62   int                   txBdActiveCount;
    63   struct iface          *iface;
    64   rtems_id              txWaitTid;
     52  rtems_irq_connect_data        irqInfo;
     53  struct mbuf                   **rxMbuf;
     54  struct mbuf                   **txMbuf;
     55  unsigned int                  port;
     56  unsigned char                 *base;
     57  unsigned long                 bpar;
     58  int                           rxBdCount;
     59  int                           txBdCount;
     60  int                           txBdHead;
     61  int                           txBdTail;
     62  int                           txBdActiveCount;
     63  struct iface                  *iface;
     64  rtems_id                      txWaitTid;
    6565 
    6666  /*
    6767   * Statistics
    6868   */
    69   unsigned long rxInterrupts;
    70   unsigned long rxNotFirst;
    71   unsigned long rxNotLast;
    72   unsigned long rxGiant;
    73   unsigned long rxNonOctet;
    74   unsigned long rxRunt;
    75   unsigned long rxBadCRC;
    76   unsigned long rxOverrun;
    77   unsigned long rxCollision;
    78  
    79   unsigned long txInterrupts;
    80   unsigned long txDeferred;
    81   unsigned long txHeartbeat;
    82   unsigned long txLateCollision;
    83   unsigned long txRetryLimit;
    84   unsigned long txUnderrun;
    85   unsigned long txLostCarrier;
    86   unsigned long txRawWait;
     69  unsigned long                 rxInterrupts;
     70  unsigned long                 rxNotFirst;
     71  unsigned long                 rxNotLast;
     72  unsigned long                 rxGiant;
     73  unsigned long                 rxNonOctet;
     74  unsigned long                 rxRunt;
     75  unsigned long                 rxBadCRC;
     76  unsigned long                 rxOverrun;
     77  unsigned long                 rxCollision;
     78 
     79  unsigned long                 txInterrupts;
     80  unsigned long                 txDeferred;
     81  unsigned long                 txHeartbeat;
     82  unsigned long                 txLateCollision;
     83  unsigned long                 txRetryLimit;
     84  unsigned long                 txUnderrun;
     85  unsigned long                 txLostCarrier;
     86  unsigned long                 txRawWait;
    8787}wd80x3EnetDriver;
    8888
     
    9999
    100100/*
    101  * WD8003 interrupt handler
    102  */
    103 static rtems_isr
    104 wd8003Enet_interrupt_handler (rtems_vector_number v)
     101 * WD8003 interrupt handler. The code as it is cleraly showes that
     102 * only one driver is connected. In order to change this a table
     103 * making the correspondance between the current irq number and
     104 * the corresponding wd8003EnetDriver structure could be used...
     105 */
     106static void wd8003Enet_interrupt_handler ()
    105107{
    106108  unsigned int tport, nowTicks, bootTicks;
     
    117119  tport = wd8003EnetDriver[0].port ;
    118120
    119   PC386_disableIrq(wd8003EnetDriver[0].irno);
    120   PC386_ackIrq(wd8003EnetDriver[0].irno);
    121   asm volatile("sti");
    122  
    123121  /*
    124122   * Drop chips interrupt
     
    196194   */
    197195  outport_byte(tport+IMR, 0x15);
    198   asm volatile("cli");
    199   PC386_enableIrq(wd8003EnetDriver[0].irno);
    200  
     196}
     197
     198static void nopOn(const rtems_irq_connect_data* notUsed)
     199{
     200  /*
     201   * code should be moved from wd8003Enet_initialize_hardware
     202   * to this location
     203   */
     204}
     205
     206static int wdIsOn(const rtems_irq_connect_data* irq)
     207{
     208  return pc386_irq_enabled_at_i8259s (irq->name);
    201209}
    202210
     
    274282   * Set up interrupts
    275283   */
    276   sc = PC386_installRtemsIrqHandler(dp->irno, wd8003Enet_interrupt_handler);
    277   if (sc != RTEMS_SUCCESSFUL)
    278     rtems_panic ("Can't attach interrupt handler: %s\n",
    279                  rtems_status_text (sc));
     284  dp->irqInfo.hdl = wd8003Enet_interrupt_handler;
     285  dp->irqInfo.on  = nopOn;
     286  dp->irqInfo.off = nopOn;
     287  dp->irqInfo.isOn = wdIsOn;
     288 
     289  sc = pc386_install_rtems_irq_handler (&dp->irqInfo);
     290  if (!sc)
     291    rtems_panic ("Can't attach WD interrupt handler for irq %d\n",
     292                  dp->irqInfo.name);
    280293}
    281294
     
    459472  dp->rxBdCount = RX_BUF_COUNT;
    460473  dp->txBdCount = TX_BUF_COUNT * TX_BD_PER_BUF;
    461   dp->irno = 5;
     474  dp->irqInfo.name = (rtems_irq_symbolic_name) 5;
    462475  dp->port = 0x240;
    463   dp->base = 0xD0000;
     476  dp->base = (unsigned char*) 0xD0000;
    464477  dp->bpar = 0xD0000;
    465478  iface->mtu = 1500;
     
    493506    }
    494507    else if (strcmp ("irno", argv[argIndex]) == 0) {
    495       dp->irno = atoi (argv[++argIndex]);
     508      dp->irqInfo.name = (rtems_irq_symbolic_name) atoi (argv[++argIndex]);
    496509    }
    497510    else if (strcmp ("port", argv[argIndex]) == 0) {
     
    499512    }
    500513    else if (strcmp ("bpar", argv[argIndex]) == 0) {
    501       sscanf(argv[++argIndex], "%x", &(dp->bpar));
    502       dp->base = (char *)(dp->bpar);
     514      sscanf(argv[++argIndex], "%x", (unsigned) &(dp->bpar));
     515      dp->base = (unsigned char *)(dp->bpar);
    503516    }
    504517    else {
     
    509522  printf ("Ethernet address: %s\n", pether (cbuf, iface->hwaddr));
    510523  printf ("Internet address: %s\n", inet_ntoa(iface->addr));
    511   printf ("Irno: %X, port: %X, bpar: %X, base: %X\n",dp->irno, dp->port,
    512           dp->bpar, dp->base);
     524  printf ("Irno: %X, port: %X, bpar: %X, base: %X\n",dp->irqInfo.name, dp->port,
     525          (unsigned) dp->bpar, (unsigned) dp->base);
    513526  fflush(stdout);
    514527  /*   
  • c/src/lib/libbsp/i386/pc386/start/Makefile.in

    r1501809 rdbab462  
    6565
    6666${ARCH}/start16.bin: ${ARCH}/start16.o
    67         $(LD) -N -T $(LINKCMDS) -Ttext $(START16ADDR) -e start16 -nostdlib \
     67        - $(LD) -N -T $(LINKCMDS) -Ttext $(START16ADDR) -e start16 -nostdlib \
    6868          --oformat=elf32-i386 -o $(basename $@).obj $(basename $@).o
    69         $(OBJCOPY) -O binary $(basename $@).obj $@
    70 
     69        - $(OBJCOPY) -O binary $(basename $@).obj $@
     70        cp $(basename $@).o $(basename $@).bin
  • c/src/lib/libbsp/i386/pc386/startup/Makefile.in

    r1501809 rdbab462  
    1010
    1111PGM=${ARCH}/startup.rel
     12
     13IMPORT_SRC=$(srcdir)/../../shared/irq/irq.c \
     14   $(srcdir)/../../shared/irq/irq_init.c $(srcdir)/../../shared/irq/irq_asm.s
    1215
    1316# C source names, if any, go here -- minus the .c
     
    5154CLOBBER_ADDITIONS +=
    5255
    53 IMPORT_SRC=$(srcdir)/../../shared/irq/irq.c \
    54    $(srcdir)/../../shared/irq/irq_init.c $(srcdir)/../../shared/irq/irq_asm.s
    55 
    5656preinstall:
    5757        ${CP} ${IMPORT_SRC} .
  • c/src/lib/libbsp/i386/shared/irq/irq_init.c

    r1501809 rdbab462  
    178178    }
    179179
    180 #define DEBUG   
     180    /*
     181     * #define DEBUG   
     182     */
    181183#ifdef DEBUG
    182184    {
  • c/src/lib/wrapup/Makefile.in

    r1501809 rdbab462  
    1717 
    1818SRCS=$(wildcard $(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a) \
    19      $(PROJECT_RELEASE)/lib/libcpu$(LIB_VARIANT).a \
    2019     $(PROJECT_RELEASE)/lib/librtems$(LIB_VARIANT).a \
    2120     $(wildcard $(PROJECT_RELEASE)/lib/libposix$(LIB_VARIANT).a) \
  • c/src/tests/samples/Makefile.in

    r1501809 rdbab462  
    1818CPLUSPLUS_TESTS = $(CPLUSPLUS_TESTS_$(HAS_CPLUSPLUS)_V)
    1919
     20# We only build the sockets tests if HAS_KA9Q was defined
     21SOCKET_yes_V = socket
     22SOCKET = $(SOCKET_$(HAS_KA9Q)_V)
     23
     24HOSTSOCKET_yes_V = socket/pgmHost
     25HOSTSOCKET = $(HOSTSOCKET_$(HAS_KA9Q)_V)
     26
    2027# base_mp is a sample multiprocessing test
    2128# We only build it if HAS_MP was defined
     
    2633FP_TESTS = paranoia
    2734
    28 # socket socket/pgmHost
    29 SUB_DIRS=hello ticker base_sp
     35SUB_DIRS=hello ticker base_sp $(HOSTSOCKET) $(SOCKET) \
    3036         $(MP_TESTS) $(CPLUSPLUS_TESTS) $(FP_TESTS)
     37
     38
     39
  • c/src/wrapup/Makefile.in

    r1501809 rdbab462  
    1717 
    1818SRCS=$(wildcard $(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a) \
    19      $(PROJECT_RELEASE)/lib/libcpu$(LIB_VARIANT).a \
    2019     $(PROJECT_RELEASE)/lib/librtems$(LIB_VARIANT).a \
    2120     $(wildcard $(PROJECT_RELEASE)/lib/libposix$(LIB_VARIANT).a) \
  • make/leaf.cfg

    r1501809 rdbab462  
    119119        $(RM) -r a.out core mon.out gmon.out $(CLEAN_OS) $(CLEAN_CC)
    120120        $(RM) -r $(CLEAN_PROTO) $(CLEAN_DEPEND) a.out
    121         $(RM) -r $(VARIANTS) $(CLEAN_ADDITIONS)
     121        $(RM) -r $(VARIANTS) $(CLEAN_ADDITIONS) $(IMPORT_SOURCE)
    122122
    123123clobber: clean
Note: See TracChangeset for help on using the changeset viewer.