This commit is contained in:
2025-12-24 17:21:08 +09:00
parent a96323de19
commit 96dc62d8dc
2302 changed files with 455822 additions and 0 deletions

View File

@@ -0,0 +1,102 @@
/*******************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only
* intended for use with Renesas products. No other uses are authorized. This
* software is owned by Renesas Electronics Corporation and is protected under
* all applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software
* and to discontinue the availability of this software. By using this software,
* you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
* Copyright 2018-2023 Renesas Electronics Corporation All rights reserved.
*******************************************************************************/
/*******************************************************************************
* DESCRIPTION : INTC handler function
******************************************************************************/
/******************************************************************************
* @file interrupt.c
* - Version : 0.05
* @brief
* .
*****************************************************************************/
/******************************************************************************
* History : DD.MM.YYYY Version Description
* : 02.08.2022 0.01 First Release
* : 31.10.2022 0.02 License notation change.
* : 15.12.2022 0.03 V4H interrupt support.
* : 27.12.2022 0.04 Change argument of pabort_error.
* : 21.08.2023 0.05 Add support for V4M.
*****************************************************************************/
#include "ip_control.h"
#include "log.h"
#include "gic.h"
#include "swdt.h"
#include "interrupt.h"
#if (RCAR_LSI == RCAR_S4)
void handler_fiq(void)
{
uint32_t intid = GIC_AcknowledgePending();
if (intid == INTC_SPI_SWDT)
{
swdt_exec();
}
else
{
ERROR("Invalid interrupt occurred.(%d)\n",intid);
panic;
}
}
/* End of function handler_fiq(void) */
#elif ((RCAR_LSI == RCAR_V4H) || (RCAR_LSI == RCAR_V4M))
void dabort_error(uint32_t occ_add, uint32_t dfsr, uint32_t dfar)
{
ERROR("Data abort.\n");
ERROR(" Data abort occurrred address : 0x%x\n", occ_add);
ERROR(" DFSR:0x%x DFAR:0x%x\n", dfsr, dfar);
panic;
}
/* End of function dabort_error(uint32_t occ_add, uint32_t dfsr, uint32_t dfare) */
void pabort_error(uint32_t ifsr, uint32_t ifar)
{
ERROR("Prefetch abort.\n");
ERROR(" IFSR:0x%x IFAR:0x%x\n", ifsr, ifar);
panic;
}
/* End of function pabort_error(uint32_t ifsr, uint32_t ifar) */
void Undefined_error(uint32_t occ_add)
{
ERROR("Undefined Instruction.\n");
ERROR(" Undefined Instruction occurrred address : 0x%x\n", occ_add);
panic;
}
/* End of function Undefined_error(uint32_t occ_add) */
#endif /* RCAR_LSI == RCAR_S4 */
void handler_error(uint32_t ex_type)
{
ERROR("Unhandled exception occurred.\n");
ERROR(" Exception type = 0x%x.\n", ex_type);
panic;
}
/* End of function handler_error(uint32_t ex_type) */