commit 068a0abdb27168e9a046b3ed588a5e363f36db78
parent 0e1d436f122e363f9d290e5548bd3f453a451cba
Author: Dimitris Papastamos <dimitris.papastamos@arm.com>
Date: Tue, 11 Dec 2018 16:28:09 +0000
Merge "Build skeleton ramfw"
Diffstat:
5 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/include/ramfw.h b/include/ramfw.h
@@ -1,3 +1,6 @@
struct bssmap {
void *text;
};
+
+extern struct bssmap *bss(void);
+#define bss bss()
diff --git a/src/ramfw/Makefile b/src/ramfw/Makefile
@@ -3,6 +3,7 @@ PROJECTDIR=../..
include $(PROJECTDIR)/scripts/rules.mk
OBJS = fs.o \
+ rt.o \
all: builtin.o
diff --git a/src/ramfw/rt.c b/src/ramfw/rt.c
@@ -0,0 +1,28 @@
+#include <setjmp.h>
+
+#include <rcode.h>
+
+void
+halt(void)
+{
+ dohalt();
+}
+
+void
+panic(const char *msg)
+{
+ dopanic();
+}
+
+void
+swtch(struct trapframe *fp)
+{
+ doswtch(fp);
+}
+
+/* TODO: Remove trap() from ramfw */
+void
+trap(struct trapframe *fp)
+{
+ panic("trap");
+}
diff --git a/target/hosted/Makefile b/target/hosted/Makefile
@@ -15,7 +15,7 @@ RAMOBJS = arch.o \
ramtab.o \
$(SRCDIR)/ramfw/builtin.o \
-TARGET = $(BINDIR)/romfw.elf
+TARGET = $(BINDIR)/romfw.elf $(BINDIR)/ramfw.elf
DIRS = crt
all: $(TARGET)
diff --git a/target/native/Makefile b/target/native/Makefile
@@ -20,10 +20,9 @@ RAMOBJS = ram-crt.o \
arch.o \
sysreg.o \
ramtab.o \
- $(DRVDIR)/builtin.o \
$(SRCDIR)/ramfw/builtin.o \
-TARGET = $(BINDIR)/romfw.bin
+TARGET = $(BINDIR)/romfw.bin $(BINDIR)/ramfw.bin
.SUFFIXES: .tst
.elf.tst: