On 6/15/22 02:44, gaosong wrote:
Hi Richard.

On 2022/6/15 上午12:21, Richard Henderson wrote:
On 6/14/22 02:05, Song Gao wrote:
+#define ELF_HWCAP get_elf_hwcap()
+
+static uint32_t get_elf_hwcap(void)
+{
+    return 0;
+}

This should not be zero.  See cpu_probe_common in the kernel.  At minimum HWCAP_LOONGARCH_CRC32 and HWCAP_LOONGARCH_FPU are missing.  I don't know how many of the other features are implemented in target/loongarch/.

HWCAP_LOONGARCH_LAM  and  HWCAP_LOONGARCH_UAL  are need.

Ok, good. For clarity, you should determine these bits just like the kernel does from the config registers set at cpu reset, via cpu->env.cpucfg[*].


r~

Reply via email to