19 #ifndef _RTEMS_IDE_PART_TABLE_H 20 #define _RTEMS_IDE_PART_TABLE_H 27 #include <sys/ioctl.h> 28 #include <sys/types.h> 29 #include <sys/endian.h> 41 #define RTEMS_IDE_SECTOR_BITS 9 42 #define RTEMS_IDE_SECTOR_SIZE 512 43 #define RTEMS_IDE_PARTITION_DESCRIPTOR_SIZE 16 44 #define RTEMS_IDE_PARTITION_MAX_PARTITION_NUMBER 63 45 #define RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER 4 46 #define RTEMS_IDE_PARTITION_DEV_NAME_LENGTH_MAX 16 48 #define RTEMS_IDE_PARTITION_MSDOS_SIGNATURE_DATA1 0x55 49 #define RTEMS_IDE_PARTITION_MSDOS_SIGNATURE_DATA2 0xaa 50 #define RTEMS_IDE_PARTITION_MSDOS_SIGNATURE_OFFSET 0x1fe 51 #define RTEMS_IDE_PARTITION_TABLE_OFFSET 0x1be 52 #define RTEMS_IDE_PARTITION_TABLE_SIZE (4 * 16) 53 #define RTEMS_IDE_PARTITION_BOOTABLE_OFFSET 0 54 #define RTEMS_IDE_PARTITION_SYS_TYPE_OFFSET 4 55 #define RTEMS_IDE_PARTITION_START_OFFSET 8 56 #define RTEMS_IDE_PARTITION_SIZE_OFFSET 12 61 #define LE_TO_CPU_U16(v) le16toh(v) 62 #define LE_TO_CPU_U32(v) le32toh(v) 63 #define CPU_TO_LE_U16(v) htole16(v) 64 #define CPU_TO_LE_U32(v) htole32(v) 73 uint8_t data[RTEMS_ZERO_LENGTH_ARRAY];
84 EMPTY_PARTITION = 0x00,
85 DOS_FAT12_PARTITION = 0x01,
86 DOS_FAT16_PARTITION = 0x04,
87 EXTENDED_PARTITION = 0x05,
88 DOS_P32MB_PARTITION = 0x06,
89 FAT32_PARTITION = 0x0B,
90 FAT32_LBA_PARTITION = 0x0C,
91 FAT16_LBA_PARTITION = 0x0E,
94 DM6_AUX1PARTITION = 0x51,
95 DM6_AUX3PARTITION = 0x53,
123 struct rtems_part_desc_s *sub_part[RTEMS_IDE_PARTITION_MAX_SUB_PARTITION_NUMBER];
130 char dev_name[RTEMS_IDE_PARTITION_DEV_NAME_LENGTH_MAX];
132 uint32_t sector_size;
133 uint32_t sector_bits;
179 const char *dev_name,
Data which Ease the Burden of Consistently Setting Errno.
rtems_status_code
Classic API Status.
Definition: status.h:43
Definition: ide_part_table.h:109
Definition: ide_part_table.h:70
Definition: ide_part_table.h:128
LibIO Internal Interface.
rtems_status_code rtems_ide_part_table_get(const char *dev_name, rtems_disk_desc_t *disk_desc) RTEMS_DEPRECATED
Definition: ide_part_table.c:531
#define RTEMS_DEPRECATED
Public name for task floating point context area.
Definition: basedefs.h:141
rtems_status_code rtems_ide_part_table_initialize(const char *dev_name) RTEMS_DEPRECATED
Definition: ide_part_table.c:550
void rtems_ide_part_table_free(rtems_disk_desc_t *disk_desc) RTEMS_DEPRECATED
Definition: ide_part_table.c:512
Block Device Buffer Management.