]> git.proxmox.com Git - qemu.git/blame - hw/pci/pcie_host.h
tcg-s390: Fix merge error in tgen_brcond
[qemu.git] / hw / pci / pcie_host.h
CommitLineData
a9f49946
IY
1/*
2 * pcie_host.h
3 *
4 * Copyright (c) 2009 Isaku Yamahata <yamahata at valinux co jp>
5 * VA Linux Systems Japan K.K.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License along
70539e18 18 * with this program; if not, see <http://www.gnu.org/licenses/>.
a9f49946
IY
19 */
20
21#ifndef PCIE_HOST_H
22#define PCIE_HOST_H
23
c759b24f 24#include "hw/pci/pci_host.h"
022c62cb 25#include "exec/memory.h"
a9f49946 26
bc927e48
JB
27#define TYPE_PCIE_HOST_BRIDGE "pcie-host-bridge"
28#define PCIE_HOST_BRIDGE(obj) \
29 OBJECT_CHECK(PCIExpressHost, (obj), TYPE_PCIE_HOST_BRIDGE)
30
fb47a2e9 31struct PCIExpressHost {
a9f49946
IY
32 PCIHostState pci;
33
34 /* express part */
35
36 /* base address where MMCONFIG area is mapped. */
a8170e5e 37 hwaddr base_addr;
a9f49946
IY
38
39 /* the size of MMCONFIG area. It's host bridge dependent */
a8170e5e 40 hwaddr size;
a9f49946 41
c76f990e
AK
42 /* MMCONFIG mmio area */
43 MemoryRegion mmio;
fb47a2e9 44};
a9f49946 45
c702ddb8 46int pcie_host_init(PCIExpressHost *e);
a9f49946 47void pcie_host_mmcfg_unmap(PCIExpressHost *e);
c702ddb8 48void pcie_host_mmcfg_map(PCIExpressHost *e, hwaddr addr, uint32_t size);
a9f49946
IY
49void pcie_host_mmcfg_update(PCIExpressHost *e,
50 int enable,
c702ddb8
JB
51 hwaddr addr,
52 uint32_t size);
a9f49946
IY
53
54#endif /* PCIE_HOST_H */