From 7b22a724421276e3cd6d77812c0b17767d6d4b75 Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Fri, 4 Jun 2021 15:09:17 +0900 Subject: [PATCH] hv.py: Add reboot() command to reboot the system and exit Signed-off-by: Hector Martin --- proxyclient/hv.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/proxyclient/hv.py b/proxyclient/hv.py index 531fced1..f925db00 100644 --- a/proxyclient/hv.py +++ b/proxyclient/hv.py @@ -459,6 +459,11 @@ class HV: def exit(self): raise shell.ExitConsole(EXC_RET.EXIT_GUEST) + def reboot(self): + print("Hard rebooting the system") + self.p.reboot() + sys.exit(0) + def hvc(self, arg): assert 0 <= arg <= 0xffff return 0xd4000002 | (arg << 5)