Skip to content

Commit

Permalink
Merge pull request #247 from RossBrunton/sizeincrease
Browse files Browse the repository at this point in the history
Increase main memory size limit in memory map
  • Loading branch information
RossBrunton authored Dec 6, 2023
2 parents f8ff552 + 94fbd3c commit d0f09c8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/refsi/hal_refsi/include/device/program.lds
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 3 additions & 1 deletion examples/refsi/hal_refsi/source/refsi_hal_g1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 3 additions & 1 deletion examples/refsi/hal_refsi/source/refsi_hal_m1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d0f09c8

Please sign in to comment.