50 lines
1.1 KiB
C
50 lines
1.1 KiB
C
// kernel.h
|
|
// Author: Josh Holtrop
|
|
// Date: 08/16/04
|
|
// Modified: 08/18/05
|
|
|
|
#ifndef __HOS_KERNEL_H__
|
|
#define __HOS_KERNEL_H__ __HOS_KERNEL_H__
|
|
|
|
#include "hos_defines.h"
|
|
#include "multiboot.h"
|
|
|
|
typedef struct
|
|
{
|
|
void *vid_addr; // address of LFB, 0 if console mode
|
|
u32_t width; // width in pixels or columns if vid_mem == 0
|
|
u32_t height; // height in pixels or columns if vid_mem == 0
|
|
u32_t bpp; // bits per pixel - 15/16/24/32
|
|
} __attribute__ ((packed)) real_mode_param_t;
|
|
|
|
typedef struct
|
|
{
|
|
u32_t gs;
|
|
u32_t fs;
|
|
u32_t es;
|
|
u32_t ds;
|
|
u32_t ebp;
|
|
u32_t esi;
|
|
u32_t edi;
|
|
u32_t edx;
|
|
u32_t ecx;
|
|
u32_t ebx;
|
|
u32_t eax;
|
|
u32_t eip;
|
|
u32_t cs;
|
|
u32_t eflags;
|
|
u32_t esp;
|
|
u32_t ss; /* present if ring3->ring0 transition ?? */
|
|
} int_stack_t;
|
|
|
|
/* returns true to callee if we should jump to a real mode module */
|
|
mb_module_t *k_mbsave(mb_info_t *mbinfo, unsigned int mb_magic);
|
|
void _init();
|
|
void isr(u32_t num, int_stack_t *stack_frame);
|
|
void k_enter_critical(); // functions for implementing "atomic actions"
|
|
void k_leave_critical();
|
|
void k_check(int val, char *msg);
|
|
|
|
#endif
|
|
|