tr->tco.sts2 |= TCO_BOOT_STS;
tr->timeouts_no = 0;
- if (!(gcs & ICH9_CC_GCS_NO_REBOOT)) {
+ if (!lpc->pin_strap.spkr_hi && !(gcs & ICH9_CC_GCS_NO_REBOOT)) {
watchdog_perform_action();
tco_timer_stop(tr);
return;
}
};
+static Property ich9_lpc_properties[] = {
+ DEFINE_PROP_BOOL("noreboot", ICH9LPCState, pin_strap.spkr_hi, true),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
static void ich9_lpc_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->reset = ich9_lpc_reset;
k->init = ich9_lpc_init;
dc->vmsd = &vmstate_ich9_lpc;
+ dc->props = ich9_lpc_properties;
k->config_write = ich9_lpc_config_write;
dc->desc = "ICH9 LPC bridge";
k->vendor_id = PCI_VENDOR_ID_INTEL;
ICH9LPCPMRegs pm;
uint32_t sci_level; /* track sci level */
+ /* 2.24 Pin Straps */
+ struct {
+ bool spkr_hi;
+ } pin_strap;
+
/* 10.1 Chipset Configuration registers(Memory Space)
which is pointed by RCBA */
uint8_t chip_config[ICH9_CC_SIZE];
typedef struct {
const char *args;
+ bool noreboot;
QPCIDevice *dev;
void *lpc_base;
void *tco_io_base;
QTestState *qs;
char *s;
- s = g_strdup_printf("-machine q35 %s", !d->args ? "" : d->args);
+ s = g_strdup_printf("-machine q35 %s %s",
+ d->noreboot ? "" : "-global ICH9-LPC.noreboot=false",
+ !d->args ? "" : d->args);
qs = qtest_start(s);
qtest_irq_intercept_in(qs, "ioapic");
g_free(s);
TestData d;
d.args = NULL;
+ d.noreboot = true;
test_init(&d);
g_assert_cmpint(qpci_io_readw(d.dev, d.tco_io_base + TCO_RLD), ==,
TCO_RLD_DEFAULT);
int ret;
d.args = NULL;
+ d.noreboot = true;
test_init(&d);
stop_tco(&d);
int ret;
d.args = NULL;
+ d.noreboot = true;
test_init(&d);
stop_tco(&d);
QDict *ad;
td.args = "-watchdog-action pause";
+ td.noreboot = false;
test_init(&td);
stop_tco(&td);
QDict *ad;
td.args = "-watchdog-action reset";
+ td.noreboot = false;
test_init(&td);
stop_tco(&td);
QDict *ad;
td.args = "-watchdog-action shutdown";
+ td.noreboot = false;
test_init(&td);
stop_tco(&td);
QDict *ad;
td.args = "-watchdog-action none";
+ td.noreboot = false;
test_init(&td);
stop_tco(&td);
uint16_t rld;
d.args = NULL;
+ d.noreboot = true;
test_init(&d);
stop_tco(&d);
uint16_t val;
d.args = NULL;
+ d.noreboot = true;
test_init(&d);
val = TCO_LOCK;
int ret;
d.args = NULL;
+ d.noreboot = true;
test_init(&d);
stop_tco(&d);
uint16_t val;
int ret;
- d.args = "-watchdog-action none";
+ d.args = NULL;
+ d.noreboot = true;
test_init(&d);
stop_tco(&d);