Skip to contentSkip to conversation

about serial port support

Qemu-devel Cai Qiang 3 participants 5 messages Apr 2, 2005 – Apr 18, 2005

lore
Share & tools
lore

Cai Qiang

author
#0 lore raw

Hi everyone,
I am doing qemu serial port support. It works like below:
1. in command line, -serial /dev/ttyS0 and so on
2. in vl.c, init the port
3. in hw/serial.c, when serial seting changed, notify vl.c also change host OS's seting.
Is this feature useful? Is there any better implement? Any comments are
welcome.

Best Regards

Cai Qiang

#1 lore raw
Quoted 10 lines · Cai Qiang

Hi everyone,
I am doing qemu serial port support. It works like below:
1. in command line, -serial /dev/ttyS0 and so on
2. in vl.c, init the port
3. in hw/serial.c, when serial seting changed, notify vl.c also change host OS's seting.
Is this feature useful? Is there any better implement? Any comments are
welcome.

Quoted 4 lines

Best Regards

Cai Qiang

This has been asked for many times, but you are the first to implement it.

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#2 lore raw
In reply to Cai Qiang

Serial support is of course usefull. I know of some kind of debugging over a serial port and if this could work between two qemu instances, it would be nice.

About the implementation, I believe there are some cracks around which could help you.

Andreas

Quoted 33 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Cai Qiang
Sent: Sunday, April 03, 2005 8:43 AM
To: [email protected]
Subject: [Qemu-devel] about serial port support

*This message was transferred with a trial version of CommuniGate(tm) Pro*

Hi everyone,
I am doing qemu serial port support. It works like below:
1. in command line, -serial /dev/ttyS0 and so on
2. in vl.c, init the port
3. in hw/serial.c, when serial seting changed, notify vl.c also change host
OS's seting.
Is this feature useful? Is there any better implement?
Any comments are
welcome.

Best Regards

Cai Qiang

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

#3 lore raw

[Qemu-devel] FreeDOS Testimage

In reply to Cai Qiang

Hello all

I have a simple disk image with the current FreeDOS kernel (2035a). When loading FreeDOS with HIMEM, EMM386 and FDAPM together, I loose the keyboard and QEMU freeze. I can't switch to the monitor nor the other consoles (ser0, par0). I need to kill the QEMU process. This happens on my WinXP host with all QEMU versions I have (from 0.6.1 to daily builds from FreeOSZoo and my owns). I will verify on my Gentoo machine at my work tomorrow.

The image can be downloaded here:

http://geodb.org/download/fdostest.zip (124kB)

Start QEMU with this image as the first hard disk. When starting, you will be prompted for loading the three binaries HIMEM, EMM386 and FDAPM. Keep in mind, that no keyboard driver is loaded (may need to press Z for Yes...).

none -> OK, but CPU usage is 100%
FDAPM -> OK
HIMEM + FDAPM -> OK
HIMEM + EMM386 -> OK, but CPU usage is 100%
HIMEM + EMM386 + FDAPM -> freeze

I have the same effekt with DOSIDLE for FDAPM.

This files works on my P350 without a clue.

If someone could test and get an idea whats wrong, please let me know.

Andreas

#4 lore raw

Re: Re: [Qemu-devel] kqemu 0.6.2 and XP

In reply to Cai Qiang

I tried the math on my WinXP host with Win2k guest.

When using the following math with my 8192MB QCOW image, QEMU refuse to start:

1 Block = 512 Bytes

Cylinders = Blocks / (Heads * Sectors)

(kBytes * 2) / (16 * 63)
(8388608 kBytes * 2) / (16 * 63)

For 8192MB Image: -hdachs 16644,16,63

I brute forced the cylinder value, QEMU will start with a lower or equal value of 16383 cylinders.

I made my own math based on this:

Cylinders = Blocks / (Heads * (Sectors + 1)) - 1

(kBytes * 2) / (16 * 64) - 1
(8388608 kBytes * 2) / (16 * 64) - 1

For 8192MB Image: -hdachs 16383,16,63

I'm realy confused about what's right or not. I created the image with the QEMU Manager. Can anyone explain this ???

Andreas

Quoted 21 lines · Ben Taylor

I forgot one very important part. The calculation needs to be <img size in bytes> / (heads * sectors per cylinder
* 512 bytes) = cylinders. so in your case, the calculation is close

well, the default sector size is 512, and you've done your sizing in number of 1k blocks, your calculations was close. It should be:

blocks secs/block hds sec/cyl

(2 000 000 * 2 ) / ( 16 * 63 ) = 3968

The first time I did the math, my 2g partition went to 8g partition when I used the -hdachs parameters cause I really screwed up the math. (it appears if you mess your c-h-s values, your image since may change. :-)

HTH, and sorry for the confusion.

Ben