[Skiboot] [PATCH] mambo: Add util function for breaking on console output
Michael Ellerman
mpe at ellerman.id.au
Wed Apr 5 11:56:00 AEST 2017
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 at ellerman.id.au>
---
external/mambo/mambo_utils.tcl | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/external/mambo/mambo_utils.tcl b/external/mambo/mambo_utils.tcl
index d8825bc3cefb..6096ab023ea0 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"
}
--
2.7.4
More information about the Skiboot
mailing list