source: rtems/c/src/lib/libbsp/a29k/portsw/shmsupp/getcfg.c @ 03f2154e

4.104.114.84.95
Last change on this file since 03f2154e was 03f2154e, checked in by Joel Sherrill <joel.sherrill@…>, on Apr 22, 1997 at 5:20:27 PM

headers updated to reflect new style copyright notice as part
of switching to the modified GNU GPL.

  • Property mode set to 100644
File size: 2.1 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-1997.
25 *  On-Line Applications Research Corporation (OAR).
26 *  Copyright assigned to U.S. Government, 1994.
27 *
28 *  The license and distribution terms for this file may in
29 *  the file LICENSE in this distribution or at
30 *  http://www.OARcorp.com/rtems/license.html.
31 *
32 *  $Id$
33 */
34
35#include <rtems.h>
36#include <bsp.h>
37#include <shm.h>
38
39#ifndef lint
40static char _sccsid[] = "@(#)getcfg.c 04/08/96     1.1\n";
41#endif
42
43/*
44 *  configured if currently polling of interrupt driven
45 */
46
47#define INTERRUPT 0        /* XXX: */
48#define POLLING   1        /* XXX: fix me -- is polling ONLY!!! */
49
50
51shm_config_table BSP_shm_cfgtbl;
52
53void Shm_Get_configuration(
54  rtems_unsigned32   localnode,
55  shm_config_table **shmcfg
56)
57{
58   BSP_shm_cfgtbl.base         = 0x0;
59   BSP_shm_cfgtbl.length       = 1 * MEGABYTE;
60   BSP_shm_cfgtbl.format       = SHM_BIG;
61
62   /*
63    *  Override cause_intr or shm_isr if your target has
64    *  special requirements.
65    */
66
67   BSP_shm_cfgtbl.cause_intr   = Shm_Cause_interrupt;
68
69#ifdef NEUTRAL_BIG
70   BSP_shm_cfgtbl.convert      = NULL_CONVERT;
71#else
72   BSP_shm_cfgtbl.convert      = CPU_swap_u32;
73#endif
74
75   BSP_shm_cfgtbl.poll_intr    = POLLED_MODE;
76   BSP_shm_cfgtbl.Intr.address = NO_INTERRUPT;
77   BSP_shm_cfgtbl.Intr.value   = NO_INTERRUPT;
78   BSP_shm_cfgtbl.Intr.length  = NO_INTERRUPT;
79
80   *shmcfg = &BSP_shm_cfgtbl;
81}
Note: See TracBrowser for help on using the repository browser.