/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* PCI Streaming Cache operations: initialization and configuration
*/
#include <vm/seg_kmem.h>
#include <sys/ddi_impldefs.h>
/*LINTLIBRARY*/
void
{
#ifdef lint
#endif
if (!pci_stream_buf_exists)
return;
/*
* Allocate streaming cache state structure and link it to
* the pci state structure.
*/
sc_p->sc_sync_reg);
"sc_create: data_diag=%x, tag_diag=%x, ltag_diag=%x\n",
/*
* aligned.
*/
/*
* Create a mutex to go along with it. While the mutex is held,
* all interrupts should be blocked. This will prevent driver
* interrupt routines from attempting to acquire the mutex while
* held by a lower priority interrupt routine. Note also that
* we now block cross calls as well, to prevent issues with
* relocation.
*/
}
void
{
if (!pci_stream_buf_exists)
return;
/*
* Free the streaming cache state structure.
*/
}
void
{
int i, instance;
uint64_t l;
if (!sc_p)
return;
/*
* Invalidate all streaming cache entries via the diagnostic
* access registers.
*/
for (i = 0; i < PCI_SBUF_ENTRIES; i++) {
}
/*
* Configure the streaming cache:
*/
l = 0;
l |= COMMON_SC_CTRL_ENABLE;
l |= COMMON_SC_CTRL_LRU_LE;
/*
* Get any SC configuration changes specific to the chip.
*/
"sc_configure: writing %x to sc csr\n", l);
*sc_p->sc_ctrl_reg = l;
}