diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2017-04-05 11:56:00 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-04-07 14:10:32 +1000 |
commit | 8c9b25349d69dec31062e93b831c676b68a7a7a5 (patch) | |
tree | 81249e8a33b6843e462c34d5d5557646fca3ab75 | |
parent | 1a7bd4bf2f9841d26b865eba2eb45316112b2cf8 (diff) | |
download | skiboot-8c9b25349d69dec31062e93b831c676b68a7a7a5.zip skiboot-8c9b25349d69dec31062e93b831c676b68a7a7a5.tar.gz skiboot-8c9b25349d69dec31062e93b831c676b68a7a7a5.tar.bz2 |
mambo: Add util function for breaking on console output
Mambo can execute a trigger when certain output appears on the console.
You can run any tcl function when the trigger fires, but the simplest
thing to use it for is stopping the simulation.
Add a helper to do that, break_on_console(), and a matching function to
clear the trigger, clear_console_break().
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | external/mambo/mambo_utils.tcl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/external/mambo/mambo_utils.tcl b/external/mambo/mambo_utils.tcl index d8825bc..6096ab0 100644 --- a/external/mambo/mambo_utils.tcl +++ b/external/mambo/mambo_utils.tcl @@ -57,6 +57,20 @@ proc b { addr } { puts "breakpoint set at $at" } +# Run until $console_string appears on the Linux console +# +# eg. +# break_on_console "Freeing unused kernel memory:" +# break_on_console "buildroot login:" + +proc break_on_console { console_string } { + mysim trigger set console "$console_string" "just_stop" +} + +proc clear_console_break { console_string } { + mysim trigger clear console "$console_string" +} + proc wr { start stop } { mysim trigger set memory system w $start $stop 0 "just_stop" } |