kern
view src/segm.h @ 7:611b2d66420b
segment descriptors
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 16 Feb 2011 07:26:03 +0200 |
parents | |
children | 78d5c304ddd0 |
line source
1 #ifndef SEGM_H_
2 #define SEGM_H_
4 #define SEGM_KCODE 1
5 #define SEGM_KDATA 2
7 typedef struct {
8 uint16_t d[4];
9 } desc_t;
11 void init_segm(void);
13 uint16_t selector(int idx, int rpl);
15 /* these functions are implemented in segm-asm.S */
16 void setup_selectors(uint16_t code, uint16_t data);
17 void set_gdt(uint32_t addr, uint16_t limit);
21 #endif /* SEGM_H_ */