Skip to content

Instantly share code, notes, and snippets.

@skochinsky
Last active November 29, 2017 14:13
Show Gist options
  • Save skochinsky/181e6e338d90bb7f2693098dc43c6d54 to your computer and use it in GitHub Desktop.
Save skochinsky/181e6e338d90bb7f2693098dc43c6d54 to your computer and use it in GitHub Desktop.
Phoenix $PFH trailer
struct PFRegionEntry
{
UINT32 FileOffset;
UINT32 Size;
UINT64 FlashAddress;
UINT32 NameOffset; //absolute offset
};
struct PFHeader
{
/* 00 */char Signature[4]; //$PFH
/* 04 */UINT32 dwVersion;
/* 08 */UINT32 dwHeaderSize;
/* 0C */UINT16 wHeaderChecksum;
/* 0E */UINT32 dwTotalImageSize;
/* 12 */UINT16 wTotalImageChecksum;
/* 14 */UINT32 dwNumberOfImages;
/* 18 */UINT32 imagetableOffset; //usually DC
/* 1C */UINT32 unknown[48];
/* DC */PFImageEntry rgtable[1];
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment