Prex Home / Browse Source - Prex Version: 0.9.0

root/include/x86/syspage.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*-
   2  * Copyright (c) 2008-2009, 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 #ifndef _X86_SYSPAGE_H
  31 #define _X86_SYSPAGE_H
  32 
  33 #include <conf/config.h>
  34 
  35 /**
  36  * syspage layout:
  37  *
  38  * +------------------+ CONFIG_SYSPAGE_BASE
  39  * | NULL pointer     |
  40  * | detection page   |
  41  * |                  |
  42  * +------------------+ +0x1000
  43  * | Interrupt stack  |
  44  * |                  |
  45  * |                  |
  46  * +------------------+ +0x2000
  47  * | Boot information |
  48  * +------------------+ +0x2400
  49  * | Boot stack       |
  50  * +------------------+ +0x3000
  51  * | PGD for boot     |
  52  * | (MMU only)       |
  53  * |                  |
  54  * +------------------+ +0x4000
  55  * | PTE0 for boot    |
  56  * | (MMU only)       |
  57  * |                  |
  58  * +------------------+ +0x5000
  59  *
  60  * Note: Interrupt stack should be placed after NULL page
  61  * to detect the stack overflow.
  62  */
  63 
  64 #define SYSPAGE         CONFIG_SYSPAGE_BASE
  65 #define INTSTK          (SYSPAGE + 0x1000)
  66 #define BOOTINFO        (SYSPAGE + 0x2000)
  67 #define BOOTSTK         (SYSPAGE + 0x2400)
  68 #define BOOT_PGD        (SYSPAGE + 0x3000)
  69 #define BOOT_PTE0       (SYSPAGE + 0x4000)
  70 
  71 #define BOOT_PGD_PHYS   0x3000
  72 #define BOOT_PTE0_PHYS  0x4000
  73 
  74 #define INTSTKSZ        0x1000          /* size of interrupt stack */
  75 #define BOOTSTKSZ       0x0c00          /* size of boot stack */
  76 
  77 #define INTSTKTOP       (INTSTK + INTSTKSZ)
  78 #define BOOTSTKTOP      (BOOTSTK + BOOTSTKSZ)
  79 
  80 #ifdef CONFIG_MMU
  81 #define SYSPAGESZ       0x5000
  82 #else
  83 #define SYSPAGESZ       0x3000
  84 #endif
  85 
  86 #endif /* !_X86_SYSPAGE_H */

/* [<][>][^][v][top][bottom][index][help] */