On 10/17/23 15:53, Akihiko Odaki wrote:
misa_mxl_max is common for all instances of a RISC-V CPU class so they
are better put into class.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
I'll repeat what I said in the v1: this patch is adding an extra class
parameter,
an extra param required to each class_init, and an extra CPUClass cast
every time
we want to read misa_mxl_max, all of that because we want to assign
gdb_core_xml_file
earlier.
If my previous suggestion of assigning gdb_core directly into
riscv_cpu_class_init()
doesn't work necause we need misa_mxl_max to do it, a good alternative
is setting
gdb_core_xml_file in riscv_cpu_post_init(), which is executed after all
cpu_init()
functions where we already have env->misa_mxl_max set properly.