1 #ifndef __LUNAIX_CONSTANTS_H
2 #define __LUNAIX_CONSTANTS_H
4 #define KSTACK_SIZE (64 << 10)
5 #define KSTACK_START ((0xFFBFFFFFU - KSTACK_SIZE) + 1)
6 #define KSTACK_TOP 0xffbffff0
7 #define HIGHER_HLF_BASE 0xC0000000
8 #define MEM_1MB 0x100000
10 #define VGA_BUFFER_VADDR 0xB0000000
11 #define VGA_BUFFER_PADDR 0xB8000
12 #define VGA_BUFFER_SIZE 4096
14 #define KCODE_SEG 0x08
15 #define KDATA_SEG 0x10
16 #define UCODE_SEG 0x1B
17 #define UDATA_SEG 0x23
20 #define USER_START 0x400000
21 #define USTACK_SIZE 0x100000
22 #define USTACK_TOP 0x9fffffff
23 #define USTACK_END (USTACK_TOP - USTACK_SIZE + 1)
24 #define UMMAP_AREA 0x4D000000
26 #define SYS_TIMER_FREQUENCY_HZ 2048
30 // From Linux kernel v2.6.0 <kernel.h:194>
32 * container_of - cast a member of a structure out to the containing structure
34 * @ptr: the pointer to the member.
35 * @type: the type of the container struct this is embedded in.
36 * @member: the name of the member within the struct.
39 #define container_of(ptr, type, member) ({ \
40 const typeof( ((type *)0)->member ) *__mptr = (ptr); \
41 (type *)( (char *)__mptr - offsetof(type,member) );})
44 #endif /* __LUNAIX_CONSTANTS_H */