Type Alias simics_api_sys::register_view_interface_t

source ·
pub type register_view_interface_t = register_view_interface;

Aliased Type§

struct register_view_interface_t {
    pub description: Option<unsafe extern "C" fn(_: *mut conf_object) -> *const i8>,
    pub big_endian_bitorder: Option<unsafe extern "C" fn(_: *mut conf_object) -> bool>,
    pub number_of_registers: Option<unsafe extern "C" fn(_: *mut conf_object) -> u32>,
    pub register_info: Option<unsafe extern "C" fn(_: *mut conf_object, _: u32) -> attr_value>,
    pub get_register_value: Option<unsafe extern "C" fn(_: *mut conf_object, _: u32) -> u64>,
    pub set_register_value: Option<unsafe extern "C" fn(_: *mut conf_object, _: u32, _: u64)>,
}

Fields§

§description: Option<unsafe extern "C" fn(_: *mut conf_object) -> *const i8>§big_endian_bitorder: Option<unsafe extern "C" fn(_: *mut conf_object) -> bool>§number_of_registers: Option<unsafe extern "C" fn(_: *mut conf_object) -> u32>§register_info: Option<unsafe extern "C" fn(_: *mut conf_object, _: u32) -> attr_value>

Returns the static information about a register in the list [NAME, DESC, SIZE, OFFSET, BITFIELDS, BIG_ENDIAN_BYTE_ORDER]. All but the two last element in the list are required and the client should tolerate if more than 6 elements are presented in the list. NAME must be a valid identifier. DESC is a short description of the register. SIZE is the number of bytes of the register, could only be 1, 2, 4, or 8. OFFSET is the offset into the bank and can be Nil denoting non-memory-mapped registers. BITFIELDS is optional and if present, is a list where each element itself being a list of [NAME, DESC, LSB, MSB] where NAME and DESC is the identifier and description of the field and LSB and MSB are the least significant and the most significant bit in little-endian bitorder. MSB is optional and if omitted, is assumed to be the same as LSB, i.e., the bitfield specifies a single bit. BIG_ENDIAN_BYTE_ORDER is an optional boolean value, assumed to be False if omitted. It controls the byte order of the register’s memory-mapped representation; the byte at OFFSET is the most significant byte if BIG_ENDIAN_BYTE_ORDER is True, and the least significant byte otherwise.

§get_register_value: Option<unsafe extern "C" fn(_: *mut conf_object, _: u32) -> u64>

Get the current value of a register, must be side-effect free.

§set_register_value: Option<unsafe extern "C" fn(_: *mut conf_object, _: u32, _: u64)>

Set the current value of a register, must be side-effect free except from updating the value.