Memory write tracing/logging of an application / Watchpoints in Genode/Fiasco.OC

Stark, Josef j.stark at ...256...
Thu Dec 7 21:57:37 CET 2017


Hi again,

so I contacted the author, Martin Stein, who gave me quite some
insight and he convinced me to use [1] as a starting point instead
of [2] for several reasons:
* The whereabouts of the older code from [2] are unknown due to a
switch from svn to git. 
* [2] uses the now obsolete base-mb kernel.
* base-mb ran only on microblaze. Obtaining the toolchain and 
getting everything to run would be a big hassle.
* [1] is much more tested and stable and the thesis is probably written
in a more comprehensible way.
* [1] is newer and thus easier to port to more current versions.

So now as a first step I'm trying to get the original code from [3] to run.
I'm using the toolchain 12.11-x86_64. Martin suggested to try the
scenario run/ptc_hdl_env from the branch ptc_hdl_env.

However, now I'm running into some compilation troubles;
So far I did the following steps:

$ git clone https://github.com/m-stein/genode_hdl_env.git ptc_hdl_env
$ cd ptc_hdl_env/
$ git checkout ptc_hdl_env
$ tool/create_builddir hw_pbxa9 BUILD_DIR=build
# enable ports and libports repos inside build/etc/build.conf
libports$ make prepare PKG="verilator"
libports$ make prepare PKG="libc"
libports$ make prepare PKG="stdcxx"
$ cd build
# point /etc/tools.conf to the toolchain
# add MAKE += -j4 to etc/build.conf
$ make run/ptc_hdl_env

I get the following errors:
===============================================
...
Program core/pbxa9/core
    COMPILE  environ.o
    COMPILE  err.o
    COMPILE  file.o
In file included from /home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../platform_timer.h:21:0,
                 from /home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../../nova/timer_session_component.h:23,
                 from /home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../../nova/timer_root.h:24,
                 from /home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../../main.cc:19:
/home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/platform_timer_base.h:27:28: error: ‘SP804_CLOCK’ is not a member of ‘Genode::Board_base’
/home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/platform_timer_base.h:27:28: error: ‘SP804_CLOCK’ is not a member of ‘Genode::Board_base’
/home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/platform_timer_base.h:27:59: error: template argument 1 is invalid
/home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/platform_timer_base.h: In constructor ‘Platform_timer_base::Platform_timer_base()’:
/home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/platform_timer_base.h:38:22: error: ‘SP804_MMIO_SIZE’ is not a member of ‘Genode::Board_base’
/home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/platform_timer_base.h:40:4: error: class ‘Platform_timer_base’ does not have any field named ‘Sp804_base’
In file included from /home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../../nova/timer_session_component.h:23:0,
                 from /home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../../nova/timer_root.h:24,
                 from /home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../../main.cc:19:
/home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../platform_timer.h: In constructor ‘Platform_timer::Platform_timer()’:
/home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../platform_timer.h:44:59: error: ‘max_value’ was not declared in this scope
/home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../platform_timer.h:44:60: error: ‘tics_to_us’ was not declared in this scope
/home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../platform_timer.h: In member function ‘long unsigned int Platform_timer::curr_time()’:
/home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../platform_timer.h:61:41: error: ‘value’ was not declared in this scope
/home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../platform_timer.h:63:55: error: ‘max_value’ was not declared in this scope
/home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../platform_timer.h:70:43: error: ‘tics_to_us’ was not declared in this scope
/home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../platform_timer.h: In member function ‘void Platform_timer::schedule_timeout(long unsigned int)’:
/home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../platform_timer.h:99:39: error: ‘us_to_tics’ was not declared in this scope
/home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../platform_timer.h:100:28: error: ‘run_and_wrap’ was not declared in this scope
    COMPILE  ldso_types.o
    COMPILE  lock.o
/home/josef/git/ptc_hdl_env/base/mk/generic.mk:46: recipe for target 'main.o' failed
make[3]: *** [main.o] Error 1
var/libdeps:261: recipe for target 'timer.prg' failed
make[2]: *** [timer.prg] Error 2
make[2]: *** Waiting for unfinished jobs....
    COMPILE  main.o
...
    MERGE    ld.lib.so
    LINK     init
Makefile:206: recipe for target 'gen_deps_and_build_targets' failed
make[1]: *** [gen_deps_and_build_targets] Error 2
make[1]: Leaving directory '/home/josef/git/ptc_hdl_env/build'
Error: Genode build failed
Makefile:237: recipe for target 'run/ptc_hdl_env' failed
make: *** [run/ptc_hdl_env] Error 252
===============================================

It seems that base-hw is borrowing a few header-files from nova, 
and grep showed that SP804_CLOCK is declared inside
base/include/platform/vea9x4/drivers/board_base.h
(which looks like another board), so maybe that's
about where things go wrong.
Can someone help me out?


Cheers,
Josef


[1] http://www.genode-labs.com/publications/mstein-hw-codesign-2013.pdf
[2] http://genode-labs.com/publications/mstein-device_emulation-2011.pdf
[3] https://github.com/m-stein/genode_hdl_env



More information about the users mailing list