adjust the smp booting procedure for segmentless operation. changes are mostly due to gdt/idt being dependent on paging, because of the high location, and paging being on much sooner because of that too. also smaller fixes: redefine DESC_SIZE, fix kernel makefile variable name (crosscompiling), some null pointer checks that trap now because of a sparser pagetable, acpi sanity checking
41 lines
954 B
C
41 lines
954 B
C
|
|
#ifndef _I386_TYPES_H
|
|
#define _I386_TYPES_H
|
|
|
|
#include <minix/sys_config.h>
|
|
#include <machine/stackframe.h>
|
|
#include <machine/fpu.h>
|
|
#include <sys/cdefs.h>
|
|
|
|
struct segdesc_s { /* segment descriptor for protected mode */
|
|
u16_t limit_low;
|
|
u16_t base_low;
|
|
u8_t base_middle;
|
|
u8_t access; /* |P|DL|1|X|E|R|A| */
|
|
u8_t granularity; /* |G|X|0|A|LIMT| */
|
|
u8_t base_high;
|
|
} __attribute__((packed));
|
|
|
|
struct gatedesc_s {
|
|
u16_t offset_low;
|
|
u16_t selector;
|
|
u8_t pad; /* |000|XXXXX| ig & trpg, |XXXXXXXX| task g */
|
|
u8_t p_dpl_type; /* |P|DL|0|TYPE| */
|
|
u16_t offset_high;
|
|
} __attribute__((packed));
|
|
|
|
struct desctableptr_s {
|
|
u16_t limit;
|
|
u32_t base;
|
|
} __attribute__((packed));
|
|
|
|
typedef struct segframe {
|
|
reg_t p_cr3; /* page table root */
|
|
u32_t *p_cr3_v;
|
|
char *fpu_state;
|
|
} segframe_t;
|
|
|
|
typedef u32_t atomic_t; /* access to an aligned 32bit value is atomic on i386 */
|
|
|
|
#endif /* #ifndef _I386_TYPES_H */
|
|
|