The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/mach/boot_info.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* 
    2  * Mach Operating System
    3  * Copyright (c) 1991 Carnegie Mellon University
    4  * All Rights Reserved.
    5  * 
    6  * Permission to use, copy, modify and distribute this software and its
    7  * documentation is hereby granted, provided that both the copyright
    8  * notice and this permission notice appear in all copies of the
    9  * software, derivative works or modified versions, and any portions
   10  * thereof, and that both notices appear in supporting documentation.
   11  * 
   12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15  * 
   16  * Carnegie Mellon requests users of this software to return to
   17  * 
   18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19  *  School of Computer Science
   20  *  Carnegie Mellon University
   21  *  Pittsburgh PA 15213-3890
   22  * 
   23  * any improvements or extensions that they make and grant Carnegie Mellon 
   24  * the rights to redistribute these changes.
   25  */
   26 
   27 /*
   28  * HISTORY
   29  * $Log:        boot_info.h,v $
   30  * Revision 2.3  93/01/14  17:41:27  danner
   31  *      Added magic number, for sanity.
   32  *      [92/12/01            af]
   33  * 
   34  * Revision 2.2  92/01/03  20:19:42  dbg
   35  *      Created.
   36  *      [91/09/06            dbg]
   37  * 
   38  */
   39 
   40 #ifndef _MACH_BOOT_INFO_H_
   41 #define _MACH_BOOT_INFO_H_
   42 
   43 /*
   44  * Structure of Mach kernel boot file.
   45  */
   46 #include <mach/machine/vm_types.h>
   47 
   48 /*
   49  *      A Mach kernel boot file consists of the Mach
   50  *      kernel image and the bootstrap image, glued
   51  *      together.
   52  *
   53  *      The first part of the file is a normal executable
   54  *      (bootable) file: a.out, coff, or whatever.  The
   55  *      text and data sizes are set to include the entire
   56  *      file.  (Some machines do not allow a zero-length
   57  *      data segment).
   58  *
   59  *      The rest of the file sits where the kernel BSS
   60  *      should be.  A boot_info record describes the
   61  *      sizes of the next 3 sections.  Following this
   62  *      are the kernel symbol table, the bootstrap image
   63  *      (including its symbol table), and the loader
   64  *      information for the bootstrap image.  Each
   65  *      of these sections is padded to an integer (4-byte)
   66  *      boundary.
   67  *
   68  *      When the file is loaded into memory, the kernel
   69  *      text and data segments are at their normal locations.
   70  *
   71  *      The boot_info structure appears at the start of
   72  *      the bss (at 'edata[]'):
   73  */
   74 
   75 struct boot_info {
   76         vm_size_t       magic_number;
   77 #       define  MACH_BOOT_INFO_MAGIC    0x15beef15
   78         vm_size_t       sym_size;               /* size of kernel symbols */
   79         vm_size_t       boot_size;              /* size of bootstrap image */
   80         vm_size_t       load_info_size;         /* size of loader information
   81                                                    for bootstrap image */
   82 };
   83 
   84 /*
   85  *      The 3 sections must be moved out of BSS for the kernel to run:
   86  *
   87  *      The kernel symbol table follows the BSS (at 'end[]').
   88  *
   89  *      The bootstrap image is on the first page boundary (machine page
   90  *      size) following the kernel symbol table.
   91  *
   92  *      The loader information immediately follows the bootstrap image.
   93  */
   94 
   95 /*
   96  *      Loader information for bootstrap image:
   97  */
   98 
   99 struct loader_info {
  100         vm_offset_t     text_start;     /* text start in memory */
  101         vm_size_t       text_size;      /* text size */
  102         vm_offset_t     text_offset;    /* text offset in file */
  103         vm_offset_t     data_start;     /* data+bss start in memory */
  104         vm_size_t       data_size;      /* data size */
  105         vm_offset_t     data_offset;    /* data offset in file */
  106         vm_size_t       bss_size;       /* BSS size */
  107         vm_offset_t     sym_offset;     /* symbol table offset in file */
  108         vm_size_t       sym_size;       /* symbol table size */
  109         vm_offset_t     entry_1;        /* 2 words for entry address */
  110         vm_offset_t     entry_2;
  111 } ;
  112 
  113 #endif  /* _MACH_BOOT_INFO_H_ */

Cache object: e89b4bed9651bce911ddfd7c31abb412


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.