1285809Sscottl/******************************************************************************* 2285809Sscottl*Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved. 3285809Sscottl* 4285809Sscottl*Redistribution and use in source and binary forms, with or without modification, are permitted provided 5285809Sscottl*that the following conditions are met: 6285809Sscottl*1. Redistributions of source code must retain the above copyright notice, this list of conditions and the 7285809Sscottl*following disclaimer. 8285809Sscottl*2. Redistributions in binary form must reproduce the above copyright notice, 9285809Sscottl*this list of conditions and the following disclaimer in the documentation and/or other materials provided 10285809Sscottl*with the distribution. 11285809Sscottl* 12285809Sscottl*THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED 13285809Sscottl*WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 14285809Sscottl*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 15285809Sscottl*FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 16285809Sscottl*NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 17285809Sscottl*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 18285809Sscottl*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 19285809Sscottl*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 20285809Sscottl* 21285809Sscottl* $FreeBSD$ 22285809Sscottl* 23285809Sscottl********************************************************************************/ 24285809Sscottl/*******************************************************************************/ 25285809Sscottl/** \file 26285809Sscottl * 27285809Sscottl * The file defines the declaration of OS types 28285809Sscottl * 29285809Sscottl */ 30285809Sscottl 31285809Sscottl#ifndef __OS_SA_H__ 32285809Sscottl#define __OS_SA_H__ 33285809Sscottl 34285809Sscottl#define DEBUG_LEVEL OSSA_DEBUG_LEVEL_1 35285809Sscottl#define ossaLogDebugString TIDEBUG_MSG 36285809Sscottl#define ossaAssert OS_ASSERT 37285809Sscottl 38285809Sscottl#define tddmLogDebugString TIDEBUG_MSG 39285809Sscottl#define DM_ASSERT OS_ASSERT 40285809Sscottl 41285809Sscottl#define tdsmLogDebugString TIDEBUG_MSG 42285809Sscottl#define SM_ASSERT OS_ASSERT 43285809Sscottl 44285809Sscottl#ifdef NOT_YET /* no longer valid */ 45285809Sscottl#define ossaLogDebugString(agRoot, level, string, ptr1, ptr2, value1, value2) \ 46285809Sscottl do { \ 47285809Sscottl if ( level <= DEBUG_LEVEL ) \ 48285809Sscottl { \ 49285809Sscottl printk("%s:", __FUNCTION__); \ 50285809Sscottl if ( agNULL != string ) \ 51285809Sscottl { \ 52285809Sscottl printk("%s:", string); \ 53285809Sscottl } \ 54285809Sscottl if ( agNULL != ptr1 ) \ 55285809Sscottl { \ 56285809Sscottl printk("ptr1=%p,", ptr1); \ 57285809Sscottl } \ 58285809Sscottl if ( agNULL != ptr2 ) \ 59285809Sscottl { \ 60285809Sscottl printk("ptr2=%p,", ptr2); \ 61285809Sscottl } \ 62285809Sscottl if ( OSSA_DEBUG_PRINT_INVALID_NUMBER != value1 ) \ 63285809Sscottl { \ 64285809Sscottl printk("value1=0x%08x ", value1); \ 65285809Sscottl } \ 66285809Sscottl if ( OSSA_DEBUG_PRINT_INVALID_NUMBER != value2 ) \ 67285809Sscottl { \ 68285809Sscottl printk("value2=0x%08x ", value2); \ 69285809Sscottl } \ 70285809Sscottl printk("\n"); \ 71285809Sscottl } \ 72285809Sscottl } while (0); 73285809Sscottl 74285809Sscottl#ifndef ossaAssert 75285809Sscottl#define ossaAssert(agRoot, expr, message) \ 76285809Sscottl do { \ 77285809Sscottl if (agFALSE == (expr)) \ 78285809Sscottl { \ 79285809Sscottl printk("ossaAssert: %s", (message)); \ 80285809Sscottl printk(" - file %s, line %d\n", __FILE__, __LINE__); \ 81285809Sscottl } \ 82285809Sscottl } while (0); 83285809Sscottl#endif 84285809Sscottl#endif /* 0 */ 85285809Sscottl#include <dev/pms/freebsd/driver/common/osenv.h> 86285809Sscottl#include <dev/pms/freebsd/driver/common/ostypes.h> 87285809Sscottl#endif /* __OS_SA_H__ */ 88