Misc changes
[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 /* enable IRQ */
31 mmio_write32(0x7E00B9BC, 1);
32
33 for(;;) {
34 for(unsigned int i = 0; i < 99999; ++i);
35
36 if( (mmio_read32(0x7E00B9B8) & 0x40000000) == 0) {
37 putchar('-');
38 } else {
39 putchar('!');
40 }
41 }
42 // __asm__ __volatile__ ("sleep" :::);
43 }
This page took 0.068063 seconds and 4 git commands to generate.