mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-10 04:15:39 -04:00
4df8ccc871
* Reorganize files into libs/{dolphin,JSystem,PowerPC_EABI_Support,revolution,TRK_MINNOW_DOLPHIN}
* Update configure.py and project.py for new libs structure
* Refactor `#include <dolphin/x.h>` -> `<x.h>`
* Remove `__REVOLUTION_SDK__` forwards from dolphin
* Fix dolphin/ references in revolution
* Wrap `#include <dolphin.h>` in `!__REVOLUTION_SDK__`
* Always build TRK against dolphin headers
* Resolve revolution SDK header resolution issues
34 lines
703 B
C
34 lines
703 B
C
#include <dolphin/dolphin.h>
|
|
#include <dolphin/os.h>
|
|
|
|
#include "__os.h"
|
|
|
|
// prototypes
|
|
void __OSSystemCallVectorStart(void);
|
|
void __OSSystemCallVectorEnd(void);
|
|
|
|
#ifdef __GEKKO__
|
|
static asm void SystemCallVector(void) {
|
|
entry __OSSystemCallVectorStart
|
|
nofralloc
|
|
mfspr r9, HID0
|
|
ori r10, r9, 0x8
|
|
mtspr HID0, r10
|
|
isync
|
|
sync
|
|
mtspr HID0, r9
|
|
rfi
|
|
entry __OSSystemCallVectorEnd
|
|
nop
|
|
}
|
|
#endif
|
|
|
|
void __OSInitSystemCall(void) {
|
|
void* addr = (void*)OSPhysicalToCached(0xC00);
|
|
|
|
memcpy(addr, __OSSystemCallVectorStart, (u32)&__OSSystemCallVectorEnd - (u32)&__OSSystemCallVectorStart);
|
|
DCFlushRangeNoSync(addr, 0x100);
|
|
__sync();
|
|
ICInvalidateRange(addr, 0x100);
|
|
}
|