2N/A/* ieee1275.h - Access the Open Firmware client interface. */
2N/A/*
2N/A * GRUB -- GRand Unified Bootloader
2N/A * Copyright (C) 2003,2004,2005,2007,2009 Free Software Foundation, Inc.
2N/A *
2N/A * GRUB is free software: you can redistribute it and/or modify
2N/A * it under the terms of the GNU General Public License as published by
2N/A * the Free Software Foundation, either version 3 of the License, or
2N/A * (at your option) any later version.
2N/A *
2N/A * GRUB is distributed in the hope that it will be useful,
2N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of
2N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2N/A * GNU General Public License for more details.
2N/A *
2N/A * You should have received a copy of the GNU General Public License
2N/A * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
2N/A */
2N/A
2N/A#ifndef GRUB_IEEE1275_MACHINE_HEADER
2N/A#define GRUB_IEEE1275_MACHINE_HEADER 1
2N/A
2N/A#include <grub/types.h>
2N/A
2N/A#define GRUB_IEEE1275_CELL_SIZEOF 8
2N/Atypedef grub_uint64_t grub_ieee1275_cell_t;
2N/A
2N/A/* Encoding of 'mode' argument to grub_ieee1275_map_physical() */
2N/A#define IEEE1275_MAP_WRITE 0x0001 /* Writable */
2N/A#define IEEE1275_MAP_READ 0x0002 /* Readable */
2N/A#define IEEE1275_MAP_EXEC 0x0004 /* Executable */
2N/A#define IEEE1275_MAP_LOCKED 0x0010 /* Locked in TLB */
2N/A#define IEEE1275_MAP_CACHED 0x0020 /* Cacheable */
2N/A#define IEEE1275_MAP_SE 0x0040 /* Side-effects */
2N/A#define IEEE1275_MAP_GLOBAL 0x0080 /* Global */
2N/A#define IEEE1275_MAP_IE 0x0100 /* Invert Endianness */
2N/A#define IEEE1275_MAP_DEFAULT (IEEE1275_MAP_WRITE | IEEE1275_MAP_READ | \
2N/A IEEE1275_MAP_EXEC | IEEE1275_MAP_CACHED)
2N/A
2N/Aextern int EXPORT_FUNC(grub_ieee1275_claim_vaddr) (grub_addr_t vaddr,
2N/A grub_size_t size);
2N/Aextern int EXPORT_FUNC(grub_ieee1275_alloc_physmem) (grub_addr_t *paddr,
2N/A grub_size_t size,
2N/A grub_uint32_t align);
2N/A
2N/Aextern grub_addr_t EXPORT_VAR (grub_ieee1275_original_stack);
2N/A
2N/A#endif /* ! GRUB_IEEE1275_MACHINE_HEADER */