From 9b0e1659eac8e45a1caa96ed52aada69f9043e8a Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Thu, 8 Dec 2022 14:19:28 +0200 Subject: [PATCH] risc-v/mpfs: Mark the page table section as NOLOAD Otherwise the linker will allocate an output section for it, which actually uses kernel ROM memory for nothing --- boards/risc-v/mpfs/icicle/scripts/kernel-space.ld | 2 +- boards/risc-v/mpfs/icicle/scripts/ld-kernel.script | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/risc-v/mpfs/icicle/scripts/kernel-space.ld b/boards/risc-v/mpfs/icicle/scripts/kernel-space.ld index ae416b79e9..c8bf774180 100644 --- a/boards/risc-v/mpfs/icicle/scripts/kernel-space.ld +++ b/boards/risc-v/mpfs/icicle/scripts/kernel-space.ld @@ -90,7 +90,7 @@ SECTIONS } > ksram /* Page tables here, align to 4K boundary */ - .pgtables : ALIGN(0x1000) { + .pgtables (NOLOAD) : ALIGN(0x1000) { *(.pgtables) . = ALIGN(32); _ebss = ABSOLUTE(.); diff --git a/boards/risc-v/mpfs/icicle/scripts/ld-kernel.script b/boards/risc-v/mpfs/icicle/scripts/ld-kernel.script index 6a5e718e93..93e67aec0a 100644 --- a/boards/risc-v/mpfs/icicle/scripts/ld-kernel.script +++ b/boards/risc-v/mpfs/icicle/scripts/ld-kernel.script @@ -97,7 +97,7 @@ SECTIONS /* Page tables here, align to 4K boundary */ - .pgtables : ALIGN(0x1000) { + .pgtables (NOLOAD) : ALIGN(0x1000) { *(.pgtables) . = ALIGN(4); } > ksram