On 1/10/25 18:57, Philippe Mathieu-Daudé wrote:
Convert the TYPE_SERIAL (16550A UART) to three-phase reset.
Local states are reset in the ResetHold handler.
Move the IRQ lowering to ResetExit, since it an external
object is accessed.
Accessing external objects is fine for hold; only "enter" cannot do so.
---
That said, externally creating IRQ like that is odd, see:
serial_pci_realize()
{
SerialState *s = &pci->state;
qdev_realize(DEVICE(s), NULL, ...);
s->irq = pci_allocate_irq(&pci->dev);
But too much cleanup for now, one step at a time.
---
serial_realize cannot fail. Just move qdev_realize after the assignment
and pass &error_abort? Same for serial_mm_realize and
multi_serial_pci_realize; serial_isa_realizefn instead is doing the
right thing.
Paolo