mirror of https://review.coreboot.org/STM.git
Make sure the STM console output does not overwrite the coreboot
console output Signed-off-by: Eugene D Myers <cedarhouse@comcast.net>
This commit is contained in:
parent
a2832e6bdf
commit
d3eea1e5dc
|
@ -126,6 +126,8 @@ find_cb_table(void)
|
|||
return cbh;
|
||||
}
|
||||
|
||||
static UINT32 STM_cursor = 0;
|
||||
|
||||
int init_cbcons(void)
|
||||
{
|
||||
struct cb_header *cbh = find_cb_table();
|
||||
|
@ -137,8 +139,10 @@ int init_cbcons(void)
|
|||
|
||||
if (cbref) {
|
||||
cbcon = (void*)(UINT64)cbref->cbmem_addr;
|
||||
//debug_banner();
|
||||
//dprintf(1, "Found coreboot cbmem console @ %llx\n", cbref->cbmem_addr);
|
||||
|
||||
// set the cursor such that the STM console will not overwrite the
|
||||
// coreboot console output
|
||||
STM_cursor = cbcon->cursor & CBMC_CURSOR_MASK;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -146,8 +150,6 @@ fail:
|
|||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void coreboot_debug_putc(char c)
|
||||
{
|
||||
if (!CONFIG_DEBUG_COREBOOT)
|
||||
|
@ -163,7 +165,7 @@ void coreboot_debug_putc(char c)
|
|||
|
||||
cbcon->body[cursor++] = c;
|
||||
if (cursor >= cbcon->size) {
|
||||
cursor = 0;
|
||||
cursor = STM_cursor;
|
||||
flags |= CBMC_OVERFLOW;
|
||||
}
|
||||
cbcon->cursor = flags | cursor;
|
||||
|
|
Loading…
Reference in New Issue