2 -- This file is part of the coreboot project.
4 -- Copyright (C) 2015 secunet Security Networks AG
6 -- This program is free software; you can redistribute it and/or modify
7 -- it under the terms of the GNU General Public License as published by
8 -- the Free Software Foundation; version 2 of the License.
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.
18 use type Interfaces
.C
.int
;
20 package body HW
.Debug_Sink
is
22 Sink_Enabled
: Boolean;
24 procedure console_tx_byte
(chr
: Interfaces
.C
.char
);
25 pragma Import
(C
, console_tx_byte
, "console_tx_byte");
27 procedure Put
(Item
: String) is
30 for Idx
in Item
'Range loop
31 console_tx_byte
(Interfaces
.C
.To_C
(Item
(Idx
)));
36 procedure Put_Char
(Item
: Character) is
39 console_tx_byte
(Interfaces
.C
.To_C
(Item
));
45 Put_Char
(Character'Val (16#
0a#
));
48 ----------------------------------------------------------------------------
50 function console_log_level
51 (msg_level
: Interfaces
.C
.int
)
52 return Interfaces
.C
.int
;
53 pragma Import
(C
, console_log_level
, "console_log_level");
55 Msg_Level_BIOS_DEBUG
: constant := 7;
58 Sink_Enabled
:= console_log_level
(Msg_Level_BIOS_DEBUG
) /= 0;