Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patches/coreboot-4.8.1: Measure firmware into PCR2 #793

Merged
merged 1 commit into from Aug 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion patches/coreboot-4.8.1/0000-measuredboot.patch
Expand Up @@ -167,7 +167,7 @@ index 6fd55d7..b5b7d91 100644
+{
+ if (IS_ENABLED(CONFIG_MEASURED_BOOT) && !(flags & SEG_NO_MEASURE))
+ {
+ tlcl_measure(3, (const void*) start, size);
+ tlcl_measure(2, (const void*) start, size);
+ }
+}
+
Expand Down
Expand Up @@ -51,9 +51,9 @@ index 30987ce..4957bc0 100644
+ tlcl_lib_init();
+ const void * const bootblock = (const void*) 0xFFFFF800;
+ const unsigned bootblock_size = 0x800;
+ tlcl_measure(0, bootblock, bootblock_size);
+ tlcl_measure(2, bootblock, bootblock_size);
+
+ tlcl_measure(1, _romstage, _eromstage - _romstage);
+ tlcl_measure(2, _romstage, _eromstage - _romstage);
+ }
+
/* Signal that FSP component has been loaded. */
Expand All @@ -66,7 +66,7 @@ index 30987ce..4957bc0 100644
+void platform_segment_loaded(uintptr_t start, size_t size, int flags)
+{
+ if (IS_ENABLED(CONFIG_MEASURED_BOOT) && !(flags & SEG_NO_MEASURE)) {
+ tlcl_measure(1, (const void*) start, size);
+ tlcl_measure(2, (const void*) start, size);
+ }
+}
+
Expand All @@ -87,7 +87,7 @@ index bda88d1..49568f6 100644
die("Failed to read FSPS!\n");

+ if (IS_ENABLED(CONFIG_MEASURED_BOOT)) {
+ tlcl_measure(1, (const void*) dest, size);
+ tlcl_measure(2, (const void*) dest, size);
+ }
+
if (fsp_component_relocate((uintptr_t)dest, dest, size) < 0)
Expand Down
4 changes: 2 additions & 2 deletions patches/coreboot-4.8.1/0030-sandybridge.patch
Expand Up @@ -22,10 +22,10 @@ index 0426b83..d348b9e 100644
+ tlcl_lib_init();
+ const void * const bootblock = (const void*) 0xFFFFF800;
+ const unsigned bootblock_size = 0x800;
+ tlcl_measure(0, bootblock, bootblock_size);
+ tlcl_measure(2, bootblock, bootblock_size);
+
+ extern char _romstage, _eromstage;
+ tlcl_measure(1, &_romstage, &_eromstage - &_romstage);
+ tlcl_measure(2, &_romstage, &_eromstage - &_romstage);
+ }
+
/* USB is initialized in MRC if MRC is used. */
Expand Down