From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111018 invoked by alias); 3 Apr 2019 16:03:09 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 110855 invoked by uid 9078); 3 Apr 2019 16:03:09 -0000 Date: Wed, 03 Apr 2019 16:03:00 -0000 Message-ID: <20190403160309.110850.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Add a dummy interrupt handler to nios2 crt0.s. X-Act-Checkin: newlib-cygwin X-Git-Author: Sandra Loosemore X-Git-Refname: refs/heads/master X-Git-Oldrev: 557227dda3ed6ce1c4cf104cc7671d56a141da38 X-Git-Newrev: c4c614046308a55e4b478c3609f05101c1b8e6b6 X-SW-Source: 2019-q2/txt/msg00000.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=c4c614046308a55e4b478c3609f05101c1b8e6b6 commit c4c614046308a55e4b478c3609f05101c1b8e6b6 Author: Sandra Loosemore Date: Wed Apr 3 09:59:36 2019 -0600 Add a dummy interrupt handler to nios2 crt0.s. The location of the handler at offset 0x20 from the start of memory, immediately after the 32-byte reset vector, matches the expectations of real hardware (e.g., a 3c120 board). Diff: --- libgloss/nios2/crt0.S | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/libgloss/nios2/crt0.S b/libgloss/nios2/crt0.S index 77eacb3..c4dd4c6 100644 --- a/libgloss/nios2/crt0.S +++ b/libgloss/nios2/crt0.S @@ -1,6 +1,6 @@ /* crt0.S -- startup code for Nios II QEMU generic-nommu board emulation. - Copyright (c) 2018 Mentor Graphics + Copyright (c) 2018-2019 Mentor Graphics The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided @@ -81,6 +81,18 @@ __reset: .size __reset, . - __reset +/* Provide a stub interrupt handler that waits in a busy loop. + The alignment puts it at offset 0x20 from the base of RAM. */ + + .align 5 + + .globl __interrupt_handler + .type __interrupt_handler, @function +__interrupt_handler: +0: + br 0b + + .size __interrupt_handler, . - __interrupt_handler /* __start is the ELF entry point. */