summaryrefslogtreecommitdiff
path: root/include/linux/memory
diff options
context:
space:
mode:
authorYidi Lin <yidilin@google.com>2026-07-17 08:41:26 +0000
committerTzung-Bi Shih <tzungbi@kernel.org>2026-07-20 02:52:48 +0000
commite31ecda9e3af675bc05039f0791a34a46c27f253 (patch)
tree0af06eeab8eea989b6a8316853e98942910b1f7f /include/linux/memory
parent65a9b9b2dee899d4033e8aad7425d9288208cadf (diff)
firmware: coreboot: Skip no-map CBMEM entries
On ARM64 platforms, certain reserved memory regions (like those used by pKVM) are marked with the 'no-map' property. This indicates that the host kernel is forbidden from creating a structural mapping for these regions. The coreboot table may describe CBMEM entries that overlap with or are entirely contained within these no-map regions. Attempting to populate these entries as devices and subsequently remapping them can lead to system crashes or security violations. Refine the coreboot table population logic to verify that each CBMEM entry resides in 'Known Good' memory before creating a device. An entry is only considered safe if it is entirely System RAM or entirely standard Reserved memory (tagged with IORES_DESC_RESERVED). This dual-check ensures that: 1. On ARM64, no-map regions are filtered out as they are IORESOURCE_MEM (see request_standard_resources() in arch/arm64/kernel/setup.c). 2. On x86, standard reserved regions (IORES_DESC_RESERVED) remain supported. Signed-off-by: Yidi Lin <yidilin@google.com> Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org> Link: https://lore.kernel.org/r/20260717-coreboot-v2-1-8f8b389e3758@chromium.org Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Diffstat (limited to 'include/linux/memory')
0 files changed, 0 insertions, 0 deletions