xref: /OK3568_Linux_fs/kernel/arch/x86/boot/compressed/error.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun // SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Callers outside of misc.c need access to the error reporting routines,
4*4882a593Smuzhiyun  * but the *_putstr() functions need to stay in misc.c because of how
5*4882a593Smuzhiyun  * memcpy() and memmove() are defined for the compressed boot environment.
6*4882a593Smuzhiyun  */
7*4882a593Smuzhiyun #include "misc.h"
8*4882a593Smuzhiyun #include "error.h"
9*4882a593Smuzhiyun 
warn(char * m)10*4882a593Smuzhiyun void warn(char *m)
11*4882a593Smuzhiyun {
12*4882a593Smuzhiyun 	error_putstr("\n\n");
13*4882a593Smuzhiyun 	error_putstr(m);
14*4882a593Smuzhiyun 	error_putstr("\n\n");
15*4882a593Smuzhiyun }
16*4882a593Smuzhiyun 
error(char * m)17*4882a593Smuzhiyun void error(char *m)
18*4882a593Smuzhiyun {
19*4882a593Smuzhiyun 	warn(m);
20*4882a593Smuzhiyun 	error_putstr(" -- System halted");
21*4882a593Smuzhiyun 
22*4882a593Smuzhiyun 	while (1)
23*4882a593Smuzhiyun 		asm("hlt");
24*4882a593Smuzhiyun }
25