aboutsummaryrefslogtreecommitdiff
path: root/src/util/status.c
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-01-06 15:51:48 -0800
committerChristian Cunningham <cc@localhost>2022-01-06 15:51:48 -0800
commita61201b8047ebe278cfb281723a4bf6c82556472 (patch)
treef3b2d5b4a9e537fa8f370b00d0c4d4b637223303 /src/util/status.c
parenta826a645a67c2be3c7acb097c436c810da728ed7 (diff)
Scheduling
Diffstat (limited to 'src/util/status.c')
-rw-r--r--src/util/status.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/util/status.c b/src/util/status.c
index f59ede6..be19287 100644
--- a/src/util/status.c
+++ b/src/util/status.c
@@ -1,3 +1,4 @@
+#include <cpu.h>
#include <graphics/drawer.h>
#include <graphics/lfb.h>
#include <symbols.h>
@@ -129,19 +130,24 @@ void status(void)
write_char(&g_Drawer, ' ');
g_Drawer.x = 0;
g_Drawer.y = 9;
- /*
- struct Q* q = scheduler.tasks->next;
- while (q != 0) {
- struct Task* t = q->data;
- write_hex32(&g_Drawer, (unsigned long)t->task);
- write_char(&g_Drawer, ' ');
- q = q->next;
- }
- write_char(&g_Drawer, '\n');
- */
- unsigned long sp = (unsigned long)getsp();
+ unsigned long sp = (unsigned long)getsvcstack();
+ write_hex32(&g_Drawer, sp);
+ write_char(&g_Drawer, ' ');
+ sp = (unsigned long)getirqstack();
write_hex32(&g_Drawer, sp);
+ write_char(&g_Drawer, ' ');
+ sp = (unsigned long)getfiqstack();
+ write_hex32(&g_Drawer, sp);
+ write_char(&g_Drawer, '\n');
+ for(unsigned long i = 1; i <= 14; i++) {
+ write_hex32(&g_Drawer, *(unsigned long*)(0x4000 - i*4));
+ if(i % 6 == 0) {
+ write_char(&g_Drawer, '\n');
+ } else {
+ write_char(&g_Drawer, ' ');
+ }
+ }
g_Drawer.x = x;
g_Drawer.y = y;