pci_cfgacc_x86.c revision 586fe2c2bfa4216c91ca1ccaf9b43738d60ede7e
/*
* 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
*/
/*
*/
#include <sys/pci_cfgacc.h>
#include <sys/pci_cfgspace.h>
#include <sys/pci_cfgspace_impl.h>
#include <sys/sysmacros.h>
#include <sys/x86_archext.h>
#include <vm/seg_kmem.h>
#include <vm/kboot_mmu.h>
/* patchable variables */
void pci_cfgacc_acc(pci_cfgacc_req_t *);
/*
* IS_P2ALIGNED() is used to make sure offset is 'size'-aligned, so
* it's guaranteed that the access will not cross 4k page boundary.
* Thus only 1 page is allocated for all config space access, and the
* virtual address of that page is cached in pci_cfgacc_virt_base.
*/
static caddr_t
{
#ifdef __xpv
(phys_addr & MMU_PAGEOFFSET);
#endif
if (khat_running) {
/*
* pci_cfgacc_virt_base may hold address left from early
* boot, which points to low mem. Realloc virtual address
* in kernel space since it's already late in boot now.
* Note: no need to unmap first, clear_boot_mappings() will
* do that for us.
*/
} else {
if (pci_cfgacc_virt_base == NULL)
}
}
static void
{
if (khat_running)
}
static void
{
case 1:
else
break;
case 2:
else
break;
case 4:
else
break;
case 8:
} else {
}
break;
}
}
static void
{
case 1:
else
break;
case 2:
else
break;
case 4:
else
break;
case 8:
else
break;
}
}
static boolean_t
{
return (B_TRUE);
return (B_FALSE);
}
void
{
}
void
{
extern uint_t pci_iocfg_max_offset;
} else {
}
}
typedef struct cfgacc_bus_range {
struct cfgacc_bus_range *next;
/*
* This function is only supposed to be called in device tree setup time,
* thus no lock is needed.
*/
void
{
}
{
/* found a device which is known to be broken */
return (B_TRUE);
}
/*
* found a device whose parent/grandparent is
* known to be broken.
*/
return (B_TRUE);
}
}
return (B_FALSE);
}