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

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [include/] [l4/] [glue/] [arm/] [memlayout.h] - Blame information for rev 6

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
/*
2
 * Virtual memory layout of ARM systems.
3
 */
4
 
5
#ifndef __MEMLAYOUT_H__
6
#define __MEMLAYOUT_H__
7
 
8
#ifndef __ASSEMBLY__
9
#include INC_GLUE(memory.h)
10
#endif
11
#include INC_PLAT(offsets.h)
12
 
13
#define KERNEL_AREA_START       0xF0000000
14
#define KERNEL_AREA_END         0xF8000000      /* 128 MB */
15
#define KERNEL_AREA_SIZE        (KERNEL_AREA_END - KERNEL_AREA_START)
16
#define KERNEL_AREA_SECTIONS    (KERNEL_AREA_SIZE / ARM_SECTION_SIZE)
17
 
18
#define UTCB_SIZE               (sizeof(int) * 64)
19
 
20
#define IO_AREA_START           0xF9000000
21
#define IO_AREA_END             0xFF000000
22
#define IO_AREA_SIZE            (IO_AREA_END - IO_AREA_START)
23
#define IO_AREA_SECTIONS        (IO_AREA_SIZE / ARM_SECTION_SIZE)
24
 
25
#define USER_KIP_PAGE           0xFF000000
26
 
27
/* ARM-specific offset in KIP that tells the address of UTCB page */
28
#define UTCB_KIP_OFFSET         0x50
29
 
30
#define IO_AREA0_VADDR          IO_AREA_START
31
#define IO_AREA1_VADDR          (IO_AREA_START + (SZ_1MB*1))
32
#define IO_AREA2_VADDR          (IO_AREA_START + (SZ_1MB*2))
33
#define IO_AREA3_VADDR          (IO_AREA_START + (SZ_1MB*3))
34
#define IO_AREA4_VADDR          (IO_AREA_START + (SZ_1MB*4))
35
#define IO_AREA5_VADDR          (IO_AREA_START + (SZ_1MB*5))
36
#define IO_AREA6_VADDR          (IO_AREA_START + (SZ_1MB*6))
37
#define IO_AREA7_VADDR          (IO_AREA_START + (SZ_1MB*7))
38
 
39
/*
40
 * IO_AREA8_VADDR
41
 * The beginning page in this slot is used for userspace uart mapping
42
 */
43
 
44
#define ARM_HIGH_VECTOR         0xFFFF0000
45
#define ARM_SYSCALL_VECTOR      0xFFFFFF00
46
 
47
#define KERNEL_OFFSET           (KERNEL_AREA_START - PLATFORM_PHYS_MEM_START)
48
 
49
/* User tasks define them differently */
50
#if defined (__KERNEL__)
51
#define phys_to_virt(addr)      ((unsigned int)(addr) + KERNEL_OFFSET)
52
#define virt_to_phys(addr)      ((unsigned int)(addr) - KERNEL_OFFSET)
53
#endif
54
 
55
#define KERN_ADDR(x)            ((x >= KERNEL_AREA_START) && (x < KERNEL_AREA_END))
56
#define UTCB_ADDR(x)            ((x >= UTCB_AREA_START) && (x < UTCB_AREA_END))
57
#define is_kernel_address(x)    (KERN_ADDR(x) || (x >= ARM_HIGH_VECTOR) || \
58
                                 (x >= IO_AREA_START && x < IO_AREA_END))
59
 
60
#endif /* __MEMLAYOUT_H__ */

powered by: WebSVN 2.1.0

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