1*af28f636SEnrico Perla - Sun Microsystems /* 2*af28f636SEnrico Perla - Sun Microsystems * CDDL HEADER START 3*af28f636SEnrico Perla - Sun Microsystems * 4*af28f636SEnrico Perla - Sun Microsystems * The contents of this file are subject to the terms of the 5*af28f636SEnrico Perla - Sun Microsystems * Common Development and Distribution License (the "License"). 6*af28f636SEnrico Perla - Sun Microsystems * You may not use this file except in compliance with the License. 7*af28f636SEnrico Perla - Sun Microsystems * 8*af28f636SEnrico Perla - Sun Microsystems * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*af28f636SEnrico Perla - Sun Microsystems * or http://www.opensolaris.org/os/licensing. 10*af28f636SEnrico Perla - Sun Microsystems * See the License for the specific language governing permissions 11*af28f636SEnrico Perla - Sun Microsystems * and limitations under the License. 12*af28f636SEnrico Perla - Sun Microsystems * 13*af28f636SEnrico Perla - Sun Microsystems * When distributing Covered Code, include this CDDL HEADER in each 14*af28f636SEnrico Perla - Sun Microsystems * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*af28f636SEnrico Perla - Sun Microsystems * If applicable, add the following below this CDDL HEADER, with the 16*af28f636SEnrico Perla - Sun Microsystems * fields enclosed by brackets "[]" replaced with your own identifying 17*af28f636SEnrico Perla - Sun Microsystems * information: Portions Copyright [yyyy] [name of copyright owner] 18*af28f636SEnrico Perla - Sun Microsystems * 19*af28f636SEnrico Perla - Sun Microsystems * CDDL HEADER END 20*af28f636SEnrico Perla - Sun Microsystems */ 21*af28f636SEnrico Perla - Sun Microsystems /* 22*af28f636SEnrico Perla - Sun Microsystems * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 23*af28f636SEnrico Perla - Sun Microsystems */ 24*af28f636SEnrico Perla - Sun Microsystems 25*af28f636SEnrico Perla - Sun Microsystems #ifndef _INSTALLBOOT_H 26*af28f636SEnrico Perla - Sun Microsystems #define _INSTALLBOOT_H 27*af28f636SEnrico Perla - Sun Microsystems 28*af28f636SEnrico Perla - Sun Microsystems #ifdef __cplusplus 29*af28f636SEnrico Perla - Sun Microsystems extern "C" { 30*af28f636SEnrico Perla - Sun Microsystems #endif 31*af28f636SEnrico Perla - Sun Microsystems 32*af28f636SEnrico Perla - Sun Microsystems #include <sys/multiboot.h> 33*af28f636SEnrico Perla - Sun Microsystems #include <sys/types.h> 34*af28f636SEnrico Perla - Sun Microsystems 35*af28f636SEnrico Perla - Sun Microsystems enum ib_fs_types { 36*af28f636SEnrico Perla - Sun Microsystems TARGET_IS_UFS = 0, 37*af28f636SEnrico Perla - Sun Microsystems TARGET_IS_HSFS, 38*af28f636SEnrico Perla - Sun Microsystems TARGET_IS_ZFS 39*af28f636SEnrico Perla - Sun Microsystems }; 40*af28f636SEnrico Perla - Sun Microsystems 41*af28f636SEnrico Perla - Sun Microsystems typedef struct _ib_device { 42*af28f636SEnrico Perla - Sun Microsystems char *path; 43*af28f636SEnrico Perla - Sun Microsystems int fd; 44*af28f636SEnrico Perla - Sun Microsystems uint8_t type; 45*af28f636SEnrico Perla - Sun Microsystems } ib_device_t; 46*af28f636SEnrico Perla - Sun Microsystems 47*af28f636SEnrico Perla - Sun Microsystems typedef struct _ib_bootblock { 48*af28f636SEnrico Perla - Sun Microsystems char *buf; 49*af28f636SEnrico Perla - Sun Microsystems char *file; 50*af28f636SEnrico Perla - Sun Microsystems char *extra; 51*af28f636SEnrico Perla - Sun Microsystems multiboot_header_t *mboot; 52*af28f636SEnrico Perla - Sun Microsystems uint32_t mboot_off; 53*af28f636SEnrico Perla - Sun Microsystems uint32_t buf_size; 54*af28f636SEnrico Perla - Sun Microsystems uint32_t file_size; 55*af28f636SEnrico Perla - Sun Microsystems } ib_bootblock_t; 56*af28f636SEnrico Perla - Sun Microsystems 57*af28f636SEnrico Perla - Sun Microsystems typedef struct _ib_data { 58*af28f636SEnrico Perla - Sun Microsystems ib_device_t device; 59*af28f636SEnrico Perla - Sun Microsystems ib_bootblock_t bootblock; 60*af28f636SEnrico Perla - Sun Microsystems } ib_data_t; 61*af28f636SEnrico Perla - Sun Microsystems 62*af28f636SEnrico Perla - Sun Microsystems #define is_zfs(type) (type == TARGET_IS_ZFS) 63*af28f636SEnrico Perla - Sun Microsystems 64*af28f636SEnrico Perla - Sun Microsystems #define BBLK_DATA_RSVD_SIZE (15 * SECTOR_SIZE) 65*af28f636SEnrico Perla - Sun Microsystems #define BBLK_ZFS_EXTRA_OFF (SECTOR_SIZE * 1024) 66*af28f636SEnrico Perla - Sun Microsystems 67*af28f636SEnrico Perla - Sun Microsystems #ifdef __cplusplus 68*af28f636SEnrico Perla - Sun Microsystems } 69*af28f636SEnrico Perla - Sun Microsystems #endif 70*af28f636SEnrico Perla - Sun Microsystems 71*af28f636SEnrico Perla - Sun Microsystems #endif /* _INSTALLBOOT_H */ 72