@@ -40,6 +40,51 @@ const skl_info_t __used skl_info = {
4040 .version = 0 ,
4141};
4242
43+ #if !defined(AMDSL )
44+ typedef struct tdFW_SIG_HEADER
45+ {
46+ u8 Nonce [16 ]; /* [0x00] Unique image id */
47+ u32 HeaderVersion ; /* [0x10] Version of the header */
48+ u32 SizeFWSigned ; /* [0x14] Signed Fw Size in bytes */
49+ u32 EncOption ; /* [0x18] 0 - Not encrypted, 1 - encrypted */
50+ u32 EncAlgID ; /* [0x1C] Encryption algorithm id */
51+ u8 EncParameters [16 ]; /* [0x20] Encryption Parameters */
52+ u32 SigOption ; /* [0x30] 0 - not signed 1 - signed */
53+ u32 SigAlgID ; /* [0x34] Signature algorithm ID */
54+ u8 SigParameters [16 ]; /* [0x38] Signature parameter */
55+ u32 CompOption ; /* [0x48] Compression option */
56+ u32 SecPatchLevel ; /* [0x4C] Security patch level */
57+ u32 UnCompImageSize ; /* [0x50] Uncompressed Image Size */
58+ u32 CompImageSize ; /* [0x54] compressed Image Size */
59+ u8 CompParameters [8 ]; /* [0x58] Compression Parameters */
60+ u32 ImageVersion ; /* [0x60] Off Chip Firmware Version */
61+ u32 APUFamilyID ; /* [0x64] APU Family ID or SoC ID */
62+ u32 FirmwareLoadAddr ; /* [0x68] Firmware Load address (default 0) */
63+ u32 SizeImage ; /* [0x6C] FW size with signature */
64+ u32 SizeFWUnSigned ; /* [0x70] Size of Un-signed portion of the FW */
65+ u32 FirmwareSplitAddr ; /* [0x74] Offset of Nwd OS */
66+ u32 SigFlags ; /* [0x78] Flags for FW signing options, perm, etc */
67+ u8 FwType ; /* [0x7C] FwType */
68+ u8 SubType ; /* [0x7D] SubType identifies FW */
69+ u8 Reserved1 [2 ]; /* [0x7E] *** RESERVED *** */
70+ u8 EncKey [16 ]; /* [0x80] Encryption Key (Wrapped MEK) */
71+ u8 SigningInfo [16 ]; /* [0x90] Signing tool specific information */
72+ u8 Padd [96 ]; /* [0xA0] *** RESERVED *** */
73+ } FW_SIG_HEADER ; /* Total 256 bytes */
74+
75+ extern char _end_of_signed [];
76+
77+ FW_SIG_HEADER __section (".skl_sig_hdr" ) __used hdr = {
78+ .HeaderVersion = 0x31534124 , /* "$AS1" */
79+ .SizeFWSigned = _u (_end_of_signed ),
80+ .SigOption = 1 ,
81+ .SigParameters = {0x00 , 0x11 , 0x22 , 0x33 , 0x44 , 0x55 , 0x66 , 0x77 ,
82+ 0x88 , 0x99 , 0xaa , 0xbb , 0xcc , 0xdd , 0xee , 0xff }, /* TBD! */
83+ .ImageVersion = 0x02000200 ,
84+ .SizeImage = _u (_end_of_signed ) + 0x200 ,
85+ };
86+ #endif
87+
4388#if !defined(AMDSL )
4489static void extend_pcr (struct tpm * tpm , void * data , u32 size , u32 pcr , char * ev )
4590{
0 commit comments