5 /* Stack Segment, placed here because of the alignment issue... */
7 /* Used with sgdt/lgdt */
10 /* General registers, accessed with pushal/popal */
14 uint32_t esp; /* points just below eax */
19 #define ESP_LOC(ctx) (&(ctx)->gs)
20 /* Segment registers */
27 /* Code segment:offset */
30 /* Optional stack contents */
35 /* Create a new context in the given stack */
37 init_context(uint8_t *stack, uint32_t stack_size, int num_param);
40 struct context *switch_to(struct context *);
42 /* Holds physical address of boot context */
43 extern unsigned long __boot_ctx;
45 /* This can always be safely used to refer to the boot context */
46 #define boot_ctx ((struct context *) phys_to_virt(__boot_ctx))
48 #endif /* i386_CONTEXT_H */