aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2016-05-21 21:22:22 -0700
committerTim Newsome <tim@sifive.com>2016-05-23 12:12:13 -0700
commit6478085c7b04fe15435e520d0ed8888a650c643b (patch)
tree4f155cfa0f298cee2789b6026d91e281f1f86f5c /tests
parentfd6c5e5347b532be385fa260a77ebe94f6a6e7ab (diff)
downloadspike-6478085c7b04fe15435e520d0ed8888a650c643b.zip
spike-6478085c7b04fe15435e520d0ed8888a650c643b.tar.gz
spike-6478085c7b04fe15435e520d0ed8888a650c643b.tar.bz2
Link standalone programs at 0x80010000.
This leaves some memory for pk, where it keeps tohost/fromhost which we cannot just write to.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/gdbserver.py4
-rw-r--r--tests/standalone.lds4
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/gdbserver.py b/tests/gdbserver.py
index 0cdd060..7edae58 100755
--- a/tests/gdbserver.py
+++ b/tests/gdbserver.py
@@ -166,8 +166,8 @@ class DownloadTest(unittest.TestCase):
fd.write("uint32_t length = %d;\n" % length)
fd.write("uint8_t d[%d] = {\n" % length)
self.crc = 0
- for _ in range(length / 16):
- fd.write(" ");
+ for i in range(length / 16):
+ fd.write(" /* 0x%04x */ " % (i * 16));
for _ in range(16):
value = random.randrange(1<<8)
fd.write("%d, " % value)
diff --git a/tests/standalone.lds b/tests/standalone.lds
index 9b1bab1..330fa16 100644
--- a/tests/standalone.lds
+++ b/tests/standalone.lds
@@ -10,7 +10,9 @@ SECTIONS
/*--------------------------------------------------------------------*/
/* Begining of code and text segment */
- . = 0x80000000;
+ /* Leave some space for pk's data structures, which includes tohost/fromhost
+ * which are special addresses we ought to leave alone. */
+ . = 0x80010000;
_ftext = .;
PROVIDE( eprol = . );