Re: [SeaBIOS] Graphics card pass-through working with two pass pci-initialization

2011-05-29 Thread Jan Kiszka
On 2011-05-29 21:30, André Weidemann wrote:
> Hi,
> 
> On 29.05.2011 17:22, Jan Kiszka wrote:
>> On 2010-05-28 20:49, André Weidemann wrote:
>>> Hi,
>>>
>>> On 28.05.2011 10:18, Jan Kiszka wrote:
 On 2011-05-26 23:19, André Weidemann wrote:
> On 27.05.2011 21:50, André Weidemann wrote:
>> On 27.05.2011 21:40, André Weidemann wrote:
>>
>>> If I am not mistaken then the graphics card needs 2 bars, one with
>>> 256MB
>>> and one with 128K. The sound card then needs 1 bar with 16K of PCI
>>> memory.
>>> How big is the PCI memory with seabios?
>>> Is there really not enough space to "squeeze" in those extra 16K?
>>
>> I obviously forgot to add up the other memory that is used...
>> 32MB go to the standard VGA card. Running qemu-kvm with "-vga
>> none" did
>> not work, so I left it in. And the e1000 NIC needs another 128K.
>>
>> I'll see if I can get rid of the standard VGA card. I guess that
>> should
>> free enough memory for the sound card.
>
> I did some more testing by starting the VM with the paramter "-vga
> none"
> and passed both the VGA card and the sound card to it. With this
> option
> the VM did not boot,

 Where did it hang, ie. what IP was reported by info cpus?
>>>
>>> I added some debug options and found out, that the VM hangs when trying
>>> to initialize the graphics card ROM.
>>> See here:
>>> http://pastebin.com/S9a8uQfU
>>>
>>> And some additional info here:
>>>
>>> http://pastebin.com/AC4rw8Ek (info cpus/registers)
>>> http://pastebin.com/yYkn8jL2 (info pci)
>>
>> Yeah, you definitely run out of PCI memory.
>>
>> Plus you may suffer from the PAM/SMRAM bug I wrote about in the wiki.
>> Try if this hack improves the situation:
>>
>> http://git.kiszka.org/?p=qemu-kvm.git;a=commitdiff;h=96e600f43275310364c0310519d6ab6540bb7d25
>>
> 
> I applied above patch, but it did not make a difference. The VM did not
> boot with the parameter "-vga none".

Err, yes, of course. You also need at least legacy VGA pass-through like
in this commit:

http://git.kiszka.org/?p=qemu-kvm.git;a=commitdiff;h=5c14a1b3510d977f194b75672196caca0b488760

But there is no guarantee that the BIOS you try to run through POST
inside the guest is actually prepared for this. Maybe specifying an
empty ROM helps to get the guest a bit further:

-device pci-assign,romfile=,host=...

> 
> 
> I found the time to apply your two patches here:
> http://git.kiszka.org/?p=seabios.git;a=shortlog;h=refs/heads/vga-assign
> After doing so, Gerds q35 bios branch prints an error message during
> compile.
> The error comes from line 33 here:
> http://www.kraxel.org/cgit/seabios/tree/src/dev-q35.c?h=kraxel.q35
> How do I adjust the memory area here?

Just use my branch without any of Gerd's patches for the first step.

Jan



signature.asc
Description: OpenPGP digital signature
___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] Graphics card pass-through working with two pass pci-initialization

2011-05-29 Thread André Weidemann

Hi,

On 29.05.2011 17:22, Jan Kiszka wrote:

On 2010-05-28 20:49, André Weidemann wrote:

Hi,

On 28.05.2011 10:18, Jan Kiszka wrote:

On 2011-05-26 23:19, André Weidemann wrote:

On 27.05.2011 21:50, André Weidemann wrote:

On 27.05.2011 21:40, André Weidemann wrote:


If I am not mistaken then the graphics card needs 2 bars, one with
256MB
and one with 128K. The sound card then needs 1 bar with 16K of PCI
memory.
How big is the PCI memory with seabios?
Is there really not enough space to "squeeze" in those extra 16K?


I obviously forgot to add up the other memory that is used...
32MB go to the standard VGA card. Running qemu-kvm with "-vga none" did
not work, so I left it in. And the e1000 NIC needs another 128K.

I'll see if I can get rid of the standard VGA card. I guess that should
free enough memory for the sound card.


I did some more testing by starting the VM with the paramter "-vga none"
and passed both the VGA card and the sound card to it. With this option
the VM did not boot,


Where did it hang, ie. what IP was reported by info cpus?


I added some debug options and found out, that the VM hangs when trying
to initialize the graphics card ROM.
See here:
http://pastebin.com/S9a8uQfU

And some additional info here:

http://pastebin.com/AC4rw8Ek (info cpus/registers)
http://pastebin.com/yYkn8jL2 (info pci)


Yeah, you definitely run out of PCI memory.

Plus you may suffer from the PAM/SMRAM bug I wrote about in the wiki.
Try if this hack improves the situation:

http://git.kiszka.org/?p=qemu-kvm.git;a=commitdiff;h=96e600f43275310364c0310519d6ab6540bb7d25


I applied above patch, but it did not make a difference. The VM did not 
boot with the parameter "-vga none".



I found the time to apply your two patches here:
http://git.kiszka.org/?p=seabios.git;a=shortlog;h=refs/heads/vga-assign
After doing so, Gerds q35 bios branch prints an error message during 
compile.

The error comes from line 33 here:
http://www.kraxel.org/cgit/seabios/tree/src/dev-q35.c?h=kraxel.q35
How do I adjust the memory area here?

Regards
 André

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] Graphics card pass-through working with two pass pci-initialization

2011-05-29 Thread Avi Kivity

On 05/29/2011 06:22 PM, Jan Kiszka wrote:

Yeah, you definitely run out of PCI memory.

Plus you may suffer from the PAM/SMRAM bug I wrote about in the wiki.
Try if this hack improves the situation:

http://git.kiszka.org/?p=qemu-kvm.git;a=commitdiff;h=96e600f43275310364c0310519d6ab6540bb7d25



Hopefully the memory API will fix this.  I'll try to push it forwards 
this week while Marcelo's minding kvm.git.


--
error compiling committee.c: too many arguments to function


___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] Graphics card pass-through working with two pass pci-initialization

2011-05-29 Thread Jan Kiszka
On 2010-05-28 20:49, André Weidemann wrote:
> Hi,
> 
> On 28.05.2011 10:18, Jan Kiszka wrote:
>> On 2011-05-26 23:19, André Weidemann wrote:
>>> On 27.05.2011 21:50, André Weidemann wrote:
 On 27.05.2011 21:40, André Weidemann wrote:

> If I am not mistaken then the graphics card needs 2 bars, one with
> 256MB
> and one with 128K. The sound card then needs 1 bar with 16K of PCI
> memory.
> How big is the PCI memory with seabios?
> Is there really not enough space to "squeeze" in those extra 16K?

 I obviously forgot to add up the other memory that is used...
 32MB go to the standard VGA card. Running qemu-kvm with "-vga none" did
 not work, so I left it in. And the e1000 NIC needs another 128K.

 I'll see if I can get rid of the standard VGA card. I guess that should
 free enough memory for the sound card.
>>>
>>> I did some more testing by starting the VM with the paramter "-vga none"
>>> and passed both the VGA card and the sound card to it. With this option
>>> the VM did not boot,
>>
>> Where did it hang, ie. what IP was reported by info cpus?
> 
> I added some debug options and found out, that the VM hangs when trying
> to initialize the graphics card ROM.
> See here:
> http://pastebin.com/S9a8uQfU
> 
> And some additional info here:
> 
> http://pastebin.com/AC4rw8Ek (info cpus/registers)
> http://pastebin.com/yYkn8jL2 (info pci)

Yeah, you definitely run out of PCI memory.

Plus you may suffer from the PAM/SMRAM bug I wrote about in the wiki.
Try if this hack improves the situation:

http://git.kiszka.org/?p=qemu-kvm.git;a=commitdiff;h=96e600f43275310364c0310519d6ab6540bb7d25

Jan



signature.asc
Description: OpenPGP digital signature
___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] Issues with ASRock E350M1

2011-05-29 Thread Kevin O'Connor
On Sun, May 29, 2011 at 03:17:40AM -0500, Scott Duplichan wrote:
> I decided to try and debug this myself. The attached patch is what I
> came up with. Within the limitations of typing abilities, it is now
> perfect. No sluggishness and no dropped keys. The head == next check
> was failing when it should have passed. The reason is that the
> toggleCarry bit is often set in endpoint descriptor dword #2, at least
> on AMD hardware.

Thanks.  I slightly modified the patch and committed it.

>Hopefully this change is compatible with qemu, Intel,
> and other OHCI controllers.

I don't think there are any Intel OHCI controllers.  I tested it on
qemu and it looks fine.  If you're curious, testing on qemu looks
like:

qemu -L biosdir -chardev stdio,id=seabios -device 
isa-debugcon,iobase=0x402,chardev=seabios -fda odin1440.img -device pci-ohci 
-device usb-kbd

-Kevin

___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios


Re: [SeaBIOS] Issues with ASRock E350M1

2011-05-29 Thread Scott Duplichan
Kevin O'Connor wrote:

]> I also have USB keyboard problems, but my problem is different. For
]> each key I press, it repeats a couple dozen times. I solve the problem
]> by adding a 'break' to usb-hid.c:
]> 
]> for (;;) {
]> struct keyevent data;
]> int ret = usb_poll_intr(pipe, &data);
]> if (ret)
]> break;
]> handle_key(&data);
]> break; <==
]
]Can you generate and send a log with debug level set to 8 and the
]dprintf in usb-hid.c:handle_key() changed to 8?  Getting timestamps on
]the log (as with tools/readserial.py) would also help.
]
]> With this change, I am able to type well enough to get windbg started,
]> which is all I needed at the time. But typing is very sluggish. I
]> believe the sluggishness is due to use of 8254 periodic interrupt
]> polling to service the keyboard.
]
]Yeah - since the loop was disabled there's no longer a queue on USB
]key events.  This means any keys pressed faster than 55ms are dropped.

Hello Kevin,

I decided to try and debug this myself. The attached patch is what I
came up with. Within the limitations of typing abilities, it is now
perfect. No sluggishness and no dropped keys. The head == next check
was failing when it should have passed. The reason is that the
toggleCarry bit is often set in endpoint descriptor dword #2, at least
on AMD hardware. Hopefully this change is compatible with qemu, Intel,
and other OHCI controllers.

Thanks,
Scott


Mask toggleCarry and Halted flags in endpoint descriptor dword #2 so that
the remaining head pointer field is valid for comparing with the next
pointer.

Signed-off-by: Scott Duplichan 


--- seabios-0.6.2-original\src\usb-ohci.c   Mon Feb 28 21:10:57 2011
+++ seabios-0.6.2\src\usb-ohci.cSun May 29 02:47:30 2011
@@ -501,7 +501,7 @@
 
 struct ohci_pipe *pipe = container_of(p, struct ohci_pipe, pipe);
 struct ohci_td *tds = GET_FLATPTR(pipe->tds);
-struct ohci_td *head = (void*)GET_FLATPTR(pipe->ed.hwHeadP);
+struct ohci_td *head = (void*)(GET_FLATPTR(pipe->ed.hwHeadP) &
0x0);
 struct ohci_td *tail = (void*)GET_FLATPTR(pipe->ed.hwTailP);
 int count = GET_FLATPTR(pipe->count);
 int pos = (tail - tds + 1) % count;


usb-kb.patch
Description: Binary data
___
SeaBIOS mailing list
SeaBIOS@seabios.org
http://www.seabios.org/mailman/listinfo/seabios