Preparation for mbh tag

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-03-08 15:40:57 +01:00
parent 8eb567e662
commit b1f6f35ae9
8 changed files with 318 additions and 305 deletions

View file

@ -23,7 +23,8 @@
#define MULTIBOOT_HEADER 1
/* How many bytes from the start of the file we search for the header. */
#define MULTIBOOT_SEARCH 8192
#define MULTIBOOT_SEARCH 32768
#define MULTIBOOT_HEADER_ALIGN 8
/* The magic field should contain this. */
#define MULTIBOOT2_HEADER_MAGIC 0xe85250d6
@ -62,6 +63,17 @@
#define MULTIBOOT_TAG_TYPE_VBE 7
#define MULTIBOOT_TAG_TYPE_FRAMEBUFFER 8
#define MULTIBOOT_HEADER_TAG_END 0
#define MULTIBOOT_HEADER_TAG_INFORMATION_REQUEST 1
#define MULTIBOOT_HEADER_TAG_ADDRESS 2
#define MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS 3
#define MULTIBOOT_HEADER_TAG_CONSOLE_FLAGS 4
#define MULTIBOOT_HEADER_TAG_FRAMEBUFFER 5
#define MULTIBOOT_HEADER_TAG_MODULE_ALIGN 6
#define GRUB_MULTIBOOT_ARCHITECTURE_I386 0
#define MULTIBOOT_HEADER_TAG_OPTIONAL 1
#ifndef ASM_FILE
typedef unsigned char multiboot_uint8_t;
@ -74,21 +86,73 @@ struct multiboot_header
/* Must be MULTIBOOT_MAGIC - see above. */
multiboot_uint32_t magic;
/* Feature flags. */
multiboot_uint32_t flags;
/* ISA */
multiboot_uint32_t architecture;
/* Total header length. */
multiboot_uint32_t header_length;
/* The above fields plus this one must equal 0 mod 2^32. */
multiboot_uint32_t checksum;
};
/* These are only valid if MULTIBOOT_AOUT_KLUDGE is set. */
struct multiboot_header_tag
{
multiboot_uint32_t type;
multiboot_uint32_t size;
multiboot_uint32_t flags;
};
struct multiboot_header_tag_information_request
{
multiboot_uint32_t type;
multiboot_uint32_t size;
multiboot_uint32_t flags;
multiboot_uint32_t requests[0];
};
struct multiboot_header_tag_address
{
multiboot_uint32_t type;
multiboot_uint32_t size;
multiboot_uint32_t flags;
multiboot_uint32_t header_addr;
multiboot_uint32_t load_addr;
multiboot_uint32_t load_end_addr;
multiboot_uint32_t bss_end_addr;
multiboot_uint32_t entry_addr;
};
/* These are only valid if MULTIBOOT_VIDEO_MODE is set. */
multiboot_uint32_t mode_type;
struct multiboot_header_tag_entry_address
{
multiboot_uint32_t type;
multiboot_uint32_t size;
multiboot_uint32_t flags;
multiboot_uint32_t entry_addr;
};
struct multiboot_header_tag_console_flags
{
multiboot_uint32_t type;
multiboot_uint32_t size;
multiboot_uint32_t flags;
multiboot_uint32_t console_flags;
};
struct multiboot_header_tag_framebuffer
{
multiboot_uint32_t type;
multiboot_uint32_t size;
multiboot_uint32_t flags;
multiboot_uint32_t width;
multiboot_uint32_t height;
multiboot_uint32_t depth;
};
struct multiboot_header_tag_module_align
{
multiboot_uint32_t type;
multiboot_uint32_t size;
multiboot_uint32_t flags;
multiboot_uint32_t width;
multiboot_uint32_t height;
multiboot_uint32_t depth;