/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <sys/sysmacros.h>
#include <sys/pcie_impl.h>
#include <sys/pcie_acpi.h>
#ifdef DEBUG
#endif /* DEBUG */
int
{
/* Mark this so we know _OSC has been called for this device */
/*
* (1) Find the ACPI device node for this bus node.
*/
return (DDI_FAILURE);
}
/*
* (2) Check if _OSC method is present.
*/
/* no _OSC method present */
PCIE_DBG("no _OSC method present for dip %p\n",
(void *)dip);
return (DDI_FAILURE);
}
/*
* (3) _OSC method exists; evaluate _OSC.
*/
PCIE_DBG("Failed to evaluate _OSC method for dip 0x%p\n",
(void *)dip);
return (DDI_FAILURE);
}
#ifdef DEBUG
if (pcie_debug_flags > 1)
#endif /* DEBUG */
return (DDI_SUCCESS);
}
static ACPI_STATUS
{
/*
* Walk up the ACPI device tree looking for _OSC method.
*/
do {
break;
return (status);
}
{0x5b, 0x4d, 0xdb, 0x33, 0xf7, 0x1f, 0x1c, 0x40,
0x96, 0x57, 0x74, 0x41, 0xc0, 0x3d, 0xd7, 0x66};
/*
* Evaluate _OSC method.
*/
{
/* construct argument list */
/* arg0 - UUID */
/* arg1 - Revision ID */
/* arg2 - Count */
/* arg3 - Capabilities Buffer */
/* Initialize Capabilities Buffer */
/* DWORD1: no query flag set */
caps_buffer[0] = 0;
/* DWORD2: Support Field */
/* DWORD3: Control Field */
/* If hotplug is supported add the corresponding control fields */
if (*osc_flags & OSC_CONTROL_PCIE_NAT_HP)
PCIE_DBG("Failed to execute _OSC method (status %d)\n",
status);
return (status);
}
/* LINTED pointer alignment */
/* check the STATUS word in the capability buffer */
if (rbuf[0] & OSC_STATUS_ERRORS) {
return (AE_ERROR);
}
PCIE_DBG("_OSC method evaluation completed for 0x%p: "
"STATUS 0x%x SUPPORT 0x%x CONTROL req 0x%x, CONTROL ret 0x%x\n",
return (AE_OK);
}
/*
* Checks if _OSC method has been called for this device.
*/
{
}
#ifdef DEBUG
static void
{
int status;
if (pcibus_obj == NULL)
return;
/* print the full path name */
return;
/* dump all the methods for this bus node */
PCIE_DBG(" METHODS: \n");
/* dump all the child devices */
}
/*ARGSUSED*/
static ACPI_STATUS
void **ret)
{
int status;
/* print the full path name */
return (status);
buf[0] = 0;
while (nl--)
/* dump all the methods for this device */
return (status);
}
/*ARGSUSED*/
static ACPI_STATUS
{
int status;
return (AE_OK);
}
#endif /* DEBUG */