0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome * CDDL HEADER START
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome * The contents of this file are subject to the terms of the
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome * Common Development and Distribution License (the "License").
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome * You may not use this file except in compliance with the License.
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome * See the License for the specific language governing permissions
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome * and limitations under the License.
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome * When distributing Covered Code, include this CDDL HEADER in each
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome * If applicable, add the following below this CDDL HEADER, with the
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome * fields enclosed by brackets "[]" replaced with your own identifying
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome * information: Portions Copyright [yyyy] [name of copyright owner]
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome * CDDL HEADER END
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome * Copyright 2016 Toomas Soome <tsoome@me.com>
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome/* partitioning type for device */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome/* file system type */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome/* partition info for boot block location. */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome enum ig_devtype_t devtype; /* partitioning type */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome/* boot device data */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome struct stage_part stage; /* location of boot block */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome struct stage_part target; /* target file system */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome/* stage 2 location */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome unsigned char stage1[SECTOR_SIZE]; /* partition boot block */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome#define BBLK_BLKLIST_OFF 50 /* vtoc/disk boot offset */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome#define BBLK_ZFS_BLK_OFF 1024 /* vdev boot offset */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome#define BBLK_ZFS_BLK_SIZE (7ULL << 19) /* vdev max boot size */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome/* locations of MBR parts, must be reviewd if mbr code is changed */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome#define STAGE1_BPB_OFFSET (0x3) /* technically BPB starts at 0xb */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome#define STAGE1_MBR_VERSION (0xfa) /* 2 bytes, not used */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome#define STAGE1_STAGE2_UUID (0x106) /* 128bits */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome#define STAGE1_PARTTBL (0x1be) /* MBR partition table */
0c946d80993858b7b1314e0b31773e48500e03fbToomas Soome#endif /* _INSTALLBOOT_H */