diff options
author | Hesham ALMatary <heshamelmatary@gmail.com> | 2015-04-02 13:16:56 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2015-04-03 15:09:23 -0500 |
commit | b6b784c38b8f86867fdb2b535239d2b5751874a5 (patch) | |
tree | b2bd3a8172582a5a131ac78a65fcfb6eea6edacf /tools | |
parent | Update gdb-sim-lm32uart.diff to gdb-7.9 (diff) | |
download | rtems-tools-b6b784c38b8f86867fdb2b535239d2b5751874a5.tar.bz2 |
Add QEMU patch for openrisc to recognize halt signals
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qemu/0001-openrisc-terminate-qemu-process-upon-receiving-a-hal.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/qemu/0001-openrisc-terminate-qemu-process-upon-receiving-a-hal.patch b/tools/qemu/0001-openrisc-terminate-qemu-process-upon-receiving-a-hal.patch new file mode 100644 index 0000000..952443c --- /dev/null +++ b/tools/qemu/0001-openrisc-terminate-qemu-process-upon-receiving-a-hal.patch @@ -0,0 +1,32 @@ +From 851489a73e99e156baee267d6162e31abfaa66a9 Mon Sep 17 00:00:00 2001 +From: Hesham ALMatary <heshamelmatary@gmail.com> +Date: Thu, 2 Apr 2015 17:47:25 +0100 +Subject: [PATCH] openrisc: terminate qemu process upon receiving a halt + signal. + +or1ksim simulator currently handles "l.nop 0xC" instruction as +a halt signal. Do the same for QEMU. + +Signed-off-by: Hesham ALMatary <heshamelmatary@gmail.com> +--- + target-openrisc/translate.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/target-openrisc/translate.c b/target-openrisc/translate.c +index dc76789..5fa8ede 100644 +--- a/target-openrisc/translate.c ++++ b/target-openrisc/translate.c +@@ -750,6 +750,11 @@ static void dec_misc(DisasContext *dc, uint32_t insn) + switch (op1) { + case 0x01: /* l.nop */ + LOG_DIS("l.nop %d\n", I16); ++ ++ if(I16 == 0xC) { ++ exit(0); ++ } ++ + break; + + default: +-- +2.1.0 |