I'm experimenting with coreboot (v3) on alix2c3 and still can't get serial console working. :( It stops right after kernel is done booting (I can see coreboot, filo and kernel messages just fine). I use openWRT but tried also another busybox based distribution (imedialinux) -- same problem. With original tinybios no problem. At the same time I tried voyage linux (without busybox) with corebooted alix and it has no such problem. It's obvious that this problem cannot be identified as 100% busybox's (why then it works on tinybios?). While digging coreboot sources I've noticed that uart initialization is done twice for this board -- once in /southbridge/amd/cs5536/cs5536.c (based on dts config) and second time in /mainboard/pcengines/alix2c3/stage1.c. I tried playing with these (and /southbridge/amd/cs5536/stage1.c), disabling one code or another, but no luck. Tried to set MOD bits:
msr.lo = (1 << 4) | (1 << 5) | (1 << 6); msr.hi = 0; wrmsr(MDD_UART1_MOD, msr);
Also no luck. Not enabling upper banks, however, makes uart appear in kernel as regular 16550A (and not as NS16550):
/* Bit 1 = DEVEN (device enable) * Bit 4 = EN_BANKS (allow access to the upper banks) */ //msr.lo = (1 << 4) | (1 << 1); msr.lo = 1 << 1; msr.hi = 0;
So... where should I go now? I'm really stuck. Begging for help...
Regards, Roman
-----Original Message----- From: coreboot-bounces@coreboot.org [mailto:coreboot-bounces@coreboot.org] On Behalf Of Roman Yeryomin Sent: Tuesday, November 04, 2008 10:39 AM To: coreboot@coreboot.org Subject: [coreboot] and/or busybox issue with alix2c3 serial console
I'm experimenting with coreboot (v3) on alix2c3 and still can't get serial console working. :( It stops right after kernel is done booting (I can see coreboot, filo and kernel messages just fine). I use openWRT but tried also another busybox based distribution (imedialinux) -- same problem. With original tinybios no problem. At the same time I tried voyage linux (without busybox) with corebooted alix and it has no such problem. It's obvious that this problem cannot be identified as 100% busybox's (why then it works on tinybios?). While digging coreboot sources I've noticed that uart initialization is done twice for this board -- once in /southbridge/amd/cs5536/cs5536.c (based on dts config) and second time in /mainboard/pcengines/alix2c3/stage1.c. I tried playing with these (and /southbridge/amd/cs5536/stage1.c), disabling one code or another, but no luck. Tried to set MOD bits:
msr.lo = (1 << 4) | (1 << 5) | (1 << 6); msr.hi = 0; wrmsr(MDD_UART1_MOD, msr);
Also no luck. Not enabling upper banks, however, makes uart appear in kernel as regular 16550A (and not as NS16550):
/* Bit 1 = DEVEN (device enable) * Bit 4 = EN_BANKS (allow access to the upper banks) */ //msr.lo = (1 << 4) | (1 << 1); msr.lo = 1 << 1; msr.hi = 0;
So... where should I go now? I'm really stuck. Begging for help...
We've seen this before on s2892, SimNOW, and other platforms. Has anyone ever nailed this down? I would say that it's definitely not busybox's problem since you don't get any kernel output at all. I didn't know where to look either.
Thanks, Myles
what's weird is that it has always worked for me.
Are you set up for serial console? Does serial console work fine on factory bios?
Don't worry about "setup twice" -- that's not it.
I think some debug prints in the kernel are called for. /sbin/init is going to try to open the console -- why not do some kernel debug prints and see how that works out?
ron
ron minnich wrote:
/sbin/init is going to try to open the console
Good point.
Is there a /dev/console node available in your filesystem at all times, Roman?
//Peter
On Tue, Nov 4, 2008 at 8:45 PM, Peter Stuge peter@stuge.se wrote:
ron minnich wrote:
/sbin/init is going to try to open the console
Good point.
Is there a /dev/console node available in your filesystem at all times, Roman?
yep
ls -la /dev/console crw-r--r-- 1 root root 5, 1 Jan 1 2000 /dev/console
Roman
Roman Yeryomin wrote:
Is there a /dev/console node available in your filesystem at all times, Roman?
yep
ls -la /dev/console crw-r--r-- 1 root root 5, 1 Jan 1 2000 /dev/console
Unfortunately one simple test is not enough. When you ran this command many things have happened in /dev compared to when init is starting.
Could you replace init with something else (maybe sh) and check if /dev/console exists also then?
//Peter
On Tue, Nov 4, 2008 at 10:59 AM, Roman Yeryomin leroi.lists@gmail.com wrote:
On Tue, Nov 4, 2008 at 8:45 PM, Peter Stuge peter@stuge.se wrote:
ron minnich wrote:
/sbin/init is going to try to open the console
Good point.
Is there a /dev/console node available in your filesystem at all times, Roman?
yep
ls -la /dev/console crw-r--r-- 1 root root 5, 1 Jan 1 2000 /dev/console
so you are in via ssh?
What does: cat /proc/devices and cat /proc/interrupts show
If you do this echo HITHERE > /dev/ttyS0 does it appear on console? If you type on console, what does /proc/interrupts show?
ron
On Tue, Nov 4, 2008 at 9:04 PM, ron minnich rminnich@gmail.com wrote:
On Tue, Nov 4, 2008 at 10:59 AM, Roman Yeryomin leroi.lists@gmail.com wrote:
On Tue, Nov 4, 2008 at 8:45 PM, Peter Stuge peter@stuge.se wrote:
ron minnich wrote:
/sbin/init is going to try to open the console
Good point.
Is there a /dev/console node available in your filesystem at all times, Roman?
yep
ls -la /dev/console crw-r--r-- 1 root root 5, 1 Jan 1 2000 /dev/console
cat /proc/devices
Character devices: 1 mem 4 /dev/vc/0 4 tty 4 ttyS 5 /dev/tty 5 /dev/console 5 /dev/ptmx 7 vcs 10 misc 13 input 90 mtd 108 ppp 128 ptm 136 pts
Block devices: 3 ide0 31 mtdblock
cat /proc/interrupts show
CPU0 0: 2594034 XT-PIC-XT timer 2: 0 XT-PIC-XT cascade 4: 0 XT-PIC-XT serial 8: 0 XT-PIC-XT rtc 10: 23113 XT-PIC-XT eth0 11: 5 XT-PIC-XT eth1, eth2 14: 20579 XT-PIC-XT ide0 NMI: 0 Non-maskable interrupts LOC: 0 Local timer interrupts RES: 0 Rescheduling interrupts CAL: 0 function call interrupts TLB: 0 TLB shootdowns TRM: 0 Thermal event interrupts SPU: 0 Spurious interrupts ERR: 0 MIS: 0
If you do this echo HITHERE > /dev/ttyS0
nothing it does work with tinybios also cat /proc/tty/driver/serial indicates that there is no tx/rx: serinfo:1.0 driver revision: 0: uart:16550A port:000003F8 irq:4 tx:0 rx:0 RTS|CTS|DTR|DSR|CD 1: uart:unknown port:000002F8 irq:3
does it appear on console? If you type on console, what does /proc/interrupts show?
serial interrupt counter doesn't change if you are talking about that
Roman
we've got another geode interrupt problem.
I figured that might be it.
WHat does dmesg say about the tty parts?
ron
On Tue, Nov 4, 2008 at 10:00 PM, ron minnich rminnich@gmail.com wrote:
we've got another geode interrupt problem.
I figured that might be it.
WHat does dmesg say about the tty parts?
dmesg | grep tty Kernel command line: block2mtd.block2mtd=/dev/hda2,131072,rootfs root=/dev/mtdblock0 rootfstype=jffs2 init=/etc/preinit noinitrd console=ttyS0,38400n8 console [ttyS0] enabled serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
this is with MOD bits set and upper banks disabled (the same is true for all my previous messages also)
Roman
On Tue, Nov 4, 2008 at 12:07 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
this is with MOD bits set and upper banks disabled (the same is true for all my previous messages also)
I'm pretty sure that MOD and banks won't matter. I think what is going on is that we have a non-connected interrupt problem.
Marc? What do we do now?
ron
ron minnich wrote:
On Tue, Nov 4, 2008 at 12:07 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
this is with MOD bits set and upper banks disabled (the same is true for all my previous messages also)
I'm pretty sure that MOD and banks won't matter. I think what is going on is that we have a non-connected interrupt problem.
Marc? What do we do now?
I am not so sure. The interrupt is setup right or not and it works in with voyage linux (without busybox). There is something more subtle going on.
Marc
Roman Yeryomin wrote:
serial interrupt counter doesn't change if you are talking about that
But it does change with tinybios?
msrtool getting closer.. Hacked on it at the airport.
//Peter
On Wed, Nov 5, 2008 at 12:33 AM, Peter Stuge peter@stuge.se wrote:
Roman Yeryomin wrote:
serial interrupt counter doesn't change if you are talking about that
But it does change with tinybios?
yes
Roman
On Tue, Nov 4, 2008 at 7:51 PM, Myles Watson mylesgw@gmail.com wrote:
We've seen this before on s2892, SimNOW, and other platforms. Has anyone ever nailed this down? I would say that it's definitely not busybox's problem since you don't get any kernel output at all. I didn't know where to look either.
you are wrong -- I can see all kernel messages
Roman
what's usually going on here is that /sbin/init starts and tries (and fails) to open a console. IIRC there are some hardware checks in the ttyS0 code that look for bits set "correctly" in the hardware. Another typical problem is interrupt setup -- there may not be any interrupts.
can you ssh in to the box when it is up? There are lots of simple tests to try if so.
ron
On Tue, Nov 4, 2008 at 8:55 PM, ron minnich rminnich@gmail.com wrote:
what's usually going on here is that /sbin/init starts and tries (and fails) to open a console. IIRC there are some hardware checks in the ttyS0 code that look for bits set "correctly" in the hardware. Another typical problem is interrupt setup -- there may not be any interrupts.
can you ssh in to the box when it is up? There are lots of simple tests to try if so.
yes, I can what do I do?
Roman
-----Original Message----- From: Roman Yeryomin [mailto:leroi.lists@gmail.com] Sent: Tuesday, November 04, 2008 11:49 AM To: Myles Watson; coreboot@coreboot.org Subject: Re: [coreboot] and/or busybox issue with alix2c3 serial console
On Tue, Nov 4, 2008 at 7:51 PM, Myles Watson mylesgw@gmail.com wrote:
We've seen this before on s2892, SimNOW, and other platforms. Has
anyone
ever nailed this down? I would say that it's definitely not busybox's problem since you don't get any kernel output at all. I didn't know
where
to look either.
you are wrong -- I can see all kernel messages
Sorry I misunderstood you. I have seen a different problem.
Thanks, Myles
What do your kernel cmdlines look like?
ron
On Tue, Nov 4, 2008 at 8:37 PM, ron minnich rminnich@gmail.com wrote:
What do your kernel cmdlines look like?
does it matter? I think if I can see kernal messages it's already ok... anyway it is:
block2mtd.block2mtd=/dev/hda2,131072,rootfs root=/dev/mtdblock0 rootfstype=jffs2 init=/etc/preinit noinitrd console=ttyS0,38400n8
Roman
On Tue, Nov 4, 2008 at 10:57 AM, Roman Yeryomin leroi.lists@gmail.com wrote:
On Tue, Nov 4, 2008 at 8:37 PM, ron minnich rminnich@gmail.com wrote:
What do your kernel cmdlines look like?
does it matter? I think if I can see kernal messages it's already ok...
it's not. but:
block2mtd.block2mtd=/dev/hda2,131072,rootfs root=/dev/mtdblock0 rootfstype=jffs2 init=/etc/preinit noinitrd console=ttyS0,38400n8
so it is something else.
ron
ron minnich wrote:
On Tue, Nov 4, 2008 at 10:57 AM, Roman Yeryomin leroi.lists@gmail.com wrote:
On Tue, Nov 4, 2008 at 8:37 PM, ron minnich rminnich@gmail.com wrote:
What do your kernel cmdlines look like?
does it matter? I think if I can see kernal messages it's already ok...
it's not. but:
block2mtd.block2mtd=/dev/hda2,131072,rootfs root=/dev/mtdblock0 rootfstype=jffs2 init=/etc/preinit noinitrd console=ttyS0,38400n8
Silly question but are you setting two different serial rates?
kernel: console=ttyS0,38400n8
coreboot default: CONFIG_CONSOLE_SERIAL_115200=y
Marc
On Tue, Nov 4, 2008 at 11:07 AM, Marc Jones Marc.Jones@amd.com wrote:
Silly question but are you setting two different serial rates?
kernel: console=ttyS0,38400n8
coreboot default: CONFIG_CONSOLE_SERIAL_115200=y
well there's a gotcha.
ron
On Tue, Nov 4, 2008 at 9:07 PM, Marc Jones Marc.Jones@amd.com wrote:
Silly question but are you setting two different serial rates?
kernel: console=ttyS0,38400n8
coreboot default: CONFIG_CONSOLE_SERIAL_115200=y
:) no
On Tue, Nov 4, 2008 at 10:57 AM, Roman Yeryomin leroi.lists@gmail.com wrote:
On Tue, Nov 4, 2008 at 8:37 PM, ron minnich rminnich@gmail.com wrote:
What do your kernel cmdlines look like?
does it matter? I think if I can see kernal messages it's already ok...
This is a pretty common thing to believe, but it is only a lucky case :-)
lots can go wrong such that you can see kernel messages but get no console.
ron
On Tue, Nov 4, 2008 at 10:57 AM, Roman Yeryomin leroi.lists@gmail.com wrote:
block2mtd.block2mtd=/dev/hda2,131072,rootfs root=/dev/mtdblock0 rootfstype=jffs2 init=/etc/preinit noinitrd console=ttyS0,38400n8
to "replace" init, do this: init=/bin/bash
or similar on the cmdline
ron
On Tue, Nov 4, 2008 at 9:07 PM, ron minnich rminnich@gmail.com wrote:
On Tue, Nov 4, 2008 at 10:57 AM, Roman Yeryomin leroi.lists@gmail.com wrote:
block2mtd.block2mtd=/dev/hda2,131072,rootfs root=/dev/mtdblock0 rootfstype=jffs2 init=/etc/preinit noinitrd console=ttyS0,38400n8
to "replace" init, do this: init=/bin/bash
yes, I've done that before openWRT uses init=/etc/preinit by default and init=/bin/sh makes kerenel to panic:
Kernel panic - not syncing: Attempted to kill init!
Roman
On Tue, Nov 4, 2008 at 12:40 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
Kernel panic - not syncing: Attempted to kill init!
A pretty sure sign that the shell tried to read /dev/console, got an eof, and bailed.
ron
On Tue, Nov 4, 2008 at 11:16 PM, ron minnich rminnich@gmail.com wrote:
On Tue, Nov 4, 2008 at 12:40 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
Kernel panic - not syncing: Attempted to kill init!
A pretty sure sign that the shell tried to read /dev/console, got an eof, and bailed.
forgot to mention that I tried to modify /etc/preinit adding echo ">>>>>>>> HERE <<<<<<<<<" above all the script code and it didn't appear on console
Roman
Roman Yeryomin wrote:
I'm experimenting with coreboot (v3) on alix2c3 and still can't get serial console working. :( It stops right after kernel is done booting (I can see coreboot, filo and kernel messages just fine). I
Is it just the console that stops? The kernel is still running and otherwise behaving normally?
Marc
On Tue, Nov 4, 2008 at 8:43 PM, Marc Jones Marc.Jones@amd.com wrote:
Roman Yeryomin wrote:
I'm experimenting with coreboot (v3) on alix2c3 and still can't get serial console working. :( It stops right after kernel is done booting (I can see coreboot, filo and kernel messages just fine). I
Is it just the console that stops? The kernel is still running and otherwise behaving normally?
exactly! only console is not working... system is running fine (at least for few hours for sure)
Roman
On 04/11/08 20:47 +0200, Roman Yeryomin wrote:
On Tue, Nov 4, 2008 at 8:43 PM, Marc Jones Marc.Jones@amd.com wrote:
Roman Yeryomin wrote:
I'm experimenting with coreboot (v3) on alix2c3 and still can't get serial console working. :( It stops right after kernel is done booting (I can see coreboot, filo and kernel messages just fine). I
Is it just the console that stops? The kernel is still running and otherwise behaving normally?
exactly! only console is not working... system is running fine (at least for few hours for sure)
pass CONSOLE=/dev/ttyS0 on the command line.
Jordan
On Tue, Nov 4, 2008 at 10:36 PM, Jordan Crouse jordan.crouse@amd.com wrote:
On 04/11/08 20:47 +0200, Roman Yeryomin wrote:
On Tue, Nov 4, 2008 at 8:43 PM, Marc Jones Marc.Jones@amd.com wrote:
Roman Yeryomin wrote:
I'm experimenting with coreboot (v3) on alix2c3 and still can't get serial console working. :( It stops right after kernel is done booting (I can see coreboot, filo and kernel messages just fine). I
Is it just the console that stops? The kernel is still running and otherwise behaving normally?
exactly! only console is not working... system is running fine (at least for few hours for sure)
pass CONSOLE=/dev/ttyS0 on the command line.
kernel command line? you mean instead of console=ttyS0,38400n8? or append to it? anyway.. it doesn't help
Roman
On Tue, Nov 4, 2008 at 12:36 PM, Jordan Crouse jordan.crouse@amd.com wrote:
On 04/11/08 20:47 +0200, Roman Yeryomin wrote:
On Tue, Nov 4, 2008 at 8:43 PM, Marc Jones Marc.Jones@amd.com wrote:
Roman Yeryomin wrote:
I'm experimenting with coreboot (v3) on alix2c3 and still can't get serial console working. :( It stops right after kernel is done booting (I can see coreboot, filo and kernel messages just fine). I
Is it just the console that stops? The kernel is still running and otherwise behaving normally?
exactly! only console is not working... system is running fine (at least for few hours for sure)
pass CONSOLE=/dev/ttyS0 on the command line.
does CONSOLE have some special meaning to busybox?
Ward, how is your 2c3 nowadays? COuld Roman send you an image and you see if it boots?
ron
On Tue, Nov 04, 2008 at 01:17:52PM -0800, ron minnich wrote:
On Tue, Nov 4, 2008 at 12:36 PM, Jordan Crouse jordan.crouse@amd.com wrote:
On 04/11/08 20:47 +0200, Roman Yeryomin wrote:
On Tue, Nov 4, 2008 at 8:43 PM, Marc Jones Marc.Jones@amd.com wrote:
Roman Yeryomin wrote:
I'm experimenting with coreboot (v3) on alix2c3 and still can't get serial console working. :( It stops right after kernel is done booting (I can see coreboot, filo and kernel messages just fine). I
Is it just the console that stops? The kernel is still running and otherwise behaving normally?
exactly! only console is not working... system is running fine (at least for few hours for sure)
pass CONSOLE=/dev/ttyS0 on the command line.
does CONSOLE have some special meaning to busybox?
Ward, how is your 2c3 nowadays? COuld Roman send you an image and you see if it boots?
I've got two 2c3's in production, with coreboot. I could probably test on one (my home firewall), but it's a bit annoying because it takes down my network :) This week's hard though, I'm technically on vacation... But I'm interested in helping out for sure.
Thanks, Ward.
ward, can you do a flashrom -r on a bios image and send it to roman?
This would have to be v3
ron
On Tue, Nov 4, 2008 at 11:30 PM, ron minnich rminnich@gmail.com wrote:
ward, can you do a flashrom -r on a bios image and send it to roman?
As far as I remember Ward is using voyage linux and I've mentioned that voyage linux (and probably others not based on busybox) works for me also. But surely I can test his image! Attaching mine as well if somebody wants to try...
Roman
What's your kernel version and what is his kernel version?
ron
On Tue, Nov 4, 2008 at 11:41 PM, ron minnich rminnich@gmail.com wrote:
What's your kernel version and what is his kernel version?
mine (openWRT) is 2.6.25.16 voyage linux I tried has 2.6.23
Roman
On Tue, Nov 04, 2008 at 01:41:44PM -0800, ron minnich wrote:
What's your kernel version and what is his kernel version?
Right, I'm on voyage 0.5,
Linux littleredbox.vandewege.net 2.6.23-486-voyage #1 PREEMPT Wed May 21 15:31:49 GMT 2008 i586 GNU/Linux
Thanks, Ward.
Okay - so we are reasonable confused at this point, so lets reset. The kernel and userland have rather different concepts of what the "console" is. Its rather possible that the kernel and userland are using different consoles based on a number of factors. The reason why I suggested that he try the CONSOLE= bit is that many distro initscripts use CONSOLE= grep for CONSOLE in /etc/ on your desktop and you will see evidence of this. Now, that, said, that doesn't always work, and I'm looking at busybox right now for some clues.
It looks like busybox looks for /dev/console and /dev/tty first off, so we need to make sure that those devices are both available and active. You may also want to add a getty line in your inittab to open a getty on ttyS0, so even if you don't have the console output, you should still have a login prompt.
Long story short - this is a userland issue, and not really a kernel or hardware problem.
Jordan
On Tue, Nov 4, 2008 at 1:53 PM, Jordan Crouse jordan.crouse@amd.com wrote:
Long story short - this is a userland issue, and not really a kernel or hardware problem.
no question. I wish I knew what busybox was doing "wrong' such that it did not work. But, since the changed software in question is coreboot, it's our problem to resolve the issue ...
One thing I have also done in the past for this sort of problem is to run the init under strace. It's doable. But does busybox come with strace nowadays?
ron
On Tue, Nov 4, 2008 at 11:53 PM, Jordan Crouse jordan.crouse@amd.com wrote:
Okay - so we are reasonable confused at this point, so lets reset. The kernel and userland have rather different concepts of what the "console" is. Its rather possible that the kernel and userland are using different consoles based on a number of factors. The reason why I suggested that he try the CONSOLE= bit is that many distro initscripts use CONSOLE= grep for CONSOLE in /etc/ on your desktop and you will see evidence of this. Now, that, said, that doesn't always work, and I'm looking at busybox right now for some clues.
It looks like busybox looks for /dev/console and /dev/tty first off, so we need to make sure that those devices are both available and active. You may also want to add a getty line in your inittab to open a getty on ttyS0, so even if you don't have the console output, you should still have a login prompt.
Long story short - this is a userland issue, and not really a kernel or hardware problem.
I agree that there is something to do with busybox also but it still works with factory bios! Why? I tried getty in inittab also -- same thing, no even login prompt.
Roman
On Tue, Nov 4, 2008 at 2:04 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
I agree that there is something to do with busybox also but it still works with factory bios! Why?
OK so what we have is a /dev/console issue.
Try to write a simple script:
touch /tmp/ALIVE
Make that script be your init (make sure to set the x bits and put the right #! shell for first line). Let's verify that we can run a simple script, that may help with diagnosis
ron
On Wed, Nov 5, 2008 at 12:16 AM, ron minnich rminnich@gmail.com wrote:
On Tue, Nov 4, 2008 at 2:04 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
I agree that there is something to do with busybox also but it still works with factory bios! Why?
OK so what we have is a /dev/console issue.
Try to write a simple script:
touch /tmp/ALIVE
Make that script be your init (make sure to set the x bits and put the right #! shell for first line). Let's verify that we can run a simple script, that may help with diagnosis
I can do that directly in preinit just after proc, sys and tmpfs are mounted but before everything else. For now I did
touch /tmp/alive echo "ALIVE" > /tmp/alive2
and get
ls -la /tmp/alive* -rw-r--r-- 1 root root 0 Nov 30 1999 /tmp/alive -rw-r--r-- 1 root root 131 Nov 30 1999 /tmp/alive2
cat /tmp/alive2 ALIVE [sighandler]: No more events to be processed, quitting. [cleanup]: Waiting for children. [cleanup]: All children terminated.
I don't understand where these three lines came from but they are there.
Roman
On Tue, Nov 4, 2008 at 3:23 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
On Wed, Nov 5, 2008 at 12:16 AM, ron minnich rminnich@gmail.com wrote:
On Tue, Nov 4, 2008 at 2:04 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
I agree that there is something to do with busybox also but it still works with factory bios! Why?
OK so what we have is a /dev/console issue.
Try to write a simple script:
touch /tmp/ALIVE
Make that script be your init (make sure to set the x bits and put the right #! shell for first line). Let's verify that we can run a simple script, that may help with diagnosis
I can do that directly in preinit just after proc, sys and tmpfs are mounted but before everything else. For now I did
touch /tmp/alive echo "ALIVE" > /tmp/alive2
and get
ls -la /tmp/alive* -rw-r--r-- 1 root root 0 Nov 30 1999 /tmp/alive -rw-r--r-- 1 root root 131 Nov 30 1999 /tmp/alive2
cat /tmp/alive2 ALIVE [sighandler]: No more events to be processed, quitting. [cleanup]: Waiting for children. [cleanup]: All children terminated.
I don't understand where these three lines came from but they are there.
probably some busybox stuff.
ok, I am shot for the day. Will wait for someone else to have a bright idea. None of this makes sense.
I'll think on it overniight.
ron
On Wed, Nov 5, 2008 at 1:43 AM, ron minnich rminnich@gmail.com wrote:
On Tue, Nov 4, 2008 at 3:23 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
On Wed, Nov 5, 2008 at 12:16 AM, ron minnich rminnich@gmail.com wrote:
On Tue, Nov 4, 2008 at 2:04 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
I agree that there is something to do with busybox also but it still works with factory bios! Why?
OK so what we have is a /dev/console issue.
Try to write a simple script:
touch /tmp/ALIVE
Make that script be your init (make sure to set the x bits and put the right #! shell for first line). Let's verify that we can run a simple script, that may help with diagnosis
I can do that directly in preinit just after proc, sys and tmpfs are mounted but before everything else. For now I did
touch /tmp/alive echo "ALIVE" > /tmp/alive2
and get
ls -la /tmp/alive* -rw-r--r-- 1 root root 0 Nov 30 1999 /tmp/alive -rw-r--r-- 1 root root 131 Nov 30 1999 /tmp/alive2
cat /tmp/alive2 ALIVE [sighandler]: No more events to be processed, quitting. [cleanup]: Waiting for children. [cleanup]: All children terminated.
I don't understand where these three lines came from but they are there.
probably some busybox stuff.
ok, I am shot for the day. Will wait for someone else to have a bright idea. None of this makes sense.
I'll think on it overniight.
Well, this is why I'm here -- for a bright idea :)
Roman
depending on how daring you feel, you can (I have done this) do an open of /dev/console IN THE KERNEL, and see what happens. But based on what we're seeing so far, I am pretty strongly convinced there is an interrupt issue here.
but seeing the .config for the voyage and busy kernels would help. You can always boot them and hopefull cat /proc/config.gz will work.
ron
On Wed, Nov 5, 2008 at 2:01 AM, ron minnich rminnich@gmail.com wrote:
depending on how daring you feel, you can (I have done this) do an open of /dev/console IN THE KERNEL, and see what happens. But based on what we're seeing so far, I am pretty strongly convinced there is an interrupt issue here.
well.. I'm not really good programmer, but I can dig there and see what I can do, or you can give me some patch I can try... BTW some time ago, when I was starting to play with coreboot and already had this issue (there are posts in this list about month ago) I've asked Pascal Dornier (person behind pcengines - alix board maker) how he sets up uart in his bios (as seems like he wrote it himself) and here is what he replied (I've already posted this):
seems like there is a bug in coreboot and it's not setting uart the right way. I can see all the coreboot and kernel messages in console but right after init starts serial console is lost (linux keeps running normally). So.. could you share how you set up uarts in your tinyBIOS? Which UART[x]_MOD, UART[x]_DON and UART[x]_CONF bits you set?
After init -> changes to Linux driver, or does it still use Int 10 + Int 16 ? My BIOS does a redirect of these BIOS interrupts to the serial console. Once the Linux kernel starts it has to take care of the serial console itself.
I didn't reply him because didn't know what to say. tinybios source code is available on pcengines website but it's written in assembler (and I don't understand anything there) -- maybe it can help somehow?
Roman
It just occured to me, I use a busybox based image for my Geode... :)
I gzipped up the ext2 filesystem and put it here:
http://www.infradead.org/~jcrouse/geode.rootfs.ext2.gz
This uses busybox 1.9.2 and kernel 2.6.27. There is a menu.lst in /boot, but the root points to the wrong place. Use
kernel /boot/bzImage root=/dev/hda1 console=tty0 console=ttyS0,115200
I just booted it with a fresh version of v3 and all was well. Good luck.
Jordan
On Tue, Nov 4, 2008 at 5:24 PM, Jordan Crouse jordan.crouse@amd.com wrote:
It just occured to me, I use a busybox based image for my Geode... :)
which geode is it? I am convinced there is something "different" about the pcengines boards. I love those boards, but let's see.
ron
ron minnich wrote:
It just occured to me, I use a busybox based image for my Geode... :)
which geode is it? I am convinced there is something "different" about the pcengines boards. I love those boards, but let's see.
I think the main difference is that alix2 and alix3 have the serial port coming out of the 5536 rather than a superio, which is what we're used to.
We just have to get the init right. :)
//Peter
On Wed, Nov 5, 2008 at 11:04 AM, Peter Stuge peter@stuge.se wrote:
ron minnich wrote:
It just occured to me, I use a busybox based image for my Geode... :)
which geode is it? I am convinced there is something "different" about the pcengines boards. I love those boards, but let's see.
I think the main difference is that alix2 and alix3 have the serial port coming out of the 5536 rather than a superio, which is what we're used to.
We just have to get the init right. :)
This is what I think too. Maybe tinybios sources can help here? What do you think about what Pascal Dornier said (about redirecting interrupts)?
Roman
Roman Yeryomin wrote:
Maybe tinybios sources can help here?
Sure, can you find the assembly code that does serial init? Possibly it's not all in once place but rather scattered out in a few places, meaning that it's simpler to look at documentation than code.
Geode documentation is available but I suppose time is scarce.
What do you think about what Pascal Dornier said (about redirecting interrupts)?
I'm afraid it isn't relevant. He is refering to BIOS interrupt services which coreboot doesn't do at all and which are unrelated to the hardware interrupts that are missing in your system.
Please see http://en.wikipedia.org/wiki/Interrupt and http://en.wikipedia.org/wiki/BIOS_interrupt_call for more info.
//Peter
On 05/11/08 10:04 +0100, Peter Stuge wrote:
ron minnich wrote:
It just occured to me, I use a busybox based image for my Geode... :)
which geode is it? I am convinced there is something "different" about the pcengines boards. I love those boards, but let's see.
I think the main difference is that alix2 and alix3 have the serial port coming out of the 5536 rather than a superio, which is what we're used to.
We just have to get the init right. :)
Not to rain on your parade, but the Norwich doesn't use a superio either. :)
Jordan
//Peter
-- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
On Wed, Nov 5, 2008 at 8:09 AM, Jordan Crouse jordan.crouse@amd.com wrote:
Not to rain on your parade, but the Norwich doesn't use a superio either. :)
The one thing I know for sure is that the way that alix1c connected interrupts, and the way it set them up, was not a way that Marc thought made sense. The pc engines bios did things w.r.t. A,B,C,D that were not "normal" practice. This difference in turn caused some weird interaction with vsa. The fact that voyage linux sees ttyS0 with irq0 tells me that this is having an effect.
We have a norwich which works (with v3, jordan?) with same chips as alix. we have two kernels what work with norwich. Jordan, can you send a boot log of these or at least tell us what irq they think is associated with com1?
ron
On 05/11/08 08:24 -0800, ron minnich wrote:
We have a norwich which works (with v3, jordan?) with same chips as alix. we have two kernels what work with norwich. Jordan, can you send a boot log of these or at least tell us what irq they think is associated with com1?
v3 yes. And the IRQ is 4, natch.... :) the x86 is still living in 1985, haven't you heard?
Jordan
On Wed, Nov 5, 2008 at 8:32 AM, Jordan Crouse jordan.crouse@amd.com wrote:
On 05/11/08 08:24 -0800, ron minnich wrote:
We have a norwich which works (with v3, jordan?) with same chips as alix. we have two kernels what work with norwich. Jordan, can you send a boot log of these or at least tell us what irq they think is associated with com1?
v3 yes. And the IRQ is 4, natch.... :) the x86 is still living in 1985, haven't you heard?
but voyage on the alix IRQ was *0*. And it worked. now that is weird.
ron
On 04/11/08 20:17 -0800, ron minnich wrote:
On Tue, Nov 4, 2008 at 5:24 PM, Jordan Crouse jordan.crouse@amd.com wrote:
It just occured to me, I use a busybox based image for my Geode... :)
which geode is it? I am convinced there is something "different" about the pcengines boards. I love those boards, but let's see.
I use the same image for all of my Geodes, but in this case this was a Norwich.
Jordan
On Wed, Nov 5, 2008 at 3:24 AM, Jordan Crouse jordan.crouse@amd.com wrote:
It just occured to me, I use a busybox based image for my Geode... :)
I gzipped up the ext2 filesystem and put it here:
http://www.infradead.org/~jcrouse/geode.rootfs.ext2.gz
This uses busybox 1.9.2 and kernel 2.6.27. There is a menu.lst in /boot, but the root points to the wrong place. Use
kernel /boot/bzImage root=/dev/hda1 console=tty0 console=ttyS0,115200
I just booted it with a fresh version of v3 and all was well. Good luck.
Tried your image but no luck. Same behaviour. No serial console. All it gave to serial console while booting is in attachment. Does it have some ip address and telnet/ssh server? So I could at least ping it and see if it booted at all.
Roman
On Wed, Nov 5, 2008 at 1:20 AM, Roman Yeryomin leroi.lists@gmail.com wrote:
Tried your image but no luck. Same behaviour. No serial console. All it gave to serial console while booting is in attachment. Does it have some ip address and telnet/ssh server? So I could at least ping it and see if it booted at all.
At this point I am willing to guarantee it's interrupts. The IRQ wiring on the pc engines is not quite what AMD would say is normal.
This is the problem I had and never fixed. I am surprised that it is coming up on the 5536 device, however. Do you have any chance of getting schematics?
ron
On Wednesday 05 November 2008 17:41:24 ron minnich wrote:
On Wed, Nov 5, 2008 at 1:20 AM, Roman Yeryomin leroi.lists@gmail.com
wrote:
Tried your image but no luck. Same behaviour. No serial console. All it gave to serial console while booting is in attachment. Does it have some ip address and telnet/ssh server? So I could at least ping it and see if it booted at all.
At this point I am willing to guarantee it's interrupts. The IRQ wiring on the pc engines is not quite what AMD would say is normal.
This is the problem I had and never fixed. I am surprised that it is coming up on the 5536 device, however. Do you have any chance of getting schematics?
Schematics are open and available here: http://www.pcengines.ch/alix2c3.htm
Roman
I see the problem. It is interesting that in some situations that it works.
Marc
Acked-by: Ronald G. Minnich rminnich@gmail.com
On Wed, Nov 5, 2008 at 8:09 PM, Marc Jones Marc.Jones@amd.com wrote:
I see the problem. It is interesting that in some situations that it works.
Marc
-- Marc Jones Senior Firmware Engineer (970) 226-9684 Office mailto:Marc.Jones@amd.com http://www.amd.com/embeddedprocessors
LPC serial IRQs were being left enabled when there is no LPC serial device.
Signed-off-by: Marc Jones marc.jones@amd.com
Index: mainboard/pcengines/alix2c3/dts
--- mainboard/pcengines/alix2c3/dts (revision 980) +++ mainboard/pcengines/alix2c3/dts (working copy) @@ -34,9 +34,9 @@ /config/("southbridge/amd/cs5536/dts"); /* Interrupt enables for LPC bus. * Each bit is an IRQ 0-15. */
lpc_serirq_enable = "0x0000105A";
lpc_serirq_enable = "0x00001002"; /* LPC IRQ polarity. Each bit is an IRQ 0-15. */
lpc_serirq_polarity = "0x0000EFA5";
lpc_serirq_polarity = "0x0000EFFD"; /* 0:continuous 1:quiet */ lpc_serirq_mode = "1"; /* GPIO(0-0x20) for INT D:C:B:A, 0xFF=none.
tried this with my mods but didn't work will try a clean build now..
Roman
On Wed, Nov 5, 2008 at 11:35 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
On Wed, Nov 5, 2008 at 8:09 PM, Marc Jones Marc.Jones@amd.com wrote:
I see the problem. It is interesting that in some situations that it works.
Marc
-- Marc Jones Senior Firmware Engineer (970) 226-9684 Office mailto:Marc.Jones@amd.com http://www.amd.com/embeddedprocessors
LPC serial IRQs were being left enabled when there is no LPC serial device.
Signed-off-by: Marc Jones marc.jones@amd.com
Index: mainboard/pcengines/alix2c3/dts
--- mainboard/pcengines/alix2c3/dts (revision 980) +++ mainboard/pcengines/alix2c3/dts (working copy) @@ -34,9 +34,9 @@ /config/("southbridge/amd/cs5536/dts"); /* Interrupt enables for LPC bus. * Each bit is an IRQ 0-15. */
lpc_serirq_enable = "0x0000105A";
lpc_serirq_enable = "0x00001002"; /* LPC IRQ polarity. Each bit is an IRQ 0-15. */
lpc_serirq_polarity = "0x0000EFA5";
lpc_serirq_polarity = "0x0000EFFD"; /* 0:continuous 1:quiet */ lpc_serirq_mode = "1"; /* GPIO(0-0x20) for INT D:C:B:A, 0xFF=none.
tried this with my mods but didn't work will try a clean build now..
WOW! Cool! :) It works!
Roman
On Thu, Nov 6, 2008 at 1:28 AM, Roman Yeryomin leroi.lists@gmail.com wrote:
On Wed, Nov 5, 2008 at 11:35 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
On Wed, Nov 5, 2008 at 8:09 PM, Marc Jones Marc.Jones@amd.com wrote:
I see the problem. It is interesting that in some situations that it works.
LPC serial IRQs were being left enabled when there is no LPC serial device.
WOW! Cool! :) It works!
Many thanks to everybody who tried to help! One more question right away... can there be any potential issues with eth1 and eth2 sitting on one interrupt?
cat /proc/interrupts CPU0 0: 541075 XT-PIC-XT timer 2: 0 XT-PIC-XT cascade 4: 403 XT-PIC-XT serial 8: 0 XT-PIC-XT rtc 10: 4828 XT-PIC-XT eth0 11: 319 XT-PIC-XT eth1, eth2 14: 20579 XT-PIC-XT ide0 NMI: 0 Non-maskable interrupts LOC: 0 Local timer interrupts RES: 0 Rescheduling interrupts CAL: 0 function call interrupts TLB: 0 TLB shootdowns TRM: 0 Thermal event interrupts SPU: 0 Spurious interrupts ERR: 0 MIS: 0
Roman
On Wed, Nov 5, 2008 at 3:34 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
cat /proc/interrupts CPU0 0: 541075 XT-PIC-XT timer 2: 0 XT-PIC-XT cascade 4: 403 XT-PIC-XT serial 8: 0 XT-PIC-XT rtc 10: 4828 XT-PIC-XT eth0 11: 319 XT-PIC-XT eth1, eth2
no, Linux knows how to handle those things.
ron
Marc Jones wrote:
+++ mainboard/pcengines/alix2c3/dts (working copy) @@ -34,9 +34,9 @@ /config/("southbridge/amd/cs5536/dts"); /* Interrupt enables for LPC bus. * Each bit is an IRQ 0-15. */
lpc_serirq_enable = "0x0000105A";
lpc_serirq_enable = "0x00001002"; /* LPC IRQ polarity. Each bit is an IRQ 0-15. */
lpc_serirq_polarity = "0x0000EFA5";
lpc_serirq_polarity = "0x0000EFFD";
Awesome. Please commit!
Acked-by: Peter Stuge peter@stuge.se
But we should not do interrupt stuff in dts this way I think. I listened to a device tree presentation today and noone else knows how to separate description from config either. At least we're not alone.
Look at Documentation/powerpc/booting-without-of.txt for much dt documentation.
//Peter
----- Original Message ----
From: Peter Stuge peter@stuge.se To: coreboot@coreboot.org Sent: Friday, November 7, 2008 6:27:40 PM Subject: Re: [coreboot] [patch] and/or busybox issue with alix2c3 serial console
Marc Jones wrote:
+++ mainboard/pcengines/alix2c3/dts (working copy) @@ -34,9 +34,9 @@ /config/("southbridge/amd/cs5536/dts"); /* Interrupt enables for LPC bus. * Each bit is an IRQ 0-15. */
lpc_serirq_enable = "0x0000105A";
lpc_serirq_enable = "0x00001002"; /* LPC IRQ polarity. Each bit is an IRQ 0-15. */
lpc_serirq_polarity = "0x0000EFA5";
lpc_serirq_polarity = "0x0000EFFD";
Awesome. Please commit!
Acked-by: Peter Stuge
But we should not do interrupt stuff in dts this way I think. I listened to a device tree presentation today and noone else knows how to separate description from config either. At least we're not alone.
Thanks Peter, I committed this a few days ago but missed emailing the list being between email accounts. Thanks for the reminder.
r986
Marc
----- Original Message ----
From: Peter Stuge peter@stuge.se To: coreboot@coreboot.org Sent: Friday, November 7, 2008 6:27:40 PM Subject: Re: [coreboot] [patch] and/or busybox issue with alix2c3 serial console
Marc Jones wrote:
+++ mainboard/pcengines/alix2c3/dts (working copy) @@ -34,9 +34,9 @@ /config/("southbridge/amd/cs5536/dts"); /* Interrupt enables for LPC bus. * Each bit is an IRQ 0-15. */
lpc_serirq_enable = "0x0000105A";
lpc_serirq_enable = "0x00001002"; /* LPC IRQ polarity. Each bit is an IRQ 0-15. */
lpc_serirq_polarity = "0x0000EFA5";
lpc_serirq_polarity = "0x0000EFFD";
Awesome. Please commit!
Acked-by: Peter Stuge
But we should not do interrupt stuff in dts this way I think. I listened to a device tree presentation today and noone else knows how to separate description from config either. At least we're not alone.
Look at Documentation/powerpc/booting-without-of.txt for much dt documentation.
Thanks Peter, I committed this a few days ago but missed emailing the list being between email accounts. Thanks for the reminder.
r986
Marc
On Tue, Nov 04, 2008 at 01:30:07PM -0800, ron minnich wrote:
ward, can you do a flashrom -r on a bios image and send it to roman?
Certainly, attached.
This would have to be v3
It is (we only have the 2c3 in v3!), but it's an ancient build.
Thanks, Ward.
On Tue, Nov 4, 2008 at 11:42 PM, Ward Vandewege ward@gnu.org wrote:
On Tue, Nov 04, 2008 at 01:30:07PM -0800, ron minnich wrote:
ward, can you do a flashrom -r on a bios image and send it to roman?
Certainly, attached.
This would have to be v3
It is (we only have the 2c3 in v3!), but it's an ancient build.
tried no luck Ron, do you need some output from that?
Roman
On Tue, Nov 4, 2008 at 1:59 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
tried no luck Ron, do you need some output from that?
summary: voyage linux serial console works with two versions of v3 busybox serial console fails with two versions of v3 we get kernel messages for all four combinations. they all boot and the network works. For each one, an ls -l of /dev/console and /dev/ttyS0 look correct.
Well ... ok. Send me dmesg for voyage and busy with newest v3
It's a userland problem, I think, but I am not sure what.
ron
On Wed, Nov 5, 2008 at 12:03 AM, ron minnich rminnich@gmail.com wrote:
On Tue, Nov 4, 2008 at 1:59 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
tried no luck Ron, do you need some output from that?
summary: voyage linux serial console works with two versions of v3 busybox serial console fails with two versions of v3 we get kernel messages for all four combinations. they all boot and the network works. For each one, an ls -l of /dev/console and /dev/ttyS0 look correct.
Well ... ok. Send me dmesg for voyage and busy with newest v3
It's a userland problem, I think, but I am not sure what.
Ok, sending a bit more than you asked but I think it will be interesting to compare. "mod" in filenames means with my modification I've mentioned before. I can do clean build if it's needed.
Roman
This makes no sense at all. I would have guessed that busybox workd and voyage did not!
voyage: cat /proc/tty/driver/serial
serinfo:1.0 driver revision: 0: uart:16550A port:000003F8 irq:0 tx:4513 rx:139 oe:3 RTS|CTS|DTR|DSR|CD 1: uart:unknown port:000002F8 irq:3
cat /proc/interrupts
CPU0 0: 265852 XT-PIC-XT timer 2: 0 XT-PIC-XT cascade 10: 116 XT-PIC-XT eth0 11: 1 XT-PIC-XT ehci_hcd:usb1, ohci_hcd:usb2
ok, uart has irq 0 and there is no irq for it.
busy: cat /proc/tty/driver/serial
serinfo:1.0 driver revision: 0: uart:16550A port:000003F8 irq:4 tx:0 rx:0 RTS|CTS|DTR|DSR|CD 1: uart:unknown port:000002F8 irq:3
cat /proc/interrupts
CPU0 0: 6011 XT-PIC-XT timer 2: 0 XT-PIC-XT cascade 4: 0 XT-PIC-XT serial
actually makes sense and compares to factory: serinfo:1.0 driver revision: 0: uart:16550A port:000003F8 irq:4 tx:825 rx:7 RTS|CTS|DTR|DSR|CD 1: uart:unknown port:000002F8 irq:3
cat /proc/interrupts
CPU0 0: 11770 XT-PIC-XT timer 2: 0 XT-PIC-XT cascade 4: 70 XT-PIC-XT serial
but voyage gets this: Console: colour dummy device 80x25 console [ttyS0] enabled
busy gets Console: colour dummy device 80x25 console [tty0] enabled console [ttyS0] enabled
busy+v3 gets Console: colour dummy device 80x25 console [ttyS0] enabled
oh boy. . voyage/v3 gets this: Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing enabled �serial8250: ttyS0 at I/O 0x3f8 (irq = 0) is a 16550A
this is I am pretty certain an IRQ foulup. Why are busy and voyage so totally different?
how do the .config files compare? does factory bios have ACPI (it would appear not).
ron
On Wed, Nov 5, 2008 at 1:41 AM, ron minnich rminnich@gmail.com wrote:
how do the .config files compare? does factory bios have ACPI (it would appear not).
what .config files?
Roman
On Tue, Nov 4, 2008 at 3:57 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
On Wed, Nov 5, 2008 at 1:41 AM, ron minnich rminnich@gmail.com wrote:
how do the .config files compare? does factory bios have ACPI (it would appear not).
what .config files?
kernel .config files
ron
On Wed, Nov 5, 2008 at 1:59 AM, ron minnich rminnich@gmail.com wrote:
On Tue, Nov 4, 2008 at 3:57 PM, Roman Yeryomin leroi.lists@gmail.com wrote:
On Wed, Nov 5, 2008 at 1:41 AM, ron minnich rminnich@gmail.com wrote:
how do the .config files compare? does factory bios have ACPI (it would appear not).
what .config files?
kernel .config files
you mean voyage and busybox? I think it doesn't really matter because other linux distributions based on busybox (and meant specially for alix boards!) don't work (I mean serial console) with coreboot too. But I can try to figure out if you want.
Roman