16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25 #include <sys/sysmacros.h>
26 #include <sys/types.h>
27 #include <sys/kmem.h>
28 #include <sys/ddi.h>
29 #include <sys/sunddi.h>
30 #include <sys/sunndi.h>
31 #include <sys/promif.h>
32 #include <sys/pcie.h>
33 #include <sys/pci_cap.h>
34 #include <sys/pcie_impl.h>
35 #include <sys/pcie_acpi.h>
36 #include <sys/acpi/acpi.h>
37 #include <sys/acpica.h>
38
39 ACPI_STATUS pcie_acpi_eval_osc(dev_info_t *dip, ACPI_HANDLE osc_hdl,
40 uint32_t *osc_flags);
41 static ACPI_STATUS pcie_acpi_find_osc(ACPI_HANDLE busobj,
42 ACPI_HANDLE *osc_hdlp);
43
44 #ifdef DEBUG
45 static void pcie_dump_acpi_obj(ACPI_HANDLE pcibus_obj);
46 static ACPI_STATUS pcie_walk_obj_namespace(ACPI_HANDLE hdl, uint32_t nl,
47 void *context, void **ret);
48 static ACPI_STATUS pcie_print_acpi_name(ACPI_HANDLE hdl, uint32_t nl,
49 void *context, void **ret);
50 #endif /* DEBUG */
51
52 int
53 pcie_acpi_osc(dev_info_t *dip, uint32_t *osc_flags)
54 {
55 ACPI_HANDLE pcibus_obj;
56 int status = AE_ERROR;
|
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25 #include <sys/sysmacros.h>
26 #include <sys/types.h>
27 #include <sys/kmem.h>
28 #include <sys/ddi.h>
29 #include <sys/sunddi.h>
30 #include <sys/sunndi.h>
31 #include <sys/promif.h>
32 #include <sys/pcie.h>
33 #include <sys/pci_cap.h>
34 #include <sys/pcie_impl.h>
35 #include <sys/pcie_acpi.h>
36 #include <acpica/include/acpi.h>
37 #include <sys/acpica.h>
38
39 ACPI_STATUS pcie_acpi_eval_osc(dev_info_t *dip, ACPI_HANDLE osc_hdl,
40 uint32_t *osc_flags);
41 static ACPI_STATUS pcie_acpi_find_osc(ACPI_HANDLE busobj,
42 ACPI_HANDLE *osc_hdlp);
43
44 #ifdef DEBUG
45 static void pcie_dump_acpi_obj(ACPI_HANDLE pcibus_obj);
46 static ACPI_STATUS pcie_walk_obj_namespace(ACPI_HANDLE hdl, uint32_t nl,
47 void *context, void **ret);
48 static ACPI_STATUS pcie_print_acpi_name(ACPI_HANDLE hdl, uint32_t nl,
49 void *context, void **ret);
50 #endif /* DEBUG */
51
52 int
53 pcie_acpi_osc(dev_info_t *dip, uint32_t *osc_flags)
54 {
55 ACPI_HANDLE pcibus_obj;
56 int status = AE_ERROR;
|