mirror of https://review.coreboot.org/STM.git
Add coreboot CBMEM configuration option
Signed-off-by: Eugene D Myers <cedarhouse@comcast.net>
This commit is contained in:
parent
1a05184b69
commit
5ec2de98a3
|
@ -27,6 +27,11 @@ if("${BUILD}" STREQUAL "release")
|
|||
message("Building with debug messages")
|
||||
endif()
|
||||
|
||||
if("${CBMEM_ENABLE}")
|
||||
add_definitions( -DCONFIG_STM_CBMEM_CONSOLE)
|
||||
message("Building with CBMEM console")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Xlinker -Map=stm.map -Xlinker --noinhibit-exec -Os -falign-functions -ffreestanding -s -pie --entry _ModuleEntryPoint -u _ModuleEntryPoint -nostdlib -n -z common-page-size=0x40 -fno-asynchronous-unwind-tables -fno-jump-tables -fPIC -fno-stack-protector -fno-stack-check -include PcdData.h -T ${PROJECT_SOURCE_DIR}/StmPkg/Core/Stm.lds")
|
||||
|
||||
set(CMAKE_ASM_FLAGS "-include BaseAsm.h -fPIC")
|
||||
|
|
|
@ -81,7 +81,8 @@ DebugPortWrite (
|
|||
char c;
|
||||
SerialPortWriteSingle(*Buffer);
|
||||
c = (char) Buffer[0];
|
||||
coreboot_debug_putc(c);
|
||||
if (cbmem_initialized)
|
||||
coreboot_debug_putc(c);
|
||||
Buffer++;
|
||||
}
|
||||
|
||||
|
@ -125,13 +126,13 @@ DebugPrint (
|
|||
serial_initialized = 1;
|
||||
SerialPortInitialize();
|
||||
}
|
||||
|
||||
#if CONFIG_STM_CBMEM_CONSOLE == 1
|
||||
if(cbmem_initialized == 0)
|
||||
{
|
||||
init_cbcons();
|
||||
cbmem_initialized = 1;
|
||||
init_cbcons();
|
||||
cbmem_initialized = 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
//
|
||||
// Check driver debug mask value and global mask
|
||||
//
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
|
||||
#define CONFIG_DEBUG_COREBOOT 1
|
||||
|
||||
/****************************************************************
|
||||
* Memory map
|
||||
****************************************************************/
|
||||
|
@ -152,7 +150,7 @@ fail:
|
|||
|
||||
void coreboot_debug_putc(char c)
|
||||
{
|
||||
if (!CONFIG_DEBUG_COREBOOT)
|
||||
#ifdef CONFIG_STM_CBMEM_CONSOLE
|
||||
return;
|
||||
if (!cbcon)
|
||||
return;
|
||||
|
@ -169,5 +167,6 @@ void coreboot_debug_putc(char c)
|
|||
flags |= CBMC_OVERFLOW;
|
||||
}
|
||||
cbcon->cursor = flags | cursor;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue