Hello Hung-Te Lin, build bot (Jenkins), Martin Roth, Patrick Georgi, Jonathan Zhang, David Hendricks,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/41757
to look at the new patch set (#3).
Change subject: drivers/vpd: Fix VPD speed regressions on non-x86 devices ......................................................................
drivers/vpd: Fix VPD speed regressions on non-x86 devices
CB:34634 expanded the VPD code to also be usable from romstage, shuffling a few things around and adding some extra infrastructure in the process. Unfortunately, the changes seem to have only been written with x86 devices in mind and make coreboot always load the whole VPD FMAP section (not just the used part) on devices where rdev_mmap() is not a no-op.
This patch rewrites the VPD code to be based on region_device structures that only represent the VPD area actually used (rather than the whole FMAP section), and that only get mapped when accessed. (It would be even better to pull this concept into the VPD decoder itself, but since that is taken from third-party code and accesses in early stages aren't very common, let's not go there for now.) It also moves the copying into CBMEM to romstage so that late romstage accesses can already benefit from it, and makes early decoding available in all stages because at this point, why not.
Also fix a long-standing bug where the 'consumed' counter was not reset between vpd_decode_string() calls to the RO and the RW VPD.
Signed-off-by: Julius Werner jwerner@chromium.org Change-Id: I55a103180b290c1563e35a25496188b6a82e49ff --- M src/drivers/vpd/Makefile.inc M src/drivers/vpd/vpd.c M src/drivers/vpd/vpd.h D src/drivers/vpd/vpd_cbmem.c D src/drivers/vpd/vpd_premem.c 5 files changed, 140 insertions(+), 201 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/41757/3