/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 2002-2005 Neterion, Inc.
* All right Reserved.
*
* FileName : xge_osdep.h
*
* Description: OSPAL - Solaris
*
*/
#ifndef _SYS_XGE_OSDEP_H
#define _SYS_XGE_OSDEP_H
#include <sys/int_fmtio.h>
#ifdef __cplusplus
extern "C" {
#endif
/* ------------------------- includes and defines ------------------------- */
#if defined(__sparc)
#endif
#ifdef _BIG_ENDIAN
#else
#endif
#if defined(__sparc)
#else
#endif
#if defined(_LP64)
#else
#endif
/* LRO defines */
/* ---------------------- fixed size primitive types ----------------------- */
/* LRO types */
/* -------------------------- "libc" functionality ------------------------- */
#ifdef __GNUC__
#else
}
}
}
}
#endif
}
/* -------------------- synchronization primitives ------------------------- */
/* x86 arch will never re-order writes, Sparc can */
sizeof (*(targetp)) == 4 ? \
/* ------------------------- misc primitives ------------------------------- */
#define xge_os_unlikely(x) (x)
#define xge_os_prefetch(a) (a = a)
#define xge_os_prefetchw
#ifdef __GNUC__
#else
}
#endif
/* -------------------------- compiler stuffs ------------------------------ */
#if defined(__i386)
#else
#endif
#ifdef __GNUC__
#define __xge_os_attr_cacheline_aligned \
#else
#define __xge_os_attr_cacheline_aligned
#endif
/* ---------------------- memory primitives -------------------------------- */
{
return (vaddr);
}
unsigned long size)
{
}
int line)
{
void *vaddr;
int ret;
extern ddi_device_acc_attr_t *p_xge_dev_attr;
extern struct ddi_dma_attr *p_hal_dma_attr;
DDI_DMA_DONTWAIT, 0, p_dmah);
if (ret != DDI_SUCCESS) {
return (NULL);
}
if (ret != DDI_SUCCESS) {
return (NULL);
}
return (NULL);
}
return (vaddr);
}
{
}
/* --------------------------- pci primitives ------------------------------ */
/* --------------------------- io primitives ------------------------------- */
/* --------------------------- dma primitives ----------------------------- */
#if defined(__x86)
#define XGE_OS_DMA_USES_IOMMU 0
#else
#endif
int ret;
switch (dir) {
case XGE_OS_DMA_DIR_TODEVICE:
break;
break;
break;
default:
return (0);
}
if (ret != DDI_SUCCESS) {
return (0);
}
(void) ddi_dma_unbind_handle(dmah);
return (0);
}
return (dma_cookie.dmac_laddress);
}
{
(void) ddi_dma_unbind_handle(dmah);
}
{
}
#ifdef __cplusplus
}
#endif
#endif /* _SYS_XGE_OSDEP_H */