@@ -46,7 +46,7 @@ GLOBAL(sl_header)
46
46
.word _end_of_measured /* SL header SKL measured length */
47
47
.byte 0xda , 0x75 , 0xc4 , 0x0e , 0xd0 , 0xd3 , 0x5d , 0x48 , 0xb6 , 0xae , 0x3c , 0xb2 , 0xf , 0xb7 , 0xad , 0x3a
48
48
.long 0xffffffff /* Reserved */
49
- .long 0xaaaa5555 /* Total Length including signature and pubkey raw data */
49
+ .long _end_of_signed + 0x640 /* Total Length including signature and pubkey raw data */
50
50
.word soc_flag /* Offset to SOCFLAG Structure, see below */
51
51
.word skl_info /* Offset to SKL info with UUID and version */
52
52
.word bootloader_data /* Offset to SLRT filled by the bootloader */
@@ -320,11 +320,42 @@ gdt:
320
320
.Lgdt_end:
321
321
ENDDATA(gdt)
322
322
323
- /*
324
- .section .skinit_reserved, "a", @progbits
325
- GLOBAL(skinit_reserved)
326
- .fill 0x740, 1, 0x00
327
- */
323
+ #ifdef AMDSL
324
+ .section .skl_sig_hdr, "a" , @progbits
325
+ .fill 16 , 1 , 0x00 /* Nonce */
326
+ .long 0x31534124 /* HeaderVersion, "$AS1" */
327
+ .long _end_of_signed /* Signed Fw Size in bytes */
328
+ .fill 4 +4 +16 , 1 , 0x00 /* Encryption options, algorithm ID and parameters */
329
+ .long 1 /* SigOption, 1 - signed */
330
+ .long 0 /* SigAlgID, unknown encoding */
331
+ .byte KEY_ID /* Key ID */
332
+ .long 0 /* Compression option */
333
+ .long 1 /* Security patch level */
334
+ .fill 4 +4 +8 , 1 , 0x00 /* Uncompr. size, compr. size, compr. parameters */
335
+ .long 0x02000200 /* ImageVersion */
336
+ .fill 4 +4 , 1 , 0x00 /* APU Family ID and Firmware Load Address */
337
+ .long _end_of_signed + 0x200 /* FW size with signature */
338
+ .fill 4 +4 +4 +1 +1 +2 +16 +16 +96 /* The rest */
339
+
340
+ /* Signature is filled during final objcopy */
341
+ .section .skl_sig, "a" , @progbits
342
+ .fill 0x200 , 1 , 0x00
343
+
344
+ .section .skl_pubkey_hdr, "a" , @progbits
345
+ .long 2 /* Version ID */
346
+ .byte KEY_ID /* Key ID */
347
+ .byte KEY_ID /* Certifying key ID */
348
+ .fill 4 +1 +1 +14 , 1 , 0x00 /* Key usage, platform vendor ID, model ID, reserved */
349
+ .long 4096 /* Public exponent size in bits */
350
+ .long 4096 /* Modulus size in bits */
351
+
352
+ .long 0x10001 /* Exponent */
353
+ .fill 508 , 1 , 0x00 /* XXX: does it have to be so oversized? */
354
+
355
+ /* Modulus is stored in a dedicated section, filled during final objcopy */
356
+ .section .skl_pubkey_modulus, "a" , @progbits
357
+ .fill 0x200 , 1 , 0x00
358
+ #endif
328
359
329
360
#ifdef __x86_64__
330
361
/* 64bit Pagetables, identity map of the first 4G of RAM. */
0 commit comments