1/* 2 * Copyright 2020, Data61, CSIRO (ABN 41 687 119 230) 3 * 4 * SPDX-License-Identifier: GPL-2.0-only 5 */ 6 7#include <abort.h> 8#include <elfloader_common.h> 9#include <types.h> 10 11#define DFSR_FS_MASK 0x40f 12#define DFSR_FS_ASYNC_EXT_ABORT 0x406 13#define DFSR_FS_ASYNC_PARITY_ERR 0x408 14 15void check_data_abort_exception(word_t dfsr, UNUSED word_t dfar) 16{ 17 //* Check if the data exception is asynchronous external abort or 18 //* asynchronous parity error on memory access */ 19 word_t fs = dfsr & DFSR_FS_MASK; 20 21 if ((fs == DFSR_FS_ASYNC_EXT_ABORT) || 22 (fs == DFSR_FS_ASYNC_PARITY_ERR)) { 23 return; 24 } 25 abort(); 26} 27 28void valid_exception(void) 29{ 30 31} 32 33void invalid_exception(void) 34{ 35 abort(); 36} 37