diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-02-09 13:02:08 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-02-19 13:01:11 -0800 |
commit | e984b263e07d2a2085e1856921253bc04c09d12c (patch) | |
tree | 12c17057d47e8511b39b90d9d86b57bb99ad4c7f | |
parent | a844b59be2524de7590d71869441f5c5cc4f8d49 (diff) | |
download | pk-e984b263e07d2a2085e1856921253bc04c09d12c.zip pk-e984b263e07d2a2085e1856921253bc04c09d12c.tar.gz pk-e984b263e07d2a2085e1856921253bc04c09d12c.tar.bz2 |
Cap main memory size at 2 GiB for RV32
This works around HTIF limitations and can later be removed.
-rw-r--r-- | pk/minit.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -47,6 +47,9 @@ static void memory_init() if (mem_size == 0) panic("could not determine memory capacity"); + if ((intptr_t)mem_size < 0) + mem_size = INTPTR_MIN; + if (num_harts == 0) panic("could not determine number of harts"); } |