xref: /minix/usr.sbin/installboot/machines.c (revision 0a6a1f1d)
1*0a6a1f1dSLionel Sambuc /*	$NetBSD: machines.c,v 1.39 2014/02/24 07:23:44 skrll Exp $	*/
29f8e6353SEvgeniy Ivanov 
39f8e6353SEvgeniy Ivanov /*-
49f8e6353SEvgeniy Ivanov  * Copyright (c) 2002-2005 The NetBSD Foundation, Inc.
59f8e6353SEvgeniy Ivanov  * All rights reserved.
69f8e6353SEvgeniy Ivanov  *
79f8e6353SEvgeniy Ivanov  * This code is derived from software contributed to The NetBSD Foundation
89f8e6353SEvgeniy Ivanov  * by Luke Mewburn of Wasabi Systems.
99f8e6353SEvgeniy Ivanov  *
109f8e6353SEvgeniy Ivanov  * Redistribution and use in source and binary forms, with or without
119f8e6353SEvgeniy Ivanov  * modification, are permitted provided that the following conditions
129f8e6353SEvgeniy Ivanov  * are met:
139f8e6353SEvgeniy Ivanov  * 1. Redistributions of source code must retain the above copyright
149f8e6353SEvgeniy Ivanov  *    notice, this list of conditions and the following disclaimer.
159f8e6353SEvgeniy Ivanov  * 2. Redistributions in binary form must reproduce the above copyright
169f8e6353SEvgeniy Ivanov  *    notice, this list of conditions and the following disclaimer in the
179f8e6353SEvgeniy Ivanov  *    documentation and/or other materials provided with the distribution.
189f8e6353SEvgeniy Ivanov  *
199f8e6353SEvgeniy Ivanov  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
209f8e6353SEvgeniy Ivanov  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
219f8e6353SEvgeniy Ivanov  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
229f8e6353SEvgeniy Ivanov  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
239f8e6353SEvgeniy Ivanov  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
249f8e6353SEvgeniy Ivanov  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
259f8e6353SEvgeniy Ivanov  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
269f8e6353SEvgeniy Ivanov  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
279f8e6353SEvgeniy Ivanov  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
289f8e6353SEvgeniy Ivanov  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
299f8e6353SEvgeniy Ivanov  * POSSIBILITY OF SUCH DAMAGE.
309f8e6353SEvgeniy Ivanov  */
319f8e6353SEvgeniy Ivanov 
329f8e6353SEvgeniy Ivanov #if HAVE_NBTOOL_CONFIG_H
339f8e6353SEvgeniy Ivanov #include "nbtool_config.h"
349f8e6353SEvgeniy Ivanov #endif
359f8e6353SEvgeniy Ivanov 
369f8e6353SEvgeniy Ivanov #include <sys/cdefs.h>
379f8e6353SEvgeniy Ivanov #if !defined(__lint)
38*0a6a1f1dSLionel Sambuc __RCSID("$NetBSD: machines.c,v 1.39 2014/02/24 07:23:44 skrll Exp $");
399f8e6353SEvgeniy Ivanov #endif	/* !__lint */
409f8e6353SEvgeniy Ivanov 
419f8e6353SEvgeniy Ivanov #include <sys/types.h>
429f8e6353SEvgeniy Ivanov #include "installboot.h"
439f8e6353SEvgeniy Ivanov 
449f8e6353SEvgeniy Ivanov /*
459f8e6353SEvgeniy Ivanov  * Define these here so they end up as zero-filled bss if installboot
469f8e6353SEvgeniy Ivanov  * isn't built with all the architectures defined.
479f8e6353SEvgeniy Ivanov  * A lot simpler that conditionally including the definitions themselves.
489f8e6353SEvgeniy Ivanov  */
499f8e6353SEvgeniy Ivanov struct ib_mach
509f8e6353SEvgeniy Ivanov     ib_mach_alpha,
519f8e6353SEvgeniy Ivanov     ib_mach_amd64,
529f8e6353SEvgeniy Ivanov     ib_mach_amiga,
539f8e6353SEvgeniy Ivanov     ib_mach_emips,
549f8e6353SEvgeniy Ivanov     ib_mach_ews4800mips,
559f8e6353SEvgeniy Ivanov     ib_mach_hp300,
56*0a6a1f1dSLionel Sambuc     ib_mach_hppa,
579f8e6353SEvgeniy Ivanov     ib_mach_i386,
589f8e6353SEvgeniy Ivanov     ib_mach_landisk,
599f8e6353SEvgeniy Ivanov     ib_mach_macppc,
609f8e6353SEvgeniy Ivanov     ib_mach_news68k,
619f8e6353SEvgeniy Ivanov     ib_mach_newsmips,
629f8e6353SEvgeniy Ivanov     ib_mach_next68k,
639f8e6353SEvgeniy Ivanov     ib_mach_pmax,
649f8e6353SEvgeniy Ivanov     ib_mach_sparc,
659f8e6353SEvgeniy Ivanov     ib_mach_sparc64,
669f8e6353SEvgeniy Ivanov     ib_mach_sun2,
679f8e6353SEvgeniy Ivanov     ib_mach_sun3,
689f8e6353SEvgeniy Ivanov     ib_mach_vax,
699f8e6353SEvgeniy Ivanov     ib_mach_x68k;
709f8e6353SEvgeniy Ivanov 
719f8e6353SEvgeniy Ivanov struct ib_mach * const machines[] = {
729f8e6353SEvgeniy Ivanov     &ib_mach_alpha,
739f8e6353SEvgeniy Ivanov     &ib_mach_amd64,
749f8e6353SEvgeniy Ivanov     &ib_mach_amiga,
759f8e6353SEvgeniy Ivanov     &ib_mach_emips,
769f8e6353SEvgeniy Ivanov     &ib_mach_ews4800mips,
779f8e6353SEvgeniy Ivanov     &ib_mach_hp300,
78*0a6a1f1dSLionel Sambuc     &ib_mach_hppa,
799f8e6353SEvgeniy Ivanov     &ib_mach_i386,
809f8e6353SEvgeniy Ivanov     &ib_mach_landisk,
819f8e6353SEvgeniy Ivanov     &ib_mach_macppc,
829f8e6353SEvgeniy Ivanov     &ib_mach_news68k,
839f8e6353SEvgeniy Ivanov     &ib_mach_newsmips,
849f8e6353SEvgeniy Ivanov     &ib_mach_next68k,
859f8e6353SEvgeniy Ivanov     &ib_mach_pmax,
869f8e6353SEvgeniy Ivanov     &ib_mach_sparc,
879f8e6353SEvgeniy Ivanov     &ib_mach_sparc64,
889f8e6353SEvgeniy Ivanov     &ib_mach_sun2,
899f8e6353SEvgeniy Ivanov     &ib_mach_sun3,
909f8e6353SEvgeniy Ivanov     &ib_mach_vax,
919f8e6353SEvgeniy Ivanov     &ib_mach_x68k,
929f8e6353SEvgeniy Ivanov     NULL
939f8e6353SEvgeniy Ivanov };
949f8e6353SEvgeniy Ivanov 
959f8e6353SEvgeniy Ivanov #if 0
969f8e6353SEvgeniy Ivanov 	{ "shark",	no_setboot,	no_clearboot,	no_editboot, 0 },
979f8e6353SEvgeniy Ivanov #endif
98