URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
1633 |
jcastillo |
#ifndef _I960_SHMPARAM_H
|
2 |
|
|
#define _I960_SHMPARAM_H
|
3 |
|
|
|
4 |
|
|
/* FIXME what do these addresses mean on the NO_MM i960? */
|
5 |
|
|
/* address range for shared memory attaches if no address passed to shmat() */
|
6 |
|
|
#define SHM_RANGE_START 0xC0000000
|
7 |
|
|
#define SHM_RANGE_END 0xD0000000
|
8 |
|
|
|
9 |
|
|
/*
|
10 |
|
|
* Format of a swap-entry for shared memory pages currently out in
|
11 |
|
|
* swap space (see also mm/swap.c).
|
12 |
|
|
*
|
13 |
|
|
* SWP_TYPE = SHM_SWP_TYPE
|
14 |
|
|
* SWP_OFFSET is used as follows:
|
15 |
|
|
*
|
16 |
|
|
* bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
|
17 |
|
|
* bits 7..21: index of page within shared memory segment (SHM_IDX)
|
18 |
|
|
* (actually fewer bits get used since SHMMAX is so low)
|
19 |
|
|
*/
|
20 |
|
|
|
21 |
|
|
/*
|
22 |
|
|
* Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
|
23 |
|
|
* there is a static array of size SHMMNI.
|
24 |
|
|
*/
|
25 |
|
|
#define _SHM_ID_BITS 7
|
26 |
|
|
#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)
|
27 |
|
|
|
28 |
|
|
#define SHM_IDX_SHIFT (_SHM_ID_BITS)
|
29 |
|
|
#define _SHM_IDX_BITS 15
|
30 |
|
|
#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)
|
31 |
|
|
|
32 |
|
|
/*
|
33 |
|
|
* _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and
|
34 |
|
|
* SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
|
35 |
|
|
*/
|
36 |
|
|
|
37 |
|
|
#define SHMMAX 0x1000000 /* max shared seg size (bytes) */
|
38 |
|
|
#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
|
39 |
|
|
#define SHMMNI (1<<_SHM_ID_BITS) /* max num of segs system wide */
|
40 |
|
|
#define SHMALL /* max shm system wide (pages) */ \
|
41 |
|
|
(1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
|
42 |
|
|
#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
|
43 |
|
|
#define SHMSEG SHMMNI /* max shared segs per process */
|
44 |
|
|
|
45 |
|
|
#endif /* _I960_SHMPARAM_H */
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.