source: rtems/bsps/no_cpu/no_bsp/mpci/getcfg.c

Last change on this file was a3571e39, checked in by Joel Sherrill <joel@…>, on 07/11/22 at 22:26:21

bsps/no_cpu/no_bsp: Change license to BSD-2

Updates #3053.

  • Property mode set to 100644
File size: 3.2 KB
Line 
1/* SPDX-License-Identifier: BSD-2-Clause */
2
3/*  void Shm_Get_configuration( localnode, &shmcfg )
4 *
5 *  This routine initializes, if necessary, and returns a pointer
6 *  to the Shared Memory Configuration Table for the XXX target.
7 *
8 *  INPUT PARAMETERS:
9 *    localnode - local node number
10 *    shmcfg    - address of pointer to SHM Config Table
11 *
12 *  OUTPUT PARAMETERS:
13 *    *shmcfg   - pointer to SHM Config Table
14 *
15XXX: FIX THE COMMENTS BELOW WHEN THE CPU IS KNOWN
16 *  NOTES:  The XYZ does not have an interprocessor interrupt.
17 *
18 *          The following table illustrates the configuration limitations:
19 *
20 *                                   BUS     MAX
21 *                          MODE    ENDIAN  NODES
22 *                        ========= ====== =======
23 *                         POLLED    BIG    2+
24 *                        INTERRUPT **** NOT SUPPORTED ****
25 *
26 *  COPYRIGHT (c) 1989-1999.
27 *  On-Line Applications Research Corporation (OAR).
28 *
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
31 * are met:
32 * 1. Redistributions of source code must retain the above copyright
33 *    notice, this list of conditions and the following disclaimer.
34 * 2. Redistributions in binary form must reproduce the above copyright
35 *    notice, this list of conditions and the following disclaimer in the
36 *    documentation and/or other materials provided with the distribution.
37 *
38 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
39 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
40 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
41 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
42 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
43 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
44 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
45 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
46 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
47 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
48 * POSSIBILITY OF SUCH DAMAGE.
49 */
50
51#include <rtems.h>
52#include <bsp.h>
53#include <shm_driver.h>
54
55/*
56 *  configured if currently polling of interrupt driven
57 */
58
59#define INTERRUPT 0        /* XXX: */
60#define POLLING   1        /* XXX: fix me -- is polling ONLY!!! */
61
62shm_config_table BSP_shm_cfgtbl;
63
64void Shm_Get_configuration(
65  uint32_t           localnode,
66  shm_config_table **shmcfg
67)
68{
69   BSP_shm_cfgtbl.base         = 0x0;
70   BSP_shm_cfgtbl.length       = 1 * MEGABYTE;
71   BSP_shm_cfgtbl.format       = SHM_BIG;
72
73   /*
74    *  Override cause_intr or shm_isr if your target has
75    *  special requirements.
76    */
77
78   BSP_shm_cfgtbl.cause_intr   = Shm_Cause_interrupt;
79
80#ifdef NEUTRAL_BIG
81   BSP_shm_cfgtbl.convert      = NULL_CONVERT;
82#else
83   BSP_shm_cfgtbl.convert      = CPU_swap_u32;
84#endif
85
86   BSP_shm_cfgtbl.poll_intr    = POLLED_MODE;
87   BSP_shm_cfgtbl.Intr.address = NO_INTERRUPT;
88   BSP_shm_cfgtbl.Intr.value   = NO_INTERRUPT;
89   BSP_shm_cfgtbl.Intr.length  = NO_INTERRUPT;
90
91   *shmcfg = &BSP_shm_cfgtbl;
92}
Note: See TracBrowser for help on using the repository browser.