x86_memory_access x86_memory_query
API Reference Manual  /  4 Model-to-Model Interfaces  / 

x86_memory_operation

Description
The x86_memory_operation interface is used to access memory from a user instruction. See the cpu_instrumentation_subscribe and cpu_instruction_decoder for more information. It is designed to be more efficient than the x86_memory_access. If an exception condition occurs, a longjmp is taken. The interface methods may only be invoked from user instruction.

SIM_INTERFACE(x86_memory_operation) {
        uint64 (*read_logical)(
                conf_object_t *cpu,
                x86_seg_t seg,
                logical_address_t offs,
                unsigned size,
                x86_processor_mode_t mode,
                x86_access_type_t access_type);
#if !defined(PYWRAP)
        void (*read_logical_buf)(
                conf_object_t *cpu,
                uint8 *dst,
                x86_seg_t seg,
                logical_address_t offs,
                unsigned size,
                x86_processor_mode_t mode,
                x86_access_type_t access_type);
#endif
        void (*write_logical)(
                conf_object_t *cpu,
                uint64 val,
                x86_seg_t seg,
                logical_address_t offs,
                unsigned size,
                x86_processor_mode_t mode,
                x86_access_type_t access_type);
#if !defined(PYWRAP)
        void (*write_logical_buf)(
                conf_object_t *cpu,
                const uint8 *src,
                x86_seg_t seg,
                logical_address_t offs,
                unsigned size,
                x86_processor_mode_t mode,
                x86_access_type_t access_type);
#endif
        x86_read_physical_ret_t (*read_physical)(
                conf_object_t *cpu,
                physical_address_t address,
                unsigned size,
                x86_access_type_t access_type);
#if !defined(PYWRAP)
        exception_type_t (*read_physical_buf)(
                conf_object_t *cpu,
                uint8 *dst,
                physical_address_t address,
                unsigned size,
                x86_access_type_t access_type);
#endif
        exception_type_t (*write_physical)(
                conf_object_t *cpu,
                uint64 val,
                physical_address_t address,
                unsigned size,
                x86_access_type_t access_type);
#if !defined(PYWRAP)  
        exception_type_t (*write_physical_buf)(
                conf_object_t *cpu,
                const uint8 *src,
                physical_address_t address,
                unsigned size,
                x86_access_type_t access_type);
#endif
};

#define X86_MEMORY_OPERATION_INTERFACE "x86_memory_operation"

Execution Context
Cell Context for all methods, but must be called from an invoke function set by the instrumentation_replace interface.

x86_memory_access x86_memory_query