[SeaBIOS] [PATCH 6/6] tpm: Move call to tpm_option_rom into init_optionrom

Stefan Berger stefanb at linux.vnet.ibm.com
Wed Jun 10 01:56:33 CEST 2015


Move the call to measure the option ROM 'tpm_option_rom' into
init_optionrom.

Signed-off-by: Stefan Berger <stefanb at linux.vnet.ibm.com>
---
 src/optionroms.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/optionroms.c b/src/optionroms.c
index 7906908..a24c539 100644
--- a/src/optionroms.c
+++ b/src/optionroms.c
@@ -81,7 +81,6 @@ is_valid_rom(struct rom_header *rom)
         if (EnforceChecksum)
             return 0;
     }
-    tpm_option_rom(rom, len);
     return 1;
 }
 
@@ -134,6 +133,8 @@ init_optionrom(struct rom_header *rom, u16 bdf, int isvga)
     if (newrom != rom)
         memmove(newrom, rom, rom->size * 512);
 
+    tpm_option_rom(newrom, rom->size * 512);
+
     if (isvga || get_pnp_rom(newrom))
         // Only init vga and PnP roms here.
         callrom(newrom, bdf);
-- 
1.9.3




More information about the SeaBIOS mailing list