LinuxQuestions.org
Weather apps tell you it'll rain. Wyndo tells you when to go.
Home Forums Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 08-14-2025, 11:26 AM   #1
somanyquestions
Member
 
Registered: Jan 2019
Distribution: Ubuntu, Debian, Buildroot
Posts: 50

Rep: Reputation: Disabled
How to debug - Kernel freezing with added 16550 UART IP in FPGA


So, there's this somewhat suboptimal situation:

In a project on a ZynqMP / Ultrascale+, running Linux on the CPU and the FPGA doing application specific stuff (of course), we have a running system so far.

I do application software and some bare metal MCU programming, then there's an FPGA guy. Neither of us more than superficially touched Linux kernel stuff.
The guy who was a bit of a Linux kernel / driver guy is no longer with us, though.
While there were no plans to change the custom logic stuff where we'd have reckoned with needing a replacement for him (not easy to find), we added an extra 16550 UART, which should just use a mainline kernel driver and all is good.

Well, we did that and the kernel halts during boot.
We passed, via u-boot, kernel args like "debug" and "ignore_loglevel". The extra information shown in the log did not help.
Basically there were a few lines of "ZynqMP DMA driver Probe sucess" and then the last line "ttyS0 at MMIO ... (irq = 55, base_baud = ...) is a 16550A",
and then it simply halts.

How would one proceed from here to find out what exactly the kernel doesn't like about the HW change?
Is full blown source level kernel debugging sensible here? It seems a bit involved, to simply get an idea about the decision to halt (if that was a decision and not some wild crash).
 
Old 08-16-2025, 07:45 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,418

Rep: Reputation: 1389Reputation: 1389Reputation: 1389Reputation: 1389Reputation: 1389Reputation: 1389Reputation: 1389Reputation: 1389Reputation: 1389Reputation: 1389
If there is no kernel stack trace, then it doesn't seem like a software problem in the kernel. Since it's crashing right where you enable the UART, you may have a hardware issue. Perhaps it is coming up in an incorrect state.
 
1 members found this post helpful.
Old 08-18-2025, 12:48 PM   #3
somanyquestions
Member
 
Registered: Jan 2019
Distribution: Ubuntu, Debian, Buildroot
Posts: 50

Original Poster
Rep: Reputation: Disabled
But would one gain any insight about that "coming up in an incorrect state" by engagnig any sort of debugging mechnisms?

I did notice now that there is an entry about 8250 (also counting for 16550, apparently) UARTS to have the max number of 4, while the system now apparently has 4 that I surely know are of that type, and 2 of ATM unknown to me type, which cuold be that. Though AFAIK only one is new, and the system worked then apparently with 5 UARTS before. Well, maybe only this one new is also of the type.
Would Linux then simply halt (and not just warn) at boot, if there are 5 such UARTS and the max number is set to 4? (e.g. CONFIG_SERIAL_8250_NR_UARTS=4)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Coding serial ISR for UART 16550 under Linux kernel 3.18 annjer Linux - Newbie 1 04-28-2017 06:48 PM
Where does uart console get its value of uart port membase? unifoxz Linux - Kernel 1 12-20-2011 02:28 PM
Ts7300 Fpga Uart ts7300 Linux - Embedded & Single-board computer 1 02-08-2008 11:51 PM
Problem in interrupt handler for uart 16550 mrinal mishra Linux - Kernel 3 05-05-2006 12:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:13 PM.

Contact Us - Advertising Info - Rules - Privacy - Donations - Contributing Member - LQ Sitemap - "Weather apps tell you it'll rain. Wyndo tells you when to go."
Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions