2N/A/*
2N/A * GRUB -- GRand Unified Bootloader
2N/A * Copyright (C) 2008,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/* $NetBSD: bootinfo.h,v 1.16 2009/08/24 02:15:46 jmcneill Exp $ */
2N/A
2N/A/*
2N/A * Copyright (c) 1997
2N/A * Matthias Drochner. All rights reserved.
2N/A *
2N/A * Redistribution and use in source and binary forms, with or without
2N/A * modification, are permitted provided that the following conditions
2N/A * are met:
2N/A * 1. Redistributions of source code must retain the above copyright
2N/A * notice, this list of conditions and the following disclaimer.
2N/A * 2. Redistributions in binary form must reproduce the above copyright
2N/A * notice, this list of conditions and the following disclaimer in the
2N/A * documentation and/or other materials provided with the distribution.
2N/A *
2N/A * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
2N/A * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2N/A * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2N/A * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2N/A * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2N/A * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2N/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2N/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2N/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2N/A * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2N/A *
2N/A */
2N/A
2N/A#ifndef GRUB_NETBSD_BOOTINFO_CPU_HEADER
2N/A#define GRUB_NETBSD_BOOTINFO_CPU_HEADER 1
2N/A
2N/A#include <grub/types.h>
2N/A
2N/A#define NETBSD_BTINFO_BOOTPATH 0
2N/A#define NETBSD_BTINFO_ROOTDEVICE 1
2N/A#define NETBSD_BTINFO_BOOTDISK 3
2N/A#define NETBSD_BTINFO_CONSOLE 6
2N/A#define NETBSD_BTINFO_SYMTAB 8
2N/A#define NETBSD_BTINFO_MEMMAP 9
2N/A#define NETBSD_BTINFO_BOOTWEDGE 10
2N/A#define NETBSD_BTINFO_MODULES 11
2N/A#define NETBSD_BTINFO_FRAMEBUF 12
2N/A
2N/Astruct grub_netbsd_bootinfo
2N/A{
2N/A grub_uint32_t bi_count;
2N/A grub_uint32_t bi_data[0];
2N/A};
2N/A
2N/Astruct grub_netbsd_btinfo_common
2N/A{
2N/A grub_uint32_t len;
2N/A grub_uint32_t type;
2N/A};
2N/A
2N/A#define GRUB_NETBSD_MAX_BOOTPATH_LEN 80
2N/A
2N/Astruct grub_netbsd_btinfo_bootdisk
2N/A{
2N/A grub_uint32_t labelsector; /* label valid if != 0xffffffff */
2N/A struct
2N/A {
2N/A grub_uint16_t type, checksum;
2N/A char packname[16];
2N/A } label;
2N/A grub_uint32_t biosdev;
2N/A grub_uint32_t partition;
2N/A};
2N/A
2N/Astruct grub_netbsd_btinfo_bootwedge {
2N/A grub_uint32_t biosdev;
2N/A grub_disk_addr_t startblk;
2N/A grub_uint64_t nblks;
2N/A grub_disk_addr_t matchblk;
2N/A grub_uint64_t matchnblks;
2N/A grub_uint8_t matchhash[16]; /* MD5 hash */
2N/A} __attribute__ ((packed));
2N/A
2N/Astruct grub_netbsd_btinfo_symtab
2N/A{
2N/A grub_uint32_t nsyms;
2N/A grub_uint32_t ssyms;
2N/A grub_uint32_t esyms;
2N/A};
2N/A
2N/A
2N/Astruct grub_netbsd_btinfo_serial
2N/A{
2N/A char devname[16];
2N/A grub_uint32_t addr;
2N/A grub_uint32_t speed;
2N/A};
2N/A
2N/Astruct grub_netbsd_btinfo_modules
2N/A{
2N/A grub_uint32_t num;
2N/A grub_uint32_t last_addr;
2N/A struct grub_netbsd_btinfo_module
2N/A {
2N/A char name[80];
2N/A#define GRUB_NETBSD_MODULE_RAW 0
2N/A#define GRUB_NETBSD_MODULE_ELF 1
2N/A grub_uint32_t type;
2N/A grub_uint32_t size;
2N/A grub_uint32_t addr;
2N/A } mods[0];
2N/A};
2N/A
2N/Astruct grub_netbsd_btinfo_framebuf
2N/A{
2N/A grub_uint64_t fbaddr;
2N/A grub_uint32_t flags;
2N/A grub_uint32_t width;
2N/A grub_uint32_t height;
2N/A grub_uint16_t pitch;
2N/A grub_uint8_t bpp;
2N/A
2N/A grub_uint8_t red_mask_size;
2N/A grub_uint8_t green_mask_size;
2N/A grub_uint8_t blue_mask_size;
2N/A
2N/A grub_uint8_t red_field_pos;
2N/A grub_uint8_t green_field_pos;
2N/A grub_uint8_t blue_field_pos;
2N/A
2N/A grub_uint8_t reserved[16];
2N/A};
2N/A
2N/A#define GRUB_NETBSD_MAX_ROOTDEVICE_LEN 16
2N/A
2N/A#endif