coreboot-kgpe-d16/src/arch/x86
Aaron Durbin 0f35af8f42 arch/x86: add support for cache-as-ram paging
Processors, such as glk, need to have paging enabled while
in cache-as-ram mode because the front end is agressive about
fetching lines into the L1I cache. If the line is dirty and in
the L1D then it writes it back to "memory". However, in this case
there is no backing store so the cache-as-ram data that was written
back transforms to all 0xff's when read back in causing corruption.

In order to mitigate the failure add x86 architecture support for
enabling paging while in cache-as-ram mode. A Kconfig variable,
NUM_CAR_PAGE_TABLE_PAGES, determines the number of pages to carve
out for page tables within the cache-as-ram region. Additionally,
the page directory pointer table is also carved out of cache-as-ram.
Both areas are allocated from the persist-across-stages region
of cache-as-ram so all stages utilizing cache-as-ram don't corrupt
the page tables.

The two paging-related areas are loaded by calling
paging_enable_for_car() with the names of cbfs files to load the
initial paging structures from.

BUG=b:72728953

Change-Id: I7ea6e3e7be94a0ef9fd3205ce848e539bfbdcb6e
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/25717
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
2018-04-25 15:32:56 +00:00
..
acpi arch/x86/acpi/statdef.asl: Remove unnecessary whitespace 2018-02-02 16:08:16 +00:00
include arch/x86: add ENV_CACHE_AS_RAM 2018-04-24 14:40:16 +00:00
acpi.c compiler.h: add __weak macro 2018-04-24 14:37:59 +00:00
acpi_device.c acpigen: Add stop gpio control to power resource 2017-08-30 16:40:14 +00:00
acpi_s3.c compiler.h: add __weak macro 2018-04-24 14:37:59 +00:00
acpigen.c compiler.h: add __weak macro 2018-04-24 14:37:59 +00:00
acpigen_dsm.c arch/x86/acpigen: Fix acpigen for If (Lequal (...)) 2016-11-16 01:08:06 +01:00
assembly_entry.S arch/x86/assembly_entry: Align stack for car_stage_entry 2017-07-13 16:48:22 +00:00
boot.c arch/x86: Wrap lines at 80 columns 2017-03-17 03:18:24 +01:00
bootblock.ld tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
bootblock_crt0.S arch/x86: Support "weak" BIST and timestamp save routines 2016-06-11 19:22:42 +02:00
bootblock_normal.c Port cmos.default handling to C environment bootblock 2017-07-26 19:30:01 +00:00
bootblock_romcc.S arch/x86: Rename bootblock.S to bootblock_romcc.S 2016-01-30 03:11:12 +01:00
bootblock_simple.c Port cmos.default handling to C environment bootblock 2017-07-26 19:30:01 +00:00
c_start.S arch/x86: prepare for having an idt in other stages 2018-04-24 13:56:00 +00:00
car.ld arch/x86: add support for cache-as-ram paging 2018-04-25 15:32:56 +00:00
cbfs_and_run.c arch/x86: Fix most of remaining issues detected by checkpatch 2017-03-20 16:36:24 +01:00
cbmem.c compiler.h: add __weak macro 2018-04-24 14:37:59 +00:00
cpu.c x86: Increase time out for parking APs to 250ms 2018-04-01 20:01:34 +00:00
cpu_common.c arch/x86: add missing license headers 2016-01-14 23:37:06 +01:00
crt0_romcc_epilogue.inc src/arch: Update license headers missing paragraph 2 2016-01-26 04:44:20 +01:00
ebda.c arch/x86: initialize EBDA in S3 and S0/S5 path 2017-10-16 16:56:19 +00:00
exception.c arch/*: Update Kconfig symbol usage 2017-07-07 16:05:16 +00:00
exit_car.S arch/x86: update assembly to ensure 16-byte alignment into C 2017-06-29 14:58:59 +00:00
failover.ld arch/x86: rename reset_vector -> _start 2016-03-04 01:16:05 +01:00
gdt.c arch/x86/gdt: Move variable assignment down 2017-11-03 15:20:15 +00:00
id.ld arch/x86: add missing license headers 2016-01-14 23:37:06 +01:00
id.S arch/x86: Wrap lines at 80 columns 2017-03-17 03:18:24 +01:00
idt.S arch/x86: align stack on entry to x86_exception() 2018-04-24 14:36:31 +00:00
ioapic.c ioapic: extend definition name to avoid collision 2018-04-09 09:29:51 +00:00
Kconfig arch/x86: add support for cache-as-ram paging 2018-04-25 15:32:56 +00:00
Makefile.inc arch/x86: prepare for having an idt in other stages 2018-04-24 13:56:00 +00:00
memcpy.c arch/x86: add missing license headers 2016-01-14 23:37:06 +01:00
memlayout.ld arch/x86: introduce postcar stage/phase 2016-03-23 14:24:30 +01:00
memmove.c arch/x86: Fix space issues detected by checkpatch 2017-03-17 03:17:39 +01:00
memset.c arch/x86: Wrap lines at 80 columns 2017-03-17 03:18:24 +01:00
mmap_boot.c arch/x86: Fix most of remaining issues detected by checkpatch 2017-03-20 16:36:24 +01:00
mpspec.c compiler.h: add __weak macro 2018-04-24 14:37:59 +00:00
pci_ops_conf1.c src: add IS_ENABLED() around Kconfig symbol references 2017-07-13 23:57:07 +00:00
pci_ops_mmconf.c arch/x86: Wrap lines at 80 columns 2017-03-17 03:18:24 +01:00
pirq_routing.c compiler.h: add __weak macro 2018-04-24 14:37:59 +00:00
postcar.c compiler.h: add __weak macro 2018-04-24 14:37:59 +00:00
postcar_loader.c arch/x86/postcar: add comment clarifying reason for finalize_load() 2018-04-24 14:39:09 +00:00
prologue.inc tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
rdrand.c arch/x86: Make rdrand.c clang friendly 2017-06-22 04:11:02 +00:00
romcc_console.c arch/*: Update Kconfig symbol usage 2017-07-07 16:05:16 +00:00
smbios.c compiler.h: add __weak macro 2018-04-24 14:37:59 +00:00
stages.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
tables.c arch/x86: Restore forwarding table on resume for non EARLY_EBDA_INIT 2017-10-29 01:59:18 +00:00
thread.c arch/x86: Fix space issues detected by checkpatch 2017-03-17 03:17:39 +01:00
thread_switch.S tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
timestamp.c compiler.h: add __weak macro 2018-04-24 14:37:59 +00:00
verstage.c vboot: Remove CHIPSET_PROVIDES_VERSTAGE_MAIN_SYMBOL Kconfig option 2017-03-28 22:14:03 +02:00
wakeup.S arch/x86: remove .intel_syntax 2016-01-23 17:01:44 +01:00
walkcbfs.S arch/x86: Wrap lines at 80 columns 2017-03-17 03:18:24 +01:00