bsd/darwin-user: mmap_frag() users only check for -1 error
[qemu/pdb.git] / hw / pcie_host.h
blob7754ac94e84ab52ad30c008069af66c29deb5cf5
1 /*
2 * pcie_host.h
4 * Copyright (c) 2009 Isaku Yamahata <yamahata at valinux co jp>
5 * VA Linux Systems Japan K.K.
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.
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.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef PCIE_HOST_H
23 #define PCIE_HOST_H
25 #include "pci_host.h"
27 struct PCIExpressHost {
28 PCIHostState pci;
30 /* express part */
32 /* base address where MMCONFIG area is mapped. */
33 target_phys_addr_t base_addr;
35 /* the size of MMCONFIG area. It's host bridge dependent */
36 target_phys_addr_t size;
38 /* result of cpu_register_io_memory() to map MMCONFIG area */
39 int mmio_index;
42 int pcie_host_init(PCIExpressHost *e);
43 void pcie_host_mmcfg_unmap(PCIExpressHost *e);
44 void pcie_host_mmcfg_map(PCIExpressHost *e,
45 target_phys_addr_t addr, uint32_t size);
46 void pcie_host_mmcfg_update(PCIExpressHost *e,
47 int enable,
48 target_phys_addr_t addr, uint32_t size);
50 #endif /* PCIE_HOST_H */