switch-coreboot/src
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: db9bb2d392
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
..
acpi src/acpi: Capitalize ACPI and SATA 2016-07-31 19:25:40 +02:00
arch Revert "x86: acpi: Add function for querying GPE status" 2016-09-19 19:20:24 -07:00
commonlib commonlib: move DIV_ROUND macros from nvidia/tegra 2016-09-07 20:52:42 +02:00
console console: honor CONFIG_POSTCAR_CONSOLE 2016-09-19 17:01:37 +02:00
cpu cpu/amd/family_10h-family_15h: transition away from device_t 2016-09-13 17:25:13 +02:00
device src/device: Add required space before opening parenthesis '(' 2016-08-28 18:27:52 +02:00
drivers Revert "drivers/i2c/tpm: Move common variables to header" 2016-09-19 19:21:24 -07:00
ec src/ec: Improve code formatting 2016-09-07 13:55:05 +02:00
include src/include: Add space around operators 2016-09-20 17:38:56 +02:00
lib arch/x86,lib: make cbmem console work in postcar stage 2016-09-19 17:02:17 +02:00
mainboard src/mainboard/a-trend - emulation: Add space around operators 2016-09-20 19:06:28 +02:00
northbridge northbridge/via: Add space around operators 2016-09-20 21:28:51 +02:00
soc Revert "soc/intel/apollolake: Initialize GPEs in bootblock" 2016-09-19 19:20:19 -07:00
southbridge southbridge/via: Add space around operators 2016-09-20 17:37:51 +02:00
superio src/superio: Add space around operators 2016-09-20 17:39:09 +02:00
vboot vboot/vbnv_flash: Binary search to find last used entry 2016-09-20 21:50:27 +02:00
vendorcode vendorcode/skylake: Add FSP header files without any adaptations 2016-09-12 19:54:25 +02:00
Kconfig Kconfig: Relocate DEVICETREE symbol 2016-09-06 22:49:06 +02:00