Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/include/mach/arm/vm_param.h

Source at commit 1270 created 12 years 8 months ago.
By meklort, Add arm headers. update makefiles
1/*
2 * Copyright (c) 2007 Apple Inc. All rights reserved.
3 */
4/*
5 * FILE_ID: vm_param.h
6 */
7
8/*
9 *ARM machine dependent virtual memory parameters.
10 */
11
12#ifndef_MACH_ARM_VM_PARAM_H_
13#define _MACH_ARM_VM_PARAM_H_
14
15#define BYTE_SIZE8/* byte size in bits */
16
17#define ARM_PGBYTES4096/* bytes per ARM small page */
18#define ARM_PGSHIFT12/* number of bits to shift for pages */
19
20#define PAGE_SIZE ARM_PGBYTES
21#define PAGE_SHIFT ARM_PGSHIFT
22#define PAGE_MASK (PAGE_SIZE-1)
23
24#define VM_PAGE_SIZEARM_PGBYTES
25
26#define KERNEL_STACK_SIZE(4*ARM_PGBYTES)
27#define INTSTACK_SIZE(4*ARM_PGBYTES)
28/* interrupt stack size */
29
30#ifndef __ASSEMBLER__
31/*
32 *Round off or truncate to the nearest page. These will work
33 *for either addresses or counts. (i.e. 1 byte rounds to 1 page
34 *bytes.
35 */
36
37
38/*
39 * ARMtodo: Make user address spaces small for now (to make
40 * context switch more efficient). Since we don't have VM
41 * pageout yet, just make it 1GB for now.
42 */
43#define VM_MIN_ADDRESS((vm_address_t) 0x00000000)
44#define VM_MAX_ADDRESS((vm_address_t) 0x40000000)
45
46#define HIGH_EXC_VECTORS((vm_address_t) 0xFFFF0000) /* exception vectors virt */
47
48#define VM_MIN_KERNEL_ADDRESS((vm_address_t) 0x80000000)
49#define VM_MIN_KERNEL_AND_KEXT_ADDRESS VM_MIN_KERNEL_ADDRESS
50#define VM_MAX_KERNEL_ADDRESS((vm_address_t) 0xFFFEFFFF) /* end short of exc vecs */
51
52#define VM_KERNEL_ADDRESS(va)((((vm_address_t)(va))>=VM_MIN_KERNEL_ADDRESS) && \
53 (((vm_address_t)(va))<=VM_MAX_KERNEL_ADDRESS))
54
55/* system-wide values */
56#define MACH_VM_MIN_ADDRESS((mach_vm_offset_t) 0)
57#define MACH_VM_MAX_ADDRESS((mach_vm_offset_t) VM_MAX_ADDRESS)
58
59/*
60 *Physical memory is mapped linearly at an offset virtual memory.
61 */
62extern unsigned long gVirtBase, gPhysBase, gPhysSize;
63#define isphysmem(a) (((vm_address_t)(a) - gPhysBase) < gPhysSize)
64#define phystokv(a)((vm_address_t)(a) - gPhysBase + gVirtBase)
65#endif
66
67#define SWI_SYSCALL0x80
68
69#endif/* _MACH_ARM_VM_PARAM_H_ */
70
71

Archive Download this file

Revision: 1270