next up previous contents index
Next: 16.4 Simple interface Up: 16 Address Map Manager: Previous: 16.2 Addresses and attributes

16.3 Address maps and entries

Each address map is represented by an amm_t structure. This structure is allocated by the user and initialized once at startup via a library routine. After initialization, a pointer to the structure is used as an opaque handle for all subsequent AMM calls.

Many of the library routines take map entries as parameters or pass them back as return values. Thus the AMM defines an opaque amm_entry_t type and includes routines to obtain the starting and ending addresses, size and attributes associated with the entry.

Implementing an address map as a collection of map entries requires that the AMM be able to split and join map entries as the attributes of addresses change. An entry is split into two entries when some sub-range of the entry changes attributes. Analogously, two entries which are adjacent may be joined when the attributes of one change to be identical to those of the other.

The AMM library provides hooks to allow the user to associate additional state with map entries. These hooks include explicit map entry parameters to some routines as well as callback interfaces to handle allocation, deallocation, splitting and joining map entries. Section 16.5 contains complete details.



University of Utah Flux Research Group