root / ioport-user.c @ 5bc89ef6
History | View | Annotate | Download (1.7 kB)
1 | 5f650495 | Isaku Yamahata | /*
|
---|---|---|---|
2 | 5f650495 | Isaku Yamahata | * qemu user ioport functions
|
3 | 5f650495 | Isaku Yamahata | *
|
4 | 5f650495 | Isaku Yamahata | * Copyright (c) 2003-2008 Fabrice Bellard
|
5 | 5f650495 | Isaku Yamahata | *
|
6 | 5f650495 | Isaku Yamahata | * This program is free software; you can redistribute it and/or modify
|
7 | 5f650495 | Isaku Yamahata | * it under the terms of the GNU General Public License as published by
|
8 | 5f650495 | Isaku Yamahata | * the Free Software Foundation; either version 2 of the License, or
|
9 | 5f650495 | Isaku Yamahata | * (at your option) any later version.
|
10 | 5f650495 | Isaku Yamahata | *
|
11 | 5f650495 | Isaku Yamahata | * This program is distributed in the hope that it will be useful,
|
12 | 5f650495 | Isaku Yamahata | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | 5f650495 | Isaku Yamahata | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 | 5f650495 | Isaku Yamahata | * GNU General Public License for more details.
|
15 | 5f650495 | Isaku Yamahata | *
|
16 | 5f650495 | Isaku Yamahata | * You should have received a copy of the GNU General Public License
|
17 | 8167ee88 | Blue Swirl | * along with this program; if not, see <http://www.gnu.org/licenses/>.
|
18 | 5f650495 | Isaku Yamahata | */
|
19 | 5f650495 | Isaku Yamahata | |
20 | 5f650495 | Isaku Yamahata | #include <stdio.h> |
21 | 5f650495 | Isaku Yamahata | |
22 | 5f650495 | Isaku Yamahata | #include "qemu.h" |
23 | 5f650495 | Isaku Yamahata | #include "qemu-common.h" |
24 | 5f650495 | Isaku Yamahata | #include "ioport.h" |
25 | 5f650495 | Isaku Yamahata | |
26 | 07323531 | Isaku Yamahata | void cpu_outb(CPUState *env, pio_addr_t addr, uint8_t val)
|
27 | 5f650495 | Isaku Yamahata | { |
28 | 07323531 | Isaku Yamahata | fprintf(stderr, "outb: port=0x%04"FMT_pioaddr", data=%02"PRIx8"\n", |
29 | 07323531 | Isaku Yamahata | addr, val); |
30 | 5f650495 | Isaku Yamahata | } |
31 | 5f650495 | Isaku Yamahata | |
32 | 07323531 | Isaku Yamahata | void cpu_outw(CPUState *env, pio_addr_t addr, uint16_t val)
|
33 | 5f650495 | Isaku Yamahata | { |
34 | 07323531 | Isaku Yamahata | fprintf(stderr, "outw: port=0x%04"FMT_pioaddr", data=%04"PRIx16"\n", |
35 | 07323531 | Isaku Yamahata | addr, val); |
36 | 5f650495 | Isaku Yamahata | } |
37 | 5f650495 | Isaku Yamahata | |
38 | 07323531 | Isaku Yamahata | void cpu_outl(CPUState *env, pio_addr_t addr, uint32_t val)
|
39 | 5f650495 | Isaku Yamahata | { |
40 | 07323531 | Isaku Yamahata | fprintf(stderr, "outl: port=0x%04"FMT_pioaddr", data=%08"PRIx32"\n", |
41 | 07323531 | Isaku Yamahata | addr, val); |
42 | 5f650495 | Isaku Yamahata | } |
43 | 5f650495 | Isaku Yamahata | |
44 | 07323531 | Isaku Yamahata | uint8_t cpu_inb(CPUState *env, pio_addr_t addr) |
45 | 5f650495 | Isaku Yamahata | { |
46 | 07323531 | Isaku Yamahata | fprintf(stderr, "inb: port=0x%04"FMT_pioaddr"\n", addr); |
47 | 5f650495 | Isaku Yamahata | return 0; |
48 | 5f650495 | Isaku Yamahata | } |
49 | 5f650495 | Isaku Yamahata | |
50 | 07323531 | Isaku Yamahata | uint16_t cpu_inw(CPUState *env, pio_addr_t addr) |
51 | 5f650495 | Isaku Yamahata | { |
52 | 07323531 | Isaku Yamahata | fprintf(stderr, "inw: port=0x%04"FMT_pioaddr"\n", addr); |
53 | 5f650495 | Isaku Yamahata | return 0; |
54 | 5f650495 | Isaku Yamahata | } |
55 | 5f650495 | Isaku Yamahata | |
56 | 07323531 | Isaku Yamahata | uint32_t cpu_inl(CPUState *env, pio_addr_t addr) |
57 | 5f650495 | Isaku Yamahata | { |
58 | 07323531 | Isaku Yamahata | fprintf(stderr, "inl: port=0x%04"FMT_pioaddr"\n", addr); |
59 | 5f650495 | Isaku Yamahata | return 0; |
60 | 5f650495 | Isaku Yamahata | } |