vbox4/5: remove printf

This commit is contained in:
Alexander Boettcher 2017-03-28 21:28:02 +02:00 committed by Christian Helmuth
parent 7df58930e2
commit b7da62cd55
4 changed files with 37 additions and 3 deletions

View File

@ -45,6 +45,40 @@ namespace Vmm {
*(Utcb_backup *)Thread::myself()->utcb() = utcb_backup; *(Utcb_backup *)Thread::myself()->utcb() = utcb_backup;
} }
template <typename... ARGS>
void warning(ARGS... args)
{
struct Utcb_backup { char buf[Nova::Utcb::size()]; };
static Lock lock;
static Utcb_backup utcb_backup;
Lock::Guard guard(lock);
utcb_backup = *(Utcb_backup *)Thread::myself()->utcb();
Genode::warning("VMM: ", args...);
*(Utcb_backup *)Thread::myself()->utcb() = utcb_backup;
}
template <typename... ARGS>
void error(ARGS... args)
{
struct Utcb_backup { char buf[Nova::Utcb::size()]; };
static Lock lock;
static Utcb_backup utcb_backup;
Lock::Guard guard(lock);
utcb_backup = *(Utcb_backup *)Thread::myself()->utcb();
Genode::error("VMM: ", args...);
*(Utcb_backup *)Thread::myself()->utcb() = utcb_backup;
}
} }
#endif /* _INCLUDE__VMM__PRINTF_H_ */ #endif /* _INCLUDE__VMM__PRINTF_H_ */

View File

@ -17,7 +17,7 @@
/* VMM utility includes */ /* VMM utility includes */
#include <vmm/vcpu_thread.h> #include <vmm/vcpu_thread.h>
#include <vmm/vcpu_dispatcher.h> #include <vmm/vcpu_dispatcher.h>
#include <vmm/printf.h> #include <vmm/log.h>
template <typename T> template <typename T>

View File

@ -24,7 +24,7 @@
#include <vmm/vcpu_thread.h> #include <vmm/vcpu_thread.h>
#include <vmm/vcpu_dispatcher.h> #include <vmm/vcpu_dispatcher.h>
#include <vmm/printf.h> #include <vmm/log.h>
/* NOVA includes that come with Genode */ /* NOVA includes that come with Genode */
#include <nova/syscalls.h> #include <nova/syscalls.h>

View File

@ -24,7 +24,7 @@
#include <vmm/vcpu_thread.h> #include <vmm/vcpu_thread.h>
#include <vmm/vcpu_dispatcher.h> #include <vmm/vcpu_dispatcher.h>
#include <vmm/printf.h> #include <vmm/log.h>
/* NOVA includes that come with Genode */ /* NOVA includes that come with Genode */
#include <nova/syscalls.h> #include <nova/syscalls.h>