/* ieee1275.h - Access the Open Firmware client interface. */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRUB_IEEE1275_HEADER
struct grub_ieee1275_devalias
{
char *name;
char *path;
char *type;
};
struct grub_ieee1275_mem_region
{
unsigned int start;
unsigned int size;
};
#ifndef IEEE1275_CALL_ENTRY_FN
#endif
/* All backcalls to the firmware is done by calling an entry function
which was passed to us from the bootloader. When doing the backcall,
a structure is passed which specifies what the firmware should do.
NAME is the requested service. NR_INS and NR_OUTS is the number of
passed arguments and the expected number of return values, resp. */
struct grub_ieee1275_common_hdr
{
};
char **device,
char **path);
/* Maps a device alias to a pathname. */
extern int (* EXPORT_VAR(grub_ieee1275_entry_fn)) (void *);
enum grub_ieee1275_flag
{
/* Old World Macintosh firmware fails seek when "dev:0" is opened. */
/* Apple firmware runs in translated mode and requires use of the "map"
method. Other firmware runs in untranslated mode and doesn't like "map"
calls. */
/* CHRP specifies partitions are numbered from 1 (partition 0 refers to the
whole disk). However, CodeGen firmware numbers partitions from 0. */
/* CodeGen firmware does not correctly implement "output-device output" */
/* OLPC / XO firmware hangs when accessing USB devices. */
/* Open Hack'Ware stops when trying to set colors */
/* Open Hack'Ware stops when grub_ieee1275_interpret is used. */
/* Open Hack'Ware has no memory map, just claim what we need. */
/* Open Hack'Ware don't support the ANSI sequence. */
/* OpenFirmware hangs on qemu if one requests any memory below 1.5 MiB. */
/* Some PowerMacs claim to use 2 address cells but in fact use only 1.
Other PowerMacs claim to use only 1 and really do so. Always assume
1 address cell is used on PowerMacs.
*/
};
void EXPORT_FUNC(grub_ieee1275_init) (void);
int EXPORT_FUNC(grub_ieee1275_enter) (void);
const char *propname,
const void *buf,
int index, int r, int g, int b);
int
(struct grub_ieee1275_devalias *
alias));
#endif /* ! GRUB_IEEE1275_HEADER */