Avoid a runtime warning message since our backend does not provide such constructor functions yet. If a backend requires them, it should initiate their execution by itself within the backend init functions. In coherence with the size_guard idea, the remote_rom packets are are separated into a simple layer packet and a data packet. While basically only managing common control informations, the layer packet may carry any payload. The data packet, instead, manages the transmission of the actual ROM payload and can be attached to the layer packet. This simplifies the management of the notification packets UPDATE and SIGNAL since they do not contain fields like 'offset' or 'payload_size' anymore. Now, a single thread manages all incoming RPC calls, signals and (thus) network packets. This will hopefully make further synchronization enhancements a lot easier. Further changes: * Following data packets are identified as such by their offset instead of their packet type field. This simplifies the protocol. * reduced redundancy in the packet building code * rewrap lines with >79 columns * fix compiler warnings * split backend code * Remove a few unnecessary include and using directives. * In order to avoid global variables across modules, 'verbose' is a member variable now. Later, its value may be set via constructor. * The nested Rx class is merged with Backend_base. This way, we avoid unnecessary maintenance as long as we don't have a clear design for ROM multiplexing which may require the management of multiple IP addresses etc. * The HANDLER template argument is removed since client and server inherit from Backend_base anyway. The receive method is virtual now. * The signals packet_avail and ready_to_ack are directly passed to the same signal handler now. * Remove unnecessarily public/protected visibility from some members. * Remove and add unnecessary and, due to inclusion order, secretly missing include directives, respectively.
153 lines
3.4 KiB
Plaintext
153 lines
3.4 KiB
Plaintext
#
|
|
# Build
|
|
#
|
|
|
|
set build_components { core init timer
|
|
server/dynamic_rom
|
|
proxy/remote_rom/backend/nic_ip
|
|
app/rom_logger
|
|
drivers/nic
|
|
server/nic_bridge
|
|
}
|
|
|
|
source ${genode_dir}/repos/base/run/platform_drv.inc
|
|
append_platform_drv_build_components
|
|
|
|
build $build_components
|
|
|
|
create_boot_directory
|
|
|
|
#
|
|
# Generate config
|
|
#
|
|
|
|
install_config {
|
|
<config>
|
|
<parent-provides>
|
|
<service name="CAP"/>
|
|
<service name="LOG"/>
|
|
<service name="RM"/>
|
|
<service name="SIGNAL"/>
|
|
<service name="ROM" />
|
|
<service name="RAM" />
|
|
<service name="CPU" />
|
|
<service name="PD" />
|
|
<service name="IO_MEM" />
|
|
<service name="IRQ" />
|
|
</parent-provides>
|
|
<default-route>
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
</default-route>
|
|
<default caps="100" />
|
|
<start name="timer">
|
|
<resource name="RAM" quantum="1M"/>
|
|
<provides><service name="Timer"/></provides>
|
|
</start>
|
|
<start name="dynamic_rom">
|
|
<resource name="RAM" quantum="4M"/>
|
|
<provides><service name="ROM"/></provides>
|
|
<config verbose="yes">
|
|
<rom name="test">
|
|
<sleep milliseconds="1000" />
|
|
<inline description="disable">
|
|
<test enabled="no"/>
|
|
</inline>
|
|
<sleep milliseconds="5000" />
|
|
<inline description="enable">
|
|
<test enabled="yes"/>
|
|
</inline>
|
|
<sleep milliseconds="10000" />
|
|
<inline description="finished"/>
|
|
</rom>
|
|
</config>
|
|
</start>
|
|
<start name="remote_rom_server">
|
|
<resource name="RAM" quantum="8M"/>
|
|
<route>
|
|
<service name="ROM" label_suffix="test">
|
|
<child name="dynamic_rom"/>
|
|
</service>
|
|
<service name="Nic"> <child name="nic_bridge"/> </service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
<config>
|
|
<remote_rom localname="test" name="remote"
|
|
src="192.168.42.10" dst="192.168.42.11">
|
|
<default>
|
|
<default />
|
|
</default>
|
|
</remote_rom>
|
|
</config>
|
|
</start>
|
|
<start name="remote_rom_client">
|
|
<resource name="RAM" quantum="8M"/>
|
|
<route>
|
|
<service name="Nic">
|
|
<child name="nic_bridge"/>
|
|
</service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
<provides><service name="ROM"/></provides>
|
|
<config>
|
|
<remote_rom name="remote" src="192.168.42.11" dst="192.168.42.10">
|
|
<default>
|
|
<default />
|
|
</default>
|
|
</remote_rom>
|
|
</config>
|
|
</start>
|
|
<start name="nic_bridge">
|
|
<resource name="RAM" quantum="4M"/>
|
|
<provides><service name="Nic"/></provides>
|
|
<route>
|
|
<service name="Nic"> <child name="nic_drv"/> </service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
<config> <default-policy/> </config>
|
|
</start>
|
|
<start name="nic_drv">
|
|
<binary name="} [nic_drv_binary] {" />
|
|
<resource name="RAM" quantum="4M"/>
|
|
<provides><service name="Nic"/></provides>
|
|
<config>
|
|
<nic tap="tap1"/>
|
|
</config>
|
|
</start>
|
|
<start name="rom_logger">
|
|
<resource name="RAM" quantum="4M"/>
|
|
<config rom="remote" />
|
|
<route>
|
|
<service name="ROM" label_suffix="remote">
|
|
<child name="remote_rom_client"/>
|
|
</service>
|
|
<any-service> <parent/> </any-service>
|
|
</route>
|
|
</start>
|
|
</config>}
|
|
|
|
#
|
|
# Boot image
|
|
#
|
|
|
|
append boot_modules { core ld.lib.so init timer
|
|
remote_rom_server
|
|
remote_rom_client
|
|
dynamic_rom
|
|
rom_logger
|
|
} [nic_drv_binary] {
|
|
nic_bridge
|
|
}
|
|
|
|
append_platform_drv_boot_modules
|
|
build_boot_image $boot_modules
|
|
|
|
append qemu_args " -nographic "
|
|
|
|
run_genode_until {.*change \(finished\).*} 30
|
|
|
|
grep_output {<test enabled}
|
|
compare_output_to {
|
|
[init -> rom_logger] <test enabled="no"/>
|
|
[init -> rom_logger] <test enabled="yes"/>
|
|
}
|