NanoPayload

stage2/entry.S

80:7d722b8de42e
2015-12-03 Paul Boddie Changed the payload to load at 0x80000000, positioning the vectors at the base of the payload, with the start of the main program at 0x80001000. Changed the boot script to actually work with USB Boot, given possible problems with the provided stage1 payload (and nonsensical xbboot/usbboot behaviour). stage2-non-pic
     1 /*     2  * Interrupt handling support.     3  *     4  * Copyright (C) 2015 Paul Boddie <paul@boddie.org.uk>     5  *     6  * This program is free software: you can redistribute it and/or modify     7  * it under the terms of the GNU General Public License as published by     8  * the Free Software Foundation, either version 3 of the License, or     9  * (at your option) any later version.    10  *    11  * This program is distributed in the hope that it will be useful,    12  * but WITHOUT ANY WARRANTY; without even the implied warranty of    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    14  * GNU General Public License for more details.    15  *    16  * You should have received a copy of the GNU General Public License    17  * along with this program.  If not, see <http://www.gnu.org/licenses/>.    18  */    19     20 .text    21 .extern real_exception_handler    22 .set noreorder    23     24 .section .vectors    25 _tlb_entry:    26 	lui $k0, %hi(real_exception_handler)    27 	ori $k0, $k0, %lo(real_exception_handler)    28 	jr $k0    29 	nop    30     31 .org 0x100    32 _cache_entry:    33 	lui $k0, %hi(real_exception_handler)    34 	ori $k0, $k0, %lo(real_exception_handler)    35 	jr $k0    36 	nop    37     38 .org 0x180    39 _exc_entry:    40 	lui $k0, %hi(real_exception_handler)    41 	ori $k0, $k0, %lo(real_exception_handler)    42 	jr $k0    43 	nop    44     45 .org 0x200    46 _irq_entry:    47 	lui $k0, %hi(real_exception_handler)    48 	ori $k0, $k0, %lo(real_exception_handler)    49 	jr $k0    50 	nop    51     52 .set reorder