[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: SH: support 7785 serial

From: Shin-ichiro KAWASAKI
Subject: Re: [Qemu-devel] Re: SH: support 7785 serial
Date: Tue, 07 Apr 2009 01:49:52 +0900
User-agent: Thunderbird (Windows/20090302)

Vladimir Prus wrote:
Shin-ichiro KAWASAKI wrote:

Hi, Vladimir.
Thank you for your work.

Vladimir Prus wrote:
These 3 patches make sh_serial.c support 7785 serial. The primary
difference is that on 7785, instead of single fifo count register
there are two separate ones -- for rx and tx. Patch 3 adds necessary
conditional logic. Patches 1 and 2 are cleanups that I've done alone
the way:

- Patch 1 makes it possible to change the size of RX fifo. It's 16
on 7751 and 64 on 7785. While I do not know of any breakage if we
use wrong size, it's still best to be correct.
- Patch 2 replaces a pile of hardcoded constants with macroses.
Also, the FSR register was handled strangely -- when written, we'd
look at the written value and set bits in the 'flags' field, and on
read, we'd reconstruct the value from the 'flags' field. There does
not seem to be any reason for such roundabout, so I've made the code
work with 'sr' directly.

This patch was tested both with r2d, using kernel and userland found


and with 7785, using a hand-made kernel.
Patch 2 produces a trouble in my environment.
For r2d, the output to SCIF from kernel is OK, but output from
shell is broken by inserted white space, like follows.

(before applying patch 2)
 # ls

(after applying patch2)
 #    l  s

Do you have time to investigate it?


I could not reproduce this locally. Did you tried typing this in virtual console
that QEMU pops up, or in the console where QEMU was started. For me, the former
does not accept any input at all.

Thank you for your work.  I checked the defect again.
Please read following lines to make current status clear.

Would it be possible for you to provide me with
- Source tree of qemu that you've tested this with? Pointer to some git commit
in some branch in some git repository will be OK.

For this case, I use the qemu trank svn tree, rev 7006.

- The kernel zImage you have used it
- The disk image you have used

Today, I updated the image package.  Before update, sh-test-0.1.tar.bz2
has been found at the URL, I guess you use it. Now, sh-test-0.2.tar.bz2
is there.

The trouble I reported happens, if following two conditions are both true.
- your patch #2 is applied to qemu,
- using zImage in 'sh-test-0.2.tar.bz2'

It does not happen for zImage in 'sh-test-0.1.tar.bz2' regardless of your
patch.  And it does not happen for qemu on which your patches are not applied,
regardless of the zImage difference.

- The command line for qemu

The exact command line I used is as follows.

../savannah-current/trunk/sh4-softmmu/qemu-system-sh4 -M r2d -kernel ./sh-test-0.2/zImage 
-append "console=tty0 console=ttySC0,115200 earlyprintk=serial root=/dev/sda1 
noiotrap" -hda ./sh-test-0.1/sh-linux-mini.img -serial null -serial stdio -usb 
-usbdevice keyboard -k ja -L ../savannah-current/trunk -monitor pty

For the latter three, I have used what you have put at:


but I want to be sure there's no accidental differences. And for qemu source 
I want to make sure I did not unintentially based by patch on some wrong state.

zImage in sh-test-0.1.tar.bz2 is built from Linux 2.6.28 source tree.
On the other hand, that in sh-test-0.2.tar.bz2 is built from SH-Linux
branch, which is based on 2.6.29 and will be 2.6.30 rc.  I'm not yet
sure which modification against linux kernel causes this.  I'll investigate
it, and report it within several days.

Shin-ichiro KAWASAKI

reply via email to

[Prev in Thread] Current Thread [Next in Thread]