\hypertarget{acpi__pcib__pci_8c_source}{}\doxysection{acpi\+\_\+pcib\+\_\+pci.\+c}
\label{acpi__pcib__pci_8c_source}\index{dev/acpica/acpi\_pcib\_pci.c@{dev/acpica/acpi\_pcib\_pci.c}}
\mbox{\hyperlink{acpi__pcib__pci_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00002}00002 \textcolor{comment}{ * Copyright (c) 2000 Michael Smith}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00003}00003 \textcolor{comment}{ * Copyright (c) 2000 BSDi}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00004}00004 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00005}00005 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00006}00006 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00007}00007 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00008}00008 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00009}00009 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00010}00010 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00011}00011 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00012}00012 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00013}00013 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00014}00014 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00015}00015 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00016}00016 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00017}00017 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00018}00018 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00019}00019 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00020}00020 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00021}00021 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00022}00022 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00023}00023 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00024}00024 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00025}00025 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00026}00026 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00027}00027 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00028}00028 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00029}\mbox{\hyperlink{acpi__pcib__pci_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00029}} \mbox{\hyperlink{acpi__pcib__pci_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00030}00030 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00031}00031 \textcolor{preprocessor}{\#include "{}opt\_acpi.h"{}}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00032}00032 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/rman.h>}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00039}00039 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <contrib/dev/acpica/include/acpi.h>}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <contrib/dev/acpica/include/accommon.h>}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00042}00042 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{acpivar_8h}{dev/acpica/acpivar.h}}>}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{acpi__pcibvar_8h}{dev/acpica/acpi\_pcibvar.h}}>}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00045}00045 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <machine/pci\_cfgreg.h>}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <dev/pci/pcivar.h>}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <dev/pci/pcireg.h>}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <dev/pci/pcib\_private.h>}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00050}00050 \textcolor{preprocessor}{\#include "{}pcib\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00051}00051 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00052}00052 \textcolor{comment}{/* Hooks for the ACPI CA debugging infrastructure. */}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00053}\mbox{\hyperlink{acpi__pcib__pci_8c_ac76d546e6c738c61838d855c815bfbcc}{00053}} \textcolor{preprocessor}{\#define \_COMPONENT      ACPI\_BUS}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00054}00054 ACPI\_MODULE\_NAME(\textcolor{stringliteral}{"{}PCI\_PCI"{}})}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00056}\mbox{\hyperlink{structacpi__pcib__softc}{00056}} struct \mbox{\hyperlink{structacpi__pcib__softc}{acpi\_pcib\_softc}} \{}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00057}\mbox{\hyperlink{structacpi__pcib__softc_a31a56138a4d0e31f681a4dd204569e2d}{00057}}     \textcolor{keyword}{struct }pcib\_softc   ap\_pcibsc;}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00058}\mbox{\hyperlink{structacpi__pcib__softc_a4dc83d23967906ea8c502e65587fac70}{00058}}     ACPI\_HANDLE         \mbox{\hyperlink{structacpi__pcib__softc_a4dc83d23967906ea8c502e65587fac70}{ap\_handle}};}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00059}\mbox{\hyperlink{structacpi__pcib__softc_a03153f1d7538f302d95cd34ea0d6f1b6}{00059}}     ACPI\_BUFFER         \mbox{\hyperlink{structacpi__pcib__softc_a03153f1d7538f302d95cd34ea0d6f1b6}{ap\_prt}};           \textcolor{comment}{/* interrupt routing table */}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00060}00060 \};}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00062}\mbox{\hyperlink{structacpi__pcib__lookup__info}{00062}} \textcolor{keyword}{struct }\mbox{\hyperlink{structacpi__pcib__lookup__info}{acpi\_pcib\_lookup\_info}} \{}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00063}\mbox{\hyperlink{structacpi__pcib__lookup__info_a990722670e295abbeb48c9348dd09988}{00063}}     UINT32              \mbox{\hyperlink{structacpi__pcib__lookup__info_a990722670e295abbeb48c9348dd09988}{address}};}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00064}\mbox{\hyperlink{structacpi__pcib__lookup__info_a6809b21e5b91a6032379dd7774b428b9}{00064}}     ACPI\_HANDLE         \mbox{\hyperlink{structacpi__pcib__lookup__info_a6809b21e5b91a6032379dd7774b428b9}{handle}};}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00065}00065 \};}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00066}00066 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00067}00067 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{acpi__pcib__pci_8c_adc0065e3cd9dea04a2895a3ebeb1c7a0}{acpi\_pcib\_pci\_probe}}(device\_t bus);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00068}00068 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{acpi__pcib__pci_8c_adbeb2d3731ec3c3083f234ec679609e0}{acpi\_pcib\_pci\_attach}}(device\_t bus);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00069}00069 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{acpi__pcib__pci_8c_a6561bc4d29472ff3ab2598ceadd939ab}{acpi\_pcib\_pci\_detach}}(device\_t bus);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00070}00070 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{acpi__pcib__pci_8c_a67ef96a7eb02431331c89d9ba1ab84e8}{acpi\_pcib\_read\_ivar}}(device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, device\_t child,}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00071}00071                             \textcolor{keywordtype}{int} which, uintptr\_t *result);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00072}00072 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{acpi__pcib__pci_8c_a58091cdbddb8a281ba8765aba74d4b4e}{acpi\_pcib\_pci\_route\_interrupt}}(device\_t pcib,}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00073}00073                             device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{keywordtype}{int} pin);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00074}00074 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00075}\mbox{\hyperlink{acpi__pcib__pci_8c_a51f2f821e5ab89ecb6084de7142f58ef}{00075}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{acpi__pcib__pci_8c_a51f2f821e5ab89ecb6084de7142f58ef}{acpi\_pcib\_pci\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00076}00076     \textcolor{comment}{/* Device interface */}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00077}00077     DEVMETHOD(device\_probe,             \mbox{\hyperlink{acpi__pcib__pci_8c_adc0065e3cd9dea04a2895a3ebeb1c7a0}{acpi\_pcib\_pci\_probe}}),}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00078}00078     DEVMETHOD(device\_attach,            \mbox{\hyperlink{acpi__pcib__pci_8c_adbeb2d3731ec3c3083f234ec679609e0}{acpi\_pcib\_pci\_attach}}),}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00079}00079     DEVMETHOD(device\_detach,            \mbox{\hyperlink{acpi__pcib__pci_8c_a6561bc4d29472ff3ab2598ceadd939ab}{acpi\_pcib\_pci\_detach}}),}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00080}00080 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00081}00081     \textcolor{comment}{/* Bus interface */}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00082}00082     DEVMETHOD(bus\_read\_ivar,            \mbox{\hyperlink{acpi__pcib__pci_8c_a67ef96a7eb02431331c89d9ba1ab84e8}{acpi\_pcib\_read\_ivar}}),}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00083}00083     DEVMETHOD(bus\_get\_cpus,             \mbox{\hyperlink{acpi__pcib_8c_a6113a8e04526d98fdd882f66550465e0}{acpi\_pcib\_get\_cpus}}),}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00084}00084 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00085}00085     \textcolor{comment}{/* pcib interface */}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00086}00086     DEVMETHOD(pcib\_route\_interrupt,     \mbox{\hyperlink{acpi__pcib__pci_8c_a58091cdbddb8a281ba8765aba74d4b4e}{acpi\_pcib\_pci\_route\_interrupt}}),}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00087}00087     DEVMETHOD(pcib\_power\_for\_sleep,     \mbox{\hyperlink{acpi__pcib_8c_a789bb07f61ea692d4aa09bca163dab13}{acpi\_pcib\_power\_for\_sleep}}),}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00089}00089     DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00090}00090 \};}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00091}00091 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00092}\mbox{\hyperlink{acpi__pcib__pci_8c_afdd98ca0b99aa132fd0c39e7f0a5f980}{00092}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{acpi__pcib__pci_8c_afdd98ca0b99aa132fd0c39e7f0a5f980}{pcib\_devclass}};}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00094}\mbox{\hyperlink{acpi__pcib__pci_8c_ac89aae8570392890e39ece74c8cb870d}{00094}} \mbox{\hyperlink{acpi__pcib__pci_8c_ac89aae8570392890e39ece74c8cb870d}{DEFINE\_CLASS\_1}}(pcib, acpi\_pcib\_pci\_driver, \mbox{\hyperlink{acpi__pcib__pci_8c_a51f2f821e5ab89ecb6084de7142f58ef}{acpi\_pcib\_pci\_methods}},}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00095}00095     \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structacpi__pcib__softc}{acpi\_pcib\_softc}}), pcib\_driver);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00096}\mbox{\hyperlink{acpi__pcib__pci_8c_aa60a1496af9f11ec698082bdc0a30367}{00096}} \mbox{\hyperlink{acpi__pcib__pci_8c_aa60a1496af9f11ec698082bdc0a30367}{DRIVER\_MODULE}}(acpi\_pcib, pci, acpi\_pcib\_pci\_driver, \mbox{\hyperlink{acpi__pcib__pci_8c_afdd98ca0b99aa132fd0c39e7f0a5f980}{pcib\_devclass}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00097}\mbox{\hyperlink{acpi__pcib__pci_8c_af8b6dc6df8a28d6c5666184c6fa54900}{00097}} \mbox{\hyperlink{acpi__pcib__pci_8c_af8b6dc6df8a28d6c5666184c6fa54900}{MODULE\_DEPEND}}(acpi\_pcib, \mbox{\hyperlink{acpi__if_8m_a5d0db714ee9e465e6cab2260587a6062}{acpi}}, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00098}00098 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00099}00099 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00100}\mbox{\hyperlink{acpi__pcib__pci_8c_adc0065e3cd9dea04a2895a3ebeb1c7a0}{00100}} \mbox{\hyperlink{acpi__pcib__pci_8c_adc0065e3cd9dea04a2895a3ebeb1c7a0}{acpi\_pcib\_pci\_probe}}(device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}})}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00101}00101 \{}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00102}00102 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00103}00103     \textcolor{keywordflow}{if} (pci\_get\_class(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}) != PCIC\_BRIDGE ||}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00104}00104         pci\_get\_subclass(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}) != PCIS\_BRIDGE\_PCI ||}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00105}00105         \mbox{\hyperlink{acpi_8c_a1713faa3d6beef1dd28bdb59dd901f30}{acpi\_disabled}}(\textcolor{stringliteral}{"{}pci"{}}))}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00106}00106         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00107}00107     \textcolor{keywordflow}{if} (acpi\_get\_handle(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}) == NULL)}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00108}00108         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00109}00109     \textcolor{keywordflow}{if} (pci\_cfgregopen() == 0)}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00110}00110         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00111}00111 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00112}00112     device\_set\_desc(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{stringliteral}{"{}ACPI PCI-\/PCI bridge"{}});}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00113}00113     \textcolor{keywordflow}{return} (-\/1000);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00114}00114 \}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00115}00115 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00116}00116 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00117}\mbox{\hyperlink{acpi__pcib__pci_8c_adbeb2d3731ec3c3083f234ec679609e0}{00117}} \mbox{\hyperlink{acpi__pcib__pci_8c_adbeb2d3731ec3c3083f234ec679609e0}{acpi\_pcib\_pci\_attach}}(device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}})}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00118}00118 \{}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00119}00119     \textcolor{keyword}{struct }\mbox{\hyperlink{structacpi__pcib__softc}{acpi\_pcib\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00120}00120 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00121}00121     ACPI\_FUNCTION\_TRACE((\textcolor{keywordtype}{char} *)(uintptr\_t)\_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00122}00122 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00123}00123     pcib\_attach\_common(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00124}00124     sc = device\_get\_softc(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00125}00125     sc-\/>\mbox{\hyperlink{structacpi__pcib__softc_a4dc83d23967906ea8c502e65587fac70}{ap\_handle}} = acpi\_get\_handle(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00126}00126     \mbox{\hyperlink{acpi__pcib_8c_ac88bfc7dc98ec7f922ad8ef90fe79660}{acpi\_pcib\_fetch\_prt}}(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \&sc-\/>\mbox{\hyperlink{structacpi__pcib__softc_a03153f1d7538f302d95cd34ea0d6f1b6}{ap\_prt}});}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00127}00127 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00128}00128     \textcolor{keywordflow}{return} (pcib\_attach\_child(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}));}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00129}00129 \}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00131}00131 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00132}\mbox{\hyperlink{acpi__pcib__pci_8c_a6561bc4d29472ff3ab2598ceadd939ab}{00132}} \mbox{\hyperlink{acpi__pcib__pci_8c_a6561bc4d29472ff3ab2598ceadd939ab}{acpi\_pcib\_pci\_detach}}(device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}})}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00133}00133 \{}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00134}00134     \textcolor{keyword}{struct }\mbox{\hyperlink{structacpi__pcib__softc}{acpi\_pcib\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00135}00135     \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00136}00136 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00137}00137     ACPI\_FUNCTION\_TRACE((\textcolor{keywordtype}{char} *)(uintptr\_t)\_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00138}00138 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00139}00139     sc = device\_get\_softc(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00140}00140     error = pcib\_detach(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00141}00141     \textcolor{keywordflow}{if} (error == 0)}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00142}00142             \mbox{\hyperlink{OsdMemory_8c_aa3baac772ec8f5df4a49d97e39bfb307}{AcpiOsFree}}(sc-\/>\mbox{\hyperlink{structacpi__pcib__softc_a03153f1d7538f302d95cd34ea0d6f1b6}{ap\_prt}}.Pointer);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00143}00143     \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00144}00144 \}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00146}00146 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00147}\mbox{\hyperlink{acpi__pcib__pci_8c_a67ef96a7eb02431331c89d9ba1ab84e8}{00147}} \mbox{\hyperlink{acpi__pcib__pci_8c_a67ef96a7eb02431331c89d9ba1ab84e8}{acpi\_pcib\_read\_ivar}}(device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, device\_t child, \textcolor{keywordtype}{int} which, uintptr\_t *result)}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00148}00148 \{}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00149}00149     \textcolor{keyword}{struct }\mbox{\hyperlink{structacpi__pcib__softc}{acpi\_pcib\_softc}} *sc = device\_get\_softc(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}});}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00150}00150 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00151}00151     \textcolor{keywordflow}{switch} (which) \{}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00152}00152     \textcolor{keywordflow}{case} \mbox{\hyperlink{acpivar_8h_a240e035fd3c4486c1c799805ff381607}{ACPI\_IVAR\_HANDLE}}:}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00153}00153         *result = (uintptr\_t)sc-\/>\mbox{\hyperlink{structacpi__pcib__softc_a4dc83d23967906ea8c502e65587fac70}{ap\_handle}};}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00154}00154         return (0);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00155}00155     \}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00156}00156     \textcolor{keywordflow}{return} (pcib\_read\_ivar(\mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, child, which, result));}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00157}00157 \}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00158}00158 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00159}00159 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00160}\mbox{\hyperlink{acpi__pcib__pci_8c_a58091cdbddb8a281ba8765aba74d4b4e}{00160}} \mbox{\hyperlink{acpi__pcib__pci_8c_a58091cdbddb8a281ba8765aba74d4b4e}{acpi\_pcib\_pci\_route\_interrupt}}(device\_t pcib, device\_t \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, \textcolor{keywordtype}{int} pin)}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00161}00161 \{}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00162}00162     \textcolor{keyword}{struct }\mbox{\hyperlink{structacpi__pcib__softc}{acpi\_pcib\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00163}00163 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00164}00164     sc = device\_get\_softc(pcib);}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00165}00165 }
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00166}00166     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00167}00167 \textcolor{comment}{     * If we don't have a \_PRT, fall back to the swizzle method}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00168}00168 \textcolor{comment}{     * for routing interrupts.}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00169}00169 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00170}00170     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structacpi__pcib__softc_a03153f1d7538f302d95cd34ea0d6f1b6}{ap\_prt}}.Pointer == NULL)}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00171}00171         \textcolor{keywordflow}{return} (pcib\_route\_interrupt(pcib, \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, pin));}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00172}00172     \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00173}00173         \textcolor{keywordflow}{return} (\mbox{\hyperlink{acpi__pcib_8c_a98b142f6e7f8d384c3600e73f1aa2857}{acpi\_pcib\_route\_interrupt}}(pcib, \mbox{\hyperlink{acpi__bus__if_8m_a5b84348f4a546955afe3156099e597f4}{dev}}, pin, \&sc-\/>\mbox{\hyperlink{structacpi__pcib__softc_a03153f1d7538f302d95cd34ea0d6f1b6}{ap\_prt}}));}
\DoxyCodeLine{\Hypertarget{acpi__pcib__pci_8c_source_l00174}00174 \}}

\end{DoxyCode}
