Lines Matching refs:IPMIBmcSim
180 struct IPMIBmcSim { struct
280 static void ipmi_sim_handle_timeout(IPMIBmcSim *ibs);
298 IPMIBmcSim *ibs = opaque; in ipmi_timeout()
303 static void set_timestamp(IPMIBmcSim *ibs, uint8_t *ts) in set_timestamp()
324 static int sdr_add_entry(IPMIBmcSim *ibs, in sdr_add_entry()
391 IPMIBmcSim *ibs = IPMI_BMC_SIMULATOR(b); in ipmi_bmc_sdr_find()
412 static int sel_add_event(IPMIBmcSim *ibs, uint8_t *event) in sel_add_event()
435 static int attn_set(IPMIBmcSim *ibs) in attn_set()
442 static int attn_irq_enabled(IPMIBmcSim *ibs) in attn_irq_enabled()
453 IPMIBmcSim *ibs = IPMI_BMC_SIMULATOR(b); in ipmi_bmc_gen_event()
475 static void gen_event(IPMIBmcSim *ibs, unsigned int sens_num, uint8_t deassert, in gen_event()
514 static void sensor_set_discrete_bit(IPMIBmcSim *ibs, unsigned int sensor, in sensor_set_discrete_bit()
553 static void ipmi_init_sensors_from_sdrs(IPMIBmcSim *s) in ipmi_init_sensors_from_sdrs()
597 int ipmi_sim_register_netfn(IPMIBmcSim *s, unsigned int netfn, in ipmi_sim_register_netfn()
607 static const IPMICmdHandler *ipmi_get_handler(IPMIBmcSim *ibs, in ipmi_get_handler()
629 static void next_timeout(IPMIBmcSim *ibs) in next_timeout()
646 IPMIBmcSim *ibs = IPMI_BMC_SIMULATOR(b); in ipmi_sim_handle_command()
698 static void ipmi_sim_handle_timeout(IPMIBmcSim *ibs) in ipmi_sim_handle_timeout()
766 static void chassis_capabilities(IPMIBmcSim *ibs, in chassis_capabilities()
777 static void chassis_status(IPMIBmcSim *ibs, in chassis_status()
787 static void chassis_control(IPMIBmcSim *ibs, in chassis_control()
820 static void chassis_get_sys_restart_cause(IPMIBmcSim *ibs, in chassis_get_sys_restart_cause()
829 static void get_device_id(IPMIBmcSim *ibs, in get_device_id()
846 static void set_global_enables(IPMIBmcSim *ibs, uint8_t val) in set_global_enables()
860 static void cold_reset(IPMIBmcSim *ibs, in cold_reset()
875 static void warm_reset(IPMIBmcSim *ibs, in warm_reset()
886 static void set_acpi_power_state(IPMIBmcSim *ibs, in set_acpi_power_state()
894 static void get_acpi_power_state(IPMIBmcSim *ibs, in get_acpi_power_state()
902 static void get_device_guid(IPMIBmcSim *ibs, in get_device_guid()
924 static void set_bmc_global_enables(IPMIBmcSim *ibs, in set_bmc_global_enables()
931 static void get_bmc_global_enables(IPMIBmcSim *ibs, in get_bmc_global_enables()
938 static void clr_msg_flags(IPMIBmcSim *ibs, in clr_msg_flags()
949 static void get_msg_flags(IPMIBmcSim *ibs, in get_msg_flags()
956 static void read_evt_msg_buf(IPMIBmcSim *ibs, in read_evt_msg_buf()
975 static void get_msg(IPMIBmcSim *ibs, in get_msg()
1013 static void send_msg(IPMIBmcSim *ibs, in send_msg()
1099 static void do_watchdog_reset(IPMIBmcSim *ibs) in do_watchdog_reset()
1118 static void reset_watchdog_timer(IPMIBmcSim *ibs, in reset_watchdog_timer()
1129 static void set_watchdog_timer(IPMIBmcSim *ibs, in set_watchdog_timer()
1200 static void get_watchdog_timer(IPMIBmcSim *ibs, in get_watchdog_timer()
1222 static void get_sdr_rep_info(IPMIBmcSim *ibs, in get_sdr_rep_info()
1243 static void reserve_sdr_rep(IPMIBmcSim *ibs, in reserve_sdr_rep()
1251 static void get_sdr(IPMIBmcSim *ibs, in get_sdr()
1295 static void add_sdr(IPMIBmcSim *ibs, in add_sdr()
1310 static void clear_sdr_rep(IPMIBmcSim *ibs, in clear_sdr_rep()
1337 static void get_sel_info(IPMIBmcSim *ibs, in get_sel_info()
1359 static void get_fru_area_info(IPMIBmcSim *ibs, in get_fru_area_info()
1380 static void read_fru_data(IPMIBmcSim *ibs, in read_fru_data()
1413 static void write_fru_data(IPMIBmcSim *ibs, in write_fru_data()
1444 static void reserve_sel(IPMIBmcSim *ibs, in reserve_sel()
1452 static void get_sel_entry(IPMIBmcSim *ibs, in get_sel_entry()
1500 static void add_sel_entry(IPMIBmcSim *ibs, in add_sel_entry()
1513 static void clear_sel(IPMIBmcSim *ibs, in clear_sel()
1540 static void get_sel_time(IPMIBmcSim *ibs, in get_sel_time()
1555 static void set_sel_time(IPMIBmcSim *ibs, in set_sel_time()
1567 static void platform_event_msg(IPMIBmcSim *ibs, in platform_event_msg()
1589 static void set_sensor_evt_enable(IPMIBmcSim *ibs, in set_sensor_evt_enable()
1639 static void get_sensor_evt_enable(IPMIBmcSim *ibs, in get_sensor_evt_enable()
1658 static void rearm_sensor_evts(IPMIBmcSim *ibs, in rearm_sensor_evts()
1678 static void get_sensor_evt_status(IPMIBmcSim *ibs, in get_sensor_evt_status()
1698 static void get_sensor_reading(IPMIBmcSim *ibs, in get_sensor_reading()
1718 static void set_sensor_type(IPMIBmcSim *ibs, in set_sensor_type()
1735 static void get_sensor_type(IPMIBmcSim *ibs, in get_sensor_type()
1761 static void set_sensor_reading(IPMIBmcSim *ibs, in set_sensor_reading()
2047 static void register_cmds(IPMIBmcSim *s) in register_cmds()
2064 static void ipmi_sdr_init(IPMIBmcSim *ibs) in ipmi_sdr_init()
2107 VMSTATE_UINT8(bmc_global_enables, IPMIBmcSim),
2108 VMSTATE_UINT8(msg_flags, IPMIBmcSim),
2109 VMSTATE_BOOL(watchdog_initialized, IPMIBmcSim),
2110 VMSTATE_UINT8(watchdog_use, IPMIBmcSim),
2111 VMSTATE_UINT8(watchdog_action, IPMIBmcSim),
2112 VMSTATE_UINT8(watchdog_pretimeout, IPMIBmcSim),
2113 VMSTATE_UINT8(watchdog_expired, IPMIBmcSim),
2114 VMSTATE_UINT16(watchdog_timeout, IPMIBmcSim),
2115 VMSTATE_BOOL(watchdog_running, IPMIBmcSim),
2116 VMSTATE_BOOL(watchdog_preaction_ran, IPMIBmcSim),
2117 VMSTATE_INT64(watchdog_expiry, IPMIBmcSim),
2118 VMSTATE_UINT8_ARRAY(evtbuf, IPMIBmcSim, 16),
2119 VMSTATE_UINT8(sensors[IPMI_WATCHDOG_SENSOR].status, IPMIBmcSim),
2120 VMSTATE_UINT8(sensors[IPMI_WATCHDOG_SENSOR].reading, IPMIBmcSim),
2121 VMSTATE_UINT16(sensors[IPMI_WATCHDOG_SENSOR].states, IPMIBmcSim),
2122 VMSTATE_UINT16(sensors[IPMI_WATCHDOG_SENSOR].assert_states, IPMIBmcSim),
2124 IPMIBmcSim),
2125 VMSTATE_UINT16(sensors[IPMI_WATCHDOG_SENSOR].assert_enable, IPMIBmcSim),
2164 IPMIBmcSim *ibs = IPMI_BMC_SIMULATOR(b); in ipmi_sim_realize()
2195 DEFINE_PROP_UINT16("fruareasize", IPMIBmcSim, fru.areasize, 1024),
2196 DEFINE_PROP_STRING("frudatafile", IPMIBmcSim, fru.filename),
2197 DEFINE_PROP_STRING("sdrfile", IPMIBmcSim, sdr_filename),
2198 DEFINE_PROP_UINT8("device_id", IPMIBmcSim, device_id, 0x20),
2199 DEFINE_PROP_UINT8("ipmi_version", IPMIBmcSim, ipmi_version, 0x02),
2200 DEFINE_PROP_UINT8("device_rev", IPMIBmcSim, device_rev, 0),
2201 DEFINE_PROP_UINT8("fwrev1", IPMIBmcSim, fwrev1, 0),
2202 DEFINE_PROP_UINT8("fwrev2", IPMIBmcSim, fwrev2, 0),
2203 DEFINE_PROP_UINT32("mfg_id", IPMIBmcSim, mfg_id, 0),
2204 DEFINE_PROP_UINT16("product_id", IPMIBmcSim, product_id, 0),
2205 DEFINE_PROP_UUID_NODEFAULT("guid", IPMIBmcSim, uuid),
2223 .instance_size = sizeof(IPMIBmcSim),