Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 61 lines (52 sloc) 1.607 kb
5f65049 @yamahata consolidate user cpu_{in, out}[bwl] into ioport-user.c
yamahata authored
1 /*
2 * qemu user ioport functions
3 *
4 * Copyright (c) 2003-2008 Fabrice Bellard
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
8167ee8 @blueswirl Update to a hopefully more future proof FSF address
blueswirl authored
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
5f65049 @yamahata consolidate user cpu_{in, out}[bwl] into ioport-user.c
yamahata authored
18 */
19
20 #include <stdio.h>
21
22 #include "qemu.h"
23 #include "qemu-common.h"
24 #include "ioport.h"
25
c227f09 Revert "Get rid of _t suffix"
Anthony Liguori authored
26 void cpu_outb(pio_addr_t addr, uint8_t val)
5f65049 @yamahata consolidate user cpu_{in, out}[bwl] into ioport-user.c
yamahata authored
27 {
0732353 @yamahata ioport: use uint{32, 16, 8}_t for ioport value and pio_addr_t for iop…
yamahata authored
28 fprintf(stderr, "outb: port=0x%04"FMT_pioaddr", data=%02"PRIx8"\n",
29 addr, val);
5f65049 @yamahata consolidate user cpu_{in, out}[bwl] into ioport-user.c
yamahata authored
30 }
31
c227f09 Revert "Get rid of _t suffix"
Anthony Liguori authored
32 void cpu_outw(pio_addr_t addr, uint16_t val)
5f65049 @yamahata consolidate user cpu_{in, out}[bwl] into ioport-user.c
yamahata authored
33 {
0732353 @yamahata ioport: use uint{32, 16, 8}_t for ioport value and pio_addr_t for iop…
yamahata authored
34 fprintf(stderr, "outw: port=0x%04"FMT_pioaddr", data=%04"PRIx16"\n",
35 addr, val);
5f65049 @yamahata consolidate user cpu_{in, out}[bwl] into ioport-user.c
yamahata authored
36 }
37
c227f09 Revert "Get rid of _t suffix"
Anthony Liguori authored
38 void cpu_outl(pio_addr_t addr, uint32_t val)
5f65049 @yamahata consolidate user cpu_{in, out}[bwl] into ioport-user.c
yamahata authored
39 {
0732353 @yamahata ioport: use uint{32, 16, 8}_t for ioport value and pio_addr_t for iop…
yamahata authored
40 fprintf(stderr, "outl: port=0x%04"FMT_pioaddr", data=%08"PRIx32"\n",
41 addr, val);
5f65049 @yamahata consolidate user cpu_{in, out}[bwl] into ioport-user.c
yamahata authored
42 }
43
c227f09 Revert "Get rid of _t suffix"
Anthony Liguori authored
44 uint8_t cpu_inb(pio_addr_t addr)
5f65049 @yamahata consolidate user cpu_{in, out}[bwl] into ioport-user.c
yamahata authored
45 {
0732353 @yamahata ioport: use uint{32, 16, 8}_t for ioport value and pio_addr_t for iop…
yamahata authored
46 fprintf(stderr, "inb: port=0x%04"FMT_pioaddr"\n", addr);
5f65049 @yamahata consolidate user cpu_{in, out}[bwl] into ioport-user.c
yamahata authored
47 return 0;
48 }
49
c227f09 Revert "Get rid of _t suffix"
Anthony Liguori authored
50 uint16_t cpu_inw(pio_addr_t addr)
5f65049 @yamahata consolidate user cpu_{in, out}[bwl] into ioport-user.c
yamahata authored
51 {
0732353 @yamahata ioport: use uint{32, 16, 8}_t for ioport value and pio_addr_t for iop…
yamahata authored
52 fprintf(stderr, "inw: port=0x%04"FMT_pioaddr"\n", addr);
5f65049 @yamahata consolidate user cpu_{in, out}[bwl] into ioport-user.c
yamahata authored
53 return 0;
54 }
55
c227f09 Revert "Get rid of _t suffix"
Anthony Liguori authored
56 uint32_t cpu_inl(pio_addr_t addr)
5f65049 @yamahata consolidate user cpu_{in, out}[bwl] into ioport-user.c
yamahata authored
57 {
0732353 @yamahata ioport: use uint{32, 16, 8}_t for ioport value and pio_addr_t for iop…
yamahata authored
58 fprintf(stderr, "inl: port=0x%04"FMT_pioaddr"\n", addr);
5f65049 @yamahata consolidate user cpu_{in, out}[bwl] into ioport-user.c
yamahata authored
59 return 0;
60 }
Something went wrong with that request. Please try again.