180 lines
5.4 KiB
Diff
180 lines
5.4 KiB
Diff
commit 3fac0bab167664f7097dd09a5124f107336dd843
|
|
Author: Emery Hemingway <ehmry@posteo.net>
|
|
Date: Sat May 23 01:54:45 2020 +0530
|
|
|
|
virtualbox debugging
|
|
|
|
diff --git a/repos/ports/src/virtualbox5/frontend/fb.h b/repos/ports/src/virtualbox5/frontend/fb.h
|
|
index bf2d65d7c1..ed7adfbe45 100644
|
|
--- a/repos/ports/src/virtualbox5/frontend/fb.h
|
|
+++ b/repos/ports/src/virtualbox5/frontend/fb.h
|
|
@@ -1,3 +1,5 @@
|
|
+#include <base/debug.h>
|
|
+
|
|
/*
|
|
* \brief Virtualbox framebuffer implementation for Genode
|
|
* \author Alexander Boettcher
|
|
@@ -63,6 +65,7 @@ class Genodefb :
|
|
|
|
void _adjust_buffer()
|
|
{
|
|
+ PDBG("request ", _fb_mode, " buffer from nitpicker");
|
|
_nitpicker.buffer(Fb_Genode::Mode(_fb_mode.width(), _fb_mode.height(),
|
|
Fb_Genode::Mode::RGB565), false);
|
|
|
|
@@ -73,10 +76,12 @@ class Genodefb :
|
|
|
|
_nitpicker.enqueue<Command::Geometry>(_view, rect);
|
|
_nitpicker.execute();
|
|
+ PDBG("done");
|
|
}
|
|
|
|
Fb_Genode::Mode _initial_setup()
|
|
{
|
|
+ PDBG();
|
|
typedef Nitpicker::Session::Command Command;
|
|
|
|
_view = _nitpicker.create_view();
|
|
@@ -86,6 +91,7 @@ class Genodefb :
|
|
_nitpicker.enqueue<Command::To_front>(_view, View_handle());
|
|
_nitpicker.execute();
|
|
|
|
+ PDBG(_fb_mode);
|
|
return _fb_mode;
|
|
}
|
|
|
|
@@ -98,6 +104,7 @@ class Genodefb :
|
|
{
|
|
int rc = RTCritSectInit(&_fb_lock);
|
|
Assert(rc == VINF_SUCCESS);
|
|
+ PDBG("VINF_SUCCESS");
|
|
}
|
|
|
|
int w() const { return _fb_mode.width(); }
|
|
diff --git a/repos/ports/src/virtualbox5/frontend/main.cc b/repos/ports/src/virtualbox5/frontend/main.cc
|
|
index ed4b249ac1..d6e6292023 100644
|
|
--- a/repos/ports/src/virtualbox5/frontend/main.cc
|
|
+++ b/repos/ports/src/virtualbox5/frontend/main.cc
|
|
@@ -1,3 +1,5 @@
|
|
+#include <base/debug.h>
|
|
+
|
|
/*
|
|
* \brief Port of VirtualBox to Genode
|
|
* \author Norman Feske
|
|
@@ -117,35 +119,46 @@ HRESULT setupmachine(Genode::Env &env)
|
|
*/
|
|
genode_global_vbox_pointer = virtualbox;
|
|
|
|
+ PDBG("initFromSettings");
|
|
rc = machine->initFromSettings(virtualbox, vm_config, nullptr);
|
|
if (FAILED(rc))
|
|
return rc;
|
|
|
|
+ PDBG("genode_setup_machine");
|
|
rc = genode_setup_machine(machine);
|
|
if (FAILED(rc))
|
|
return rc;
|
|
|
|
+ PDBG("RegisterMachine");
|
|
rc = virtualbox->RegisterMachine(machine);
|
|
if (FAILED(rc))
|
|
return rc;
|
|
|
|
// open a session
|
|
+ PDBG("open a session");
|
|
static ComObjPtr<Session> session;
|
|
rc = session.createObject();
|
|
- if (FAILED(rc))
|
|
+ if (FAILED(rc)) {
|
|
+ Genode::error("session.createObject FAILED");
|
|
return rc;
|
|
+ }
|
|
|
|
+ PDBG("LockMachine");
|
|
rc = machine->LockMachine(session, LockType_VM);
|
|
- if (FAILED(rc))
|
|
+ if (FAILED(rc)) {
|
|
+ Genode::error("machine->LockMachine FAILED");
|
|
return rc;
|
|
+ }
|
|
|
|
/* Validate configured memory of vbox file and Genode config */
|
|
+ PDBG("Validate configured memory of vbox file and Genode config");
|
|
ULONG memory_vbox;
|
|
rc = machine->COMGETTER(MemorySize)(&memory_vbox);
|
|
if (FAILED(rc))
|
|
return rc;
|
|
|
|
/* Console object */
|
|
+ PDBG("Console object");
|
|
static ComPtr<IConsole> gConsole;
|
|
rc = session->COMGETTER(Console)(gConsole.asOutParam());
|
|
|
|
@@ -155,6 +168,7 @@ HRESULT setupmachine(Genode::Env &env)
|
|
genodeConsole->init_clipboard();
|
|
|
|
/* Display object */
|
|
+ PDBG("Display object");
|
|
static ComPtr<IDisplay> display;
|
|
rc = gConsole->COMGETTER(Display)(display.asOutParam());
|
|
if (FAILED(rc))
|
|
@@ -176,12 +190,14 @@ HRESULT setupmachine(Genode::Env &env)
|
|
}
|
|
|
|
/* Power up the VMM */
|
|
+ PDBG("Power up the VMM");
|
|
ComPtr <IProgress> progress;
|
|
rc = gConsole->PowerUp(progress.asOutParam());
|
|
if (FAILED(rc))
|
|
return rc;
|
|
|
|
/* check whether enough memory is available for VM + VMM */
|
|
+ PDBG("check whether enough memory is available for VM + VMM");
|
|
ULONG const required_memory_vm = (13 * 1024 + 6 * memory_vbox) << 10;
|
|
rc = genode_check_memory_config(machine, required_memory_vm);
|
|
if (FAILED(rc))
|
|
@@ -190,6 +206,7 @@ HRESULT setupmachine(Genode::Env &env)
|
|
/* wait until VM is up */
|
|
MachineState_T machineState = MachineState_Null;
|
|
do {
|
|
+ PDBG("wait until VM is up");
|
|
if (machineState != MachineState_Null)
|
|
RTThreadSleep(1000);
|
|
|
|
@@ -199,6 +216,7 @@ HRESULT setupmachine(Genode::Env &env)
|
|
return E_FAIL;
|
|
|
|
/* request mouse object */
|
|
+ PDBG("request mouse object");
|
|
static ComPtr<IMouse> gMouse;
|
|
rc = gConsole->COMGETTER(Mouse)(gMouse.asOutParam());
|
|
if (FAILED(rc))
|
|
@@ -206,6 +224,7 @@ HRESULT setupmachine(Genode::Env &env)
|
|
Assert (&*gMouse);
|
|
|
|
/* request keyboard object */
|
|
+ PDBG("request keyboard object");
|
|
static ComPtr<IKeyboard> gKeyboard;
|
|
rc = gConsole->COMGETTER(Keyboard)(gKeyboard.asOutParam());
|
|
if (FAILED(rc))
|
|
@@ -215,6 +234,7 @@ HRESULT setupmachine(Genode::Env &env)
|
|
genodeConsole->init_backends(gKeyboard, gMouse);
|
|
|
|
/* check whether enough memory for the fb is available */
|
|
+ PDBG("check whether enough memory for the fb is available");
|
|
ULONG required_memory_fb = 0;
|
|
for (unsigned uScreenId = 0; uScreenId < cMonitors; uScreenId++)
|
|
{
|
|
diff --git a/repos/ports/src/virtualbox5/network.cpp b/repos/ports/src/virtualbox5/network.cpp
|
|
index f743e64104..abb587664a 100644
|
|
--- a/repos/ports/src/virtualbox5/network.cpp
|
|
+++ b/repos/ports/src/virtualbox5/network.cpp
|
|
@@ -519,6 +519,7 @@ static DECLCALLBACK(int) drvNicConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uin
|
|
* Setup Genode nic_session connection
|
|
*/
|
|
try {
|
|
+ Genode::log("initialize Nic session ", (char const *)label);
|
|
pThis->nic_client = new (vmm_heap()) Nic_client(genode_env(), pThis, label);
|
|
} catch (...) {
|
|
return VERR_HOSTIF_INIT_FAILED;
|