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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-alpha/] [shmparam.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1632 jcastillo
#ifndef _ASMAXP_SHMPARAM_H
2
#define _ASMAXP_SHMPARAM_H
3
 
4
/*
5
 * Address range for shared memory attaches if no address passed to shmat().
6
 */
7
#define SHM_RANGE_START 0x14000000000
8
#define SHM_RANGE_END   0x15000000000
9
 
10
/*
11
 * Format of a swap-entry for shared memory pages currently out in
12
 * swap space (see also mm/swap.c).
13
 *
14
 * SWP_TYPE = SHM_SWP_TYPE
15
 * SWP_OFFSET is used as follows:
16
 *
17
 *  bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
18
 *  bits 7..21: index of page within shared memory segment (SHM_IDX)
19
 *              (actually fewer bits get used since SHMMAX is so low)
20
 */
21
 
22
/*
23
 * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
24
 * there is a static array of size SHMMNI.
25
 */
26
#define _SHM_ID_BITS    7
27
#define SHM_ID_MASK     ((1<<_SHM_ID_BITS)-1)
28
 
29
#define SHM_IDX_SHIFT   (_SHM_ID_BITS)
30
#define _SHM_IDX_BITS   15
31
#define SHM_IDX_MASK    ((1<<_SHM_IDX_BITS)-1)
32
 
33
/*
34
 * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the Alpha and
35
 * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
36
 */
37
 
38
#define SHMMAX 0x3fa000                 /* max shared seg size (bytes) */
39
#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
40
#define SHMMNI (1<<_SHM_ID_BITS)        /* max num of segs system wide */
41
#define SHMALL                          /* max shm system wide (pages) */ \
42
        (1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
43
#define SHMLBA PAGE_SIZE                /* attach addr a multiple of this */
44
#define SHMSEG SHMMNI                   /* max shared segs per process */
45
 
46
#endif /* _ASMAXP_SHMPARAM_H */

powered by: WebSVN 2.1.0

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