diff --git a/examples/refsi/hal_refsi/external/refsidrv/source/refsidrv/refsi_device_g.cpp b/examples/refsi/hal_refsi/external/refsidrv/source/refsidrv/refsi_device_g.cpp index d07c50e9e..51c805b62 100644 --- a/examples/refsi/hal_refsi/external/refsidrv/source/refsidrv/refsi_device_g.cpp +++ b/examples/refsi/hal_refsi/external/refsidrv/source/refsidrv/refsi_device_g.cpp @@ -27,8 +27,10 @@ // Default memory area for storing kernel ELF binaries. When the RefSi device // does not have dedicated (TCIM) memory for storing kernel exeutables, a memory // window is set up to map this memory area to a reserved area in DMA. +// We have increased the memory size from 1 << 20 to handle kernels larger than +// 1MiB constexpr const uint64_t REFSI_ELF_BASE = 0x10000ull; -constexpr const uint64_t REFSI_ELF_SIZE = (1 << 20) - REFSI_ELF_BASE; +constexpr const uint64_t REFSI_ELF_SIZE = (1 << 27) - REFSI_ELF_BASE; // Memory area for per-hart storage. constexpr const uint64_t G_HART_LOCAL_BASE = 0x20800000; diff --git a/examples/refsi/hal_refsi/include/device/program.lds b/examples/refsi/hal_refsi/include/device/program.lds index 015483b0d..2a0f80b90 100644 --- a/examples/refsi/hal_refsi/include/device/program.lds +++ b/examples/refsi/hal_refsi/include/device/program.lds @@ -19,7 +19,7 @@ OUTPUT_ARCH( "riscv" ) MEMORY { - mainmem : ORIGIN = 0x10000, LENGTH = (1 << 20) + mainmem : ORIGIN = 0x10000, LENGTH = (1 << 27) localmem : ORIGIN = 0x10000000, LENGTH = 0x200000 } diff --git a/examples/refsi/hal_refsi/source/refsi_hal_g1.cpp b/examples/refsi/hal_refsi/source/refsi_hal_g1.cpp index f509e14dd..d1e398d60 100644 --- a/examples/refsi/hal_refsi/source/refsi_hal_g1.cpp +++ b/examples/refsi/hal_refsi/source/refsi_hal_g1.cpp @@ -29,8 +29,10 @@ // Default memory area for storing kernel ELF binaries. When the RefSi device // does not have dedicated (TCIM) memory for storing kernel exeutables, a memory // window is set up to map this memory area to a reserved area in DMA. +// We have increased the memory size from 1 << 20 to handle kernels larger than +// 1MiB constexpr const uint64_t REFSI_ELF_BASE = 0x10000ull; -constexpr const uint64_t REFSI_ELF_SIZE = (1 << 20) - REFSI_ELF_BASE; +constexpr const uint64_t REFSI_ELF_SIZE = (1 << 27) - REFSI_ELF_BASE; constexpr const uint64_t REFSI_MAX_HARTS = 64; diff --git a/examples/refsi/hal_refsi/source/refsi_hal_m1.cpp b/examples/refsi/hal_refsi/source/refsi_hal_m1.cpp index 55c577136..4deabd23c 100644 --- a/examples/refsi/hal_refsi/source/refsi_hal_m1.cpp +++ b/examples/refsi/hal_refsi/source/refsi_hal_m1.cpp @@ -28,8 +28,10 @@ // Default memory area for storing kernel ELF binaries. When the RefSi device // does not have dedicated (TCIM) memory for storing kernel exeutables, a memory // window is set up to map this memory area to a reserved area in DMA. +// We have increased the memory size from 1 << 20 to handle kernels larger than +// 1MiB constexpr const uint64_t REFSI_ELF_BASE = 0x10000ull; -constexpr const uint64_t REFSI_ELF_SIZE = (1 << 20) - REFSI_ELF_BASE; +constexpr const uint64_t REFSI_ELF_SIZE = (1 << 27) - REFSI_ELF_BASE; refsi_m1_hal_device::refsi_m1_hal_device(refsi_device_t device, riscv::hal_device_info_riscv_t *info,