📄 mkservice.h.svn-base
字号:
#ifndef __MKSERVICE_H__#define __MKSERVICE_H__#include "lib.h"#define NAME_MAX 16#define SERVICE_TYPE_NONE 0#define SERVICE_TYPE_BINARY 1#define SERVICE_TYPE_BINARY_KERNEL 2#define SERVICE_TYPE_ARCHIVE 3#define SERVICE_TYPE_ELF 4#define SERVICE_TYPE_ELF_LOADING 5#define SERVICE_TYPE_ELF_KERNEL 6#define SERVICE_IDENT 4struct service_description{ char magic[SERVICE_IDENT]; unsigned char count; unsigned char reserved[27];};struct service_entry{ char name[NAME_MAX]; unsigned char type; unsigned char reserved[3]; unsigned long offset; unsigned long size; unsigned long phaddr;};/* service information */struct mk_service_entry{ /* name of service */ char name[8]; /* physical information */ rt_uint32 phys; /* physical address */ rt_uint32 size; /* size of service image */ /* entry address */ rt_uint32 entry; /* text segment information */ rt_uint32 text; rt_uint32 text_size; /* data segment information */ rt_uint32 data; rt_uint32 data_size; /* bss segment information */ rt_uint32 bss_size;};/* physical memory information */struct physical_memory{ rt_uint32 start_address; /* start address */ rt_uint32 size; /* size in bytes */};#define MK_MAGIC0 'R'#define MK_MAGIC1 'T'#define MK_MAGIC2 'T'#define MK_MAGIC3 0/* mircokernel boot */struct mk_service{ rt_uint32 magic; /* magic of microkernel service description */ struct physical_memory memory; /* memory information */ struct physical_memory reserved[4]; /* reserved memory information */ rt_uint32 entries; /* number of service task */ struct mk_service_entry kernel; /* the kernel image */ struct mk_service_entry entry[1]; /* services image */};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -