To add a tunable (my_tunable) to the IOM component, an integer named my_tunable needs to be written in an IOM source file, as follows:
extern int my_tunable;You will configure this integer using the external name iom.my.tunable. The default value for my_tunable is 0.
To add the tunable to the XML source configuration file for the IOM component, go to the directory containing the IOM configuration files:
host% cd <src_dir>/iom/conf/mkconfig
To add the iom.my.tunable, modify two files, iom_rule.xml and iom_action.xml.
The iom_rule.xml file contains the description of the configurable entities as features and tunables, and their associated dependency.
The iom_action.xml file contains the internal implementation rules for management of features and tunables and provides the interface with the mkmk environment.
<tunable name="iom.my.tunable"> <description> My Tunable </description> <int> <const>0</const> </tunable>
This definition includes the external name, a description field that will be accessible through the ews configuration tool, and a default value. All tunable values are integers; the default value is 0 in this example.
Include the standard rule used for the management of the IOM tunables in iom_action.xml:
<setting name="iom.tunables"> <condition><ifdef name="iom.my.tunable"></condition> <value index="size"> <vstring>my_tunable iom.my.tunable ${iom.my.tunable}</vstring> </value> </setting>
iom.my.tunable is the external name of the tunable and my_tunable is the corresponding integer declaration in the source code.
Update the configuration in the build directory and build the new system image. As you modified XML configuration files in the source directory, you must propagate these changes back to the work directory. Remove the corresponding XML files and run make xml.
host% cd <work_dir> host% rm conf/mkconfig/iom_rule.xml conf/mkconfig/iom_action.xml host% make xml
Set your tunable and check that it is now visible in the configuration:
host% configurator -set myiom.my.tunable=0x12345 host% configurator -list tunables | grep my myiom.my.tunable:'0x12345'
Build the new system image and check that the tunable is in the IOM actor:
host% make build host% powerpc-elf-nm image/RAM/chorus/bin/N_iom | grep my_ a00b44f0 D my_tunable a00b44f0: 00 01 23 45 .long 0x12345