coreboot-kgpe-d16/src/drivers
Reka Norman ee63b44c47 drivers/mrc_cache: Compare hashes instead of full data
The current MRC cache update process is slow (28 ms on nissa), because
cbmem is not cached in romstage. Specifically, the new MRC data returned
by the FSP is stored in the FSP reserved memory in cbmem, so operations
on the new data (computing the checksum, comparing to the old data) are
slow.

Replace the data checksum in the MRC header with a hash, and compare
hashes instead of comparing the full data. This has two benefits:
1. The xxhash function is faster than computing an IP checksum (4 ms vs
   14 ms on uncached data on nissa).
2. There's no need to memcmp() the full MRC data, which takes 14 ms on
   nissa.

Before:
550:starting to load ChromeOS VPD                     867,930 (4,664)
  3:after RAM initialization                          896,020 (28,090)
  4:end of romstage                                   906,274 (10,254)

After:
550:starting to load ChromeOS VPD                     864,820 (4,649)
  3:after RAM initialization                          869,652 (4,831)
  4:end of romstage                                   879,909 (10,257)

BUG=b:242667207
TEST=Check that MRC caching still works as expected on nissa. Corrupt
the MRC cache and check that memory is retrained.

Change-Id: I1b7848d1d05e555b61e0f1cb605550dfe3449c6d
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67670
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-24 01:23:09 +00:00
..
acpi/thermal_zone
amd drivers/amd/agesa: Fix some white spaces issues 2022-07-17 21:55:47 +00:00
ams include/bcd: move bcd code to commonlib/bsd/include 2021-08-23 14:08:47 +00:00
analogix/anx7625 treewide: Remove "ERROR: "/"WARN: " prefixes from log messages 2022-02-07 23:29:09 +00:00
asmedia
aspeed drivers: Get rid of unnecessary blank lines {before,after} brace 2022-07-17 18:45:23 +00:00
broadcom src: Make PCI ID define names shorter 2022-03-07 08:32:09 +00:00
camera treewide: Unify Google branding 2022-07-04 14:02:26 +00:00
crb drivers: Get rid of unnecessary blank lines {before,after} brace 2022-07-17 18:45:23 +00:00
elog drivers/elog/gsmi.c: Fix compiling for 64bit 2022-09-01 16:43:33 +00:00
emulation/qemu drivers/emulation/qemu: Add missing include for MMIO 2021-10-17 11:48:13 +00:00
generic pciexp_device: Join pciexp_find_(next_)extended_cap() APIs 2022-08-17 16:29:39 +00:00
genesyslogic drivers/genesyslogic/gl9763e: Add set L1 entry delay to Max for GL9763E 2022-03-22 03:45:30 +00:00
gfx/generic drivers/gfx/generic: Add optional _HID for gfx devices 2021-12-01 22:04:12 +00:00
i2c drivers/i2c/ptn3460: Add early init option 2022-09-22 15:14:57 +00:00
intel drivers/intel/ptt: Use the correct detection method 2022-09-12 12:23:19 +00:00
ipmi drivers: Get rid of unnecessary blank lines {before,after} brace 2022-07-17 18:45:23 +00:00
lenovo drivers: Remove unused <acpi/acpi.h> 2022-04-24 17:41:26 +00:00
maxim
mipi commonlib/bsd: Remove cb_err_t 2022-03-09 02:18:21 +00:00
mrc_cache drivers/mrc_cache: Compare hashes instead of full data 2022-09-24 01:23:09 +00:00
net drivers: Get rid of unnecessary blank lines {before,after} brace 2022-07-17 18:45:23 +00:00
nxp/uwb mb/google/brya/var/ghost: Enable NXP UWB SR150 chip 2022-08-17 19:46:07 +00:00
ocp/dmi cpu/x86/mp_init: use cb_err as status return type in remaining functions 2021-10-22 01:26:30 +00:00
parade commonlib/bsd: Remove cb_err_t 2022-03-09 02:18:21 +00:00
pc80 drivers: Get rid of unnecessary blank lines {before,after} brace 2022-07-17 18:45:23 +00:00
pcie drivers/pci/generic: Add support for `_PRW` 2022-07-20 22:31:22 +00:00
ricoh/rce822 src: Make PCI ID define names shorter 2022-03-07 08:32:09 +00:00
secunet/dmi
siemens/nc_fpga drivers/siemens/nc_fpga: Fix typo in comment 2022-08-23 14:04:22 +00:00
sil/3114
smbus drivers/smbus: add smbus console driver 2022-09-16 17:01:17 +00:00
smmstore payloads/tianocore: Rename TianoCore to edk2 2022-08-13 16:35:18 +00:00
soundwire device/mipi: Move to drivers/mipi 2021-08-26 15:18:45 +00:00
spi timer: Change timer util functions to 64-bit 2022-09-14 11:55:39 +00:00
ti commonlib/bsd: Remove cb_err_t 2022-03-09 02:18:21 +00:00
tpm drivers/i2c/tpm: Remove TI50_FIRMWARE_VERSION_NOT_SUPPORTED 2022-08-29 04:57:37 +00:00
uart drivers/uart/uart8250reg.h: use shifts in constants 2022-02-07 14:05:05 +00:00
usb drivers/usb/hub/acpi.c: Don't use heap for ACPI name 2022-09-16 13:05:19 +00:00
vpd CBMEM: Change declarations for initialization hooks 2022-05-20 07:15:39 +00:00
wifi/generic Revert "drivers/wifi: Move MTL Magnetar CNVi DIDs from SoC to generic driver" 2022-09-16 05:37:05 +00:00
wwan/fm drivers/wwan/fm: Include option to add ACPI _DSD for DmaProperty 2022-03-07 17:48:44 +00:00