coreboot-kgpe-d16/src/soc/intel/baytrail
Shelley Chen ad9cd687b8 mrc_cache: Add mrc_cache fetch functions to support non-x86 platforms
Create two new functions to fetch mrc_cache data (replacing
mrc_cache_get_current):

- mrc_cache_load_current: fetches the mrc_cache data and drops it into
  the given buffer.  This is useful for ARM platforms where the mmap
  operation is very expensive.

- mrc_cache_mmap_leak: fetch the mrc_cache data and puts it into a
  given buffer.  This is useful for platforms where the mmap operation
  is a no-op (like x86 platforms).  As the name mentions, we are not
  freeing the memory that we allocated with the mmap, so it is the
  caller's responsibility to do so.

Additionally, we are replacing mrc_cache_latest with
mrc_cache_get_latest_slot_info, which does not check the validity of
the data when retrieving the current mrc_cache slot.  This allows the
caller some flexibility in deciding where they want the mrc_cache data
stored (either in an mmaped region or at a given address).

BUG=b:150502246
BRANCH=None
TEST=Testing on a nami (x86) device:
     reboot from ec console.  Make sure memory training happens.
     reboot from ec console.  Make sure that we don't do training again.

Signed-off-by: Shelley Chen <shchen@google.com>
Change-Id: I259dd4f550719d821bbafa2d445cbae6ea22e988
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44006
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-24 23:30:50 +00:00
..
acpi {sb,soc}/intel/*/acpi/lpc.asl: Drop commented-out code 2020-08-05 15:46:17 +00:00
bootblock soc/intel/baytrail/bootblock/bootblock.c: Move functions 2020-07-25 10:17:46 +00:00
include/soc soc/intel/baytrail: Add native refcode replacement 2020-08-02 12:07:08 +00:00
romstage mrc_cache: Add mrc_cache fetch functions to support non-x86 platforms 2020-08-24 23:30:50 +00:00
acpi.c soc/intel/baytrail: Factor out acpi_fill_madt() 2020-08-04 12:26:14 +00:00
chip.c device/pci_device: Extract pci_domain_set_resources from SOC 2020-05-12 20:07:25 +00:00
chip.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
cpu.c soc/intel/baytrail/cpu.c: Align with Braswell 2020-07-25 10:22:33 +00:00
dptf.c src: Remove unused '#include <stdint.h>' 2020-05-13 08:48:17 +00:00
ehci.c soc/intel/baytrail: Rename "pmc.h" to "pm.h" 2020-07-09 12:46:35 +00:00
elog.c elog: rename ELOG_WAKE_SOURCE_GPIO to ELOG_WAKE_SOURCE_GPE 2020-08-18 15:57:40 +00:00
emmc.c soc/intel/baytrail: Add dedicated devices for MMC and MMC 4.5 controller 2020-07-12 19:44:02 +00:00
fadt.c src: Use ACPI macros 2020-07-21 18:26:47 +00:00
gfx.c {sb,soc}/intel/**/*.c: Use macros for PCI COMMAND bits 2020-07-26 21:17:50 +00:00
gpio.c soc/intel/baytrail: Rename "pmc.h" to "pm.h" 2020-07-09 12:46:35 +00:00
hda.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
iosf.c soc/intel/baytrail: Add native refcode replacement 2020-08-02 12:07:08 +00:00
Kconfig soc/intel/baytrail: Add native refcode replacement 2020-08-02 12:07:08 +00:00
lpe.c soc/intel/baytrail/lpe.c: Align with Braswell 2020-07-25 10:21:59 +00:00
lpss.c {sb,soc}/intel/**/*.c: Use macros for PCI COMMAND bits 2020-07-26 21:17:50 +00:00
Makefile.inc soc/intel/baytrail: Add native refcode replacement 2020-08-02 12:07:08 +00:00
memmap.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
modphy_table.c soc/intel/baytrail: Add native refcode replacement 2020-08-02 12:07:08 +00:00
northcluster.c soc/intel/baytrail/northcluster.c: Clean up comments 2020-08-02 13:08:50 +00:00
pcie.c src: Use pci_dev_ops_pci where applicable 2020-06-06 20:36:51 +00:00
perf_power.c src: Remove unused '#include <stdint.h>' 2020-05-13 08:48:17 +00:00
placeholders.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
pmutil.c soc/intel/baytrail: Retype some pointers 2020-07-25 10:17:40 +00:00
ramstage.c soc/intel/baytrail: Simplify pattrs definitions 2020-07-25 10:23:09 +00:00
refcode.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
refcode_native.c soc/intel/baytrail: Add native refcode replacement 2020-08-02 12:07:08 +00:00
sata.c soc/intel/baytrail/sata.c: Fix SATA init sequence 2020-08-02 12:18:40 +00:00
scc.c {sb,soc}/intel/**/*.c: Use macros for PCI COMMAND bits 2020-07-26 21:17:50 +00:00
sd.c soc/intel/baytrail/sd.c: Align with Braswell 2020-07-25 10:22:18 +00:00
smihandler.c SMM: Validate more user-provided pointers 2020-08-21 07:51:07 +00:00
smm.c soc/intel/baytrail/smm.c: Align with Braswell 2020-07-25 10:22:52 +00:00
southcluster.c src: Remove whitespace between 'sizeof' and '(' 2020-07-26 21:18:16 +00:00
tsc_freq.c src: Remove unused '#include <stdint.h>' 2020-05-13 08:48:17 +00:00
xhci.c soc/intel/baytrail: Rename "pmc.h" to "pm.h" 2020-07-09 12:46:35 +00:00