Detect AArch64 CPU features on FreeBSD
Categories
(NSS :: Libraries, enhancement, P2)
Tracking
(Not tracked)
People
(Reporter: jbeich, Assigned: val)
Details
Attachments
(1 file, 3 obsolete files)
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Sorry, I can't submit on Phabricator due to bug 1536716.
https://treeherder.mozilla.org/#/jobs?repo=nss-try&revision=ee7cb82a04e4c8012b35b099d0a4c31ae913fd34
Assignee | ||
Comment 4•5 years ago
|
||
Wait a second..
ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_BASE
ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL
That ==
looks like having PMULL support would detect as not having AES
Does this work? Make sure you have https://github.com/freebsd/freebsd/commit/8d6dc914b6ab
https://treeherder.mozilla.org/#/jobs?repo=nss-try&revision=00ebd9f0cdf81e443ab1e9c033dcb6997a31bf8e
Assignee | ||
Comment 6•5 years ago
|
||
(In reply to Jan Beich from comment #5)
Created attachment 9087997 [details] [diff] [review]
v3
Does this work? Make sure you have https://github.com/freebsd/freebsd/commit/8d6dc914b6ab
uhh.. why? Don't use hwcap on aarch64, everything was good in v2, except one thing – I just said you need to compare the register value differently.
The AES field is 1 when only AES is supported and 2 when AES+PMULL are.
If you check it == 1
for AES, systems with PMULL (which is like all of them) would detect as not having AES.
I think just using >=
on these fields is the best option.
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 7•4 years ago
|
||
Environment checks are reogranized to be separate from platform code
to make it impossible to forget to check disable_FEATURE on one platform
but not the other.
Comment on attachment 9112745 [details]
Bug 1575843 - Detect AArch64 CPU features on FreeBSD
Don't forget to pick up -CURRENT fixes from
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242104
(In reply to greg v [:myfreeweb] from comment #6)
(In reply to Jan Beich from comment #5)
Created attachment 9087997 [details] [diff] [review]
v3
Does this work? Make sure you have https://github.com/freebsd/freebsd/commit/8d6dc914b6abuhh.. why?
Less FreeBSD-specific code to maintain and works under qemu-user.
If someone else does upstreaming (like you did in comment 7) then I don't care. ;) armv7 is a lower priority and doesn't support Firefox on FreeBSD yet without patching.
Don't use hwcap on aarch64
Not convincing unless you answer "why?" as well. Is it because big.LITTLE may support different features?
Assignee | ||
Comment 10•4 years ago
|
||
Is it because big.LITTLE may support different features?
haha, no, that would actually make the register read more concerning, but FreeBSD always returns the intersection of features of all cores, whatever method you use to access the values.
why?
It's not in 12.x, right? Mostly because of that. I don't follow STABLE though, maybe it's there now and will be in the next 12.something…
Comment hidden (obsolete) |
Reporter | ||
Comment 12•4 years ago
•
|
||
@jcj, due to bug 1536716 Phabricator is read-only for me as I can't log in. Adding me as a reviewer is only useful to keep me in the loop as mail notification does work.
Comment 13•4 years ago
|
||
Agh, I'm sorry Jan, I knew that but ::waves hand at the mess today with him forgetting the new release schedule:: I forgot.
Comment 14•4 years ago
|
||
Reporter | ||
Comment 15•4 years ago
|
||
Adjusting Summary as armv6/armv7 bits were discarded (to be moved in a separate bug).
Description
•