coreboot-kgpe-d16/src/vboot
Randall Spangler aa1d314ac2 vboot/vbnv_flash: Binary search to find last used entry
This improves the previous linear search to O(log n).  No change in
storage format.

BUG=chromium:640656
BRANCH=none
TEST=Manual
	(test empty)
	flashrom -i RW_NVRAM -e
	Reboot; device should boot normally.

	(start using records)
	crossystem kern_nv=0xaab0
	crossystem recovery_request=1 && reboot
	Device should go into recovery mode with reason 1
	Reboot again; it should boot normally.
	crossystem kern_nv (should still contain 0xaab0)
	Repeat steps several times with request=2, 3, etc.

	flashrom -i RW_NVRAM -r nvdata
	Modify nvdata to copy the first record across all valid
	records
	flashrom -i RW_NVRAM -w nvdata
	Reboot; device should boot normally.

Change-Id: Ieb97563ab92bd1d18a4f6a9e1d20157efe311fb4
Signed-off-by: Martin Roth <martinroth@chromium.org>
Original-Commit-Id: db9bb2d3927ad57270d7acfd42cf0652102993b1
Original-Change-Id: I1eb5fd9fa6b2ae56833f024bcd3c250147bcc7a1
Original-Signed-off-by: Randall Spangler <rspangler@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/376928
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/16577
Tested-by: build bot (Jenkins)
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-09-20 21:50:27 +02:00
..
bootmode.c bootmode: Get rid of CONFIG_BOOTMODE_STRAPS 2016-07-28 00:36:22 +02:00
common.c src/vboot: Capitalize RAM and CPU 2016-07-31 19:31:41 +02:00
Kconfig vboot/vbnv_flash: make I/O connection agnostic 2016-08-19 18:18:57 +02:00
Makefile.inc bootmode: Get rid of CONFIG_BOOTMODE_STRAPS 2016-07-28 00:36:22 +02:00
misc.h vboot: Separate vboot from chromeos 2016-07-28 00:36:00 +02:00
secdata_mock.c vboot: Separate vboot from chromeos 2016-07-28 00:36:00 +02:00
secdata_tpm.c vboot: Separate vboot from chromeos 2016-07-28 00:36:00 +02:00
symbols.h vboot: Separate vboot from chromeos 2016-07-28 00:36:00 +02:00
vbnv.c vboot: Separate vboot from chromeos 2016-07-28 00:36:00 +02:00
vbnv.h vboot: Separate vboot from chromeos 2016-07-28 00:36:00 +02:00
vbnv_cmos.c vboot: Separate vboot from chromeos 2016-07-28 00:36:00 +02:00
vbnv_ec.c vboot: Separate vboot from chromeos 2016-07-28 00:36:00 +02:00
vbnv_flash.c vboot/vbnv_flash: Binary search to find last used entry 2016-09-20 21:50:27 +02:00
vbnv_layout.h vboot: Separate vboot from chromeos 2016-07-28 00:36:00 +02:00
vboot_common.c vboot/vboot_common: actually provide a writable region_device 2016-08-24 00:09:16 +02:00
vboot_common.h vboot: provide RW region device support 2016-08-19 18:18:37 +02:00
vboot_handoff.c vboot: Separate vboot from chromeos 2016-07-28 00:36:00 +02:00
vboot_loader.c vboot: consolidate google_chromeec_early_init() calls 2016-08-25 22:50:17 +02:00
vboot_logic.c vboot: Separate vboot from chromeos 2016-07-28 00:36:00 +02:00
verstage.c vboot: Separate vboot from chromeos 2016-07-28 00:36:00 +02:00