-Â get rid of ASM_CONSOLE_LOGLEVEL except in two assembler files.
- start naming all versions of post code output "post_code()" Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5344 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
committed by
Stefan Reinauer
parent
84b685af5f
commit
0c781b2694
@ -10,7 +10,7 @@ void console_tx_byte(unsigned char byte);
|
||||
void console_tx_flush(void);
|
||||
unsigned char console_rx_byte(void);
|
||||
int console_tst_byte(void);
|
||||
void post_code(uint8_t value);
|
||||
void post_code(u8 value);
|
||||
void __attribute__ ((noreturn)) die(const char *msg);
|
||||
#if CONFIG_CONSOLE_VGA == 1
|
||||
void vga_console_init(void);
|
||||
@ -31,7 +31,14 @@ extern struct console_driver console_drivers[];
|
||||
extern struct console_driver econsole_drivers[];
|
||||
|
||||
extern int console_loglevel;
|
||||
#endif /* !__PRE_RAM__ */
|
||||
#else
|
||||
/* __PRE_RAM__ */
|
||||
/* Using a global varible can cause problems when we reset the stack
|
||||
* from cache as ram to ram. If we make this a define USE_SHARED_STACK
|
||||
* we could use the same code on all architectures.
|
||||
*/
|
||||
#define console_loglevel CONFIG_DEFAULT_CONSOLE_LOGLEVEL
|
||||
#endif
|
||||
|
||||
#ifndef __ROMCC__
|
||||
int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
|
||||
@ -121,6 +128,8 @@ int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf,
|
||||
#define print_debug_hex32(HEX) printk(BIOS_DEBUG, "%08x", (HEX))
|
||||
#define print_spew_hex32(HEX) printk(BIOS_SPEW, "%08x", (HEX))
|
||||
#else
|
||||
|
||||
|
||||
/* __ROMCC__ */
|
||||
static void __console_tx_byte(unsigned char byte)
|
||||
{
|
||||
@ -139,14 +148,14 @@ static void __console_tx_nibble(unsigned nibble)
|
||||
|
||||
static void __console_tx_char(int loglevel, unsigned char byte)
|
||||
{
|
||||
if (ASM_CONSOLE_LOGLEVEL >= loglevel) {
|
||||
if (console_loglevel >= loglevel) {
|
||||
uart_tx_byte(byte);
|
||||
}
|
||||
}
|
||||
|
||||
static void __console_tx_hex8(int loglevel, unsigned char value)
|
||||
{
|
||||
if (ASM_CONSOLE_LOGLEVEL >= loglevel) {
|
||||
if (console_loglevel >= loglevel) {
|
||||
__console_tx_nibble((value >> 4U) & 0x0fU);
|
||||
__console_tx_nibble(value & 0x0fU);
|
||||
}
|
||||
@ -154,7 +163,7 @@ static void __console_tx_hex8(int loglevel, unsigned char value)
|
||||
|
||||
static void __console_tx_hex16(int loglevel, unsigned short value)
|
||||
{
|
||||
if (ASM_CONSOLE_LOGLEVEL >= loglevel) {
|
||||
if (console_loglevel >= loglevel) {
|
||||
__console_tx_nibble((value >> 12U) & 0x0fU);
|
||||
__console_tx_nibble((value >> 8U) & 0x0fU);
|
||||
__console_tx_nibble((value >> 4U) & 0x0fU);
|
||||
@ -164,7 +173,7 @@ static void __console_tx_hex16(int loglevel, unsigned short value)
|
||||
|
||||
static void __console_tx_hex32(int loglevel, unsigned int value)
|
||||
{
|
||||
if (ASM_CONSOLE_LOGLEVEL >= loglevel) {
|
||||
if (console_loglevel >= loglevel) {
|
||||
__console_tx_nibble((value >> 28U) & 0x0fU);
|
||||
__console_tx_nibble((value >> 24U) & 0x0fU);
|
||||
__console_tx_nibble((value >> 20U) & 0x0fU);
|
||||
@ -178,7 +187,7 @@ static void __console_tx_hex32(int loglevel, unsigned int value)
|
||||
|
||||
static void __console_tx_string(int loglevel, const char *str)
|
||||
{
|
||||
if (ASM_CONSOLE_LOGLEVEL >= loglevel) {
|
||||
if (console_loglevel >= loglevel) {
|
||||
unsigned char ch;
|
||||
while((ch = *str++) != '\0') {
|
||||
if (ch == '\n')
|
||||
|
@ -2,11 +2,6 @@
|
||||
#define LOGLEVEL_H
|
||||
|
||||
/* Safe for inclusion in assembly */
|
||||
|
||||
#ifndef ASM_CONSOLE_LOGLEVEL
|
||||
#define ASM_CONSOLE_LOGLEVEL CONFIG_MAXIMUM_CONSOLE_LOGLEVEL
|
||||
#endif
|
||||
|
||||
#define BIOS_EMERG 0 /* system is unusable */
|
||||
#define BIOS_ALERT 1 /* action must be taken immediately */
|
||||
#define BIOS_CRIT 2 /* critical conditions */
|
||||
|
Reference in New Issue
Block a user