Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1826522
  • 博文数量: 286
  • 博客积分: 3713
  • 博客等级: 少校
  • 技术积分: 2275
  • 用 户 组: 普通用户
  • 注册时间: 2012-01-11 09:47
个人简介

http://blog.chinaunix.net/uid/16979052.html

文章分类

全部博文(286)

文章存档

2018年(1)

2017年(16)

2016年(9)

2015年(17)

2014年(15)

2013年(112)

2012年(116)

分类: LINUX

2012-06-27 17:17:16

#ifndef __KERNEL_MULTIBOOT_H
#define __KERNEL_MULTIBOOT_H

/** The magic number for the Multiboot header. */
#define MULTIBOOT_HEADER_MAGIC 0x1BADB002
/** The flags for the Multiboot header. */
#define MULTIBOOT_HEADER_FLAGS 0x00000003
/** Marks an ELF-compatible executable. */
#define MULTIBOOT_HEADER_ELF_FLAGS 0x00010003
/** Size of the multiboot header structure. */
#define MULTIBOOT_HEADER_SIZE 52
/** The magic number passed by a Multiboot-compliant boot loader.  */
#define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
/* Do not include in assembler source. */
#ifndef __ASSEMBLER__
#include
/**The symbol table for a.out.*/
typedef struct AoutSymbolTable
{
uint32_t tabSize;
uint32_t strSize;
uint32_t address;
uint32_t reserved;
} AoutSymbolTable;
/**The section header table for ELF.*/
typedef struct ElfSectionHeaderTable
{
uint32_t num;
uint32_t size;
uint32_t address;
uint32_t shndx;
} ElfSectionHeaderTable;
/**The Multiboot information.*/
typedef struct MultibootInfo
{
uint32_t flags;
uint32_t memLower;
uint32_t memUpper;
uint32_t bootDevice;
uint32_t cmdline;
uint32_t modsCount;
uint32_t modsAddress;
union
{
AoutSymbolTable aout;
ElfSectionHeaderTable elf;
};
uint32_t mmapLength;
uint32_t mmapAddress;
} MultibootInfo;
/**The module class.*/
typedef struct MultibootModule
{
uint32_t modStart;
uint32_t modEnd;
uint32_t string;
uint32_t reserved;
} MultibootModule;
/**The memory map. Be careful that the offset 0 is base_addr_low but no size.*/
typedef struct MultibootMemoryMap
{
uint32_t size;
uint32_t baseAddressLow;
uint32_t baseAddressHigh;
uint32_t lengthLow;
uint32_t lengthHigh;
uint32_t type;
} MultibootMemoryMap;

#endif /* !__ASSEMBLER__ */
#endif

阅读(1138) | 评论(0) | 转发(0) |
0

上一篇:boot/serial_printk.c

下一篇:include/platform.h

给主人留下些什么吧!~~