summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2012-10-30 06:07:30 +0000
committerjmallett <jmallett@FreeBSD.org>2012-10-30 06:07:30 +0000
commit1729e10b3745cf955dae5a4ecf8a6006294cbe56 (patch)
tree5e335606919c872a2fce8cf9f89b7c5e67545dc0
parent21d56b1a98d8e96451b4b76cd5344f263292f35c (diff)
downloadFreeBSD-src-1729e10b3745cf955dae5a4ecf8a6006294cbe56.zip
FreeBSD-src-1729e10b3745cf955dae5a4ecf8a6006294cbe56.tar.gz
Speed feature tests and initialize helper configuration that some CPUs require.
-rw-r--r--sys/contrib/octeon-sdk/octeon-feature.c2
-rw-r--r--sys/contrib/octeon-sdk/octeon-feature.h2
-rw-r--r--sys/mips/cavium/files.octeon12
-rw-r--r--sys/mips/cavium/octeon_machdep.c5
4 files changed, 9 insertions, 2 deletions
diff --git a/sys/contrib/octeon-sdk/octeon-feature.c b/sys/contrib/octeon-sdk/octeon-feature.c
index 64bc084..bf18945 100644
--- a/sys/contrib/octeon-sdk/octeon-feature.c
+++ b/sys/contrib/octeon-sdk/octeon-feature.c
@@ -139,7 +139,7 @@ feature_check:
cvmx_dprintf("unknown error %d.\n", val);
break;
}
-#if !defined(CVMX_BUILD_FOR_LINUX_KERNEL) && !defined(__U_BOOT__) && !defined(CVMX_BUILD_FOR_TOOLCHAIN)
+#if !defined(CVMX_BUILD_FOR_LINUX_KERNEL) && !defined(__U_BOOT__) && !defined(CVMX_BUILD_FOR_TOOLCHAIN) && !defined(CVMX_BUILD_FOR_FREEBSD_KERNEL)
exit (1);
#endif
}
diff --git a/sys/contrib/octeon-sdk/octeon-feature.h b/sys/contrib/octeon-sdk/octeon-feature.h
index 7571c33..9814415 100644
--- a/sys/contrib/octeon-sdk/octeon-feature.h
+++ b/sys/contrib/octeon-sdk/octeon-feature.h
@@ -281,7 +281,7 @@ extern uint8_t octeon_feature_map[FEATURE_MAP_SIZE];
#if defined(__U_BOOT__) || defined(CVMX_BUILD_FOR_LINUX_HOST) || defined(CVMX_BUILD_FOR_TOOLCHAIN)
#define octeon_has_feature old_octeon_has_feature
#else
-#if defined(USE_RUNTIME_MODEL_CHECKS)
+#if defined(USE_RUNTIME_MODEL_CHECKS) || (defined(__FreeBSD__) && defined(_KERNEL))
static inline int octeon_has_feature(octeon_feature_t feature)
{
int byte, bit;
diff --git a/sys/mips/cavium/files.octeon1 b/sys/mips/cavium/files.octeon1
index 241c0fd..103189c 100644
--- a/sys/mips/cavium/files.octeon1
+++ b/sys/mips/cavium/files.octeon1
@@ -61,6 +61,7 @@ contrib/octeon-sdk/cvmx-clock.c standard
contrib/octeon-sdk/cvmx-ebt3000.c standard
contrib/octeon-sdk/cvmx-fpa.c standard
contrib/octeon-sdk/cvmx-helper.c standard
+contrib/octeon-sdk/cvmx-helper-cfg.c standard
contrib/octeon-sdk/cvmx-helper-board.c standard
contrib/octeon-sdk/cvmx-helper-cfg.c standard
contrib/octeon-sdk/cvmx-helper-errata.c standard
@@ -89,6 +90,7 @@ contrib/octeon-sdk/cvmx-sysinfo.c standard
contrib/octeon-sdk/cvmx-thunder.c standard
contrib/octeon-sdk/cvmx-twsi.c standard
contrib/octeon-sdk/cvmx-warn.c standard
+contrib/octeon-sdk/octeon-feature.c standard
contrib/octeon-sdk/octeon-model.c standard
# HWPMC
diff --git a/sys/mips/cavium/octeon_machdep.c b/sys/mips/cavium/octeon_machdep.c
index 4cebb34..633532c 100644
--- a/sys/mips/cavium/octeon_machdep.c
+++ b/sys/mips/cavium/octeon_machdep.c
@@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$");
#include <contrib/octeon-sdk/cvmx.h>
#include <contrib/octeon-sdk/cvmx-bootmem.h>
#include <contrib/octeon-sdk/cvmx-ebt3000.h>
+#include <contrib/octeon-sdk/cvmx-helper-cfg.h>
#include <contrib/octeon-sdk/cvmx-interrupt.h>
#include <contrib/octeon-sdk/cvmx-version.h>
@@ -598,6 +599,10 @@ octeon_boot_params_init(register_t ptr)
panic("Your boot loader did not supply a memory descriptor.");
cvmx_bootmem_init(cvmx_sysinfo_get()->phy_mem_desc_addr);
+ octeon_feature_init();
+
+ __cvmx_helper_cfg_init();
+
printf("Boot Descriptor Ver: %u -> %u/%u",
app_desc_ptr->desc_version, octeon_bootinfo->major_version,
octeon_bootinfo->minor_version);
OpenPOWER on IntegriCloud