source: rtems/c/src/lib/libbsp/a29k/portsw/shmsupp/getcfg.c @ 48bfd992

4.104.114.84.95
Last change on this file since 48bfd992 was 48bfd992, checked in by Joel Sherrill <joel.sherrill@…>, on 11/30/99 at 19:58:02

Renamed shm.h to shm_driver.h to avoid conflicts with POSIX shm.h.

Renamed file shmsupp/intr.c in some BSPs to shmsupp/cause_intr.c to
avoid conflict with rtems/src/intr.c (Classic API Interrupt Manager).

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