X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=include%2Fprom.h;h=97008030d52afbd1aa613b2efd8738bff00c99b0;hp=b217be408c90fd861411020cd97c23260d6979b3;hb=e348755b9f809dd5b83111c8cfd3dc14e641f01a;hpb=f4ebbd9f7ea23e3f0fcbe098754580c220894628 diff --git a/include/prom.h b/include/prom.h index b217be4..9700803 100644 --- a/include/prom.h +++ b/include/prom.h @@ -1,24 +1,28 @@ /* - Definitions for talking to the Open Firmware PROM on - Power Macintosh computers. - - Copyright (C) 1999 Marius Vollmer - Copyright (C) 1996 Paul Mackerras. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ + * prom.h - Routines for talking to the Open Firmware PROM + * + * Copyright (C) 2001 Ethan Benson + * + * Copyright (C) 1999 Benjamin Herrenschmidt + * + * Copyright (C) 1999 Marius Vollmer + * + * Copyright (C) 1996 Paul Mackerras. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ #ifndef PROM_H #define PROM_H @@ -62,9 +66,17 @@ int prom_getchar (); void prom_putchar (char); int prom_nbgetchar(); +#ifdef __GNUC__ +void prom_vprintf (char *fmt, va_list ap) __attribute__ ((format (printf, 1, 0))); +void prom_fprintf (prom_handle dev, char *fmt, ...) __attribute__ ((format (printf, 2, 3))); +void prom_printf (char *fmt, ...) __attribute__ ((format (printf, 1, 2))); +#else void prom_vprintf (char *fmt, va_list ap); void prom_fprintf (prom_handle dev, char *fmt, ...); void prom_printf (char *fmt, ...); +#endif + +void prom_perror (int error, char *filename); void prom_readline (char *prompt, char *line, int len); int prom_set_color(prom_handle device, int color, int r, int g, int b); @@ -79,6 +91,7 @@ void prom_map (void *phys, void *virt, int size); prom_handle prom_finddevice (char *name); prom_handle prom_findpackage (char *path); int prom_getprop (prom_handle dev, char *name, void *buf, int len); +int prom_get_devtype (char *device); /* misc */ @@ -87,6 +100,7 @@ void prom_setargs (char *args); void prom_exit (); void prom_abort (char *fmt, ...); +void prom_sleep (int seconds); int prom_interpret (char *forth);