source: rtems/c/src/lib/libbsp/powerpc/psim/shmsupp/getcfg.c @ 0c875c6a

4.115
Last change on this file since 0c875c6a was 0c875c6a, checked in by Joel Sherrill <joel.sherrill@…>, on 01/28/11 at 20:29:53

2011-01-28 Joel Sherrill <joel.sherrilL@…>

  • beatnik/include/bsp.h, beatnik/irq/irq.h, beatnik/pci/gt_pci_init.c, ep1a/console/polled_io.c, ep1a/irq/openpic_xxx_irq.c, gen5200/include/irq.h, gen5200/irq/irq.c, gen5200/startup/bspstart.c, haleakala/irq/irq.c, mbx8xx/irq/irq.c, mbx8xx/irq/irq.h, motorola_powerpc/include/bsp.h, mpc8260ads/irq/irq.c, mpc8260ads/irq/irq.h, mvme3100/include/bsp.h, mvme3100/irq/irq.h, mvme3100/start/start.S, mvme5500/include/bsp.h, mvme5500/irq/irq.h, psim/include/bsp.h, psim/include/coverhd.h, psim/irq/irq.h, psim/shmsupp/addrconv.c, psim/shmsupp/getcfg.c, psim/startup/linkcmds, psim/tools/psim-gdb-top.in, psim/tools/psim-top.in, psim/tools/runtest-top.in, qemuppc/irq/irq.h, score603e/irq/irq.c, shared/bootloader/bootldr.h, shared/bootloader/em86.c, shared/bootloader/em86real.S, shared/bootloader/exception.S, shared/bootloader/head.S, shared/bootloader/lib.c, shared/bootloader/misc.c, shared/bootloader/mm.c, shared/bootloader/pci.c, shared/console/console.c, shared/console/consoleIo.h, shared/console/inch.c, shared/console/keyboard.h, shared/console/polled_io.c, shared/irq/i8259.c, shared/irq/irq.h, shared/irq/openpic_i8259_irq.c, shared/motorola/motorola.c, shared/motorola/motorola.h, shared/openpic/openpic.c, shared/openpic/openpic.h, shared/pci/pci.c, shared/residual/residual.c, shared/start/start.S, ss555/irq/irq.h: Fix typo where license said found in found in.
  • Property mode set to 100644
File size: 1.7 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 PowerPC PSIM.
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 *
13 *  NOTES:  No interrupt support.
14 *
15 *  COPYRIGHT (c) 1989-2008.
16 *  On-Line Applications Research Corporation (OAR).
17 *
18 *  The license and distribution terms for this file may be
19 *  found in the file LICENSE in this distribution or at
20 *  http://www.rtems.com/license/LICENSE.
21 *
22 *  $Id$
23 */
24
25#include <rtems.h>
26#include <psim.h>
27#include "shm_driver.h"
28
29#define INTERRUPT 0                   /* PSIM target supports only */
30#define POLLING   1                   /* polling mode. */
31
32shm_config_table BSP_shm_cfgtbl;
33
34void Shm_Get_configuration(
35  uint32_t           localnode,
36  shm_config_table **shmcfg
37)
38{
39   BSP_shm_cfgtbl.base         = (uint32_t*)PSIM.SharedMemory;
40   BSP_shm_cfgtbl.length       = sizeof(PSIM.SharedMemory);
41   BSP_shm_cfgtbl.format       = SHM_BIG;
42
43   BSP_shm_cfgtbl.cause_intr   = Shm_Cause_interrupt;
44
45#ifdef NEUTRAL_BIG
46   BSP_shm_cfgtbl.convert      = NULL_CONVERT;
47#else
48   BSP_shm_cfgtbl.convert      = CPU_swap_u32;
49#endif
50
51#if (POLLING==1)
52   BSP_shm_cfgtbl.poll_intr    = POLLED_MODE;
53   BSP_shm_cfgtbl.Intr.address = NO_INTERRUPT;
54   BSP_shm_cfgtbl.Intr.value   = NO_INTERRUPT;
55   BSP_shm_cfgtbl.Intr.length  = NO_INTERRUPT;
56#else
57   BSP_shm_cfgtbl.poll_intr    = INTR_MODE;
58   BSP_shm_cfgtbl.Intr.address = 0;
59   BSP_shm_cfgtbl.Intr.value   = 0;
60   BSP_shm_cfgtbl.Intr.length  = BYTE;
61#endif
62
63   *shmcfg = &BSP_shm_cfgtbl;
64
65}
Note: See TracBrowser for help on using the repository browser.