diff options
author | Sandra Loosemore <sandra@codesourcery.com> | 2019-04-03 13:53:05 -0600 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-04-29 16:09:51 +0100 |
commit | 413a99a92c13ec408dcf2adaa87918dc81e890c8 (patch) | |
tree | 464dba82fd644eea860bd991c4c1dc9f15b1a15a /target/nios2/cpu.h | |
parent | ed960ba90549aca1735df128c6b454fe0a5dec2a (diff) | |
download | qemu-413a99a92c13ec408dcf2adaa87918dc81e890c8.zip qemu-413a99a92c13ec408dcf2adaa87918dc81e890c8.tar.gz qemu-413a99a92c13ec408dcf2adaa87918dc81e890c8.tar.bz2 |
Add Nios II semihosting support.
This patch adds support for libgloss semihosting to Nios II bare-metal
emulation. The specification for the protocol can be found in the
libgloss sources.
Signed-off-by: Sandra Loosemore <sandra@codesourcery.com>
Signed-off-by: Julian Brown <julian@codesourcery.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1554321185-2825-3-git-send-email-sandra@codesourcery.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/nios2/cpu.h')
-rw-r--r-- | target/nios2/cpu.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h index 4e8eb7d..881e7d5 100644 --- a/target/nios2/cpu.h +++ b/target/nios2/cpu.h @@ -141,7 +141,7 @@ typedef struct Nios2CPUClass { #define R_PC 64 /* Exceptions */ -#define EXCP_BREAK -1 +#define EXCP_BREAK 0x1000 #define EXCP_RESET 0 #define EXCP_PRESET 1 #define EXCP_IRQ 2 @@ -222,6 +222,8 @@ void nios2_cpu_do_unaligned_access(CPUState *cpu, vaddr addr, qemu_irq *nios2_cpu_pic_init(Nios2CPU *cpu); void nios2_check_interrupts(CPUNios2State *env); +void do_nios2_semihosting(CPUNios2State *env); + #define TARGET_PHYS_ADDR_SPACE_BITS 32 #ifdef CONFIG_USER_ONLY # define TARGET_VIRT_ADDR_SPACE_BITS 31 |