Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Apr 2010 23:45:48 +0000 (UTC)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r206960 - user/jmallett/octeon/sys/contrib/octeon-sdk
Message-ID:  <201004202345.o3KNjmnv081211@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmallett
Date: Tue Apr 20 23:45:48 2010
New Revision: 206960
URL: http://svn.freebsd.org/changeset/base/206960

Log:
  Support building for FreeBSD's kernel.

Modified:
  user/jmallett/octeon/sys/contrib/octeon-sdk/cvmx-platform.h
  user/jmallett/octeon/sys/contrib/octeon-sdk/octeon-model.h

Modified: user/jmallett/octeon/sys/contrib/octeon-sdk/cvmx-platform.h
==============================================================================
--- user/jmallett/octeon/sys/contrib/octeon-sdk/cvmx-platform.h	Tue Apr 20 23:45:09 2010	(r206959)
+++ user/jmallett/octeon/sys/contrib/octeon-sdk/cvmx-platform.h	Tue Apr 20 23:45:48 2010	(r206960)
@@ -103,6 +103,8 @@
     /* To build the simple exec toolchain runtime (newlib) library. We
        should only use features available on all Octeon models.  */
     #define CVMX_BUILD_FOR_TOOLCHAIN
+#elif defined(__FreeBSD__) && defined(_KERNEL)
+    #define CVMX_BUILD_FOR_FREEBSD
 #else
     /* We are building a simple exec standalone image for Octeon */
     #define CVMX_BUILD_FOR_STANDALONE
@@ -187,6 +189,10 @@
     #include <string.h>
     #include <assert.h>
 
+#elif defined(CVMX_BUILD_FOR_FREEBSD)
+
+    #include <mips/cavium/cvmx_config.h>
+
 #else
 
     #error Unexpected CVMX_BUILD_FOR_* macro

Modified: user/jmallett/octeon/sys/contrib/octeon-sdk/octeon-model.h
==============================================================================
--- user/jmallett/octeon/sys/contrib/octeon-sdk/octeon-model.h	Tue Apr 20 23:45:09 2010	(r206959)
+++ user/jmallett/octeon/sys/contrib/octeon-sdk/octeon-model.h	Tue Apr 20 23:45:48 2010	(r206960)
@@ -254,7 +254,7 @@ extern "C" {
        && (((chip_model) & OCTEON_58XX_MODEL_MASK) < ((arg_model) & OCTEON_58XX_MODEL_MASK))) \
     )))
 
-#if defined(USE_RUNTIME_MODEL_CHECKS) || defined(__U_BOOT__) || (defined(__linux__) && defined(__KERNEL__))
+#if defined(USE_RUNTIME_MODEL_CHECKS) || defined(__U_BOOT__) || (defined(__linux__) && defined(__KERNEL__)) || (defined(__FreeBSD__) && defined(_KERNEL))
 
 /* NOTE: This for internal use only!!!!! */
 static inline int __octeon_is_model_runtime__(uint32_t model)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004202345.o3KNjmnv081211>