source: rtems/c/src/lib/libbsp/nios2/nios2_iss/shmsupp/getcfg.c @ 783669fc

4.104.114.84.95
Last change on this file since 783669fc was 783669fc, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 9, 2006 at 8:57:11 PM

2006-08-09 Kolja Waschk <waschk@…>

  • ChangeLog?, Makefile.am, README, acinclude.m4, configure.ac, nios2_iss/ChangeLog, nios2_iss/Makefile.am, nios2_iss/bsp_specs, nios2_iss/configure.ac, nios2_iss/nios2_iss.ptf, nios2_iss/nios2_iss.sh, nios2_iss/times, nios2_iss/console/console.c, nios2_iss/include/bsp.h, nios2_iss/include/bspopts.h.in, nios2_iss/include/coverhd.h, nios2_iss/include/tm27.h, nios2_iss/shmsupp/addrconv.c, nios2_iss/shmsupp/getcfg.c, nios2_iss/shmsupp/lock.c, nios2_iss/shmsupp/mpisr.c, nios2_iss/start/crtnn.s, nios2_iss/start/start.S, nios2_iss/startup/bspclean.c, nios2_iss/startup/bspstart.c, nios2_iss/startup/linkcmds, nios2_iss/startup/main.c, nios2_iss/startup/setvec.c, nios2_iss/timer/timer.c: New files.
  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*  void Shm_Get_configuration( localnode, &shmcfg )
2 *
3 *  This routine initializes, if necessary, and returns a pointer
4 *  to the Shared Memory Configuration Table for the XXX target.
5 *
6 *  INPUT PARAMETERS:
7 *    localnode - local node number
8 *    shmcfg    - address of pointer to SHM Config Table
9 *
10 *  OUTPUT PARAMETERS:
11 *    *shmcfg   - pointer to SHM Config Table
12 *
13XXX: FIX THE COMMENTS BELOW WHEN THE CPU IS KNOWN
14 *  NOTES:  The XYZ does not have an interprocessor interrupt.
15 *
16 *          The following table illustrates the configuration limitations:
17 *
18 *                                   BUS     MAX
19 *                          MODE    ENDIAN  NODES
20 *                        ========= ====== =======
21 *                         POLLED    BIG    2+
22 *                        INTERRUPT **** NOT SUPPORTED ****
23 *
24 *  COPYRIGHT (c) 1989-1999.
25 *  On-Line Applications Research Corporation (OAR).
26 *
27 *  The license and distribution terms for this file may be
28 *  found in the file LICENSE in this distribution or at
29 *  http://www.rtems.com/license/LICENSE.
30 *
31 *  $Id$
32 */
33
34#include <rtems.h>
35#include <bsp.h>
36#include <shm_driver.h>
37
38/*
39 *  configured if currently polling of interrupt driven
40 */
41
42#define INTERRUPT 0        /* XXX: */
43#define POLLING   1        /* XXX: fix me -- is polling ONLY!!! */
44
45shm_config_table BSP_shm_cfgtbl;
46
47void Shm_Get_configuration(
48  uint32_t           localnode,
49  shm_config_table **shmcfg
50)
51{
52   BSP_shm_cfgtbl.base         = 0x0;
53   BSP_shm_cfgtbl.length       = 1 * MEGABYTE;
54   BSP_shm_cfgtbl.format       = SHM_BIG;
55
56   /*
57    *  Override cause_intr or shm_isr if your target has
58    *  special requirements.
59    */
60
61   BSP_shm_cfgtbl.cause_intr   = Shm_Cause_interrupt;
62
63#ifdef NEUTRAL_BIG
64   BSP_shm_cfgtbl.convert      = NULL_CONVERT;
65#else
66   BSP_shm_cfgtbl.convert      = CPU_swap_u32;
67#endif
68
69   BSP_shm_cfgtbl.poll_intr    = POLLED_MODE;
70   BSP_shm_cfgtbl.Intr.address = NO_INTERRUPT;
71   BSP_shm_cfgtbl.Intr.value   = NO_INTERRUPT;
72   BSP_shm_cfgtbl.Intr.length  = NO_INTERRUPT;
73
74   *shmcfg = &BSP_shm_cfgtbl;
75}
Note: See TracBrowser for help on using the repository browser.