vboot: rewrite GBB functions and API

Old vboot1-style GBB accessor functions were awkwardly located
within region-init.c.

Rewrite GBB accessor functions for vboot2, and formally expose
HWID retrieval function via vboot2 API.  workbuf is used for
key retrieval functions, while a buffer provided by the caller
is used for HWID retrieval function.

Reintroduce vboot_display_tests to `make runtests` test suite.
Move GBB tests from vboot_display_tests to vb2_gbb_tests.

Properly propagate vb2_workbuf objects within the function call
stack (vb2_load_partition).

BUG=b:124141368, chromium:954774
TEST=Build and flash to eve, check that Chrome OS boots
TEST=Build with CL:1627469 applied, check HWID
TEST=make clean && make runtests

Change-Id: I398d1329f0b092de35aac73d98dfd9aee6e4e7de
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1584488
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Jason Clinton <jclinton@chromium.org>
21 files changed