aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--riscv/dts.cc2
-rw-r--r--riscv/jtag_dtm.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/riscv/dts.cc b/riscv/dts.cc
index cea33ba..f730293 100644
--- a/riscv/dts.cc
+++ b/riscv/dts.cc
@@ -47,7 +47,7 @@ std::string make_dts(size_t insns_per_rtc_tick, size_t cpu_hz,
" memory@" << m.first << " {\n"
" device_type = \"memory\";\n"
" reg = <0x" << (m.first >> 32) << " 0x" << (m.first & (uint32_t)-1) <<
- " 0x" << (m.second->size() >> 32) << " 0x" << (m.second->size() & (uint32_t)-1) << ">;\n"
+ " 0x" << (m.second->size() >> 16 >> 16) << " 0x" << (m.second->size() & (uint32_t)-1) << ">;\n"
" };\n";
}
s << " soc {\n"
diff --git a/riscv/jtag_dtm.cc b/riscv/jtag_dtm.cc
index 3e44c5e..576e495 100644
--- a/riscv/jtag_dtm.cc
+++ b/riscv/jtag_dtm.cc
@@ -25,8 +25,8 @@ enum {
#define DTMCONTROL_DBUSRESET (1<<16)
#define DMI_OP 3
-#define DMI_DATA (0xffffffffL<<2)
-#define DMI_ADDRESS ((1L<<(abits+34)) - (1L<<34))
+#define DMI_DATA (0xffffffffLL<<2)
+#define DMI_ADDRESS ((1LL<<(abits+34)) - (1LL<<34))
#define DMI_OP_STATUS_SUCCESS 0
#define DMI_OP_STATUS_RESERVED 1