misc cleanup
[rpi-open-firmware.git] / arm_monitor.c
1 /*=============================================================================
2 Copyright (C) 2016-2017 Authors of rpi-open-firmware
3 All rights reserved.
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 FILE DESCRIPTION
16 First stage monitor.
17
18 =============================================================================*/
19
20 #include <lib/runtime.h>
21 #include "hardware.h"
22
23 /*
24 * called from sleh_irq (trap.c)
25 */
26 void arm_monitor_interrupt() {
27 printf("VPU MBOX rcv: 0x%X, cnf 0x%X\n",
28 ARM_1_MAIL1_RD,
29 ARM_1_MAIL1_CNF);
30 }
31
32 void monitor_start() {
33 printf("Starting IPC monitor ...\n");
34
35 /* enable IRQ */
36 ARM_1_MAIL1_CNF = ARM_MC_IHAVEDATAIRQEN;
37
38 for(;;) {
39 __asm__ __volatile__ ("sleep" :::);
40 printf("sleep interrupted!\n");
41 }
42 }
This page took 0.076833 seconds and 4 git commands to generate.