The smmstore_lookup_region() function was using fmap_locate_area_as_rdev_rw() directly, which only provides direct SPI access. This bypassed the optimized lookup_store() function that uses incoherent_rdev to enable memory-mapped reads via the read-only device while keeping direct SPI writes via the read-write device. Change smmstore_lookup_region() to call lookup_store() instead, enabling memory-mapped reads for the public API and matching the behavior of the internal implementation. This improves read performance for EFI options and other consumers of the SMMSTORE region device. It also fixes an issue where direct SPI reads were crossing 4k page boundaries on older platforms (Broadwell and earlier) causing them to fail and the fallback option to be used, leading to a disconnect between the user-selected option and device beahvior. TEST=build/boot google/guado, verify all CFR options work properly and no errors in cbmem. Change-Id: I34947be932ede19a3fe896fe0da6373035fe6db7 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/90717 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> |
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile.mk | ||
| ramstage.c | ||
| smi.c | ||
| store.c | ||