Speed feature tests and initialize helper configuration that some CPUs require.
This commit is contained in:
parent
a0eae699c9
commit
684ba62e3f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=242342
@ -139,7 +139,7 @@ void __init octeon_feature_init(void)
|
|||||||
cvmx_dprintf("unknown error %d.\n", val);
|
cvmx_dprintf("unknown error %d.\n", val);
|
||||||
break;
|
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);
|
exit (1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -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)
|
#if defined(__U_BOOT__) || defined(CVMX_BUILD_FOR_LINUX_HOST) || defined(CVMX_BUILD_FOR_TOOLCHAIN)
|
||||||
#define octeon_has_feature old_octeon_has_feature
|
#define octeon_has_feature old_octeon_has_feature
|
||||||
#else
|
#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)
|
static inline int octeon_has_feature(octeon_feature_t feature)
|
||||||
{
|
{
|
||||||
int byte, bit;
|
int byte, bit;
|
||||||
|
@ -61,6 +61,7 @@ contrib/octeon-sdk/cvmx-clock.c standard
|
|||||||
contrib/octeon-sdk/cvmx-ebt3000.c standard
|
contrib/octeon-sdk/cvmx-ebt3000.c standard
|
||||||
contrib/octeon-sdk/cvmx-fpa.c standard
|
contrib/octeon-sdk/cvmx-fpa.c standard
|
||||||
contrib/octeon-sdk/cvmx-helper.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-board.c standard
|
||||||
contrib/octeon-sdk/cvmx-helper-cfg.c standard
|
contrib/octeon-sdk/cvmx-helper-cfg.c standard
|
||||||
contrib/octeon-sdk/cvmx-helper-errata.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-thunder.c standard
|
||||||
contrib/octeon-sdk/cvmx-twsi.c standard
|
contrib/octeon-sdk/cvmx-twsi.c standard
|
||||||
contrib/octeon-sdk/cvmx-warn.c standard
|
contrib/octeon-sdk/cvmx-warn.c standard
|
||||||
|
contrib/octeon-sdk/octeon-feature.c standard
|
||||||
contrib/octeon-sdk/octeon-model.c standard
|
contrib/octeon-sdk/octeon-model.c standard
|
||||||
|
|
||||||
# HWPMC
|
# HWPMC
|
||||||
|
@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <contrib/octeon-sdk/cvmx.h>
|
#include <contrib/octeon-sdk/cvmx.h>
|
||||||
#include <contrib/octeon-sdk/cvmx-bootmem.h>
|
#include <contrib/octeon-sdk/cvmx-bootmem.h>
|
||||||
#include <contrib/octeon-sdk/cvmx-ebt3000.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-interrupt.h>
|
||||||
#include <contrib/octeon-sdk/cvmx-version.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.");
|
panic("Your boot loader did not supply a memory descriptor.");
|
||||||
cvmx_bootmem_init(cvmx_sysinfo_get()->phy_mem_desc_addr);
|
cvmx_bootmem_init(cvmx_sysinfo_get()->phy_mem_desc_addr);
|
||||||
|
|
||||||
|
octeon_feature_init();
|
||||||
|
|
||||||
|
__cvmx_helper_cfg_init();
|
||||||
|
|
||||||
printf("Boot Descriptor Ver: %u -> %u/%u",
|
printf("Boot Descriptor Ver: %u -> %u/%u",
|
||||||
app_desc_ptr->desc_version, octeon_bootinfo->major_version,
|
app_desc_ptr->desc_version, octeon_bootinfo->major_version,
|
||||||
octeon_bootinfo->minor_version);
|
octeon_bootinfo->minor_version);
|
||||||
|
Loading…
Reference in New Issue
Block a user