source: rtems-tools/tools/qemu/0001-openrisc-terminate-qemu-process-upon-receiving-a-hal.patch @ b6b784c

4.104.115
Last change on this file since b6b784c was b6b784c, checked in by Hesham ALMatary <heshamelmatary@…>, on 04/02/15 at 18:16:56

Add QEMU patch for openrisc to recognize halt signals

  • Property mode set to 100644
File size: 943 bytes
  • target-openrisc/translate.c

    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 b static void dec_misc(DisasContext *dc, uint32_t insn) 
    750750        switch (op1) {
    751751        case 0x01:    /* l.nop */
    752752            LOG_DIS("l.nop %d\n", I16);
     753
     754            if(I16 == 0xC) {
     755                exit(0);
     756            }
     757
    753758            break;
    754759
    755760        default:
Note: See TracBrowser for help on using the repository browser.