mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-23 06:54:14 -04:00
6475196f0f
* os symbols
* various variables
* more variables
* more cleanup
* yeet HW_REG
* OS_PHYSICAL_TO_K0 and other cleanups
* Rename r4300.h
* migrate pimgr data and cleanup on initialize.c
* rename osFlash symbols
* cleanup gu
* vimodes
* yeet rmon, do libc files
* some os files
* hardwareinterrupt
* cleanup a lot of os files
* cleanup osVirtualToPhysical
* various io files
* another io chunk
* final io chunk
* yeet hardware.h
* yeet PHYSICAL_TO_VIRTUAL and VIRTUAL_TO_PHYSICAL
* fix typo
* fix merge
* remove global.h from libultra files
* fixes and format
* brief explanation
* review
* review
* review
* review
* SEGMENTED_TO_K0
* Revert "SEGMENTED_TO_K0"
This reverts commit f8d62d670f.
* take two
* bss
* bss
50 lines
1.3 KiB
C
50 lines
1.3 KiB
C
#ifndef PR_OS_EXCEPTION_H
|
|
#define PR_OS_EXCEPTION_H
|
|
|
|
#include "ultratypes.h"
|
|
|
|
|
|
typedef u32 OSIntMask;
|
|
typedef u32 OSHWIntr;
|
|
|
|
/* Flags for debugging purpose */
|
|
|
|
#define OS_FLAG_CPU_BREAK 1 /* Break exception has occurred */
|
|
#define OS_FLAG_FAULT 2 /* CPU fault has occurred */
|
|
|
|
/* Interrupt masks */
|
|
|
|
#define OS_IM_NONE 0x00000001
|
|
#define OS_IM_RCP 0x00000401
|
|
#define OS_IM_SW1 0x00000501
|
|
#define OS_IM_SW2 0x00000601
|
|
#define OS_IM_CART 0x00000c01
|
|
#define OS_IM_PRENMI 0x00001401
|
|
#define OS_IM_RDBWRITE 0x00002401
|
|
#define OS_IM_RDBREAD 0x00004401
|
|
#define OS_IM_COUNTER 0x00008401
|
|
#define OS_IM_CPU 0x0000FF01
|
|
#define OS_IM_SP 0x00010401
|
|
#define OS_IM_SI 0x00020401
|
|
#define OS_IM_AI 0x00040401
|
|
#define OS_IM_VI 0x00080401
|
|
#define OS_IM_PI 0x00100401
|
|
#define OS_IM_DP 0x00200401
|
|
#define OS_IM_ALL 0x003FFF01
|
|
#define RCP_IMASK 0x003F0000
|
|
#define RCP_IMASKSHIFT 16
|
|
|
|
|
|
OSIntMask osGetIntMask(void);
|
|
OSIntMask osSetIntMask(OSIntMask im);
|
|
|
|
|
|
// Internal
|
|
void __osSetHWIntrRoutine(OSHWIntr interrupt, s32 (*handler)(void), void* stackEnd);
|
|
void __osGetHWIntrRoutine(OSHWIntr interrupt, s32 (**handler)(void), void** stackEnd);
|
|
void __osSetGlobalIntMask(OSHWIntr mask);
|
|
void __osResetGlobalIntMask(OSHWIntr mask);
|
|
|
|
|
|
#endif
|