1210284Sjmallett/***********************license start***************
2232812Sjmallett * Copyright (c) 2003-2010  Cavium Inc. (support@cavium.com). All rights
3215990Sjmallett * reserved.
4210284Sjmallett *
5210284Sjmallett *
6215990Sjmallett * Redistribution and use in source and binary forms, with or without
7215990Sjmallett * modification, are permitted provided that the following conditions are
8215990Sjmallett * met:
9210284Sjmallett *
10215990Sjmallett *   * Redistributions of source code must retain the above copyright
11215990Sjmallett *     notice, this list of conditions and the following disclaimer.
12210284Sjmallett *
13215990Sjmallett *   * Redistributions in binary form must reproduce the above
14215990Sjmallett *     copyright notice, this list of conditions and the following
15215990Sjmallett *     disclaimer in the documentation and/or other materials provided
16215990Sjmallett *     with the distribution.
17215990Sjmallett
18232812Sjmallett *   * Neither the name of Cavium Inc. nor the names of
19215990Sjmallett *     its contributors may be used to endorse or promote products
20215990Sjmallett *     derived from this software without specific prior written
21215990Sjmallett *     permission.
22215990Sjmallett
23215990Sjmallett * This Software, including technical data, may be subject to U.S. export  control
24215990Sjmallett * laws, including the U.S. Export Administration Act and its  associated
25215990Sjmallett * regulations, and may be subject to export or import  regulations in other
26215990Sjmallett * countries.
27215990Sjmallett
28215990Sjmallett * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
29232812Sjmallett * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR
30215990Sjmallett * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
31215990Sjmallett * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR
32215990Sjmallett * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM
33215990Sjmallett * SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE,
34215990Sjmallett * MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF
35215990Sjmallett * VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
36215990Sjmallett * CORRESPONDENCE TO DESCRIPTION. THE ENTIRE  RISK ARISING OUT OF USE OR
37215990Sjmallett * PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
38210284Sjmallett ***********************license end**************************************/
39210284Sjmallett
40210284Sjmallett
41215990Sjmallett
42210284Sjmallett/**
43210284Sjmallett * @file
44210284Sjmallett *
45210284Sjmallett * Main Octeon executive header file (This should be the second header
46210284Sjmallett * file included by an application).
47210284Sjmallett *
48232812Sjmallett * <hr>$Revision: 70030 $<hr>
49210284Sjmallett*/
50210284Sjmallett#ifndef __CVMX_H__
51210284Sjmallett#define __CVMX_H__
52210284Sjmallett
53210284Sjmallett/* Control whether simple executive applications use 1-1 TLB mappings to access physical
54210284Sjmallett** memory addresses.  This must be disabled to allow large programs that use more than
55210284Sjmallett** the 0x10000000 - 0x20000000 virtual address range.
56243473Sjmallett**
57243473Sjmallett** The FreeBSD kernel ifdefs elsewhere should mean that this is never even checked,
58243473Sjmallett** and so does not need to be defined.
59210284Sjmallett*/
60243473Sjmallett#if !defined(__FreeBSD__) || !defined(_KERNEL)
61210284Sjmallett#ifndef CVMX_USE_1_TO_1_TLB_MAPPINGS
62210284Sjmallett#define CVMX_USE_1_TO_1_TLB_MAPPINGS 1
63210284Sjmallett#endif
64243473Sjmallett#endif
65210284Sjmallett
66243473Sjmallett#if defined(__FreeBSD__) && defined(_KERNEL)
67243473Sjmallett    #ifndef CVMX_ENABLE_PARAMETER_CHECKING
68243473Sjmallett        #ifdef INVARIANTS
69243473Sjmallett            #define CVMX_ENABLE_PARAMETER_CHECKING 1
70243473Sjmallett        #else
71243473Sjmallett            #define CVMX_ENABLE_PARAMETER_CHECKING 0
72243473Sjmallett        #endif
73243473Sjmallett    #endif
74243473Sjmallett#else
75243473Sjmallett    #ifndef CVMX_ENABLE_PARAMETER_CHECKING
76243473Sjmallett        #define CVMX_ENABLE_PARAMETER_CHECKING 1
77243473Sjmallett    #endif
78210284Sjmallett#endif
79210284Sjmallett
80210284Sjmallett#ifndef CVMX_ENABLE_DEBUG_PRINTS
81210284Sjmallett#define CVMX_ENABLE_DEBUG_PRINTS 1
82210284Sjmallett#endif
83210284Sjmallett
84210284Sjmallett#ifdef	__cplusplus
85210284Sjmallettextern "C" {
86210284Sjmallett#endif
87210284Sjmallett
88210284Sjmallett#include "cvmx-platform.h"
89210284Sjmallett#include "cvmx-access.h"
90210284Sjmallett#include "cvmx-address.h"
91210284Sjmallett#include "cvmx-asm.h"
92210284Sjmallett#include "cvmx-packet.h"
93210284Sjmallett#include "cvmx-warn.h"
94210284Sjmallett#include "cvmx-sysinfo.h"
95210284Sjmallett#include "octeon-model.h"
96210284Sjmallett#include "cvmx-csr.h"
97210284Sjmallett#include "cvmx-utils.h"
98215990Sjmallett#include "cvmx-clock.h"
99232812Sjmallett#include "octeon-feature.h"
100210284Sjmallett
101210284Sjmallett#if defined(__mips__) && !defined(CVMX_BUILD_FOR_LINUX_HOST)
102210284Sjmallett#include "cvmx-access-native.h"
103210284Sjmallett#endif
104210284Sjmallett
105210284Sjmallett#ifdef	__cplusplus
106210284Sjmallett}
107210284Sjmallett#endif
108210284Sjmallett
109210284Sjmallett#endif  /*  __CVMX_H__  */
110