1N/A/* multiboot.h - the header for Multiboot */
1N/A/* Copyright (C) 1999, 2001 Free Software Foundation, Inc.
1N/A
1N/A This program is free software; you can redistribute it and/or modify
1N/A it under the terms of the GNU General Public License as published by
1N/A the Free Software Foundation; either version 2 of the License, or
1N/A (at your option) any later version.
1N/A
1N/A This program is distributed in the hope that it will be useful,
1N/A but WITHOUT ANY WARRANTY; without even the implied warranty of
1N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1N/A GNU General Public License for more details.
1N/A
1N/A You should have received a copy of the GNU General Public License
1N/A along with this program; if not, write to the Free Software
1N/A Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
1N/A
1N/A/* Macros. */
1N/A
1N/A/* The magic number for the Multiboot header. */
1N/A#define MULTIBOOT_HEADER_MAGIC 0x1BADB002
1N/A
1N/A/* The flags for the Multiboot header. */
1N/A#ifdef __ELF__
1N/A# define MULTIBOOT_HEADER_FLAGS 0x00000003
1N/A#else
1N/A# define MULTIBOOT_HEADER_FLAGS 0x00010003
1N/A#endif
1N/A
1N/A/* The magic number passed by a Multiboot-compliant boot loader. */
1N/A#define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
1N/A
1N/A/* The size of our stack (16KB). */
1N/A#define STACK_SIZE 0x4000
1N/A
1N/A/* C symbol format. HAVE_ASM_USCORE is defined by configure. */
1N/A#ifdef HAVE_ASM_USCORE
1N/A# define EXT_C(sym) _ ## sym
1N/A#else
1N/A# define EXT_C(sym) sym
1N/A#endif
1N/A
1N/A#ifndef ASM
1N/A/* Do not include here in boot.S. */
1N/A
1N/A/* Types. */
1N/A
1N/A/* The Multiboot header. */
1N/Atypedef struct multiboot_header
1N/A{
1N/A unsigned long magic;
1N/A unsigned long flags;
1N/A unsigned long checksum;
1N/A unsigned long header_addr;
1N/A unsigned long load_addr;
1N/A unsigned long load_end_addr;
1N/A unsigned long bss_end_addr;
1N/A unsigned long entry_addr;
1N/A} multiboot_header_t;
1N/A
1N/A/* The symbol table for a.out. */
1N/Atypedef struct aout_symbol_table
1N/A{
1N/A unsigned long tabsize;
1N/A unsigned long strsize;
1N/A unsigned long addr;
1N/A unsigned long reserved;
1N/A} aout_symbol_table_t;
1N/A
1N/A/* The section header table for ELF. */
1N/Atypedef struct elf_section_header_table
1N/A{
1N/A unsigned long num;
1N/A unsigned long size;
1N/A unsigned long addr;
1N/A unsigned long shndx;
1N/A} elf_section_header_table_t;
1N/A
1N/A/* The Multiboot information. */
1N/Atypedef struct multiboot_info
1N/A{
1N/A unsigned long flags;
1N/A unsigned long mem_lower;
1N/A unsigned long mem_upper;
1N/A unsigned long boot_device;
1N/A unsigned long cmdline;
1N/A unsigned long mods_count;
1N/A unsigned long mods_addr;
1N/A union
1N/A {
1N/A aout_symbol_table_t aout_sym;
1N/A elf_section_header_table_t elf_sec;
1N/A } u;
1N/A unsigned long mmap_length;
1N/A unsigned long mmap_addr;
1N/A} multiboot_info_t;
1N/A
1N/A/* The module structure. */
1N/Atypedef struct module
1N/A{
1N/A unsigned long mod_start;
1N/A unsigned long mod_end;
1N/A unsigned long string;
1N/A unsigned long reserved;
1N/A} module_t;
1N/A
1N/A/* The memory map. Be careful that the offset 0 is base_addr_low
1N/A but no size. */
1N/Atypedef struct memory_map
1N/A{
1N/A unsigned long size;
1N/A unsigned long base_addr_low;
1N/A unsigned long base_addr_high;
1N/A unsigned long length_low;
1N/A unsigned long length_high;
1N/A unsigned long type;
1N/A} memory_map_t;
1N/A
1N/A#endif /* ! ASM */