Browse Source

riscv: more tweaks to get it to compile

Gets as far as failing to load.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Ronald G. Minnich 8 years ago
parent
commit
7b681862d0
2 changed files with 11 additions and 0 deletions
  1. 1 0
      riscv/include/ureg.h
  2. 10 0
      sys/src/9/riscv/dat.h

+ 1 - 0
riscv/include/ureg.h

@@ -44,5 +44,6 @@ struct Ureg {
 	uintptr_t sstatus;
 	uintptr_t sbadaddr;
 	uintptr_t scause;
+	uintptr_t bp; // BOGUS: need a real frame pointer here. 
 };
 

+ 10 - 0
sys/src/9/riscv/dat.h

@@ -36,6 +36,16 @@ typedef uint64_t uintmem;				/* Physical address (hideous) */
 typedef struct Ureg Ureg;
 typedef struct Vctl Vctl;
 
+/*
+ * Conversion for Ureg to gdb reg. This avoids a lot of nonsense
+ * in the outside world. TODO. 
+ */
+enum regnames {
+	GDB_IP,
+};
+#define DBG_MAX_REG_NUM		(0)
+#define GDB_NUMREGBYTES		(0)
+
 #define MAXSYSARG	6	/* for mount(fd, afd, mpt, flag, arg, mntname) */
 
 /*