security/vboot: Add Kconfig symbol to set hashing block size
Generally, this size probably doesn't matter very much, but in the case of picasso's psp_verstage, the hash is being calculated by hardware using relatively expensive system calls. By increasing the block size, we can save roughly 140ms of boot and resume time. TEST=Build & boot see that boot time has decreased. BRANCH=Zork BUG=b:169217270 - Zork: SHA calculation in vboot takes too long Signed-off-by: Martin Roth <martinroth@chromium.org> Change-Id: I68eecbbdfadcbf14288dc6e849397724fb66e0b2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/46901 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Kangheui Won <khwon@chromium.org>
This commit is contained in:
@@ -369,6 +369,17 @@ config VBOOT_KEYBLOCK_PREAMBLE_FLAGS
|
||||
hex "Keyblock preamble flags"
|
||||
default 0x0
|
||||
|
||||
config VBOOT_HASH_BLOCK_SIZE
|
||||
hex
|
||||
default 0x400
|
||||
help
|
||||
Set the default hash size. Generally 1k is reasonable, but in some
|
||||
cases it may improve hashing speed to increase the size.
|
||||
|
||||
Note that this buffer is allocated in the stack. Although the
|
||||
build should fail if the stack size is exceeded, it's something to
|
||||
be aware of when changing the size.
|
||||
|
||||
endmenu # Keys
|
||||
endif # VBOOT
|
||||
endmenu # Verified Boot (vboot)
|
||||
|
Reference in New Issue
Block a user