bootinfo.h revision 1.7
11.7Sjunyoung/*	$NetBSD: bootinfo.h,v 1.7 2005/07/06 08:28:31 junyoung Exp $	*/
21.1Sdrochner
31.1Sdrochner/*
41.1Sdrochner * Copyright (c) 1997
51.1Sdrochner *	Matthias Drochner.  All rights reserved.
61.1Sdrochner *
71.1Sdrochner * Redistribution and use in source and binary forms, with or without
81.1Sdrochner * modification, are permitted provided that the following conditions
91.1Sdrochner * are met:
101.1Sdrochner * 1. Redistributions of source code must retain the above copyright
111.1Sdrochner *    notice, this list of conditions and the following disclaimer.
121.1Sdrochner * 2. Redistributions in binary form must reproduce the above copyright
131.1Sdrochner *    notice, this list of conditions and the following disclaimer in the
141.1Sdrochner *    documentation and/or other materials provided with the distribution.
151.1Sdrochner *
161.1Sdrochner * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
171.1Sdrochner * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
181.1Sdrochner * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
191.1Sdrochner * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
201.1Sdrochner * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
211.1Sdrochner * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
221.1Sdrochner * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
231.1Sdrochner * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
241.1Sdrochner * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
251.1Sdrochner * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
261.1Sdrochner *
271.1Sdrochner */
281.1Sdrochner
291.1Sdrochner#include <machine/bootinfo.h>
301.1Sdrochner
311.1Sdrochnerstruct bootinfo {
321.1Sdrochner	int nentries;
331.1Sdrochner	physaddr_t entry[1];
341.1Sdrochner};
351.1Sdrochner
361.1Sdrochnerextern struct bootinfo *bootinfo;
371.1Sdrochner
381.1Sdrochner#define BI_ALLOC(max) (bootinfo = alloc(sizeof(struct bootinfo) \
391.1Sdrochner                                        + ((max) - 1) * sizeof(physaddr_t))) \
401.1Sdrochner                      ->nentries = 0
411.1Sdrochner
421.1Sdrochner#define BI_FREE() free(bootinfo, 0)
431.1Sdrochner
441.7Sjunyoung#define BI_ADD(x, type, size) bi_add((struct btinfo_common *)(x), type, size)
451.1Sdrochner
461.7Sjunyoungvoid bi_add(struct btinfo_common *, int, int);
471.7Sjunyoungvoid bi_getbiosgeom(void);
481.7Sjunyoungvoid bi_getmemmap(void);
49