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

Subversion Repositories or1k

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

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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