Annotation of prex-old/include/prex/bootinfo.h, Revision 1.1
1.1 ! nbrk 1: /*
! 2: * Copyright (c) 2005-2007, Kohsuke Ohtani
! 3: * All rights reserved.
! 4: *
! 5: * Redistribution and use in source and binary forms, with or without
! 6: * modification, are permitted provided that the following conditions
! 7: * are met:
! 8: * 1. Redistributions of source code must retain the above copyright
! 9: * notice, this list of conditions and the following disclaimer.
! 10: * 2. Redistributions in binary form must reproduce the above copyright
! 11: * notice, this list of conditions and the following disclaimer in the
! 12: * documentation and/or other materials provided with the distribution.
! 13: * 3. Neither the name of the author nor the names of any co-contributors
! 14: * may be used to endorse or promote products derived from this software
! 15: * without specific prior written permission.
! 16: *
! 17: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
! 18: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
! 19: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! 20: * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
! 21: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
! 22: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
! 23: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! 24: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
! 25: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
! 26: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! 27: * SUCH DAMAGE.
! 28: */
! 29:
! 30: /*
! 31: * Boot information
! 32: *
! 33: * The boot information is stored by an OS loader, and
! 34: * it is refered by kernel later in boot time.
! 35: */
! 36:
! 37: #ifndef _PREX_BOOTINFO_H
! 38: #define _PREX_BOOTINFO_H
! 39:
! 40: #include <sys/types.h>
! 41:
! 42: /*
! 43: * Module information for kernel, driver, and boot tasks.
! 44: * An OS loader will build this structure regardless of its file format.
! 45: */
! 46: struct module
! 47: {
! 48: char name[16]; /* name of image */
! 49: u_long phys; /* physical address */
! 50: size_t size; /* size of image */
! 51: u_long entry; /* entry address */
! 52: u_long text; /* text address */
! 53: u_long data; /* data address */
! 54: size_t textsz; /* text size */
! 55: size_t datasz; /* data size */
! 56: size_t bsssz; /* bss size */
! 57: };
! 58:
! 59: /*
! 60: * Memory map
! 61: */
! 62: struct mem_map
! 63: {
! 64: u_long start; /* start address */
! 65: size_t size; /* size in bytes */
! 66: };
! 67:
! 68: /*
! 69: * Video information
! 70: */
! 71: struct video_cfg
! 72: {
! 73: int pixel_x; /* screen pixels */
! 74: int pixel_y;
! 75: int text_x; /* text size, in characters */
! 76: int text_y;
! 77: };
! 78:
! 79: #define NRESMEM 8 /* number of reserved memory */
! 80:
! 81: /*
! 82: * Boot information
! 83: */
! 84: struct boot_info
! 85: {
! 86: struct video_cfg video;
! 87: struct mem_map main_mem; /* main memory */
! 88: struct mem_map reserved[NRESMEM]; /* system reserved memory */
! 89: struct mem_map ram_disk; /* ram disk image in memory */
! 90: struct mem_map modules; /* boot modules (kernel, driver, boot tasks) */
! 91: u_long archive; /* archive offset in memory */
! 92: int nr_tasks; /* number of boot tasks */
! 93: struct module kernel; /* kernel image */
! 94: struct module driver; /* driver image */
! 95: struct module tasks[1]; /* boot tasks image */
! 96: };
! 97:
! 98: #endif /* !_PREX_BOOTINFO_H */
CVSweb