accel/tcg: Record mmio bytes during translation
[qemu/kevin.git] / tests / qtest / lpc-ich9-test.c
blob8ac95b89f7292a3f29dc6d413f478b5bbff21ba8
1 /*
2 * QTest testcases for ich9 case
4 * Copyright (c) 2020 Li Qiang <liq3ea@gmail.com>
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
8 */
10 #include "qemu/osdep.h"
12 #include "libqtest.h"
14 static void test_lp1878642_pci_bus_get_irq_level_assert(void)
16 QTestState *s;
18 s = qtest_init("-M pc-q35-5.0 "
19 "-nographic -monitor none -serial none");
21 qtest_outl(s, 0xcf8, 0x8000f840); /* PMBASE */
22 qtest_outl(s, 0xcfc, 0x5d00);
23 qtest_outl(s, 0xcf8, 0x8000f844); /* ACPI_CTRL */
24 qtest_outl(s, 0xcfc, 0xeb);
25 qtest_outw(s, 0x5d02, 0x205d);
26 qtest_quit(s);
29 int main(int argc, char **argv)
31 const char *arch = qtest_get_arch();
33 g_test_init(&argc, &argv, NULL);
35 if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
36 qtest_add_func("ich9/test_lp1878642_pci_bus_get_irq_level_assert",
37 test_lp1878642_pci_bus_get_irq_level_assert);
40 return g_test_run();