kern

annotate 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
rev   line source
nuclear@7 1 #ifndef SEGM_H_
nuclear@7 2 #define SEGM_H_
nuclear@7 3
nuclear@7 4 #define SEGM_KCODE 1
nuclear@7 5 #define SEGM_KDATA 2
nuclear@7 6
nuclear@7 7 typedef struct {
nuclear@7 8 uint16_t d[4];
nuclear@7 9 } desc_t;
nuclear@7 10
nuclear@7 11 void init_segm(void);
nuclear@7 12
nuclear@7 13 uint16_t selector(int idx, int rpl);
nuclear@7 14
nuclear@7 15 /* these functions are implemented in segm-asm.S */
nuclear@7 16 void setup_selectors(uint16_t code, uint16_t data);
nuclear@7 17 void set_gdt(uint32_t addr, uint16_t limit);
nuclear@7 18
nuclear@7 19
nuclear@7 20
nuclear@7 21 #endif /* SEGM_H_ */