direct_memory
interface, the
image snoop interface is rarely needed for model functionality.
The page_modified function is always called the first time a page is written to. It may also be called additional times even if a page has already been written to. A user of the image snoop interface can at any time reset this mechanism so that all pages are considered not written to and therefore the page_modified function will be called again on future writes. The reset can be accomplished either through the memory page update interface or through the pool protect interface.
The image snoop
interface can, for example, be used by frame
buffer devices to efficiently keep track of areas of the frame buffer to
redraw, or for a CPU module that builds cached representations of code pages
to invalidate such caches when memory is modified.
Listeners using this interface are installed with the image_snoop_devices attribute in the image class.
SIM_INTERFACE(image_snoop) { void (*page_modified)(conf_object_t *obj, conf_object_t *img, uint64 offset, uint8 *page_data, image_spage_t *spage); }; #define IMAGE_SNOOP_INTERFACE "image_snoop"