mirror of
https://github.com/qemu/qemu.git
synced 2025-09-28 02:24:42 +00:00

Change the return type to abi_ulong, and pass in the cpu. As this is the last instance of get_elf_hwcap to be converted, remove the ifdef around the declaration in loader.h. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
24 lines
526 B
C
24 lines
526 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#include "qemu/osdep.h"
|
|
#include "qemu.h"
|
|
#include "loader.h"
|
|
|
|
|
|
const char *get_elf_cpu_model(uint32_t eflags)
|
|
{
|
|
return "max";
|
|
}
|
|
|
|
abi_ulong get_elf_hwcap(CPUState *cs)
|
|
{
|
|
#define MISA_BIT(EXT) (1 << (EXT - 'A'))
|
|
RISCVCPU *cpu = RISCV_CPU(cs);
|
|
uint32_t mask = MISA_BIT('I') | MISA_BIT('M') | MISA_BIT('A')
|
|
| MISA_BIT('F') | MISA_BIT('D') | MISA_BIT('C')
|
|
| MISA_BIT('V');
|
|
|
|
return cpu->env.misa_ext & mask;
|
|
#undef MISA_BIT
|
|
}
|