1 #ifndef _SDI_H
2 #define _SDI_H
3 
4 /** @file
5  *
6  * System Deployment Image (SDI)
7  *
8  */
9 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 
12 /** SDI image header */
13 struct sdi_header {
14 	/** Signature */
15 	uint32_t magic;
16 	/** Version (as an ASCII string) */
17 	uint32_t version;
18 	/** Reserved */
19 	uint8_t reserved[8];
20 	/** Boot code offset */
21 	uint64_t boot_offset;
22 	/** Boot code size */
23 	uint64_t boot_size;
24 } __attribute__ (( packed ));
25 
26 /** SDI image signature */
27 #define SDI_MAGIC \
28 	( ( '$' << 0 ) | ( 'S' << 8 ) | ( 'D' << 16 ) | ( 'I' << 24 ) )
29 
30 /** SDI boot segment */
31 #define SDI_BOOT_SEG 0x0000
32 
33 /** SDI boot offset */
34 #define SDI_BOOT_OFF 0x7c00
35 
36 /** Constant to binary-OR with physical address of SDI image */
37 #define SDI_WTF 0x41
38 
39 #endif /* _SDI_H */
40