source: rtems/bsps/no_cpu/no_bsp/mpci/getcfg.c @ 1efa1c8

5
Last change on this file since 1efa1c8 was 1efa1c8, checked in by Sebastian Huber <sebastian.huber@…>, on 04/20/18 at 11:38:33

bsps: Move MPCI support to bsps

This patch is a part of the BSP source reorganization.

Update #3285.

  • Property mode set to 100644
File size: 2.0 KB
RevLine 
[ac7d5ef0]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 *
[08311cc3]24 *  COPYRIGHT (c) 1989-1999.
[ac7d5ef0]25 *  On-Line Applications Research Corporation (OAR).
26 *
[98e4ebf5]27 *  The license and distribution terms for this file may be
28 *  found in the file LICENSE in this distribution or at
[c499856]29 *  http://www.rtems.org/license/LICENSE.
[ac7d5ef0]30 */
31
32#include <rtems.h>
33#include <bsp.h>
[48bfd992]34#include <shm_driver.h>
[ac7d5ef0]35
36/*
37 *  configured if currently polling of interrupt driven
38 */
39
40#define INTERRUPT 0        /* XXX: */
41#define POLLING   1        /* XXX: fix me -- is polling ONLY!!! */
42
43shm_config_table BSP_shm_cfgtbl;
44
45void Shm_Get_configuration(
[6505d3fa]46  uint32_t           localnode,
[ac7d5ef0]47  shm_config_table **shmcfg
48)
49{
50   BSP_shm_cfgtbl.base         = 0x0;
51   BSP_shm_cfgtbl.length       = 1 * MEGABYTE;
52   BSP_shm_cfgtbl.format       = SHM_BIG;
53
54   /*
55    *  Override cause_intr or shm_isr if your target has
56    *  special requirements.
57    */
58
59   BSP_shm_cfgtbl.cause_intr   = Shm_Cause_interrupt;
60
61#ifdef NEUTRAL_BIG
62   BSP_shm_cfgtbl.convert      = NULL_CONVERT;
63#else
64   BSP_shm_cfgtbl.convert      = CPU_swap_u32;
65#endif
66
67   BSP_shm_cfgtbl.poll_intr    = POLLED_MODE;
68   BSP_shm_cfgtbl.Intr.address = NO_INTERRUPT;
69   BSP_shm_cfgtbl.Intr.value   = NO_INTERRUPT;
70   BSP_shm_cfgtbl.Intr.length  = NO_INTERRUPT;
71
72   *shmcfg = &BSP_shm_cfgtbl;
73}
Note: See TracBrowser for help on using the repository browser.