coreboot/src/lib
Jonathan Zhang e111de0752 lib: set up specific purpose memory as LB_MEM_SOFT_RESERVED
CXL (Compute Express Link) [1] is a cache-coherent interconnect
standard for processors, memory expansion and accelerators.

CXL memory is provided through CXL device which is connected
through CXL/PCIe link, while regular system memory is provided
through DIMMs plugged into DIMM slots which are connected to
memory controllers of processor.

With CXL memory, the server's memory capacity is increased.
CXL memory is in its own NUMA domain, with longer latency
and added bandwidth, comparing to regular system memory.

Host firmware may present CXL memory as specific purpose memory.
Linux kernel dax driver provides direct access to such differentiated
memory. In particular, hmem dax driver provides direct access to
specific purpose memory.

Specific purpose memory needs to be represented in e820 table as
soft reserved, as described in [2].

Add IORESOURCE_SOFT_RESERVE resource property to indicate (memory)
resource that needs to be soft reserved.

Add soft_reserved_ram_resource macro to allow soc/mb code to add
memory resource as soft reserved.

[1] https://www.computeexpresslink.org/

[2] https://web.archive.org/web/20230130233752/https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.32&id=262b45ae3ab4bf8e2caf1fcfd0d8307897519630

Signed-off-by: Jonathan Zhang <jonzhang@fb.com>
Change-Id: Ie70795bcb8c97e9dd5fb772adc060e1606f9bab0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52585
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2023-03-03 11:10:38 +00:00
..
gnat lib/gnat: Remove Compiler_Unit_Warning pragmas 2023-02-26 13:30:35 +00:00
asan.c
b64_decode.c
bmp_logo.c
boot_device.c
bootblock.c
bootmem.c lib: set up specific purpose memory as LB_MEM_SOFT_RESERVED 2023-03-03 11:10:38 +00:00
bootmode.c
bootsplash.c
cb.ads
cbfs.c treewide: stop calling custom TPM log "TCPA" 2023-01-11 16:00:55 +00:00
cbfs_master_header.c
cbmem_common.c
cbmem_console.c
cbmem_stage_cache.c
compute_ip_checksum.c
coreboot_table.c treewide: stop calling custom TPM log "TCPA" 2023-01-11 16:00:55 +00:00
crc_byte.c
decompressor.c
delay.c
device_tree.c lib/device_tree.c: Change log level message 2022-12-22 03:27:34 +00:00
dimm_info_util.c
dp_aux.c
edid.c
edid_fill_fb.c
espi_debug.c
ext_stage_cache.c
fallback_boot.c
fit.c
fit_payload.c
fmap.c
fw_config.c lib: Introduce fw_config_get_field 2022-12-17 20:43:16 +00:00
gcc.c
gcov-glue.c tree: Use __func__ instead of hard-coded names 2023-02-17 16:08:04 +00:00
gcov-io.c
gcov-io.h
gcov-iov.h
gpio.c
halt.c
hardwaremain.c timer: Change timer util functions to 64-bit 2022-09-14 11:55:39 +00:00
hexdump.c
hexstrtobin.c
hw-time-timer.adb
imd.c
imd_cbmem.c cbmem_top_chipset: Change the return value to uintptr_t 2022-11-18 16:00:45 +00:00
jpeg.c
jpeg.h
Kconfig lib: Hook up libhwbase in romstage 2022-12-17 20:51:38 +00:00
Kconfig.cbfs_verification cbfs_verification: Remove dependency on VBOOT_STARTS_BEFORE_BOOTBLOCK 2022-10-26 17:19:22 +00:00
libgcc.c
libgcov.c
list.c
lzma.c
lzmadecode.c lib/lzma: Build the source for decompression with flag -Ofast 2022-10-12 16:55:58 +00:00
lzmadecode.h
Makefile.inc src/lib: Include LZMA in romstage for FSP-M 2023-01-08 01:21:46 +00:00
malloc.c tree: Use __func__ instead of hard-coded names 2023-02-17 16:08:04 +00:00
master_header_pointer.c
memchr.c
memcmp.c
memcpy.c
memmove.c
memrange.c allocator_v4: Introduce RESOURCE_ALLOCATION_TOP_DOWN 2022-09-04 16:35:22 +00:00
memset.c
metadata_hash.c
nhlt.c lib/nhlt, soc/intel/skl: Update NHLT to program feedback config 2022-12-21 13:57:48 +00:00
primitive_memtest.c
prog_loaders.c lib/prog_loaders.c: Clean up includes 2022-10-06 18:13:30 +00:00
prog_ops.c lib/prog_ops.c: Add <types.h> 2022-10-06 18:13:19 +00:00
program.ld arch/x86: Only use .bss from car.ld when running XIP 2022-10-20 14:43:40 +00:00
ramdetect.c
ramtest.c lib/ramtest.c: Use {read,write}32p() 2022-12-10 00:01:05 +00:00
reg_script.c
region_file.c
reset.c
rmodule.c payloads,src: Replace ALIGN(x, a) by ALIGN_UP(x, a) for clarity 2022-10-13 19:14:57 +00:00
rmodule.ld
romstage_handoff.c
rtc.c
selfboot.c /: Remove extra space after comma 2022-11-30 03:07:23 +00:00
spd_bin.c lib: Add LPDDR5x DRAM type 2022-11-07 02:29:23 +00:00
spd_cache.c
stack.c
string.c
thread.c timer: Change timer util functions to 64-bit 2022-09-14 11:55:39 +00:00
timer.c
timer_queue.c lib/timer_queue.c: Fix function signature 2022-09-23 17:34:30 +00:00
timestamp.c
ubsan.c
uuid.c
version.c
wrdd.c
xxhash.c lib/xxhash.c: Add new hash functions 2022-09-07 22:24:51 +00:00