vboot2: Reduce minimum required work buffer size

Apparently our initial submission of 16K was a little too generous for
the vboot2 work buffer, and I hear that we should also be well within
bounds for 12K. This patch reduces the minimum asserted by memlayout so
some of our low-mem boards can get a few more kilobytes back for
discretionary spending. Also changes the required minimum alignment to 8
since that's what the current vboot code aligns it to anyway, and add a
warning comment to make it clearer that this is a dangerous number
people should not be playing with lightly.

BRANCH=None
BUG=None
TEST=Built and booted on Pinky.

Original-Change-Id: Iae9c74050500a315c90f5d5517427d755ac1dfea
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/232613
Original-Reviewed-by: Randall Spangler <rspangler@chromium.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>

(cherry picked from commit 64e972f10363451cd544fdf8642bd484463703bc)
Signed-off-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: I362b8c33cf79534bb76bd7acda44d467563fe133
Reviewed-on: http://review.coreboot.org/9445
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
This commit is contained in:
Julius Werner 2014-12-01 13:11:52 -08:00 committed by Aaron Durbin
parent 2624c8d337
commit d0db3a90ad
1 changed files with 5 additions and 2 deletions

View File

@ -22,9 +22,12 @@
#ifndef __CHROMEOS_VBOOT2_MEMLAYOUT_H
#define __CHROMEOS_VBOOT2_MEMLAYOUT_H
/* Careful: required work buffer size depends on RW properties such as key size
* and algorithm -- what works for you might stop working after an update. Do
* NOT lower the asserted minimum without consulting vboot devs (rspangler)! */
#define VBOOT2_WORK(addr, size) \
REGION(vboot2_work, addr, size, 4) \
_ = ASSERT(size >= 16K, "vboot2 work buffer must be at least 16K!");
REGION(vboot2_work, addr, size, 8) \
_ = ASSERT(size >= 12K, "vboot2 work buffer must be at least 12K!");
#ifdef __VERSTAGE__
#define VERSTAGE(addr, sz) \