Subversion Repositories HelenOS-historic

Rev

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

Rev 188 Rev 194
Line 24... Line 24...
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
 
28
 
29
#ifndef __PM_H__
29
#ifndef __amd64_PM_H__
30
#define __PM_H__
30
#define __amd64_PM_H__
31
 
31
 
-
 
32
#ifndef __ASM__
32
#include <arch/types.h>
33
# include <arch/types.h>
33
#include <typedefs.h>
34
# include <typedefs.h>
34
#include <arch/context.h>
35
# include <arch/context.h>
-
 
36
#endif
35
 
37
 
36
#define IDT_ITEMS 64
38
#define IDT_ITEMS 64
37
#define GDT_ITEMS 7
39
#define GDT_ITEMS 7
38
 
40
 
39
#define NULL_DES    0
41
#define NULL_DES    0
40
#define KTEXT_DES   1
42
#define KTEXT_DES   1
41
#define KDATA_DES   2
43
#define KDATA_DES   2
42
#define UTEXT_DES   3
44
#define UTEXT_DES   3
43
#define UDATA_DES   4
45
#define UDATA_DES   4
-
 
46
#define KTEXT32_DES     5
44
#define TSS_DES     5
47
#define TSS_DES     6
45
 
48
 
46
#define selector(des)   ((des)<<3)
49
#define selector(des)   ((des)<<3)
47
 
50
 
48
#define PL_KERNEL   0
51
#define PL_KERNEL   0
49
#define PL_USER     3
52
#define PL_USER     3
Line 59... Line 62...
59
#define DPL_KERNEL  (PL_KERNEL<<5)
62
#define DPL_KERNEL  (PL_KERNEL<<5)
60
#define DPL_USER    (PL_USER<<5)
63
#define DPL_USER    (PL_USER<<5)
61
 
64
 
62
#define IO_MAP_BASE (104)
65
#define IO_MAP_BASE (104)
63
 
66
 
-
 
67
#ifndef __ASM__
-
 
68
 
64
struct ptr_16_32 {
69
struct ptr_16_32 {
65
    __u16 limit;
70
    __u16 limit;
66
    __u32 base;
71
    __u32 base;
67
} __attribute__ ((packed));
72
} __attribute__ ((packed));
68
 
73
 
Line 143... Line 148...
143
extern void idt_init(void);
148
extern void idt_init(void);
144
extern void idt_setoffset(struct idescriptor *d, __address offset);
149
extern void idt_setoffset(struct idescriptor *d, __address offset);
145
 
150
 
146
extern void tss_initialize(struct tss *t);
151
extern void tss_initialize(struct tss *t);
147
 
152
 
-
 
153
#endif /* __ASM__ */
-
 
154
 
148
#endif
155
#endif