@@ -14,8 +14,4 @@ cpu = 'armv8-a'
endian = 'little'
[properties]
-implementer_id = '0x56'
-part_number = '0xd08'
-max_lcores = 16
-max_numa_nodes = 1
-numa = false
+platform = 'armada'
@@ -14,7 +14,6 @@ cpu = 'armv8-a'
endian = 'little'
[properties]
-implementer_id = 'generic'
-part_number = 'generic'
+platform = 'generic'
c_args = ['-target', 'aarch64-linux-gnu', '--sysroot', '/usr/aarch64-linux-gnu']
c_link_args = ['-target', 'aarch64-linux-gnu', '-fuse-ld=lld', '--gcc-toolchain=/usr']
@@ -14,7 +14,4 @@ endian = 'little'
[properties]
# Generate binaries that are portable across all Armv8 machines
-implementer_id = 'generic'
-part_number = 'generic'
-max_lcores = 256
-max_numa_nodes = 4
+platform = 'generic'
@@ -13,8 +13,4 @@ cpu = 'armv8-a'
endian = 'little'
[properties]
-implementer_id = '0x41'
-part_number = '0xd08'
-max_lcores = 16
-max_numa_nodes = 1
-numa = false
+platform = 'bluefield'
@@ -14,8 +14,4 @@ cpu = 'armv8-a'
endian = 'little'
[properties]
-implementer_id = 'dpaa'
-part_number = '0xd08'
-max_lcores = 16
-max_numa_nodes = 1
-numa = false
+platform = 'dpaa'
@@ -13,7 +13,4 @@ cpu = 'armv8-a'
endian = 'little'
[properties]
-implementer_id = '0x50'
-part_number = '0x0'
-max_lcores = 32
-max_numa_nodes = 1
+platform = 'emag'
@@ -13,8 +13,4 @@ cpu = 'armv8-a'
endian = 'little'
[properties]
-implementer_id = '0x41'
-part_number = '0xd0c'
-max_lcores = 64
-max_numa_nodes = 1
-numa = false
+platform = 'graviton2'
@@ -13,8 +13,4 @@ cpu = 'armv8-a'
endian = 'little'
[properties]
-implementer_id = '0x41'
-part_number = '0xd0c'
-max_lcores = 4
-max_numa_nodes = 1
-numa = false
+platform = 'n1sdp'
@@ -13,8 +13,4 @@ cpu = 'armv8-a'
endian = 'little'
[properties]
-implementer_id = '0x41'
-part_number = '0xd49'
-max_lcores = 64
-max_numa_nodes = 1
-numa = false
+platform = 'n2'
@@ -13,8 +13,4 @@ cpu = 'armv8-a'
endian = 'little'
[properties]
-implementer_id = '0x43'
-part_number = '0xb2'
-max_lcores = 36
-max_numa_nodes = 1
-numa = false
+platform = 'octeontx2'
@@ -13,8 +13,4 @@ cpu = 'armv8-a'
endian = 'little'
[properties]
-implementer_id = '0x41'
-part_number = '0xd08'
-max_lcores = 16
-max_numa_nodes = 1
-numa = false
+platform = 'stingray'
@@ -13,7 +13,4 @@ cpu = 'armv8-a'
endian = 'little'
[properties]
-implementer_id = '0x43'
-part_number = '0xaf'
-max_lcores = 256
-max_numa_nodes = 2
+platform = 'thunderx2'
@@ -13,7 +13,4 @@ cpu = 'armv8-a'
endian = 'little'
[properties]
-implementer_id = '0x43'
-part_number = '0xa1'
-max_lcores = 96
-max_numa_nodes = 1
+platform = 'thunderxt88'
@@ -25,7 +25,7 @@ flags_common = [
## Part numbers are specific to Arm implementers
# implementer specific aarch64 flags have middle priority
# (will overwrite common flags)
-# part number specific aarch64 flags have the highest priority
+# part number specific aarch64 flags have higher priority
# (will overwrite both common and implementer specific flags)
implementer_generic = {
'description': 'Generic armv8',
@@ -192,6 +192,106 @@ implementers = {
'dpaa': implementer_dpaa
}
+# soc specific aarch64 flags have the highest priority
+# (will overwrite all other flags)
+soc_generic = {
+ 'description': 'Generic un-optimized build for all aarch64 machines',
+ 'implementer': 'generic',
+ 'part_number': 'generic'
+}
+
+soc_armada = {
+ 'description': 'Marvell ARMADA',
+ 'implementer': '0x56',
+ 'part_number': '0xd08',
+ 'numa': false
+}
+
+soc_bluefield = {
+ 'description': 'NVIDIA BlueField',
+ 'implementer': '0x41',
+ 'part_number': '0xd08',
+ 'numa': false
+}
+
+soc_dpaa = {
+ 'description': 'NXP DPAA',
+ 'implementer': 'dpaa',
+ 'part_number': '0xd08',
+ 'numa': false
+}
+
+soc_emag = {
+ 'description': 'Ampere eMAG',
+ 'implementer': '0x50',
+ 'part_number': '0x0'
+}
+
+soc_graviton2 = {
+ 'description': 'AWS Graviton2',
+ 'implementer': '0x41',
+ 'part_number': '0xd0c',
+ 'numa': false
+}
+
+soc_n1sdp = {
+ 'description': 'Arm Neoverse N1SDP',
+ 'implementer': '0x41',
+ 'part_number': '0xd0c',
+ 'flags': [
+ ['RTE_MAX_LCORE', 4]
+ ],
+ 'numa': false
+}
+
+soc_n2 = {
+ 'description': 'Arm Neoverse N2',
+ 'implementer': '0x41',
+ 'part_number': '0xd49',
+ 'numa': false
+}
+
+soc_octeontx2 = {
+ 'description': 'Marvell OCTEON TX2',
+ 'implementer': '0x43',
+ 'part_number': '0xb2',
+ 'numa': false
+}
+
+soc_stingray = {
+ 'description': 'Broadcom Stingray',
+ 'implementer': '0x41',
+ 'part_number': '0xd08',
+ 'numa': false
+}
+
+soc_thunderx2 = {
+ 'description': 'Marvell ThunderX2 T99',
+ 'implementer': '0x43',
+ 'part_number': '0xaf'
+}
+
+soc_thunderxt88 = {
+ 'description': 'Marvell ThunderX T88',
+ 'implementer': '0x43',
+ 'part_number': '0xa1'
+}
+
+socs = {
+ 'generic': soc_generic,
+ 'armada': soc_armada,
+ 'bluefield': soc_bluefield,
+ 'dpaa': soc_dpaa,
+ 'emag': soc_emag,
+ 'graviton2': soc_graviton2,
+ 'n1sdp': soc_n1sdp,
+ 'n2': soc_n2,
+ 'octeontx2': soc_octeontx2,
+ 'stingray': soc_stingray,
+ 'thunderx2': soc_thunderx2,
+ 'thunderxt88': soc_thunderxt88
+}
+
dpdk_conf.set('RTE_ARCH_ARM', 1)
dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
@@ -203,11 +303,19 @@ if dpdk_conf.get('RTE_ARCH_32')
machine_args += '-mfpu=neon'
else
# aarch64 build
+ soc = get_option('platform')
+ soc_config = {}
if not meson.is_cross_build()
if machine == 'default'
# default build
+ if soc != ''
+ error('Building for a particular platform is ' +
+ 'unsupported with default build.')
+ endif
implementer_id = 'generic'
part_number = 'generic'
+ elif soc != ''
+ soc_config = socs.get(soc, {'not_supported': true})
else
# native build
# The script returns ['Implementer', 'Variant', 'Architecture',
@@ -225,8 +333,30 @@ else
endif
else
# cross build
- implementer_id = meson.get_cross_property('implementer_id')
- part_number = meson.get_cross_property('part_number')
+ soc = meson.get_cross_property('platform', '')
+ if soc == ''
+ error('Arm SoC must be specified in the cross file.')
+ endif
+ soc_config = socs.get(soc, {'not_supported': true})
+ endif
+
+ soc_flags = []
+ if soc_config.has_key('not_supported')
+ error('SoC @0@ not supported.'.format(soc))
+ elif soc_config != {}
+ implementer_id = soc_config['implementer']
+ implementer_config = implementers[implementer_id]
+ part_number = soc_config['part_number']
+ soc_flags = soc_config.get('flags', [])
+ if not soc_config.get('numa', true)
+ has_libnuma = 0
+ endif
+ if soc_config.has_key('disabled_drivers')
+ disabled_drivers += soc_config['disabled_drivers']
+ endif
+ if soc_config.has_key('enabled_drivers')
+ enabled_drivers += soc_config['enabled_drivers']
+ endif
endif
if implementers.has_key(implementer_id)
@@ -252,8 +382,8 @@ else
'(-Dmachine=generic) build.')
endif
- # use default flags with implementer flags
- dpdk_flags = flags_common + implementer_config['flags'] + part_number_config.get('flags', [])
+ # add/overwrite flags in the proper order
+ dpdk_flags = flags_common + implementer_config['flags'] + part_number_config.get('flags', []) + soc_flags
# apply supported machine args
machine_args = [] # Clear previous machine args
@@ -187,58 +187,32 @@ Use the following command to cross-compile DPDK for the target machine::
meson aarch64-build-clang --cross-file config/arm/arm64_armv8_linux_clang_ubuntu1804
ninja -C aarch64-build-clang
-Supported cross-compilation targets
------------------------------------
-
-If you wish to build for a target which is not among the current cross-files,
-you may use various combinations of implementer/part number::
-
- Supported implementers:
- 'generic': Generic armv8
- '0x41': Arm
- '0x43': Cavium
- '0x50': Ampere Computing
- '0x56': Marvell ARMADA
- 'dpaa': NXP DPAA
-
- Supported part_numbers for generic:
- 'generic': valid for all armv8-a architectures (unoptimized portable build)
-
- Supported part_numbers for 0x41, 0x56, dpaa:
- '0xd03': cortex-a53
- '0xd04': cortex-a35
- '0xd09': cortex-a73
- '0xd0a': cortex-a75
- '0xd0b': cortex-a76
- '0xd0c': neoverse-n1
-
- Supported part_numbers for 0x43:
- '0xa1': thunderxt88
- '0xa2': thunderxt81
- '0xa3': thunderxt83
- '0xaf': thunderx2t99
- '0xb2': octeontx2
-
- Supported part_numbers for 0x50:
- '0x0': emag
-
-Other cross file options
-------------------------
-
-There are other options you may specify in a cross file to tailor the build::
-
- Supported extra configuration
- max_numa_nodes = n # will set RTE_MAX_NUMA_NODES
- max_lcores = n # will set RTE_MAX_LCORE
-
- numa = false # set to false to force building for a non-NUMA system
- # if not set or set to true, the build system will build for a NUMA
- # system only if libnuma is installed
-
- disabled_drivers = ['bus/dpaa', 'crypto/*'] # add disabled drivers
- # valid values are dir/subdirs in the drivers directory
- # wildcards are allowed
-
- enabled_drivers = ['common/*', 'bus/*'] # build only these drivers
- # valid values are dir/subdirs in the drivers directory
- # wildcards are allowed
+Building for an aarch64 SoC on an aarch64 build machine
+-------------------------------------------------------
+
+If you wish to build on an aarch64 build machine for a different aarch64 SoC,
+you don't need a separate cross toolchain, just a different set of
+configuration options. To build for an aarch64 SoC, use the -Dplatform meson
+option::
+
+ meson soc_build -Dplatform=<target_soc>
+
+Substitute <target_soc> with one of the supported SoCs::
+
+ generic: Generic un-optimized build for all aarch64 machines.
+ armada: Marvell ARMADA
+ bluefield: NVIDIA BlueField
+ dpaa: NXP DPAA
+ emag: Ampere eMAG
+ graviton2: AWS Graviton2
+ n1sdp: Arm Neoverse N1SDP
+ octeontx2: Marvell OCTEON TX2
+ stingray: Broadcom Stingray
+ thunderx2: Marvell ThunderX2 T99
+ thunderxt88: Marvell ThunderX T88
+
+These SoCs are also used in cross files, e.g.::
+
+ [properties]
+ # Generate binaries that are portable across all Armv8 machines
+ platform = 'generic'
@@ -32,6 +32,8 @@ option('max_lcores', type: 'integer', value: 128,
description: 'maximum number of cores/threads supported by EAL')
option('max_numa_nodes', type: 'integer', value: 32,
description: 'maximum number of NUMA nodes supported by EAL')
+option('platform', type: 'string', value: '',
+ description: 'Use configuration for a particular platform (such as an Arm SoC).')
option('enable_trace_fp', type: 'boolean', value: false,
description: 'enable fast path trace points.')
option('tests', type: 'boolean', value: true,