Subversion Repositories HelenOS

Rev

Rev 3386 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3386 Rev 4153
Line 44... Line 44...
44
#ifdef KERNEL
44
#ifdef KERNEL
45
 
45
 
46
/** Bit width of the TLB-locked portion of kernel address space. */
46
/** Bit width of the TLB-locked portion of kernel address space. */
47
#define KERNEL_PAGE_WIDTH       28  /* 256M */
47
#define KERNEL_PAGE_WIDTH       28  /* 256M */
48
#define IO_PAGE_WIDTH           26  /* 64M */
48
#define IO_PAGE_WIDTH           26  /* 64M */
-
 
49
#define FW_PAGE_WIDTH           28  /* 256M */
-
 
50
 
-
 
51
#define USPACE_IO_PAGE_WIDTH        12  /* 4K */
-
 
52
 
-
 
53
 
-
 
54
/*
-
 
55
 * Statically mapped IO spaces - offsets to 0xe...00 of virtual addresses
-
 
56
 * because of "minimal virtual bits implemented is 51" it is possible to
-
 
57
 * have values up to 0x0007000000000000
-
 
58
 */
-
 
59
 
-
 
60
/* Firmware area (bellow 4GB in phys mem) */
-
 
61
#define FW_OFFSET             0x00000000F0000000
-
 
62
/* Legacy IO space */
-
 
63
#define IO_OFFSET             0x0001000000000000
-
 
64
/* Videoram - now mapped to 0 as VGA text mode vram on 0xb8000 */
-
 
65
#define VIO_OFFSET            0x0002000000000000
49
 
66
 
50
 
67
 
51
#define PPN_SHIFT           12
68
#define PPN_SHIFT           12
52
 
69
 
53
#define VRN_SHIFT           61
70
#define VRN_SHIFT           61
Line 60... Line 77...
60
#define VRN_KERNEL          7LL
77
#define VRN_KERNEL          7LL
61
#endif
78
#endif
62
 
79
 
63
#define REGION_REGISTERS        8
80
#define REGION_REGISTERS        8
64
 
81
 
65
#define KA2PA(x)    ((uintptr_t) (x-(VRN_KERNEL<<VRN_SHIFT)))
82
#define KA2PA(x)    ((uintptr_t) (x - (VRN_KERNEL << VRN_SHIFT)))
66
#define PA2KA(x)    ((uintptr_t) (x+(VRN_KERNEL<<VRN_SHIFT)))
83
#define PA2KA(x)    ((uintptr_t) (x + (VRN_KERNEL << VRN_SHIFT)))
67
 
84
 
68
#define VHPT_WIDTH          20  /* 1M */
85
#define VHPT_WIDTH          20  /* 1M */
69
#define VHPT_SIZE           (1 << VHPT_WIDTH)
86
#define VHPT_SIZE           (1 << VHPT_WIDTH)
70
 
87
 
71
#define PTA_BASE_SHIFT          15
88
#define PTA_BASE_SHIFT          15