Skip to content

Commit b93a793

Browse files
jraman567rossphilipson
authored andcommitted
AMDSL: Add SKINIT reserved section and ensure SKL is 64KB long
A section of size 0x740 must the carved out just after the measured portion of the SKL for the signature header, signature and public key. The .fill directive ensures we have enough space in there and the signing process does not crash into other sections. In addition, adding ". = 0xFFF4" is a preliminary approach to ensure that SKL is 64KB long. The extra missing 0xC bytes are produced by the .got.plt section. A cleaner approach might be to use ALIGN() linker directives. Signed-off-by: Jagannathan Raman <[email protected]>
1 parent b27a656 commit b93a793

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

head.S

+4
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,10 @@ gdt:
313313
.Lgdt_end:
314314
ENDDATA(gdt)
315315

316+
.section .skinit_reserved, "a", @progbits
317+
GLOBAL(skinit_reserved)
318+
.fill 0x740, 1, 0x00
319+
316320
#ifdef __x86_64__
317321
/* 64bit Pagetables, identity map of the first 4G of RAM. */
318322
.section .bss.page_data, "aw", @nobits

link.lds

+8
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ SECTIONS
4949

5050
_end_of_measured = .;
5151

52+
. = ALIGN(16);
53+
54+
.skinit_reserved : {
55+
*(.skinit_reserved)
56+
}
57+
5258
.bss : {
5359
. = ALIGN(4096);
5460
_bss = .;
@@ -73,6 +79,8 @@ SECTIONS
7379
*(.bootloader_data)
7480
}
7581

82+
. = 0xFFF4;
83+
7684
_end = .;
7785

7886
/* This section is expected to be empty. */

0 commit comments

Comments
 (0)