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 | * |
---|
13 | XXX: 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-1998. |
---|
25 | * On-Line Applications Research Corporation (OAR). |
---|
26 | * Copyright assigned to U.S. Government, 1994. |
---|
27 | * |
---|
28 | * The license and distribution terms for this file may be |
---|
29 | * found in the file LICENSE in this distribution or at |
---|
30 | * http://www.OARcorp.com/rtems/license.html. |
---|
31 | * |
---|
32 | * $Id$ |
---|
33 | */ |
---|
34 | |
---|
35 | #include <rtems.h> |
---|
36 | #include <bsp.h> |
---|
37 | #include <shm.h> |
---|
38 | |
---|
39 | /* |
---|
40 | * configured if currently polling of interrupt driven |
---|
41 | */ |
---|
42 | |
---|
43 | #define INTERRUPT 0 /* XXX: */ |
---|
44 | #define POLLING 1 /* XXX: fix me -- is polling ONLY!!! */ |
---|
45 | |
---|
46 | |
---|
47 | shm_config_table BSP_shm_cfgtbl; |
---|
48 | |
---|
49 | void Shm_Get_configuration( |
---|
50 | rtems_unsigned32 localnode, |
---|
51 | shm_config_table **shmcfg |
---|
52 | ) |
---|
53 | { |
---|
54 | BSP_shm_cfgtbl.base = 0x0; |
---|
55 | BSP_shm_cfgtbl.length = 1 * MEGABYTE; |
---|
56 | BSP_shm_cfgtbl.format = SHM_BIG; |
---|
57 | |
---|
58 | /* |
---|
59 | * Override cause_intr or shm_isr if your target has |
---|
60 | * special requirements. |
---|
61 | */ |
---|
62 | |
---|
63 | BSP_shm_cfgtbl.cause_intr = Shm_Cause_interrupt; |
---|
64 | |
---|
65 | #ifdef NEUTRAL_BIG |
---|
66 | BSP_shm_cfgtbl.convert = NULL_CONVERT; |
---|
67 | #else |
---|
68 | BSP_shm_cfgtbl.convert = CPU_swap_u32; |
---|
69 | #endif |
---|
70 | |
---|
71 | BSP_shm_cfgtbl.poll_intr = POLLED_MODE; |
---|
72 | BSP_shm_cfgtbl.Intr.address = NO_INTERRUPT; |
---|
73 | BSP_shm_cfgtbl.Intr.value = NO_INTERRUPT; |
---|
74 | BSP_shm_cfgtbl.Intr.length = NO_INTERRUPT; |
---|
75 | |
---|
76 | *shmcfg = &BSP_shm_cfgtbl; |
---|
77 | } |
---|