source: rtems/c/src/lib/libbsp/no_cpu/no_bsp/shmsupp/getcfg.c @ 7f6a24ab

4.104.114.84.95
Last change on this file since 7f6a24ab was ac7d5ef0, checked in by Joel Sherrill <joel.sherrill@…>, on May 11, 1995 at 5:39:37 PM

Initial revision

  • Property mode set to 100644
File size: 2.2 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, 1990, 1991, 1992, 1993, 1994.
25 *  On-Line Applications Research Corporation (OAR).
26 *  All rights assigned to U.S. Government, 1994.
27 *
28 *  This material may be reproduced by or for the U.S. Government pursuant
29 *  to the copyright license under the clause at DFARS 252.227-7013.  This
30 *  notice must appear in all copies of this file and its derivatives.
31 *
32 *  $Id$
33 */
34
35#include <rtems.h>
36#include <bsp.h>
37#include <shm.h>
38
39/*
40 *  configured if currently polling of interrupt driven
41 */
42
43#define INTERRUPT 0        /* XXX: */
44#define POLLING   1        /* XXX: fix me -- is polling ONLY!!! */
45
46
47shm_config_table BSP_shm_cfgtbl;
48
49void Shm_Get_configuration(
50  rtems_unsigned32   localnode,
51  shm_config_table **shmcfg
52)
53{
54   BSP_shm_cfgtbl.base         = 0x0;
55   BSP_shm_cfgtbl.length       = 1 * MEGABYTE;
56   BSP_shm_cfgtbl.format       = SHM_BIG;
57
58   /*
59    *  Override cause_intr or shm_isr if your target has
60    *  special requirements.
61    */
62
63   BSP_shm_cfgtbl.cause_intr   = Shm_Cause_interrupt;
64
65#ifdef NEUTRAL_BIG
66   BSP_shm_cfgtbl.convert      = NULL_CONVERT;
67#else
68   BSP_shm_cfgtbl.convert      = CPU_swap_u32;
69#endif
70
71   BSP_shm_cfgtbl.poll_intr    = POLLED_MODE;
72   BSP_shm_cfgtbl.Intr.address = NO_INTERRUPT;
73   BSP_shm_cfgtbl.Intr.value   = NO_INTERRUPT;
74   BSP_shm_cfgtbl.Intr.length  = NO_INTERRUPT;
75
76   *shmcfg = &BSP_shm_cfgtbl;
77}
Note: See TracBrowser for help on using the repository browser.