1166551Smarcel/*- 2166551Smarcel * Copyright (c) 2007 Marcel Moolenaar 3166551Smarcel * All rights reserved. 4166551Smarcel * 5166551Smarcel * Redistribution and use in source and binary forms, with or without 6166551Smarcel * modification, are permitted provided that the following conditions 7166551Smarcel * are met: 8166551Smarcel * 9166551Smarcel * 1. Redistributions of source code must retain the above copyright 10166551Smarcel * notice, this list of conditions and the following disclaimer. 11166551Smarcel * 2. Redistributions in binary form must reproduce the above copyright 12166551Smarcel * notice, this list of conditions and the following disclaimer in the 13166551Smarcel * documentation and/or other materials provided with the distribution. 14166551Smarcel * 15166551Smarcel * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16166551Smarcel * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17166551Smarcel * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18166551Smarcel * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19166551Smarcel * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20166551Smarcel * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21166551Smarcel * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22166551Smarcel * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23166551Smarcel * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24166551Smarcel * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25166551Smarcel * 26166551Smarcel * $FreeBSD$ 27166551Smarcel */ 28166551Smarcel 29166551Smarcel#ifndef _SYS_APM_H_ 30166551Smarcel#define _SYS_APM_H_ 31166551Smarcel 32166551Smarcel/* Driver Descriptor Record. */ 33166551Smarcelstruct apm_ddr { 34166551Smarcel uint16_t ddr_sig; 35166551Smarcel#define APM_DDR_SIG 0x4552 36166551Smarcel uint16_t ddr_blksize; 37166551Smarcel uint32_t ddr_blkcount; 38166551Smarcel}; 39166551Smarcel 40179747Smarcel#define APM_ENT_NAMELEN 32 41179747Smarcel#define APM_ENT_TYPELEN 32 42179747Smarcel 43166551Smarcel/* Partition Map Entry Record. */ 44166551Smarcelstruct apm_ent { 45166551Smarcel uint16_t ent_sig; 46166551Smarcel#define APM_ENT_SIG 0x504d 47166551Smarcel uint16_t _pad_; 48166551Smarcel uint32_t ent_pmblkcnt; 49166551Smarcel uint32_t ent_start; 50166551Smarcel uint32_t ent_size; 51179747Smarcel char ent_name[APM_ENT_NAMELEN]; 52179747Smarcel char ent_type[APM_ENT_TYPELEN]; 53166551Smarcel}; 54166551Smarcel 55166551Smarcel#define APM_ENT_TYPE_SELF "Apple_partition_map" 56166551Smarcel#define APM_ENT_TYPE_UNUSED "Apple_Free" 57166551Smarcel 58166551Smarcel#define APM_ENT_TYPE_FREEBSD "FreeBSD" 59236023Smarcel#define APM_ENT_TYPE_FREEBSD_NANDFS "FreeBSD-nandfs" 60166551Smarcel#define APM_ENT_TYPE_FREEBSD_SWAP "FreeBSD-swap" 61166551Smarcel#define APM_ENT_TYPE_FREEBSD_UFS "FreeBSD-UFS" 62166551Smarcel#define APM_ENT_TYPE_FREEBSD_VINUM "FreeBSD-Vinum" 63172855Smarcel#define APM_ENT_TYPE_FREEBSD_ZFS "FreeBSD-ZFS" 64166551Smarcel 65200557Srpaulo#define APM_ENT_TYPE_APPLE_BOOT "Apple_Bootstrap" 66166551Smarcel#define APM_ENT_TYPE_APPLE_HFS "Apple_HFS" 67200557Srpaulo#define APM_ENT_TYPE_APPLE_UFS "Apple_UNIX_SVR2" 68166551Smarcel 69166551Smarcel#endif /* _SYS_APM_H_ */ 70