diff options
author | Megan Wachs <megan@sifive.com> | 2017-04-17 21:21:35 -0700 |
---|---|---|
committer | Megan Wachs <megan@sifive.com> | 2017-04-17 21:21:35 -0700 |
commit | 3526283513b12afc57c3430c70190fe1630564e6 (patch) | |
tree | 98d3b5871730d1d22fd843b631203d4a8f3f8c5f /debug_rom | |
parent | 159a8fe6f82102e183b700dcc46eed00ca22b749 (diff) | |
download | riscv-isa-sim-3526283513b12afc57c3430c70190fe1630564e6.zip riscv-isa-sim-3526283513b12afc57c3430c70190fe1630564e6.tar.gz riscv-isa-sim-3526283513b12afc57c3430c70190fe1630564e6.tar.bz2 |
debug: move the debug_rom defines to a seperate file
Diffstat (limited to 'debug_rom')
-rw-r--r-- | debug_rom/Makefile | 7 | ||||
-rw-r--r-- | debug_rom/debug_rom_defines.h | 13 |
2 files changed, 15 insertions, 5 deletions
diff --git a/debug_rom/Makefile b/debug_rom/Makefile index 825aed8..4e9093c 100644 --- a/debug_rom/Makefile +++ b/debug_rom/Makefile @@ -7,12 +7,9 @@ OBJCOPY = $(RISCV)/bin/riscv64-unknown-elf-objcopy COMPILE = $(CC) -nostdlib -nostartfiles -I.. -Tlink.ld ELFS = debug_rom -DEPS = debug_rom.S link.ld +DEPS = debug_rom.S link.ld debug_rom_defines.h -all: $(patsubst %,%.h,$(ELFS)) $(patsubst %,%_defines.h,$(ELFS)) - -%_defines.h: %.S - grep define $^ > $@ +all: $(patsubst %,%.h,$(ELFS)) %.h: %.raw xxd -i $^ | sed "s/^unsigned/static const unsigned/" > $@ diff --git a/debug_rom/debug_rom_defines.h b/debug_rom/debug_rom_defines.h index 070d26d..074107c 100644 --- a/debug_rom/debug_rom_defines.h +++ b/debug_rom/debug_rom_defines.h @@ -1,9 +1,22 @@ +// See LICENSE file for license details. + +#ifndef DEBUG_ROM_DEFINES_H +#define DEBUG_ROM_DEFINES_H + +// These are implementation-specific addresses in the Debug Module #define DEBUG_ROM_HALTED 0x100 #define DEBUG_ROM_GOING 0x104 #define DEBUG_ROM_RESUMING 0x108 #define DEBUG_ROM_EXCEPTION 0x10C + +// Region of memory where each hart has 1 +// byte to read. #define DEBUG_ROM_FLAGS 0x400 #define DEBUG_ROM_FLAG_GO 0 #define DEBUG_ROM_FLAG_RESUME 1 + +// These needs to match the link.ld #define DEBUG_ROM_WHERETO 0x300 #define DEBUG_ROM_ENTRY 0x800 + +#endif |