34 #include "gdt-layout.h"
35 #include "prot-domains.h"
36 #include "segmentation.h"
39 extern int ATTR_KERN_ADDR_SPACE _ebss_gdt_addr;
41 #define GDT_IDX_OF_DESC(ptr) \
42 ((((uintptr_t)(ptr)) - ((uintptr_t)&gdt))/ \
43 sizeof(segment_desc_t))
45 typedef struct far_pointer {
58 #define GDT_SEL_OF_DESC(ptr, rpl) GDT_SEL(GDT_IDX_OF_DESC(ptr), rpl)
61 #define ATTR_BSS_GDT \
62 __attribute__((section(".gdt_bss"))) ATTR_KERN_ADDR_SPACE
64 #define ATTR_BSS_GDT_MID \
65 __attribute__((used, section(".gdt_bss_mid"))) ATTR_KERN_ADDR_SPACE
67 #define ATTR_BSS_GDT_START \
68 __attribute__((section(".gdt_bss_start"))) ATTR_KERN_ADDR_SPACE
70 void gdt_copy_desc_change_dpl(
unsigned int dest_idx,
73 void gdt_init(
void) ATTR_CODE_BOOT;
75 void gdt_insert_boot(
unsigned int idx,
segment_desc_t desc) ATTR_CODE_BOOT;
#define __attribute__(nothing)
Define attribute to nothing since it isn't handled by IAR.