Subversion Repositories HelenOS

Rev

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

Rev 2089 Rev 2612
Line 33... Line 33...
33
 */
33
 */
34
 
34
 
35
#ifndef KERN_ia32_PM_H_
35
#ifndef KERN_ia32_PM_H_
36
#define KERN_ia32_PM_H_
36
#define KERN_ia32_PM_H_
37
 
37
 
38
#define IDT_ITEMS 64
38
#define IDT_ITEMS   64  
39
#define GDT_ITEMS 7
39
#define GDT_ITEMS   7
40
 
40
 
41
#define VESA_INIT_SEGMENT 0x8000
41
#define VESA_INIT_SEGMENT 0x8000
42
 
42
 
43
#define NULL_DES    0
43
#define NULL_DES    0
44
#define KTEXT_DES   1
44
#define KTEXT_DES   1
Line 61... Line 61...
61
#define selector(des)   ((des) << 3)
61
#define selector(des)   ((des) << 3)
62
 
62
 
63
#define PL_KERNEL   0
63
#define PL_KERNEL   0
64
#define PL_USER     3
64
#define PL_USER     3
65
 
65
 
66
#define AR_PRESENT  (1<<7)
66
#define AR_PRESENT  (1 << 7)
67
#define AR_DATA     (2<<3)
67
#define AR_DATA     (2 << 3)
68
#define AR_CODE     (3<<3)
68
#define AR_CODE     (3 << 3)
69
#define AR_WRITABLE (1<<1)
69
#define AR_WRITABLE (1 << 1)
70
#define AR_INTERRUPT    (0xe)
70
#define AR_INTERRUPT    (0xe)
71
#define AR_TSS      (0x9)
71
#define AR_TSS      (0x9)
72
 
72
 
73
#define DPL_KERNEL  (PL_KERNEL<<5)
73
#define DPL_KERNEL  (PL_KERNEL << 5)
74
#define DPL_USER    (PL_USER<<5)
74
#define DPL_USER    (PL_USER << 5)
75
 
75
 
76
#define TSS_BASIC_SIZE  104
76
#define TSS_BASIC_SIZE  104
77
#define TSS_IOMAP_SIZE  (16*1024+1) /* 16K for bitmap + 1 terminating byte for convenience */
77
#define TSS_IOMAP_SIZE  (16 * 1024 + 1) /* 16K for bitmap + 1 terminating byte for convenience */
78
 
78
 
79
#define IO_PORTS    (64*1024)
79
#define IO_PORTS    (64 * 1024)
80
 
80
 
81
#ifndef __ASM__
81
#ifndef __ASM__
82
 
82
 
83
#include <arch/types.h>
83
#include <arch/types.h>
84
#include <arch/context.h>
84
#include <arch/context.h>