SDI file format specification
Page as used in SDI file format is default i386 MMU page, 4096 bytes.
All numeric values in SDI file are stored in little-endian 64-bit format.
Empty (reserved) fields and space from a BLOB end to the beginning of next BLOB
are padded with 0-s.
SDI file is not padded at the end, so total length of an SDI file equals to
sum of aligned offset to last BLOB and exact (not aligned) length of that BLOB.
All BLOBs are aligned on boundary of alignment block.
Size of alignment block is specified as multiple of page size.
Size of SDI header alone is always 1 page, so if SDI consists of only a header,
its length is exactly 4096 bytes regardless of alignment block size.
First sector (512 bytes, the header) is checksummed, as described in previous article
For empty header with 1-page alignment the checksum value is 0x3A.
TOC begins at third sector (at 0x400 = 1K) (may be it can last until end of page ;-) )
Header format (offset 0)
char magic (= '$SDI')
char ver (= '0001', you can define char magic instead )
0 --- (Unspecified)
Them are just copies of Offset and Size fields from the BOOT BLOB TOC record, if present.
QWORD VendorID (16-bit HEX value, PCI SIG?)
QWORD DeviceID (16-bit HEX value - what chip do you mean? Northbridge? Network?)
QWORD DeviceRole (int32 value)
QWORD RuntimeOEMrev (int32 value)
QWORD PageAlignment (BLOB alignment value in pages, as specified in /pack: )
QWORD Reserved3 (48=384/8; 384=0x80*3)
TOC (Table-of-Content) record format (record size 64 bytes (0x40) ), offset of first record 0x400
char BLOBtype (3-4 bytes UPPERCASE value, 0-padded)
QWORD Attr (uint32 value)
(0 for non-filesystem BLOBs, filesystem code for PART (as in MBR) - 7 for NTFS, 6 for BIGFAT, etc)
end-of-TOC is just 0-record (may be detected by 0-blobtype)
known BLOB types:
BOOT (startrom.*, you could use server' hdlscom?.* for debug)
LOAD (osloader.exe, bootmgr.exe for PE 2.0)
You can unstub regular ntldr or setupldr.bin with oneliner from oss.netfarm.it
- get fixloader.py from here: http://oss.netfarm.it/guides/pxe.php
PART (Winimage .ima - just a filesystem, as old Linux initrd)
DISK (image with a MBR, you could import flat-VHD or *-flat.vmdk)
WIM (a new squashfs-style Windows Vista filesystem)
sdimgr /pack just needs to alphabetically sort BLOBs ('BOOT' < 'LOAD' < 'PART')
There are neither checksums for TOC and files (BLOB-s), nor sdimgr supports
signing of SDI file.
You should not make BootCodeOffset point to non-aligned-boundary
(for example to point into unused part of TOC in the first page),
some loaders can depend on it!
I hope this info is enough to write your own open-source version of sdimgr :-)
This post is discussed here: