next up previous contents index
Next: anno.h: (X86) generic macros Up: 10 Kernel Support Library: Previous: gdb_pc_com_init: (X86 PC) set

10.19 Annotations

 

Kernel annotations are ``markers'' that can be placed in code or static data. Annotations are static and are collected into a special section of the object/executable file. How this section is created is object-file format specific and is normally handled by the default startup files (e.g, crt0.o).

Annotations are organized in tables which is sorted by a key value (typically the address being marked) at boot time via anno_init.

The basic annotation structures look like:

struct anno_table  {

	struct anno_entry	*start;	/* first entry */
	struct anno_entry	*end;	/* last entry */
 
};

struct anno_entry  {

	oskit_addr_t		val1;	/* lookup value */
	oskit_addr_t		val2;	/* context dependent value */
	oskit_addr_t		val3;	/* context dependent value */
	struct anno_table	*table;	/* associated anno_table */
 
};

Annotation tables contain a pointer to the first and last entries they contain. All entries in a table are contiguous and sorted by the key value.

Annotation entries specify the table they belong to, the key value used for lookups, and two uninterpreted values.

Though annotations can be structured arbitrarily, the OSKit supports two common kernel annotation uses: ``trap tables'' and ``interrupt tables.'' These are described in the following anno_trap and anno_intr sections.

Currently, annotation support only works with the ELF binary file format (i.e., it does not work with a.out).





University of Utah Flux Research Group