Message ID | 20241025141254.2141506-1-peter.maydell@linaro.org |
---|---|
Headers | show |
Series | softfloat: Set 2-NaN propagation rule in float_status, not at compile time | expand |
On 10/25/24 16:12, Peter Maydell wrote: > A summary of those TODOs and other oddities I have noticed but not > tried to tackle is:> > * hppa really ought to implement a CPU reset method > * alpha also doesn't implement CPU reset I used the alpha code as template to implement the hppa machine. That's probably why the CPU reset method is missing for both :-) The TODO about implementing: ? resettable_class_set_parent_phases(rc, NULL, hppa_cpu_reset_hold, NULL,...)... Helge
On Fri, 25 Oct 2024 at 15:49, Helge Deller <deller@gmx.de> wrote: > > > On 10/25/24 16:12, Peter Maydell wrote: > > A summary of those TODOs and other oddities I have noticed but not > > tried to tackle is:> > > * hppa really ought to implement a CPU reset method > > * alpha also doesn't implement CPU reset > > I used the alpha code as template to implement the hppa machine. > That's probably why the CPU reset method is missing for both :-) > > The TODO about implementing: ? > resettable_class_set_parent_phases(rc, NULL, hppa_cpu_reset_hold, NULL,...)... Yes, basically. The reset method should restore all the state of the CPU to what it was when QEMU started. Typically you put an end_reset_fields marker in the CPU state struct so you can memset() everything up to that point to zero, and then manually reset anything else that needs special handling. thanks -- PMM
On 10/25/24 16:59, Peter Maydell wrote: > On Fri, 25 Oct 2024 at 15:49, Helge Deller <deller@gmx.de> wrote: >> >> >> On 10/25/24 16:12, Peter Maydell wrote: >>> A summary of those TODOs and other oddities I have noticed but not >>> tried to tackle is:> >>> * hppa really ought to implement a CPU reset method >>> * alpha also doesn't implement CPU reset >> >> I used the alpha code as template to implement the hppa machine. >> That's probably why the CPU reset method is missing for both :-) >> >> The TODO about implementing: ? >> resettable_class_set_parent_phases(rc, NULL, hppa_cpu_reset_hold, NULL,...)... > > Yes, basically. The reset method should restore all the > state of the CPU to what it was when QEMU started. > Typically you put an end_reset_fields marker in the > CPU state struct so you can memset() everything up to > that point to zero, and then manually reset anything > else that needs special handling. Thanks for the explanation! I've just sent a patch to the mailing list: [PATCH] target/hppa: Add CPU reset method I tested it and it does work for me. If OK for you, I'd happy if you could include it in your patch series and adjust as needed to fix the FP initialization. Helge