mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
target/hppa: Implement cpu_list
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
9cf2112be4
commit
d3ae32d4d2
2 changed files with 29 additions and 0 deletions
|
@ -161,6 +161,30 @@ static ObjectClass *hppa_cpu_class_by_name(const char *cpu_model)
|
||||||
return object_class_by_name(TYPE_HPPA_CPU);
|
return object_class_by_name(TYPE_HPPA_CPU);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void hppa_cpu_list_entry(gpointer data, gpointer user_data)
|
||||||
|
{
|
||||||
|
ObjectClass *oc = data;
|
||||||
|
CPUClass *cc = CPU_CLASS(oc);
|
||||||
|
const char *tname = object_class_get_name(oc);
|
||||||
|
g_autofree char *name = g_strndup(tname, strchr(tname, '-') - tname);
|
||||||
|
|
||||||
|
if (cc->deprecation_note) {
|
||||||
|
qemu_printf(" %s (deprecated)\n", name);
|
||||||
|
} else {
|
||||||
|
qemu_printf(" %s\n", name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void hppa_cpu_list(void)
|
||||||
|
{
|
||||||
|
GSList *list;
|
||||||
|
|
||||||
|
list = object_class_get_list_sorted(TYPE_HPPA_CPU, false);
|
||||||
|
qemu_printf("Available CPUs:\n");
|
||||||
|
g_slist_foreach(list, hppa_cpu_list_entry, NULL);
|
||||||
|
g_slist_free(list);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_USER_ONLY
|
#ifndef CONFIG_USER_ONLY
|
||||||
#include "hw/core/sysemu-cpu-ops.h"
|
#include "hw/core/sysemu-cpu-ops.h"
|
||||||
|
|
||||||
|
|
|
@ -396,4 +396,9 @@ int hppa_artype_for_page(CPUHPPAState *env, target_ulong vaddr);
|
||||||
#endif
|
#endif
|
||||||
G_NORETURN void hppa_dynamic_excp(CPUHPPAState *env, int excp, uintptr_t ra);
|
G_NORETURN void hppa_dynamic_excp(CPUHPPAState *env, int excp, uintptr_t ra);
|
||||||
|
|
||||||
|
#define CPU_RESOLVING_TYPE TYPE_HPPA_CPU
|
||||||
|
|
||||||
|
#define cpu_list hppa_cpu_list
|
||||||
|
void hppa_cpu_list(void);
|
||||||
|
|
||||||
#endif /* HPPA_CPU_H */
|
#endif /* HPPA_CPU_H */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue