]> git.proxmox.com Git - mirror_qemu.git/blame - hw/pcie_host.h
pseries: Implement automatic PAPR VIO address allocation
[mirror_qemu.git] / hw / 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
24#include "pci_host.h"
c76f990e 25#include "memory.h"
a9f49946 26
fb47a2e9 27struct PCIExpressHost {
a9f49946
IY
28 PCIHostState pci;
29
30 /* express part */
31
32 /* base address where MMCONFIG area is mapped. */
33 target_phys_addr_t base_addr;
34
35 /* the size of MMCONFIG area. It's host bridge dependent */
36 target_phys_addr_t size;
37
c76f990e
AK
38 /* MMCONFIG mmio area */
39 MemoryRegion mmio;
fb47a2e9 40};
a9f49946 41
c76f990e 42int pcie_host_init(PCIExpressHost *e, uint32_t size);
a9f49946 43void pcie_host_mmcfg_unmap(PCIExpressHost *e);
c76f990e 44void pcie_host_mmcfg_map(PCIExpressHost *e, target_phys_addr_t addr);
a9f49946
IY
45void pcie_host_mmcfg_update(PCIExpressHost *e,
46 int enable,
c76f990e 47 target_phys_addr_t addr);
a9f49946
IY
48
49#endif /* PCIE_HOST_H */