aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-01-20 14:57:57 -0700
committerChristian Cunningham <cc@localhost>2022-01-20 14:57:57 -0700
commita9171b3f7499dfff1f40bf3503fdf13a20487b68 (patch)
tree1be5d31f8d2a2c0b787ebdd64b2f600f0fae1bbe /src/util
parent7e501bd9e881b9d3b9dadc483218dd877b0bb25d (diff)
Read Paging Register
Diffstat (limited to 'src/util')
-rw-r--r--src/util/status.c15
-rw-r--r--src/util/time.c5
2 files changed, 18 insertions, 2 deletions
diff --git a/src/util/status.c b/src/util/status.c
index ac801d1..dd2b899 100644
--- a/src/util/status.c
+++ b/src/util/status.c
@@ -124,12 +124,14 @@ void status(void)
write_cchar(&g_Drawer, '!', 0xFF00FF);
}
+
g_Drawer.x = 0;
g_Drawer.y = 9;
+ write_string(&g_Drawer, "SVC IRQ FIQ User/SYS\n");
for(int i = 0; i < 128; i++)
write_char(&g_Drawer, ' ');
g_Drawer.x = 0;
- g_Drawer.y = 9;
+ g_Drawer.y = 10;
unsigned long sp = (unsigned long)getsvcstack();
write_hex32(&g_Drawer, sp);
@@ -143,14 +145,23 @@ void status(void)
sp = (unsigned long)getsysstack();
write_hex32(&g_Drawer, sp);
write_char(&g_Drawer, '\n');
+ /* WRITE Stack Values
for(unsigned long i = 1; i <= 14; i++) {
- write_hex32(&g_Drawer, *(unsigned long*)(0x4000 - i*4));
+ write_hex32(&g_Drawer, *(unsigned long*)(0x2000 - i*4));
if(i % 6 == 0) {
write_char(&g_Drawer, '\n');
} else {
write_char(&g_Drawer, ' ');
}
}
+ write_char(&g_Drawer, '\n');
+ */
+ unsigned long coren;
+ asm volatile (
+ "mrc p15, #0, %0, c0, c0, #5\n"
+ "and %0, %0, #3" : "=r"(coren) :: "cc");
+ write_string(&g_Drawer, "Status Updated by Core #");
+ write_10(&g_Drawer, coren);
g_Drawer.x = x;
g_Drawer.y = y;
diff --git a/src/util/time.c b/src/util/time.c
index 035ff82..a0c539b 100644
--- a/src/util/time.c
+++ b/src/util/time.c
@@ -1,6 +1,11 @@
#include <symbols.h>
#include <sys/core.h>
+void routing_core0cntv_to_core0fiq(void)
+{
+ store32(0x80, CORE0_TIMER_IRQCNTL);
+}
+
void routing_core0cntv_to_core0irq(void)
{
store32(0x08, CORE0_TIMER_IRQCNTL);