Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: LSE Atomics



On Wed, 6 May 2020 23:40:31 +0200
Kamil Rytarowski <n54%gmx.com@localhost> wrote:

> What's the NetBSD equivalent of the following logic:
> 
> unsigned long hwcap = __getauxval (AT_HWCAP);
> _aarch64_have_lse_atomics = (hwcap & HWCAP_ATOMICS) != 0;

Fetch sysctl machdep.cpu0.cpu_id (see usr.sbin/cpuctl/arch/aarch64.c)
Then test the ID_AA64ISAR0_EL1 register bits 23:20 for the value 0b0010.

-Tobias


Home | Main Index | Thread Index | Old Index