Hi,
I am working on qemu 6.2.0 for isa serial char device in
hw/char/serial-isa.c.
It once creates 2 ports with "1" and "2" literally. But with the
following commit
commit dcdbfaafe90a5e6e172368b2aa5500a9ca192e49
Author: Gerd Hoffmann <kra...@redhat.com>
Date: Fri May 15 17:04:10 2020 +0200
acpi: move aml builder code for serial device
The code uses the isa_serial_io array to figure what the device uid is.
Side effect is that acpi antries are not limited to port 1+2 any more,
we'll also get entries for ports 3+4.
they are created in reverse order with 4,3,2,1.
With the following command,
# qemu-system-x86_64 -enable-kvm -S -cpu Conroe -m 2048 -chardev
pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0,index=0 -chardev
tty,id=charserial1,path=/dev/ttyS1 -device
isa-serial,chardev=charserial1,id=serial1,index=1
It calls the realize function serial_isa_realizefn() with indexes "0"
and "1". But calls serial_isa_build_aml() with 1 and 0.
I didn't figure out the root cause. Which part of source codes should I
focus on next please?
Or fortunately someone just knows the root cause.
Thanks a lot.
--
Kai Kang
Wind River Linux