mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 05:32:47 +00:00
- maps a regular ARM-style exception vector table instead of using the bootrom vector redirection features a ton of bugs because I'm missing something, it actually manages to boot fb3DS v1.2 and BAX fine, but fails to boot itself
21 lines
559 B
C
Executable File
21 lines
559 B
C
Executable File
#include <types.h>
|
|
#include <arm.h>
|
|
|
|
#include "arm/gic.h"
|
|
#include "arm/timer.h"
|
|
|
|
#define TIMER_INTERRUPT (0x1E)
|
|
|
|
#define REG_TIMER(c, n) REG_ARM_PMR(0x700 + ((c) * 0x100) + (n), u32)
|
|
#define TIMER_THIS_CPU (-1)
|
|
|
|
#define REG_TIMER_LOAD(c) *REG_TIMER((c), 0x00)
|
|
#define REG_TIMER_COUNT(c) *REG_TIMER((c), 0x04)
|
|
#define REG_TIMER_CNT(c) *REG_TIMER((c), 0x08)
|
|
#define REG_TIMER_IRQ(c) *REG_TIMER((c), 0x0C)
|
|
|
|
#define TIMER_CNT_SCALE(n) ((n) << 8)
|
|
#define TIMER_CNT_INT_EN BIT(2)
|
|
#define TIMER_CNT_RELOAD BIT(1)
|
|
#define TIMER_CNT_ENABLE BIT(0)
|