Gentoo Archives: gentoo-dev

From: Roy Bamford <neddyseagoon@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Need ARM/AArch64 test data for cpuid2cpuflags
Date: Tue, 01 Oct 2019 11:49:01
Message-Id: ATUUR7GH.S2N7LAY5.JJAXIS23@7ARBTZJI.7ZKHBCGX.X7NBHLBF
In Reply to: [gentoo-dev] Need ARM/AArch64 test data for cpuid2cpuflags by "Michał Górny"
1 On 2019.09.10 21:44, Michał Górny wrote:
2 > Hi, everyone.
3 >
4 > I've recently (finally!) started adding tests to cpuid2cpuflags.
5 > Tests
6 > are based on mocked syscalls that return arch-specific data read from
7 > text files. So far I've got x86 and ppc covered, and now I'd like to
8 > add tests for various arm hardware. Since ARM covers a pretty broad
9 > range of hardware, I'd use as much data as possible, especially from
10 > different ARM generations.
11 >
12 > If you have an ARM board and would like to help, please:
13 >
14 > wget https://dev.gentoo.org/~mgorny/dist/cpuid2cpuflags-7-dev.tar.bz2
15 > tar -xf cpuid2cpuflags-7-dev.tar.bz2
16 > cd cpuid2cpuflags-7-dev
17 > ./configure
18 > make hwcap-dump
19 > ./hwcap-dump
20 >
21 > and send me the output along with 'uname -m'. TIA!
22 >
23 > --
24 > Best regards,
25 > Michał Górny
26 >
27 >
28
29 Team, this is going to be a long rambling tale of woe. Sorry in advance.
30 On arm64 cpuid2cpuflags-8 tells me
31
32 Pi4_~arm64 /usr/portage # cpuid2cpuflags
33 CPU_FLAGS_ARM: edsp neon thumb vfp vfpv3 vfpv4 vfp-d32 crc32 v4 v5 v6 v7 v8 thumb2
34
35 but by chance I hit
36 [Bug 695854] net-misc/freerdp-2.0.0_rc4 on arm64 - aarch64-unknown-linux-gnu-gcc: error: unrecognized command line option ‘-mfpu=neon’
37
38 The 32 bit arm instruction set is optional on arm64.
39 The 64 bit Raspberry Pis all have it
40 The Cavium Thunder does not.
41
42 It is unlikely that there will ever be a multilib arm64. Only a subset
43 of arm64 could ever support it, so should we be using CPU_FLAGS_ARM
44 to cover arm64 too?
45
46 There is nothing in the name. Its the content that matters.
47
48 On a Pi4 in 64 bit mode, cpuinfo shows
49 Pi4_~arm64 /usr/portage # cat /proc/cpuinfo
50 processor : 0
51 BogoMIPS : 108.00
52 Features : fp asimd evtstrm crc32 cpuid
53 CPU implementer : 0x41
54 CPU architecture: 8
55 CPU variant : 0x0
56 CPU part : 0xd08
57 CPU revision : 3
58
59 In 32 bit mode, the same CPU shows
60 $ cat pi4_32.txt
61 processor : 0
62 model name : ARMv7 Processor rev 3 (v7l)
63 BogoMIPS : 108.00
64 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
65 CPU implementer : 0x41
66 CPU architecture: 7
67 CPU variant : 0x0
68 CPU part : 0xd08
69 CPU revision : 3
70
71
72 Cavium (64 bit)
73 arm64-build / # cat /proc/cpuinfo
74 processor : 0
75 BogoMIPS : 200.00
76 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32
77 CPU implementer : 0x43
78 CPU architecture: 8
79 CPU variant : 0x1
80 CPU part : 0x0a1
81 CPU revision : 1
82
83 The Cavium does not have any 32 bit instructions.
84
85 From bug 695854, CPU_FLAGS_ARM: neon is not correct on the Cavium.
86 I suspect that the other 32 bit flags will fail there, as it does not have them
87 but they might work on the Pi, as it does.
88
89 Other than pointing out the problem, I don't know how to test further.
90 Guidance welcome.
91
92 --
93 Regards,
94
95 Roy Bamford
96 (Neddyseagoon) a member of
97 elections
98 gentoo-ops
99 forum-mods
100 arm64