diff options
author | Palmer Dabbelt <palmer@sifive.com> | 2018-04-02 20:43:14 -0700 |
---|---|---|
committer | Palmer Dabbelt <palmer@sifive.com> | 2018-04-02 20:43:14 -0700 |
commit | 7a8e7da42250138adf202ba2596ef7f68651060a (patch) | |
tree | 4b736dff3d2bd1b04fe7d6b1683350e6cc5f2df7 /arch/riscv/Kconfig | |
parent | 2c9046b71bb6ce2386e8847fce92b18aca9127c4 (diff) | |
parent | e21d54219c7a698b10d5f1e6a1023ebde284cd7b (diff) |
RISC-V: Fixes to module loading
This cleans up the module support that was commited earlier to work with
what's actually emitted from our GCC port as it lands upstream. Most of
the work here is adding new relocations to the kernel.
There's some limitations on module loading imposed by the kernel:
* The kernel doesn't support linker relaxation, which is necessary to
support R_RISCV_ALIGN. In order to get reliable module building
you're going to need to a GCC that supports the new '-mno-relax',
which IIRC isn't going to be out until 8.1.0. It's somewhat unlikely
that R_RISCV_ALIGN will appear in a module even without '-mno-relax'
support, so issues shouldn't be common.
* There is no large code model for RISC-V, which means modules must be
loaded within a 32-bit signed offset of the kernel. We don't
currently have any mechanism for ensuring this memory remains free or
moving pages around, so issues here might be common.
I fixed a singcle merge conflict in arch/riscv/kernel/Makefile.
Diffstat (limited to 'arch/riscv/Kconfig')
-rw-r--r-- | arch/riscv/Kconfig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 61dd82709898..1df6e264edd3 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -134,6 +134,10 @@ choice bool "medium any code model" endchoice +config MODULE_SECTIONS + bool + select HAVE_MOD_ARCH_SPECIFIC + choice prompt "Maximum Physical Memory" default MAXPHYSMEM_2GB if 32BIT @@ -144,6 +148,7 @@ choice bool "2GiB" config MAXPHYSMEM_128GB depends on 64BIT && CMODEL_MEDANY + select MODULE_SECTIONS if MODULES bool "128GiB" endchoice |