Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / SLOF / lib / libbootmsg / bootmsg.code
1 /******************************************************************************
2  * Copyright (c) 2004, 2008 IBM Corporation
3  * All rights reserved.
4  * This program and the accompanying materials
5  * are made available under the terms of the BSD License
6  * which accompanies this distribution, and is available at
7  * http://www.opensource.org/licenses/bsd-license.php
8  *
9  * Contributors:
10  *     IBM Corporation - initial implementation
11  *****************************************************************************/
12 #include <libbootmsg.h>
13
14 // : cp ( cp-id -- )
15 PRIM(bootmsg_X2d_cp)
16         int cpid = TOS.n; POP;
17         bootmsg_cp(cpid);
18 MIRP
19
20 // : bootmsg-warning ( cp-id lvl pstr -- )
21 PRIM(bootmsg_X2d_warning)
22         char* str = TOS.a; POP;
23         short lvl = TOS.n; POP;
24         short cpid = TOS.n; POP;
25         bootmsg_warning(cpid, (const char*)str, lvl);
26 MIRP
27
28 // : bootmsg-error ( cp-id pstr -- )
29 PRIM(bootmsg_X2d_error)
30         char* str = TOS.a; POP;
31         short cpid = TOS.n; POP;
32         bootmsg_error(cpid, (const char*)str);
33 MIRP
34
35 // : bootmsg-debugcp ( cp-id lvl pstr -- )
36 PRIM(bootmsg_X2d_debugcp)
37         char* str = TOS.a; POP;
38         short lvl = TOS.n; POP;
39         short cpid = TOS.n; POP;
40         bootmsg_debugcp(cpid, (const char*)str, lvl);
41 MIRP
42
43 // : bootmsg-setlevel ( area lvl -- )
44 PRIM(bootmsg_X2d_setlevel)
45         char lvl = TOS.n; POP;
46         short area = TOS.n; POP;
47         bootmsg_setlevel(area, lvl);
48 MIRP
49
50 // : bootmsg-checklevel ( area lvl -- [true|false] )
51 PRIM(bootmsg_X2d_checklevel)
52         char lvl = TOS.n; POP;
53         short area = TOS.n; POP;
54         PUSH;
55         TOS.n = (bootmsg_checklevel(area, lvl)) ? -1 : 0;
56 MIRP
57
58 // : bootmsg-nvupdate ( -- )
59 PRIM(bootmsg_X2d_nvupdate)
60         bootmsg_nvupdate();
61 MIRP