multiboot.h revision ae115bc77f6fcde83175c75b4206dc2e50747966
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _MULTIBOOT_H
#define _MULTIBOOT_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Multiboot header must be present withing the first
* 8192 bytes of the elf executable. The flag bit fields
* are defined to request multiboot info from the boot
* loader (see struct multiboot_info below):
* flag[0] mem_upper, mem_loader
* flag[1] boot_device
* flag[2] cmdline (for launching kernel)
* flag[3] mods_count, mods_addr
* flag[4] symbol table for a.out
* flag[5] symbol table for elf
* flag[6] mmap_length, mmap_addr
* flag[7] drives_length, drivers_addr
* flag[8] config_table
* flag[9] boot_loader_name
* flag[10] apm_table
* flag[11] vbe_control_info
* vbe_mode_info
* vbe_mode
* vbe_interface_seg
* vbe_interface_off
* vbe_interface_len
*/
/* passed by boot loader to kernel */
#define MB_BOOTLOADER_MAGIC 0x2BADB002
#define STACK_SIZE 0x4000
#ifndef _ASM /* excluded from assembly routines */
/* The Multiboot header. */
typedef struct multiboot_header {
/* The section header table for ELF. */
typedef struct mb_elf_shtable {
/* The Multiboot information. */
typedef struct multiboot_info {
/* The module structure. */
typedef struct mb_module {
} mb_module_t;
/*
* The memory map. Be careful that the offset 0 is base_addr_low
* but no size.
*/
typedef struct mb_memory_map {
/*
* netinfo for Solaris diskless booting
* XXX - not part of multiboot spec
*/
struct sol_netinfo {
};
#define SN_TYPE_BOOTP 2
#define SN_TYPE_RARP 0xf0
/* Check if the bit BIT in FLAGS is set. */
#endif /* _ASM */
#ifdef __cplusplus
}
#endif
#endif /* _MULTIBOOT_H */