diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-07-31 14:30:04 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-08-08 16:07:26 +1000 |
commit | 68218760dc200b268487d005da8b0567d405e3c1 (patch) | |
tree | dfc327f6561da1e9e78b07b08ba9c03eedda2c7d /include | |
parent | 451e6a755e58e692d1ec8ffb1b1416a0a0c47604 (diff) | |
download | skiboot-68218760dc200b268487d005da8b0567d405e3c1.zip skiboot-68218760dc200b268487d005da8b0567d405e3c1.tar.gz skiboot-68218760dc200b268487d005da8b0567d405e3c1.tar.bz2 |
Make log level thresholds dynamic in debug_descriptor rather than static
This enables (advanced) users to vary what level of output they want
at runtime in the memory console and through console drivers (fsp/uart)
You can vary two things by poking in the debug descriptor:
a) what log level is printed at all
e.g. only turn on PR_TRACE at specific points during runtime
b) what log level goes out the fsp/uart console
defaults to PR_PRINTF
We use two 4bit numbers (1 byte) for this in debug descriptor (saving
some space, not needlessly wasting space that we may want in future).
The default is 0x75 (7=PR_DEBUG to in memory console, 5=PR_PRINTF to drivers)
If you write 0x77 you will get debug info on uart/fsp console as
well as in memory. If you write 0x95 you get PR_INSANE in memory but
still only PR_NOTICE through drivers.
People who write something like 0x1f will get a very quiet boot indeed.
A future patch would be to (when possible) peek at device tree entries
for if we should change the default.
A future patch would add an OPAL API to get/set this.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/skiboot.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/skiboot.h b/include/skiboot.h index 79f85ce..ddc6b4a 100644 --- a/include/skiboot.h +++ b/include/skiboot.h @@ -58,7 +58,11 @@ struct debug_descriptor { u8 eye_catcher[8]; /* "OPALdbug" */ #define DEBUG_DESC_VERSION 1 u32 version; - u32 reserved[3]; + u8 console_log_levels; /* high 4 bits in memory, + * low 4 bits driver (e.g. uart). */ + u8 reserved1; + u16 reserved2; + u32 reserved[2]; /* Memory console */ u64 memcons_phys; |