Next: Protocol Specifications Up: x-Kernel Programmer's Manual Previous: Reporting Problems

Installing within a Mach3 Kernel

The x-kernel can be compiled as an integral part of the Mach3 kernel. This facility is provided for researchers developing highly efficient protocols and for obtaining timing results that are exclusive of Mach IPC and Unix server overhead. At the present time, there is no user interface for accessing the x-kernel services - the Mach3 kernel can boot, run an x-kernel timing test and print the results. A more usable interface will be provided in the future.

These are instructions for building a version of the x-kernel that resides in the Mach3 kernel. You should be familiar with the build instructions for the ``out of kernel'' version before starting. You should also be familiar with the procedure for building the Mach kernel and have a working environment set up.

The files distributed (and these directions) have been used with the MK82 Mach kernel for a DecStation 5000 and an Intel 486 PC.

Set your path to include the /usr/xkernel/bin and /usr/xkernel/bin/ARCH directories.

  1. Place the x-kernel source tree in the mach source tree. In the src/mk/kernel directory, in either a shadow area or the primary source area, create a link named 'xkern' to the head of the x-kernel source tree.

  2. Patch some mach kernel source files. The tree rooted at xkernel/mach3/machkernel is a parallel of the mach kernel source tree, containing modifications to support the x-kernel. These modifications are all conditional on x-kernel compilation flags, so you can use these modified files to build non-x-kernel Mach kernels if you desire. You can either go through these files one at a time and make the appropriate file-by-file substitutions, or you can set up a mach shadow directory and link/copy the directories in xkernel/mach3/machkernel to the shadow area. The latter should be the easier approach (and less intrusive to your original mach source tree.)

    Note that one can not transparently shadow the mk/kernel/conf directory. Since the directory
    xkernel/mach3/machkernel/conf only includes files that we have modified, it should be overlayed on top of a copy of an original mk/kernel/conf directory.

  3. Compose an x-kernel graph. Create a directory xkern.local under src/mk/kernel. This directory will contain the files created by composing the graph.comp. Change to the new xkern.local directory. Copy or create your graph.comp here. To compose this graph.comp run:

    compose -f < graph.comp

    This must be explicitly done each time the graph.comp changes. The files traceLevels.c, protocols.c, protocols.h and protTbl.c will be created. The files that were created here are referenced by the `conf/files' file for inclusion in the mach kernel.

  4. In your xkern.local directory, build a compilable version of the protocol table by running the x-kernel utility program ptbldump:

    ptbldump /usr/xkernel/etc/prottbl > ptblData.c

    This file will be automatically included by an x-kernel source file.

  5. In your xkern.local directory, create a compilable rom file by running the genrom.awk script:

    awk -f /usr/x32/merge/bin/genrom.awk < rom > initRom.c

    This file will be automatically included by an x-kernel source file.

  6. Build a configuration including the x-kernel. If your configuration includes the string +xk, the x-kernel will be built in DEBUG configuration (with tracing enabled.) If the configuration includes the string +xko, the x-kernel will be built in OPTIMIZE configuration (with no tracing.)

  7. If you have problems with kernels crashing because of storage exhaustion, you might want to adjust the zone block table in the Mach kernel file kalloc.c. See the x-kernel file xkernel/pi/msg_internal.h for the size of a message block; these account for most of the x-kernel storage use.

  8. The machkernel will come up by default with both the Unix server and the x-kernel receiving and sending network packets (incoming packets are copied to both the x-kernel and the Unix server.) For accurate kernel-kernel timings of x-kernel protocols, boot the mach_kernelimage (which doesn't start the user task) instead of the mach.boot image and configure the in-kernel driver (xklance) to not deliver incoming packets to the user task as described in Appendix A.



Next: Protocol Specifications Up: x-Kernel Programmer's Manual Previous: Reporting Problems


Tue Nov 29 16:28:56 MST 1994