4 * Open Hack'Ware BIOS partitions management definitions
6 * Copyright (c) 2004-2005 Jocelyn Mayer
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License V2
10 * as published by the Free Software Foundation
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #if !defined (__OHW_LIBPART_H__)
23 #define __OHW_LIBPART_H__
25 /* LBA for IDE is 48 bits long.
26 * For now, I'll use 32 bits to store bloc nr
27 * and 32 bits to store offsets in blocs and will only handle LBA 28.
28 * So, I'll be affected with the well known 128 GB disk barrier bug...
34 uint32_t start
; /* Partition first bloc */
35 uint32_t size
; /* Partition size, in blocs */
40 uint32_t bloc_size
; /* Bloc size (may be != bd->seclen) */
41 /* XXX: broken: to be reworked */
42 pos_t boot_start
; /* Boot program start bloc & offset */
43 pos_t boot_size
; /* Boot program size */
44 uint32_t boot_load
; /* Boot program address load */
45 uint32_t boot_entry
; /* Boot program entry point */
57 int part_register (bloc_device_t
*bd
, part_t
*partition
,
58 const unsigned char *name
, int partnum
);
59 void part_set_blocsize (bloc_device_t
*bd
, part_t
*part
, uint32_t blocsize
);
60 void part_private_set (part_t
*part
, void *private);
61 void *part_private_get (part_t
*part
);
63 part_t
*PREP_find_partition (bloc_device_t
*bd
);
64 part_t
*Apple_probe_partitions (bloc_device_t
*bd
);
65 part_t
*isofs_probe_partitions (bloc_device_t
*bd
);
67 #endif /* !defined (__OHW_LIBPART_H__) */