unified VC4 and ARM runtime code (including C++ runtime), updated some minor bits
[rpi-open-firmware.git] / lib / panic.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 Panic routine.
17
18 =============================================================================*/
19
20 #include <lib/runtime.h>
21
22 #if defined(__VIDEOCORE4__)
23 #include <cpu.h>
24 #else
25 #include <chainloader.h>
26 #endif
27
28 #undef panic
29
30 void panic(const char* fmt, ...) {
31 printf("panic(): ");
32
33 va_list arp;
34
35 va_start(arp, fmt);
36 vprintf(fmt, arp);
37 va_end(arp);
38
39 putchar('\n');
40
41 hang_cpu();
42 }
This page took 0.087874 seconds and 4 git commands to generate.