ab5149e1fc61b9ad3c3cd4cab9cdcc4f659b75e4
[rpi-open-firmware.git] / arm_monitor.c
1 /*=============================================================================
2 Copyright (C) 2016 Kristina Brooks
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 <common.h>
21 #include "hardware.h"
22
23 void monitor_irq() {
24
25 }
26
27 void monitor_start() {
28 printf("Starting IPC monitor ...\n");
29
30 /* dump status */
31 printf("Status --- %X\n", mmio_read32(0x7E00B9B8));
32
33 /* enable IRQ */
34 mmio_write32(0x7E00B9BC, 0x1);
35
36 for(;;) {
37 if(mmio_read32(0x7E00B9B8) != 0x40000000) {
38 printf("Squeal!\n");
39 }
40 }
41
42 __asm__ __volatile__ ("sleep" :::);
43 for(;;);
44 }
This page took 0.087985 seconds and 3 git commands to generate.