Hack on the loader
[rpi-open-firmware.git] / arm_monitor.c
index f9f67b7..7b1a22f 100644 (file)
@@ -20,26 +20,26 @@ First stage monitor.
 #include <common.h>\r
 #include "hardware.h"\r
 \r
-void monitor_irq() {\r
-\r
+/*\r
+ * called from sleh_irq (trap.c)\r
+ */\r
+void arm_monitor_interrupt() {\r
+       printf("VPU MBOX rcv: 0x%X, cnf 0x%X\n",\r
+               ARM_1_MAIL1_RD,\r
+               ARM_1_MAIL1_CNF);\r
 }\r
 \r
 void monitor_start() {\r
        printf("Starting IPC monitor ...\n");\r
 \r
        /* dump status */\r
-       printf("Status --- %X\n", mmio_read32(0x7E00B9B8));\r
+       printf("Mailbox status: 0x%X\n", ARM_1_MAIL1_STA);\r
 \r
        /* enable IRQ */\r
-       mmio_write32(0x7E00B9BC, 0x1);\r
+       ARM_1_MAIL1_CNF = ARM_MC_IHAVEDATAIRQEN;\r
 \r
        for(;;) {\r
-               if(mmio_read32(0x7E00B9B8) != 0x40000000) {\r
-                       printf("Squeal!\n");\r
-               }\r
+               __asm__ __volatile__ ("sleep" :::);\r
+               printf("sleep interrupted!\n");\r
        }\r
-\r
-       __asm__ __volatile__ ("sleep" :::);\r
-       \r
-       for(;;);\r
 }\r
This page took 0.025277 seconds and 4 git commands to generate.