OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [powerpc/] [psim/] [shmsupp/] [getcfg.c] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  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-1999.
16
 *  On-Line Applications Research Corporation (OAR).
17
 *
18
 *  The license and distribution terms for this file may be
19
 *  found in found in the file LICENSE in this distribution or at
20
 *  http://www.OARcorp.com/rtems/license.html.
21
 *
22
 *  $Id: getcfg.c,v 1.2 2001-09-27 12:01:02 chris Exp $
23
 */
24
 
25
#include <rtems.h>
26
#include "shm_driver.h"
27
 
28
#define INTERRUPT 0                   /* PSIM target supports only */
29
#define POLLING   1                   /* polling mode. */
30
 
31
shm_config_table BSP_shm_cfgtbl;
32
 
33
void Shm_Get_configuration(
34
  rtems_unsigned32   localnode,
35
  shm_config_table **shmcfg
36
)
37
{
38
   BSP_shm_cfgtbl.base         = (rtems_unsigned32 *)0xc0000000;
39
   BSP_shm_cfgtbl.length       = 64 * 1024;
40
   BSP_shm_cfgtbl.format       = SHM_BIG;
41
 
42
   BSP_shm_cfgtbl.cause_intr   = Shm_Cause_interrupt;
43
 
44
#ifdef NEUTRAL_BIG
45
   BSP_shm_cfgtbl.convert      = NULL_CONVERT;
46
#else
47
   BSP_shm_cfgtbl.convert      = CPU_swap_u32;
48
#endif
49
 
50
#if (POLLING==1)
51
   BSP_shm_cfgtbl.poll_intr    = POLLED_MODE;
52
   BSP_shm_cfgtbl.Intr.address = NO_INTERRUPT;
53
   BSP_shm_cfgtbl.Intr.value   = NO_INTERRUPT;
54
   BSP_shm_cfgtbl.Intr.length  = NO_INTERRUPT;
55
#else
56
   BSP_shm_cfgtbl.poll_intr    = INTR_MODE;
57
   BSP_shm_cfgtbl.Intr.address = 0;
58
   BSP_shm_cfgtbl.Intr.value   = 0;
59
   BSP_shm_cfgtbl.Intr.length  = BYTE;
60
#endif
61
 
62
   *shmcfg = &BSP_shm_cfgtbl;
63
 
64
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.