Please sign in to comment.
Support for dynamic ROM sessions, fix #170
This patch introduces support for ROM sessions that update their provided data during the lifetime of the session. The 'Rom_session' interface had been extended with the new 'release()' and 'sigh()' functions, which are needed to support the new protocol. All ROM services have been updated to the new interface. Furthermore, the patch changes the child policy of init with regard to the handling of configuration files. The 'Init::Child' used to always provide the ROM dataspace with the child's config file via a locally implemented ROM service. However, for dynamic ROM sessions, we need to establish a session to the real supplier of the ROM data. This is achieved by using a new 'Child_policy_redirect_rom_file' policy to handle the 'configfile' rather than handling the 'configfile' case entirely within 'Child_config'. To see the new facility in action, the new 'os/run/dynamic_config.run' script provides a simple scenario. The config file of the test program is provided by a service, which generates and updates the config data at regular intervals. In addition, new support has been added to let slaves use dynamic reconfiguration. By using the new 'Child_policy_dynamic_rom_file', the configuration of a slave can be changed dynamically at runtime via the new 'configure()' function. The config is provided as plain null-terminated string (instead of a dataspace capability) because we need to buffer the config data anyway. So there is no benefit of using a dataspace. For buffering configuration data, a 'Ram_session' must be supplied. If no 'Ram_session' is specified at construction time of a 'Slave_policy', no config is supplied to the slave (which is still a common case). An example for dynamically reconfiguring a slave is provided by 'os/run/dynamic_config_slave.run'.
- Loading branch information...
Showing with 752 additions and 68 deletions.
- +2 −0 base/include/rom_session/client.h
- +28 −1 base/include/rom_session/rom_session.h
- +1 −0 base/src/core/include/rom_session_component.h
- +12 −16 gems/src/server/d3m/main.cc
- +4 −1 os/include/init/child.h
- +33 −27 os/include/init/child_config.h
- +35 −0 os/include/init/child_policy.h
- +163 −0 os/include/os/child_policy_dynamic_rom.h
- +30 −0 os/include/os/config.h
- +27 −16 os/include/os/slave.h
- +50 −0 os/run/dynamic_config.run
- +38 −0 os/run/dynamic_config_slave.run
- +4 −7 os/src/server/iso9660/main.cc
- +2 −0 os/src/server/loader/rom_session_component.h
- +2 −0 os/src/server/rom_prefetcher/main.cc
- +2 −0 os/src/server/tar_rom/main.cc
- +62 −0 os/src/test/dynamic_config/main.cc
- +68 −0 os/src/test/dynamic_config/master/main.cc
- +3 −0 os/src/test/dynamic_config/master/target.mk
- +176 −0 os/src/test/dynamic_config/server/main.cc
- +3 −0 os/src/test/dynamic_config/server/target.mk
- +3 −0 os/src/test/dynamic_config/target.mk
- +4 −0 ports/src/app/gdb_monitor/rom.h
Oops, something went wrong.