mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-01-04 07:53:34 +01:00
e1aca8d89b
This change introduces exception handlers that default to a fatal error with an on-screen description of the exception and some debugging information. It also adds the dprint() function as a definitely-needed helper and removes bootlog_unmapped() by using the exception handler for the fatal error display. (Also printf() is now required in all gint add-ins; this is sad, but space is not as much of a constraint as debugging.) Finally, the exception handler is used to handle an interrupt which is an exception in practice, the DMA address error. On fx-CG 50, additional DMA-related information is displayed on the screen. This is left out on fx-9860G as there is not enough space.
31 lines
941 B
C
31 lines
941 B
C
//---
|
|
// core:setup - Installing and unloading the library
|
|
//---
|
|
|
|
#ifndef GINT_CORE_SETUP
|
|
#define GINT_CORE_SETUP
|
|
|
|
#include <gint/defs/types.h>
|
|
|
|
/* Prototypes for the library management functions are in <gint/gint.h> */
|
|
|
|
/* gint_setvbr()
|
|
Changes the VBR address and calls the configuration function while
|
|
interrupts are disabled. The configuration function must disable all
|
|
interrupts that the new handlers cannot handle, either by clearing the
|
|
priority registers or by setting the interrupt masks.
|
|
|
|
@vbr New VBR address
|
|
@configure Configuration function
|
|
Returns the previous VBR address. */
|
|
uint32_t gint_setvbr(uint32_t vbr, void (*configure)(void));
|
|
|
|
/* gint_exch_tlbh(): Exception and TLB miss handler */
|
|
void gint_exch_tlbh(void);
|
|
|
|
/* gint_inth_7705(): SH7705 exception handler */
|
|
void gint_inth_7705(void);
|
|
/* gint_inth_7305(): SH7305 exception handler */
|
|
void gint_inth_7305(void);
|
|
|
|
#endif /* GINT_CORE_SETUP */
|