coreboot-kgpe-d16/src/lib
Raul E Rangel 1e1aa0ca4d lib/cbmem_console: Add cbmemc_copy_in function
When running in verstage before bootblock, the PSP (ARM co-processor) is
running with limited SRAM. It needs to stash the verstage console data
internally until DRAM is brought up. Once DRAM is brought up the data is
stashed in a "transfer buffer" region. In the current design, we are
using the same region for the transfer buffer and the
preram_cbmem_console region. This has the following downsides:

1) The pre-x86 buffer needs to be large enough to hold all the
   verstage, bootblock and romstage console logs.
2) On AMD platforms, the PSP verstage is signed. Changing the size of
   preram_cbmem_console after the fact will result in a mismatch of the
   transfer buffer between verstage and bootblock.

This CL adds a new method that allows SoC specific code to copy the
CBMEM console in the transfer buffer to the active CBMEM console.

BUG=b:213828947
TEST=Boot guybrush and no longer see
   *** Pre-CBMEM romstage console overflowed, log truncated!

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Idc0ab8090db740e0d1b3d21d8968f26471f2e930
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61099
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-01-23 16:42:38 +00:00
..
gnat
asan.c
b64_decode.c
bmp_logo.c
boot_device.c
bootblock.c
bootmem.c
bootmode.c
bootsplash.c
cb.ads
cbfs.c lib/cbfs: Disable cbfs_preload in romstage when VBOOT_STARTS_IN_ROMSTAGE 2021-12-15 23:26:06 +00:00
cbmem_common.c
cbmem_console.c lib/cbmem_console: Add cbmemc_copy_in function 2022-01-23 16:42:38 +00:00
cbmem_stage_cache.c
compute_ip_checksum.c
coreboot_table.c coreboot tables: Add type-c port info to coreboot table 2021-10-04 17:12:48 +00:00
crc_byte.c
decompressor.c
delay.c
device_tree.c src/acpi to src/lib: Fix spelling errors 2021-10-05 18:06:39 +00:00
dimm_info_util.c arch/x86: Refactor the SMBIOS type 17 write function 2021-11-11 09:10:10 +00:00
dp_aux.c src/{drivers,lib}: Remove unused <console/console.h> 2022-01-14 00:29:02 +00:00
edid.c src/acpi to src/lib: Fix spelling errors 2021-10-05 18:06:39 +00:00
edid_fill_fb.c
espi_debug.c
ext_stage_cache.c
fallback_boot.c
fit.c src: Remove unused <cbfs.h> 2022-01-17 15:38:54 +00:00
fit_payload.c src: Remove unused <cbfs.h> 2022-01-17 15:38:54 +00:00
fmap.c src/lib/fmap.c: use le*toh() functions where needed 2021-10-27 14:55:51 +00:00
fw_config.c src/lib: Add FW_CONFIG_SOURCE_VPD 2021-11-08 14:48:05 +00:00
gcc.c
gcov-glue.c
gcov-io.c
gcov-io.h
gcov-iov.h
gpio.c
halt.c
hardwaremain.c ChromeOS: Refactor ACPI CNVS generation 2021-12-23 21:18:25 +00:00
hexdump.c lib/hexdump: remove hexdump32 and use hexdump instead 2021-05-27 15:41:15 +00:00
hexstrtobin.c
hw-time-timer.adb
imd.c
imd_cbmem.c
jpeg.c
jpeg.h
Kconfig lib/prog_loaders, soc/amd/: Make payload_preload use cbfs_preload 2021-11-16 18:20:31 +00:00
Kconfig.cbfs_verification Spell *Boot Guard* with a space for official spelling 2021-12-16 14:17:36 +00:00
libgcc.c
libgcov.c
list.c lib/list: Add list_append 2021-11-03 08:29:16 +00:00
lzma.c
lzmadecode.c
lzmadecode.h
Makefile.inc lib/Makefile.inc: Remove effect-free line 2021-12-23 12:14:17 +00:00
malloc.c
memchr.c
memcmp.c
memcpy.c
memmove.c
memrange.c
memset.c
metadata_hash.c
nhlt.c src/acpi to src/lib: Fix spelling errors 2021-10-05 18:06:39 +00:00
primitive_memtest.c
prog_loaders.c src/lib/prog_loaders: Add preload_ramstage 2021-11-16 21:45:36 +00:00
prog_ops.c
program.ld cbmem: Introduce "early" init hooks for console 2021-05-27 23:30:42 +00:00
ramdetect.c
ramtest.c
reg_script.c
region_file.c src/acpi to src/lib: Fix spelling errors 2021-10-05 18:06:39 +00:00
reset.c
rmodule.c
rmodule.ld
romstage_handoff.c
rtc.c lib/rtc: Add sanity check for time and date 2021-05-30 20:24:13 +00:00
selfboot.c selfboot: Add support for selfload in romstage 2021-07-02 00:47:23 +00:00
spd_bin.c
spd_cache.c
stack.c
string.c src: Remove redundant <rules.h> and <commonlib/bsd/compiler.h> 2022-01-12 16:11:05 +00:00
thread.c src: Remove redundant <rules.h> and <commonlib/bsd/compiler.h> 2022-01-12 16:11:05 +00:00
timer.c
timer_queue.c
timestamp.c timestamp: Allow timestamp_add to accept a negative number 2022-01-21 22:42:19 +00:00
ubsan.c
uuid.c
version.c
wrdd.c