00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _MAC_H
00012 #define _MAC_H
00013
00014 #ifdef __cplusplus
00015 extern "C" {
00016 #endif
00017
00018 typedef struct {
00019 uint8_t magic[2];
00020 uint8_t reserved[2];
00021 uint8_t pmap_size[4];
00022 uint8_t start_sec[4];
00023 uint8_t size_sec[4];
00024 uint8_t name[32];
00025 uint8_t type[32];
00026 uint8_t data_start_sec[4];
00027 uint8_t data_size_sec[4];
00028 uint8_t status[4];
00029 uint8_t boot_start_sec[4];
00030 uint8_t boot_size_sec[4];
00031 uint8_t boot_load_addr[4];
00032 uint8_t reserved2[4];
00033 uint8_t boot_entry[4];
00034 uint8_t reserved3[4];
00035 uint8_t boot_checksum[4];
00036 uint8_t proc_type[16];
00037 uint8_t reserved4[376];
00038 } mac_part;
00039
00040 #define MAC_MAGIC 0x504d
00041 #define MAC_PART_SOFFSET 1
00042
00043 #define MAC_STAT_VALID 0x00
00044 #define MAC_STAT_ALLOC 0x01
00045 #define MAC_STAT_INUSE 0x02
00046 #define MAC_STAT_BOOT 0x04
00047 #define MAC_STAT_READ 0x08
00048
00049 #ifdef __cplusplus
00050 }
00051 #endif
00052 #endif