]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - sys/powerpc/include/bootinfo.h
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / sys / powerpc / include / bootinfo.h
1 /*-
2  * Copyright (C) 2006-2008 Semihalf, Marian Balakowicz <m8@semihalf.com>
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. The name of the author may not be used to endorse or promote products
14  *    derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
19  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
21  * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  *
27  * $FreeBSD$
28  */
29
30 #ifndef _MACHINE_BOOTINFO_H_
31 #define _MACHINE_BOOTINFO_H_
32
33 #if !defined(LOCORE)
34
35 /* Platform hardware spec, received from loader(8) */
36
37 #define BI_VERSION      1
38
39 struct bi_mem_region {
40         vm_paddr_t      mem_base;
41         vm_size_t       mem_size;
42 };
43
44 struct bi_eth_addr {
45         u_int8_t        mac_addr[6];
46 };
47
48 struct bootinfo {
49         u_int32_t       bi_version;
50         vm_offset_t     bi_bar_base;
51         u_int32_t       bi_cpu_clk;
52         u_int32_t       bi_bus_clk;
53         u_int8_t        bi_mem_reg_no;
54         u_int8_t        bi_eth_addr_no;
55
56         u_int8_t        bi_data[1];
57         /*
58          * The bi_data container is allocated in run time and has the
59          * following layout:
60          *
61          * - bi_mem_reg_no elements of struct bi_mem_region
62          * - bi_eth_addr_no elements of struct bi_eth_addr
63          */
64 };
65
66 extern struct bootinfo *bootinfo;
67
68 struct bi_mem_region *bootinfo_mr(void);
69 struct bi_eth_addr *bootinfo_eth(void);
70 #endif
71
72 #endif /* _MACHINE_BOOTINFO_H_ */