Brijesh-Thakkar opened a new pull request, #20918:
URL: https://github.com/apache/nuttx/pull/20918
**Title:** boards/x86_64/qemu-intel64: Set PCI UART1 port 0 in citest_smp
and jumbo
*Refs #20870 (driver fix follows in a separate PR).*
## Summary
`qemu-intel64:citest_smp` and `qemu-intel64:jumbo` enable a PCI 16550 UART as
`UART1` and name the QEMU single-port card (`1b36:0002`), but do not set
`CONFIG_16550_PCI_UART1_PORT`. Its Kconfig default is `1`
(`drivers/serial/Kconfig-pci`), and a single-port card only has port 0, so
`pci_u16550_probe()` never finds a matching instance and `/dev/ttyS1` is
never
registered. See #20870 (cause 1).
This adds `CONFIG_16550_PCI_UART1_PORT=0` to both defconfigs, which matches
the
card they already name. One line per file, nothing else changes.
The second cause in #20870 (the probe aborting at the first unconfigured
port) is in the driver and is handled in a separate PR; this change does not
depend on it.
## Impact
- **Users / boards:** only `qemu-intel64:citest_smp` and
`qemu-intel64:jumbo`.
`ttyS1` now exists when a `pci-serial` device is attached to QEMU.
- **CI:** none. The CI QEMU command for `citest_smp` does not add a PCI
serial
device, so behavior there is unchanged (and I did not touch `config.yaml`).
- **Build / docs / security / compatibility:** none. The line survives the
CI normalize step (see below).
## Testing
**Host:** Ubuntu 26.04, Linux 7.0.0-38, x86_64, GCC 15.2.0, QEMU 10.2.1 +
KVM.
Builds in a throwaway clone, nuttx `b01e7e760c` (master) + this commit, apps
`e0174bf71` (master).
**Normalize:** `tools/refresh.sh --silent qemu-intel64:citest_smp
qemu-intel64:jumbo` leaves both defconfigs unchanged (the new line is already
in normalized position), `git status` clean.
**Runtime:** `qemu-system-x86_64 -cpu host -enable-kvm -m 2G -smp 4 -kernel
nuttx -nographic -serial mon:stdio [-chardev null,id=c1 -device
pci-serial,chardev=c1]`, then `ls /dev` at the NSH prompt. Both configs have
`CONFIG_ARCH_PVHBOOT=y`, so `-kernel` boots them.
| Config | Build | QEMU PCI device | `.config` PORT | `/dev/ttyS1` |
|---|---|---|---|---|
| citest_smp | master | none | 1 | no |
| citest_smp | master | `pci-serial` | 1 | no |
| citest_smp | this PR | `pci-serial` | 0 | **yes** |
| jumbo | master | `pci-serial` | 1 | no |
| jumbo | this PR | `pci-serial` | 0 | **yes** |
`ls /dev` for `citest_smp`, this PR:
```
/dev:
console null pci random telnet ttyS0 ttyS1 zero
```
and on master with the same QEMU command: same list without `ttyS1`.
**Not tested:** any real hardware. This change only makes the device
register. Note that opening `/dev/ttyS1` in these configs asserts in
`up_enable_irq()` because the card's legacy IRQ is already busy and
`CONFIG_IRQCHAIN` is not set; this is independent of this PR (the driver is
not modified) and nothing in the config opens the port. TX/RX through the
port work with `CONFIG_IRQCHAIN=y`; see the driver PR.
## AI assistance
This change was developed with Claude Code (`claude-sonnet-5-5`). The commit
carries an `Assisted-by:` field as required by CONTRIBUTING.md. I reviewed
the diff and certify the DCO with my `Signed-off-by`.
**Note:** with ttyS1 now registered, opening it on citest_smp asserts in
`up_enable_irq()` because `CONFIG_IRQCHAIN` is not set. This reproduces with
the unmodified driver whenever the port registers; my TX/RX tests used
`CONFIG_IRQCHAIN=y`. I'll file a separate issue; if you prefer, I can add
`CONFIG_IRQCHAIN=y` to these defconfigs in this PR instead.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]