xref: /dpdk/doc/guides/platform/octeontx.rst (revision 443b949e17953a1094f80532d600a1ee540f2ba4)
1a9263e3cSJerin Jacob..  SPDX-License-Identifier: BSD-3-Clause
2a9263e3cSJerin Jacob    Copyright(c) 2017 Cavium, Inc
326cb0a72SSantosh Shukla
426cb0a72SSantosh ShuklaOCTEON TX Board Support Package
595a6b04fSAnoob Joseph===============================
626cb0a72SSantosh Shukla
795a6b04fSAnoob JosephThis doc has information about steps to setup OCTEON TX platform
826cb0a72SSantosh Shuklaand information about common offload hw block drivers of
926cb0a72SSantosh Shukla**Cavium OCTEON TX** SoC family.
1026cb0a72SSantosh Shukla
1126cb0a72SSantosh Shukla
1226cb0a72SSantosh ShuklaMore information about SoC can be found at `Cavium, Inc Official Website
1326cb0a72SSantosh Shukla<http://www.cavium.com/OCTEON-TX_ARM_Processors.html>`_.
1426cb0a72SSantosh Shukla
1526cb0a72SSantosh ShuklaCommon Offload HW Block Drivers
1626cb0a72SSantosh Shukla-------------------------------
1726cb0a72SSantosh Shukla
18*443b949eSDavid Marchand#. **Crypto Driver**
19474fd349SAnoob Joseph   See :doc:`../cryptodevs/octeontx` for octeontx crypto driver
20474fd349SAnoob Joseph   information.
21474fd349SAnoob Joseph
22*443b949eSDavid Marchand#. **Eventdev Driver**
2349781e37SPavan Nikhilesh   See :doc:`../eventdevs/octeontx` for octeontx ssovf eventdev driver
2426cb0a72SSantosh Shukla   information.
2526cb0a72SSantosh Shukla
26*443b949eSDavid Marchand#. **Mempool Driver**
2749781e37SPavan Nikhilesh   See :doc:`../mempool/octeontx` for octeontx fpavf mempool driver
2848191ddeSSantosh Shukla   information.
2948191ddeSSantosh Shukla
3026cb0a72SSantosh ShuklaSteps To Setup Platform
3126cb0a72SSantosh Shukla-----------------------
3226cb0a72SSantosh Shukla
3326cb0a72SSantosh ShuklaThere are three main pre-prerequisites for setting up Platform drivers on
3426cb0a72SSantosh ShuklaOCTEON TX compatible board:
3526cb0a72SSantosh Shukla
36*443b949eSDavid Marchand#. **OCTEON TX Linux kernel PF driver for Network acceleration HW blocks**
3726cb0a72SSantosh Shukla
3826cb0a72SSantosh Shukla   The OCTEON TX Linux kernel drivers (includes the required PF driver for the
3926cb0a72SSantosh Shukla   Platform drivers) are available on Github at `octeontx-kmod <https://github.com/caviumnetworks/octeontx-kmod>`_
4026cb0a72SSantosh Shukla   along with build, install and dpdk usage instructions.
4126cb0a72SSantosh Shukla
42474fd349SAnoob Joseph   .. note::
43474fd349SAnoob Joseph
44474fd349SAnoob Joseph      The PF driver and the required microcode for the crypto offload block will be
45474fd349SAnoob Joseph      available with OCTEON TX SDK only. So for using crypto offload, follow the steps
46474fd349SAnoob Joseph      mentioned in :ref:`setup_platform_using_OCTEON_TX_SDK`.
47474fd349SAnoob Joseph
48*443b949eSDavid Marchand#. **ARM64 Tool Chain**
4926cb0a72SSantosh Shukla
5026cb0a72SSantosh Shukla   For example, the *aarch64* Linaro Toolchain, which can be obtained from
5126cb0a72SSantosh Shukla   `here <https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/aarch64-linux-gnu>`_.
5226cb0a72SSantosh Shukla
53*443b949eSDavid Marchand#. **Rootfile system**
5426cb0a72SSantosh Shukla
5526cb0a72SSantosh Shukla   Any *aarch64* supporting filesystem can be used. For example,
5626cb0a72SSantosh Shukla   Ubuntu 15.10 (Wily) or 16.04 LTS (Xenial) userland which can be obtained
5726cb0a72SSantosh Shukla   from `<http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-16.04.1-base-arm64.tar.gz>`_.
5826cb0a72SSantosh Shukla
5926cb0a72SSantosh Shukla   As an alternative method, Platform drivers can also be executed using images provided
6026cb0a72SSantosh Shukla   as part of SDK from Cavium. The SDK includes all the above prerequisites necessary
61474fd349SAnoob Joseph   to bring up a OCTEON TX board. Please refer :ref:`setup_platform_using_OCTEON_TX_SDK`.
6226cb0a72SSantosh Shukla
63*443b949eSDavid Marchand#. Follow the DPDK :doc:`../linux_gsg/index` to setup the basic DPDK environment.
64474fd349SAnoob Joseph
65474fd349SAnoob Joseph.. _setup_platform_using_OCTEON_TX_SDK:
66474fd349SAnoob Joseph
67474fd349SAnoob JosephSetup Platform Using OCTEON TX SDK
68474fd349SAnoob Joseph----------------------------------
69474fd349SAnoob Joseph
70474fd349SAnoob JosephThe OCTEON TX platform drivers can be compiled either natively on
71474fd349SAnoob Joseph**OCTEON TX** :sup:`®` board or cross-compiled on an x86 based platform.
72474fd349SAnoob Joseph
73474fd349SAnoob JosephThe **OCTEON TX** :sup:`®` board must be running the linux kernel based on
74474fd349SAnoob JosephOCTEON TX SDK 6.2.0 patch 3. In this, the PF drivers for all hardware
75474fd349SAnoob Josephoffload blocks are already built in.
76474fd349SAnoob Joseph
77474fd349SAnoob JosephNative Compilation
78474fd349SAnoob Joseph~~~~~~~~~~~~~~~~~~
79474fd349SAnoob Joseph
80474fd349SAnoob JosephIf the kernel and modules are cross-compiled and copied to the target board,
81474fd349SAnoob Josephsome intermediate binaries required for native build would be missing on the
82474fd349SAnoob Josephtarget board. To make sure all the required binaries are available in the
83474fd349SAnoob Josephnative architecture, the linux sources need to be compiled once natively.
84474fd349SAnoob Joseph
85474fd349SAnoob Joseph.. code-block:: console
86474fd349SAnoob Joseph
87474fd349SAnoob Joseph        cd /lib/modules/$(uname -r)/source
88474fd349SAnoob Joseph        make menuconfig
89474fd349SAnoob Joseph        make
90474fd349SAnoob Joseph
91474fd349SAnoob JosephThe above steps would rebuild the modules and the required intermediate binaries.
92474fd349SAnoob JosephOnce the target is ready for native compilation, the OCTEON TX platform
93474fd349SAnoob Josephdrivers can be compiled with the following steps,
94474fd349SAnoob Joseph
95474fd349SAnoob Joseph.. code-block:: console
96474fd349SAnoob Joseph
97e24b8ad4SStephen Hemminger        meson setup build -Dexamples=<application>
98d2e65d43SCiara Power        ninja -C build
99474fd349SAnoob Joseph
100474fd349SAnoob JosephThe example applications can be compiled using the following:
101474fd349SAnoob Joseph
102474fd349SAnoob Joseph.. code-block:: console
103474fd349SAnoob Joseph
104e24b8ad4SStephen Hemminger        meson setup build -Dexamples=<application>
105d2e65d43SCiara Power        ninja -C build
106474fd349SAnoob Joseph
107474fd349SAnoob JosephCross Compilation
108474fd349SAnoob Joseph~~~~~~~~~~~~~~~~~
109474fd349SAnoob Joseph
110474fd349SAnoob JosephThe DPDK applications can be cross-compiled on any x86 based platform. The
111474fd349SAnoob JosephOCTEON TX SDK need to be installed on the build system. The SDK package will
112474fd349SAnoob Josephprovide the required toolchain etc.
113474fd349SAnoob Joseph
114d2e65d43SCiara PowerRefer to :doc:`../linux_gsg/cross_build_dpdk_for_arm64` for generic arm64 details.
115474fd349SAnoob Joseph
116474fd349SAnoob JosephThe following steps can be used to perform cross-compilation with OCTEON TX
117474fd349SAnoob JosephSDK 6.2.0 patch 3:
118474fd349SAnoob Joseph
119474fd349SAnoob Joseph.. code-block:: console
120474fd349SAnoob Joseph
121474fd349SAnoob Joseph        cd <sdk_install_dir>
122474fd349SAnoob Joseph        source env-setup
123474fd349SAnoob Joseph
124d2e65d43SCiara PowerThe above steps will prepare build system with required toolchain.
125d2e65d43SCiara PowerNow this build system can be used to build applications for **OCTEON TX** :sup:`®` platforms.
126474fd349SAnoob Joseph
127474fd349SAnoob Joseph.. code-block:: console
128474fd349SAnoob Joseph
129474fd349SAnoob Joseph        cd <dpdk directory>
130e24b8ad4SStephen Hemminger        meson setup build --cross-file config/arm/arm64_thunderx_linux_gcc
131d2e65d43SCiara Power        ninja -C build
132474fd349SAnoob Joseph
133d2e65d43SCiara PowerThe example applications can be compiled using the following:
134474fd349SAnoob Joseph
135474fd349SAnoob Joseph.. code-block:: console
136474fd349SAnoob Joseph
137d2e65d43SCiara Power        cd <dpdk directory>
138e24b8ad4SStephen Hemminger        meson setup build --cross-file config/arm/arm64_thunderx_linux_gcc -Dexamples=<application>
139d2e65d43SCiara Power        ninja -C build
140474fd349SAnoob Joseph
141d2e65d43SCiara Power.. note::
142d2e65d43SCiara Power
143d2e65d43SCiara Power   By default, meson cross compilation uses ``aarch64-linux-gnu-gcc`` toolchain,
144d2e65d43SCiara Power   if OCTEON TX SDK 6.2.0 patch 3 is available then it can be used by
145d2e65d43SCiara Power   overriding the c, cpp, ar, strip ``binaries`` attributes to respective thunderx
146d2e65d43SCiara Power   toolchain binaries in ``config/arm/arm64_thunderx_linux_gcc`` file.
147474fd349SAnoob Joseph
148474fd349SAnoob JosephSDK and related information can be obtained from: `Cavium support site <https://support.cavium.com/>`_.
149