| 1 | /* @title: Master Boot Record */ |
|---|---|
| 2 | #pragma once |
| 3 | #include <compiler.h> |
| 4 | #include <stdint.h> |
| 5 | |
| 6 | struct mbr_partition_entry { |
| 7 | uint8_t status; |
| 8 | uint8_t chs_first[3]; |
| 9 | uint8_t type; |
| 10 | uint8_t chs_last[3]; |
| 11 | uint32_t lba_start; |
| 12 | uint32_t sector_count; |
| 13 | } __packed; |
| 14 | |
| 15 | struct mbr { |
| 16 | uint8_t bootstrap[446]; |
| 17 | struct mbr_partition_entry partitions[4]; |
| 18 | uint16_t signature; |
| 19 | } __packed; |
| 20 | _Static_assert(sizeof(struct mbr) == 512, ""); |
| 21 |