1*3c550524Sjoerg /* $NetBSD: common.h,v 1.14 2011/01/22 19:19:15 joerg Exp $ */ 2f0bdf503Scgd 3f0bdf503Scgd /* 4f0bdf503Scgd * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. 5f0bdf503Scgd * 6f0bdf503Scgd * Redistribution and use in source and binary forms, with or without 7f0bdf503Scgd * modification, are permitted provided that the following conditions 8f0bdf503Scgd * are met: 9f0bdf503Scgd * 1. Redistributions of source code must retain the above copyright 10f0bdf503Scgd * notice, this list of conditions and the following disclaimer. 11f0bdf503Scgd * 2. Redistributions in binary form must reproduce the above copyright 12f0bdf503Scgd * notice, this list of conditions and the following disclaimer in the 13f0bdf503Scgd * documentation and/or other materials provided with the distribution. 14f0bdf503Scgd * 3. All advertising materials mentioning features or use of this software 15f0bdf503Scgd * must display the following acknowledgement: 16f0bdf503Scgd * This product includes software developed by Christopher G. Demetriou 17f0bdf503Scgd * for the NetBSD Project. 18f0bdf503Scgd * 4. The name of the author may not be used to endorse or promote products 19f0bdf503Scgd * derived from this software without specific prior written permission 20f0bdf503Scgd * 21f0bdf503Scgd * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22f0bdf503Scgd * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23f0bdf503Scgd * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24f0bdf503Scgd * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25f0bdf503Scgd * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26f0bdf503Scgd * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27f0bdf503Scgd * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28f0bdf503Scgd * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29f0bdf503Scgd * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30f0bdf503Scgd * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31f0bdf503Scgd */ 327c4cd2bbScgd 3302cdf4d2Sdsl void OSFpal(void); 3402cdf4d2Sdsl void init_prom_calls(void); 3502cdf4d2Sdsl void halt(void); 3602cdf4d2Sdsl u_int64_t prom_dispatch(int, ...); 3702cdf4d2Sdsl void putulong(unsigned long); 3802cdf4d2Sdsl void putstr(const char *); 3902cdf4d2Sdsl void switch_palcode(void); 40f0bdf503Scgd 41f0bdf503Scgd 42f0bdf503Scgd /* 43f262e027Scgd * vers.c (generated by newvers.sh) 44f262e027Scgd */ 45f262e027Scgd extern const char bootprog_rev[]; 46f262e027Scgd 47f262e027Scgd 48f262e027Scgd /* 49f0bdf503Scgd * booted_dev.c 50f0bdf503Scgd */ 51f0bdf503Scgd 52f0bdf503Scgd #define BOOTED_DEV_MAXNAMELEN 64 53f0bdf503Scgd 54f0bdf503Scgd #if defined(PRIMARY_BOOTBLOCK) || defined(UNIFIED_BOOTBLOCK) 55f0bdf503Scgd int booted_dev_open(void); 56f0bdf503Scgd #endif 57f0bdf503Scgd #define booted_dev_close() ((void)prom_close(booted_dev_fd)) 58f0bdf503Scgd #if defined(SECONDARY_BOOTBLOCK) 59f0bdf503Scgd #define booted_dev_setfd(fd) ((void)(booted_dev_fd = fd)) 60f0bdf503Scgd #endif 61f0bdf503Scgd 62f0bdf503Scgd extern long booted_dev_fd; 63f0bdf503Scgd #if defined(PRIMARY_BOOTBLOCK) || defined(UNIFIED_BOOTBLOCK) 64f0bdf503Scgd extern char booted_dev_name[BOOTED_DEV_MAXNAMELEN]; 65f0bdf503Scgd #endif 661fe5f90dScgd 671fe5f90dScgd 681fe5f90dScgd /* 691fe5f90dScgd * putstr.c 701fe5f90dScgd */ 711fe5f90dScgd 721fe5f90dScgd void putstr(const char *s); 73