]> git.proxmox.com Git - qemu.git/blame - ioport.h
ioport: remove some #ifdef DEBUG_UNUSED_IOPORT.
[qemu.git] / ioport.h
CommitLineData
32993977
IY
1/*
2 * defines ioport related functions
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library 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 GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
8167ee88 17 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
32993977
IY
18 */
19
20/**************************************************************************
21 * IO ports API
22 */
23
24#ifndef IOPORT_H
25#define IOPORT_H
26
27#include "qemu-common.h"
28
29#define MAX_IOPORTS (64 * 1024)
d56dd6cf 30#define IOPORTS_MASK (MAX_IOPORTS - 1)
32993977
IY
31
32/* These should really be in isa.h, but are here to make pc.h happy. */
33typedef void (IOPortWriteFunc)(void *opaque, uint32_t address, uint32_t data);
34typedef uint32_t (IOPortReadFunc)(void *opaque, uint32_t address);
35
36int register_ioport_read(int start, int length, int size,
37 IOPortReadFunc *func, void *opaque);
38int register_ioport_write(int start, int length, int size,
39 IOPortWriteFunc *func, void *opaque);
40void isa_unassign_ioport(int start, int length);
41
42
43/* NOTE: as these functions may be even used when there is an isa
44 brige on non x86 targets, we always defined them */
45#if !defined(NO_CPU_IO_DEFS) && defined(NEED_CPU_H)
46void cpu_outb(CPUState *env, int addr, int val);
47void cpu_outw(CPUState *env, int addr, int val);
48void cpu_outl(CPUState *env, int addr, int val);
49int cpu_inb(CPUState *env, int addr);
50int cpu_inw(CPUState *env, int addr);
51int cpu_inl(CPUState *env, int addr);
52#endif
53
54#endif /* IOPORT_H */