diff options
author | Simon Glass <sjg@chromium.org> | 2015-11-08 23:47:48 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-11-19 20:27:50 -0700 |
commit | 9854a8748c8fdd69784a1fa1c4758c696621c88d (patch) | |
tree | df09215e384695c184221ab9e3f4a295ef15efeb /common/Kconfig | |
parent | b7b65090b29e6bc133c7922f8290c1e2f75b064a (diff) | |
download | talos-obmc-uboot-9854a8748c8fdd69784a1fa1c4758c696621c88d.tar.gz talos-obmc-uboot-9854a8748c8fdd69784a1fa1c4758c696621c88d.zip |
console: Add a console buffer
It is useful to be able to record console output and provide console input
via a buffer. This provides sandbox with the ability to run a command and
check its output. If the console is set to silent then no visible output
is generated.
This also provides a means to fix the problem where tests produce unwanted
output, such as errors or warnings. This can be confusing. We can instead
set the console to silent and record this output. It can be checked later
in the test if required.
It is possible that this may prove useful for non-test situations. For
example the console output may be suppressed for normal operations, but
recorded and stored for access by the OS. That feature is not implemented
at present.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/Kconfig')
-rw-r--r-- | common/Kconfig | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/common/Kconfig b/common/Kconfig index 620d41f9ea..ccf5475bac 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -679,3 +679,31 @@ config CMD_TPM_TEST endmenu endmenu + +config CONSOLE_RECORD + bool "Console recording" + help + This provides a way to record console output (and provide console + input) through cirular buffers. This is mostly useful for testing. + Console output is recorded even when the console is silent. + To enable console recording, call console_record_reset_enable() + from your code. + +config CONSOLE_RECORD_OUT_SIZE + hex "Output buffer size" + depends on CONSOLE_RECORD + default 0x400 if CONSOLE_RECORD + help + Set the size of the console output buffer. When this fills up, no + more data will be recorded until some is removed. The buffer is + allocated immediately after the malloc() region is ready. + +config CONSOLE_RECORD_IN_SIZE + hex "Input buffer size" + depends on CONSOLE_RECORD + default 0x100 if CONSOLE_RECORD + help + Set the size of the console input buffer. When this contains data, + tstc() and getc() will use this in preference to real device input. + The buffer is allocated immediately after the malloc() region is + ready. |