bootconfig.h revision 1.7 1 1.7 bjh21 /* $NetBSD: bootconfig.h,v 1.7 2006/10/24 20:39:13 bjh21 Exp $ */
2 1.1 reinoud
3 1.1 reinoud /*
4 1.3 reinoud * Copyright (c) 2002 Reinoud Zandijk.
5 1.1 reinoud * All rights reserved.
6 1.1 reinoud *
7 1.1 reinoud * Redistribution and use in source and binary forms, with or without
8 1.1 reinoud * modification, are permitted provided that the following conditions
9 1.1 reinoud * are met:
10 1.1 reinoud * 1. Redistributions of source code must retain the above copyright
11 1.1 reinoud * notice, this list of conditions and the following disclaimer.
12 1.1 reinoud * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 reinoud * notice, this list of conditions and the following disclaimer in the
14 1.1 reinoud * documentation and/or other materials provided with the distribution.
15 1.4 reinoud * 3. The name of the company nor the name of the author may be used to
16 1.1 reinoud * endorse or promote products derived from this software without specific
17 1.1 reinoud * prior written permission.
18 1.1 reinoud *
19 1.1 reinoud * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
20 1.1 reinoud * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 1.1 reinoud * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 1.1 reinoud * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23 1.1 reinoud * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 1.1 reinoud * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 1.1 reinoud * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 1.1 reinoud * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 1.1 reinoud * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 1.1 reinoud * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 1.1 reinoud * SUCH DAMAGE.
30 1.1 reinoud *
31 1.1 reinoud * boot configuration structures
32 1.1 reinoud *
33 1.1 reinoud */
34 1.1 reinoud
35 1.7 bjh21 #include <arm/bootconfig.h>
36 1.3 reinoud
37 1.3 reinoud /* get some spare blocks ;) */
38 1.3 reinoud #define DRAM_BLOCKS 32
39 1.3 reinoud #define VRAM_BLOCKS 16
40 1.3 reinoud
41 1.4 reinoud #define PHYSMEM_TYPE_GENERIC 0
42 1.4 reinoud #define PHYSMEM_TYPE_PROCESSOR_ONLY 1
43 1.4 reinoud
44 1.3 reinoud
45 1.3 reinoud typedef struct {
46 1.1 reinoud u_int address;
47 1.1 reinoud u_int pages;
48 1.3 reinoud u_int flags;
49 1.3 reinoud } phys_mem;
50 1.1 reinoud
51 1.1 reinoud
52 1.4 reinoud struct bootconfig {
53 1.3 reinoud u_int magic;
54 1.3 reinoud u_int version; /* version 2+ */
55 1.3 reinoud
56 1.4 reinoud u_char machine_id[4]; /* unique machine Id */
57 1.3 reinoud char kernelname[80];
58 1.3 reinoud char args[512]; /* 512 bytes is better than 4096 */
59 1.3 reinoud
60 1.3 reinoud u_int kernvirtualbase; /* not used now */
61 1.3 reinoud u_int kernphysicalbase; /* not used now */
62 1.3 reinoud u_int kernsize;
63 1.4 reinoud u_int scratchvirtualbase; /* not used now */
64 1.4 reinoud u_int scratchphysicalbase; /* not used now */
65 1.4 reinoud u_int scratchsize; /* not used now */
66 1.3 reinoud
67 1.3 reinoud u_int ksym_start;
68 1.3 reinoud u_int ksym_end;
69 1.3 reinoud
70 1.3 reinoud u_int MDFvirtualbase; /* not used yet */
71 1.3 reinoud u_int MDFphysicalbase; /* not used yet */
72 1.3 reinoud u_int MDFsize; /* not used yet */
73 1.3 reinoud
74 1.3 reinoud u_int display_phys;
75 1.3 reinoud u_int display_start;
76 1.3 reinoud u_int display_size;
77 1.3 reinoud u_int width;
78 1.3 reinoud u_int height;
79 1.3 reinoud u_int log2_bpp;
80 1.3 reinoud u_int framerate;
81 1.3 reinoud
82 1.3 reinoud char reserved[512]; /* future expansion */
83 1.3 reinoud
84 1.3 reinoud u_int pagesize;
85 1.3 reinoud u_int drampages;
86 1.3 reinoud u_int vrampages;
87 1.3 reinoud u_int dramblocks;
88 1.3 reinoud u_int vramblocks;
89 1.3 reinoud
90 1.3 reinoud phys_mem dram[DRAM_BLOCKS];
91 1.3 reinoud phys_mem vram[VRAM_BLOCKS];
92 1.3 reinoud
93 1.4 reinoud };
94 1.3 reinoud
95 1.1 reinoud
96 1.1 reinoud #define BOOTCONFIG_MAGIC 0x43112233
97 1.3 reinoud #define BOOTCONFIG_VERSION 0x2
98 1.1 reinoud
99 1.4 reinoud extern struct bootconfig bootconfig;
100 1.1 reinoud
101 1.1 reinoud /* End of bootconfig.h */
102