Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCI debug logging cannot work with PCI-enabled NS16550 #14763

Closed
dcpleung opened this issue Mar 20, 2019 · 0 comments · Fixed by #14920
Closed

PCI debug logging cannot work with PCI-enabled NS16550 #14763

dcpleung opened this issue Mar 20, 2019 · 0 comments · Fixed by #14920
Labels
area: PCI Peripheral Component Interconnect area: UART Universal Asynchronous Receiver-Transmitter bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@dcpleung
Copy link
Member

Describe the bug
#14554 shows a problem when CONFIG_UART_NS16550_PCI, CONFIG_PCI_ENUMERATION and CONFIG_PCI_LOG_DBG are all enabled. The UART driver has not been initialized yet but pci_dev_scan() is trying to printing debug messages. Exception was raised and nothing got printed to the console.

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build; cd build
  2. Enable these options
    • CONFIG_LOG=y
    • CONFIG_PCI=y
    • CONFIG_PCI_ENUMERATION=y
    • CONFIG_PCI_LOG_DBG=y
    • CONFIG_SHELL=y
  3. cmake -DBOARD=up_squared ../
  4. make
  5. Run with image
  6. See error

Expected behavior
The shell should come up.

Impact
Low, as one should use MMIO address anyway.

@dcpleung dcpleung added bug The issue is a bug, or the PR is fixing a bug area: UART Universal Asynchronous Receiver-Transmitter area: PCI Peripheral Component Interconnect labels Mar 20, 2019
@rljordan-zz rljordan-zz assigned ghost Mar 22, 2019
@ghost ghost added the priority: low Low impact/importance bug label Mar 22, 2019
carlescufi pushed a commit that referenced this issue Mar 26, 2019
When the console UART is a PCI device, and PCI debug logging is enabled,
the system crashes because the UART is initialized before logging, but
the UART initialization invokes the PCI subsystem which invokes logging.
Reordering the initialization sequence will not fix this chicken/egg.

Luckily, the LOG_DBG() calls in the PCI subsystem appear to be bitrot
leftovers from early development, so they are simply removed.

Also mark myself as the owner of the PCI subsystem.

Fixes: #14763

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: PCI Peripheral Component Interconnect area: UART Universal Asynchronous Receiver-Transmitter bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant