Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
wdenk | afe3d13 | 2001-03-29 22:35:59 +0000 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2000 |
| 4 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
wdenk | afe3d13 | 2001-03-29 22:35:59 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef _DISK_PART_DOS_H |
| 8 | #define _DISK_PART_DOS_H |
| 9 | |
Stephen Warren | d27b5f9 | 2012-09-21 09:51:00 +0000 | [diff] [blame] | 10 | #define DOS_PART_DISKSIG_OFFSET 0x1b8 |
wdenk | afe3d13 | 2001-03-29 22:35:59 +0000 | [diff] [blame] | 11 | #define DOS_PART_TBL_OFFSET 0x1be |
| 12 | #define DOS_PART_MAGIC_OFFSET 0x1fe |
wdenk | 7205e40 | 2003-09-10 22:30:53 +0000 | [diff] [blame] | 13 | #define DOS_PBR_FSTYPE_OFFSET 0x36 |
Wolfgang Denk | 66c2d73 | 2010-07-19 11:36:57 +0200 | [diff] [blame] | 14 | #define DOS_PBR32_FSTYPE_OFFSET 0x52 |
wdenk | 7205e40 | 2003-09-10 22:30:53 +0000 | [diff] [blame] | 15 | #define DOS_PBR_MEDIA_TYPE_OFFSET 0x15 |
| 16 | #define DOS_MBR 0 |
| 17 | #define DOS_PBR 1 |
Marek Szyprowski | 80bd05f | 2020-12-23 13:55:11 +0100 | [diff] [blame] | 18 | #define DOS_PART_TYPE_EXTENDED 0x05 |
| 19 | #define DOS_PART_TYPE_EXTENDED_LBA 0x0F |
| 20 | #define DOS_PART_TYPE_EXTENDED_LINUX 0x85 |
wdenk | afe3d13 | 2001-03-29 22:35:59 +0000 | [diff] [blame] | 21 | |
Marek Szyprowski | 20bd5ac | 2020-12-23 13:55:14 +0100 | [diff] [blame] | 22 | #define DOS_PART_DEFAULT_GAP 2048 |
| 23 | |
wdenk | afe3d13 | 2001-03-29 22:35:59 +0000 | [diff] [blame] | 24 | typedef struct dos_partition { |
| 25 | unsigned char boot_ind; /* 0x80 - active */ |
| 26 | unsigned char head; /* starting head */ |
| 27 | unsigned char sector; /* starting sector */ |
| 28 | unsigned char cyl; /* starting cylinder */ |
| 29 | unsigned char sys_ind; /* What partition type */ |
| 30 | unsigned char end_head; /* end head */ |
| 31 | unsigned char end_sector; /* end sector */ |
| 32 | unsigned char end_cyl; /* end cylinder */ |
| 33 | unsigned char start4[4]; /* starting sector counting from 0 */ |
| 34 | unsigned char size4[4]; /* nr of sectors in partition */ |
| 35 | } dos_partition_t; |
| 36 | |
| 37 | #endif /* _DISK_PART_DOS_H */ |