1
2
3
4
5
6
7
8
9
10#include "qemu/osdep.h"
11
12#include "libqtest.h"
13
14static void test_lp1878642_pci_bus_get_irq_level_assert(void)
15{
16 QTestState *s;
17
18 s = qtest_init("-M pc-q35-5.0 "
19 "-nographic -monitor none -serial none");
20
21 qtest_outl(s, 0xcf8, 0x8000f840);
22 qtest_outl(s, 0xcfc, 0x5d00);
23 qtest_outl(s, 0xcf8, 0x8000f844);
24 qtest_outl(s, 0xcfc, 0xeb);
25 qtest_outw(s, 0x5d02, 0x205d);
26 qtest_quit(s);
27}
28
29int main(int argc, char **argv)
30{
31 const char *arch = qtest_get_arch();
32
33 g_test_init(&argc, &argv, NULL);
34
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);
38 }
39
40 return g_test_run();
41}
42