Misc changes
authorAlyssa Rosenzweig <alyssa@backtick.town>
Mon, 15 Aug 2016 23:00:51 +0000 (16:00 -0700)
committerAlyssa Rosenzweig <alyssa@backtick.town>
Mon, 15 Aug 2016 23:00:51 +0000 (16:00 -0700)
arm_chainloader/main.c
arm_loader.c
arm_monitor.c
start.s

index 1a4ae6b..4a8b62a 100644 (file)
@@ -36,7 +36,7 @@ void main() {
        heap_init();\r
 \r
        /* c++ runtime */\r
-       cxx_init();\r
+       //cxx_init();\r
 \r
         /* poke the VPU */\r
         printf("Poking the VPU..\n");\r
index 2d2fa3b..6513956 100644 (file)
@@ -256,7 +256,7 @@ void arm_init() {
         * set the mem size for who knows what reason.\r
         */\r
        ARM_CONTROL0 |= 0x008 | ARM_C0_APROTSYST | ARM_C0_SIZ1G | ARM_C0_FULLPERI;\r
-        ARM_CONTROL1 |= ARM_C1_PERSON | ARM_C1_MAIL;\r
+        ARM_CONTROL1 |= ARM_C1_PERSON;\r
 \r
         ARM_IRQ_ENBL3 |= ARM_IE_MAIL;\r
 \r
index ee6d384..c1b6c1d 100644 (file)
@@ -27,9 +27,13 @@ void monitor_irq() {
 void monitor_start() {\r
        printf("Starting IPC monitor ...\n");\r
 \r
+        /* enable IRQ */\r
+        mmio_write32(0x7E00B9BC, 1);\r
+\r
         for(;;) {\r
             for(unsigned int i = 0; i < 99999; ++i);\r
-            if( (mmio_read32(0x7E00B9B8) & 0x40000000) ) {\r
+\r
+            if( (mmio_read32(0x7E00B9B8) & 0x40000000) == 0) {\r
                 putchar('-');\r
             } else {\r
                 putchar('!');\r
diff --git a/start.s b/start.s
index 2e3e035..464a364 100644 (file)
--- a/start.s
+++ b/start.s
@@ -71,6 +71,23 @@ _start:
        RegExceptionHandler badl2alias, #12
        RegExceptionHandler breakpoint, #13
        RegExceptionHandler unknown, #14
+       RegExceptionHandler unknown, #15
+       RegExceptionHandler unknown, #16
+       RegExceptionHandler unknown, #17
+       RegExceptionHandler unknown, #18
+       RegExceptionHandler unknown, #19
+       RegExceptionHandler unknown, #20
+       RegExceptionHandler unknown, #21
+       RegExceptionHandler unknown, #22
+       RegExceptionHandler unknown, #23
+       RegExceptionHandler unknown, #24
+       RegExceptionHandler unknown, #25
+       RegExceptionHandler unknown, #26
+       RegExceptionHandler unknown, #27
+       RegExceptionHandler unknown, #28
+       RegExceptionHandler unknown, #29
+       RegExceptionHandler unknown, #30
+       RegExceptionHandler unknown, #31
 
        //add r1, r3, #252
         add r1, r3, #128
@@ -91,16 +108,10 @@ L_setup_hw_irq:
        mov r28, #0x1D000 
        mov sp, #0x1C000
 
-       /* set interrupt vector bases */
-       mov r0, #IC0_VADDR
-       st r3, (r0)
-       mov r0, #IC1_VADDR
-       st r3, (r0)
-
         /* unmask ARM interrupts */
         mov r0, #(IC0_BASE + 0x10)
         mov r1, #(IC1_BASE + 0x10)
-        mov r2, 0xFFFFFFFF
+        mov r2, 0x11111111
         mov r3, #(IC0_BASE + 0x10 + 0x20)
 
     unmask_all:
@@ -109,6 +120,14 @@ L_setup_hw_irq:
         add r0, 4
         add r1, 4
         ble r0, r3, unmask_all
+       /* set interrupt vector bases */
+       mov r3, #0x1B000
+       mov r0, #IC0_VADDR
+       st r3, (r0)
+       mov r0, #IC1_VADDR
+       st r3, (r0)
+
 
         /* enable interrupts */
        ei
This page took 0.030164 seconds and 4 git commands to generate.