# FreeBSD on MIPS64 (Cavium Octeon III)



## MAHDTech (Sep 23, 2015)

Greetings,

I have recently acquired some hardware based on Cavium Octeon III (CN70XX - ITUS Networks Shield), and I would like to try and install FreeBSD on it 

I am new to FreeBSD (and kernel compiling in general) so apologies if this is a stupid question, but I have read the parts of the handbook which have got me this far.

* Is there any support for Octeon III processors in the kernel?

* I have attempted to build an image using the standard OCTEON1 kernel config, just using the auto-detect at runtime for a test and when it boots from uboot I get the following error.


```
reading kernel/kernel
9974466 bytes read in 9068 ms (1 MiB/s)
argv[2]: mem=0
argv[3]: numcores=2
Allocating memory for ELF segment: addr: 0xffffffff80100080 (adjusted to: 0x100080), size0x88b440
## Loading big-endian Linux kernel with entry point: 0xffffffff80100080 ...
Bootloader: Done loading app on coremask: 0x3
Starting cores:
 0x3
Using runtime CPU model checks.
CPU Model: CNXXXXpX.X-3150-XXX
CPU clock: 1000MHz  Core Mask: 0x3
Board: Unsupported Board
Board Type: 20006  Revision: 0/1
MAC address base: 2c:26:5f:80:0a:40 (3 configured)
panic: mips_get_identity: unsupported Cavium Networks CPU.
cpuid = 0
Uptime: 1s
```

* I have looked in the sys/contrib/octeon-sdk/octeon-model.h to see if there is a specific value for the CPU model I am using but the closest matches are as follows


```
#define OCTEON_CNF71XX_PASS1_0  0x000d9400
#define OCTEON_CNF71XX  (OCTEON_CNF71XX_PASS1_0 | OM_IGNORE_REVISION)
#define OCTEON_CNF71XX_PASS1_X  (OCTEON_CNF71XX_PASS1_0 | OM_IGNORE_MINOR_REVISION)
```

* None of these are exact matches, is there a particular one I should try and use?

Any tips much appreciated.


----------



## SirDice (Sep 23, 2015)

MAHDTech said:


> I am new to FreeBSD (and kernel compiling in general) so apologies if this is a stupid question, but I have read the parts of the handbook which have got me this far.
> 
> * Is there any support for Octeon III processors in the kernel?


Keep in mind that MIPS is a Tier 3 platform. 

https://www.freebsd.org/platforms/mips.html


----------



## MAHDTech (Sep 24, 2015)

Thanks.

I managed to find the relevant CPU revision information from a recent Linux build, it just looks like the support hasn't hit FreeBSD yet so I will just have to wait and see.


```
define OCTEON_CN70XX_PASS1_2  0x000d9602
```

https://www.linux-mips.org/archives/linux-mips/2014-12/msg00181.html


----------



## Mirza Ubaidullah baig (Mar 25, 2018)

This is an old post but I hope someone could tell me if there is a way I can build FreeBSD for octeon CN70XX/CN71XX? 
It seems  SDK in sys/contrib/octeon-sdk in FreeBSD 11.1 is too old, octeon-model.h does not have CN70XX model defined.


----------

