1
Washington
WASHINGTON UNIVERSITY IN ST LOUIS
jdd@arl.wustl.edu http://www.arl.wustl.edu/~jdd
The New MSR Plugin Download Environment
2
Washington
WASHINGTON UNIVERSITY IN ST LOUIS
John DeHart - 6/24/2003
First: The Old Way
- Compile plugin code on NetBSD
- Copy plugin directory onto File System
destined for SPC
- Boot SPC
- Log in to SPC
– requires user space and serial line or telnet access
- Use modload(1) on SPC to load plugin
– links plugin against kernel in /netbsd on SPC
- Use modstat(1) on SPC to see list of loaded
plugins
3
Washington
WASHINGTON UNIVERSITY IN ST LOUIS
John DeHart - 6/24/2003
The New Way
- Compile plugin code on NetBSD
- Verify plugin has no undefined symbols
– There is no link against running kernel anymore – wu_arl/msr/usr/src/sys/msr/msr_lkm.h provides macros to needed kernel functions and structures
- We can add more as we need them.
- Plugins do need to be recompiled if msr_lkm.* changes
- But if msr_lkm.* is stable, even if rest of kernel changes, plugin does
not need to be recompiled.
- Use pluginDownload utility from CP (Linux) to download
plugin to SPC
– Only runs on Linux right now…
- Use instantiatePlugin utility from CP to config plugin,
filters, etc
- Use pluginStat utility from CP to view list of loaded
plugins
4
Washington
WASHINGTON UNIVERSITY IN ST LOUIS
John DeHart - 6/24/2003
Exposed Functions
- Kernel functions
– assert() – MALLOC() – FREE()
- Clock Functions
– cpu_clock_1usec() – cpu_clock_10usec() – cpu_clock_1msec()
- LKM Functions