09c8e63ea23f264216cdcfbd817c725c39c6baed
[kernel/u-boot.git] / include / mbr.h
1 /*
2  * Copyright (C) 2010 Samsung Electrnoics
3  */
4
5 struct mbr_partition {
6         char status;
7         char f_chs[3];
8         char partition_type;
9         char l_chs[3];
10         int lba;
11         int nsectors;
12 } __attribute__((packed));
13
14 struct mbr {
15         char code_area[440];
16         char disk_signature[4];
17         char nulls[2];
18         struct mbr_partition parts[4];
19         unsigned short signature;
20 };
21
22 void set_mbr_table(unsigned int start_addr, int parts,
23                 unsigned int *blocks, unsigned int *part_offset);
24 int get_mbr_table(unsigned int *part_offset);