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 FORCE CPU-386 |
---|
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: The FORCE CPU-386 does not have an interprocessor interrupt. |
---|
14 | * |
---|
15 | * The following table illustrates the configuration limitations: |
---|
16 | * |
---|
17 | * BUS MAX |
---|
18 | * MODE ENDIAN NODES |
---|
19 | * ========= ====== ======= |
---|
20 | * POLLED BIG 2+ |
---|
21 | * INTERRUPT **** NOT SUPPORTED **** |
---|
22 | * |
---|
23 | * COPYRIGHT (c) 1989-1997. |
---|
24 | * On-Line Applications Research Corporation (OAR). |
---|
25 | * Copyright assigned to U.S. Government, 1994. |
---|
26 | * |
---|
27 | * The license and distribution terms for this file may be |
---|
28 | * found in the file LICENSE in this distribution or at |
---|
29 | * http://www.OARcorp.com/rtems/license.html. |
---|
30 | * |
---|
31 | * $Id$ |
---|
32 | */ |
---|
33 | |
---|
34 | #include <rtems.h> |
---|
35 | #include <shm.h> |
---|
36 | #include <bsp.h> |
---|
37 | |
---|
38 | #define INTERRUPT 0 |
---|
39 | #define POLLING 1 /* FORCE CPU-386 target is polling ONLY!!! */ |
---|
40 | |
---|
41 | |
---|
42 | shm_config_table BSP_shm_cfgtbl; |
---|
43 | |
---|
44 | void Shm_Get_configuration( |
---|
45 | rtems_unsigned32 localnode, |
---|
46 | shm_config_table **shmcfg |
---|
47 | ) |
---|
48 | { |
---|
49 | set_segment( get_ds(), 0x00002000, 0xffffd000 ); |
---|
50 | |
---|
51 | BSP_shm_cfgtbl.base = i386_Physical_to_logical( |
---|
52 | get_ds(), |
---|
53 | (void *) 0x20000000 |
---|
54 | ); |
---|
55 | |
---|
56 | BSP_shm_cfgtbl.length = 1 * MEGABYTE; |
---|
57 | BSP_shm_cfgtbl.format = SHM_BIG; |
---|
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 | } |
---|