Re: [SeaBIOS] WD Elements hang SeaBIOS at boot with "call16 with invalid stack"

2015-12-23 Thread Tobias Diedrich
And with verbose logging (level 8). [...] |dfbf9000| USB MSC vendor='WD' product='Elements 10B8' rev='1012' type=0 removable=0 |dfbf9000| scsi_is_ready (drive=0x000f5c40) |dfbf9000| ehci_send_pipe qh=0x0009ed80 dir=0 data=0xdfbf9e45 size=31 |dfbfe000| ehci_send_pipe qh=0x0009ef00 dir=128

Re: [SeaBIOS] WD Elements hang SeaBIOS at boot with "call16 with invalid stack"

2015-12-23 Thread Kevin O'Connor
On Wed, Dec 23, 2015 at 07:02:37PM +0100, Tobias Diedrich wrote: > Wcall16 with invalid stack: eax=dfbf3e62 edx=0 func=0x000f9563 esp=dfbf3e50 > > .text._farcall16 0x9563 : { *(.text._farcall16) } > Can you include the full log? It looks like the code tried to call a 16bit function while in a

Re: [SeaBIOS] WD Elements hang SeaBIOS at boot with "call16 with invalid stack"

2015-12-23 Thread Kevin O'Connor
On Wed, Dec 23, 2015 at 07:13:27PM +0100, Tobias Diedrich wrote: > Wcall16 with invalid stack: eax=dfbf3e62 edx=0 func=0x000f9563 esp=dfbf3e50 > ret=0x000f2304 > > │.text:000F22C8 sub_F22C8 proc near ; CODE XREF: > sub_F2309+2Cvp > ▒ > │.text:000F22C8

Re: [SeaBIOS] WD Elements hang SeaBIOS at boot with "call16 with invalid stack"

2015-12-23 Thread Tobias Diedrich
Wcall16 with invalid stack: eax=dfbf3e62 edx=0 func=0x000f9563 esp=dfbf3e50 .text._farcall16 0x9563 : { *(.text._farcall16) } On Wed, Dec 23, 2015 at 6:51 PM, Kevin O'Connor wrote: > On Wed, Dec 23, 2015 at 04:27:55PM +0100, Tobias Diedrich wrote: > > And with verbose

Re: [SeaBIOS] WD Elements hang SeaBIOS at boot with "call16 with invalid stack"

2015-12-23 Thread Kevin O'Connor
On Wed, Dec 23, 2015 at 07:39:56PM +0100, Tobias Diedrich wrote: > On Wed, Dec 23, 2015 at 7:10 PM, Kevin O'Connor wrote: > > > On Wed, Dec 23, 2015 at 07:02:37PM +0100, Tobias Diedrich wrote: > > > Wcall16 with invalid stack: eax=dfbf3e62 edx=0 func=0x000f9563 > >

Re: [SeaBIOS] [Qemu-devel] [PATCH] SeaBios: Fix reset procedure reentrancy problem on qemu-kvm platform

2015-12-23 Thread Kevin O'Connor
On Wed, Dec 23, 2015 at 06:40:12AM +, Gonglei (Arei) wrote: > > From: Kevin O'Connor [mailto:ke...@koconnor.net] > > On Tue, Dec 22, 2015 at 02:14:12AM +, Gonglei (Arei) wrote: > > > Sorry, it doesn't work. What's worse is we cannot stop SeaBIOS stuck by > > > Setting

Re: [SeaBIOS] WD Elements hang SeaBIOS at boot with "call16 with invalid stack"

2015-12-23 Thread Kevin O'Connor
On Wed, Dec 23, 2015 at 12:51:30PM -0500, Kevin O'Connor wrote: > On Wed, Dec 23, 2015 at 04:27:55PM +0100, Tobias Diedrich wrote: > > And with verbose logging (level 8). > > > > [...] > > Wcall16 with invalid stack > > Strange. Can you report the output with the patch below? Using the patch

Re: [SeaBIOS] WD Elements hang SeaBIOS at boot with "call16 with invalid stack"

2015-12-23 Thread Kevin O'Connor
On Wed, Dec 23, 2015 at 04:27:55PM +0100, Tobias Diedrich wrote: > And with verbose logging (level 8). > > [...] > Wcall16 with invalid stack Strange. Can you report the output with the patch below? -Kevin --- a/src/stacks.c +++ b/src/stacks.c @@ -274,7 +274,8 @@ call16(u32 eax, u32 edx,

Re: [SeaBIOS] WD Elements hang SeaBIOS at boot with "call16 with invalid stack"

2015-12-23 Thread Tobias Diedrich
Wcall16 with invalid stack: eax=dfbf3e62 edx=0 func=0x000f9563 esp=dfbf3e50 ret=0x000f2304 │.text:000F22C8 sub_F22C8 proc near ; CODE XREF: sub_F2309+2Cvp ▒ │.text:000F22C8 ; sub_F2309+35vj ▒

Re: [SeaBIOS] WD Elements hang SeaBIOS at boot with "call16 with invalid stack"

2015-12-23 Thread Tobias Diedrich
On Wed, Dec 23, 2015 at 7:10 PM, Kevin O'Connor wrote: > On Wed, Dec 23, 2015 at 07:02:37PM +0100, Tobias Diedrich wrote: > > Wcall16 with invalid stack: eax=dfbf3e62 edx=0 func=0x000f9563 > esp=dfbf3e50 > > > > .text._farcall16 0x9563 : { *(.text._farcall16) } > > > > Can

Re: [SeaBIOS] WD Elements hang SeaBIOS at boot with "call16 with invalid stack"

2015-12-23 Thread Kevin O'Connor
On Wed, Dec 23, 2015 at 09:14:44PM +0100, Tobias Diedrich wrote: > Final diff attached (without the src/stacks.c change, with %d->%u change > for sector counts). > Bootlog with debug_level 1 attached. Great! Patches sent - if no further comments I'll commit in a few days. -Kevin

[SeaBIOS] [PATCH 1/2] scsi: Do not call printf() from scsi_is_ready()

2015-12-23 Thread Kevin O'Connor
The scsi_is_ready() function may be called from a thread, and it is not valid to call printf() from a thread. Convert printf() to dprintf() to avoid this possibility. This does mean that cdrom detection (from cdrom_boot() ) may not give notification of slow cdrom drives to a user. However, the

Re: [SeaBIOS] [PATCH] xhci: Wait for port enable even for USB3 devices

2015-12-23 Thread Kevin O'Connor
On Sun, Dec 20, 2015 at 03:10:48PM -0500, Kevin O'Connor wrote: > Some USB3 controllers (and/or devices) need additional time after the > device is detected to place the port in an enabled state. Wait for > the controller to report enabled before proceeding. This fixes > several reports of

Re: [SeaBIOS] WD Elements hang SeaBIOS at boot with "call16 with invalid stack"

2015-12-23 Thread Tobias Diedrich
I replaced the printf(...) with dprintf(1, ...) (since a dprintf earlier in the function was working fine). This appears to have fixed the issue (though PCHS seems to be wrong, maybe because sector count is negative when parsed as a signed int). Full log attached. |dfc02000| USB MSC vendor='WD'

Re: [SeaBIOS] [Qemu-devel] [PATCH] SeaBios: Fix reset procedure reentrancy problem on qemu-kvm platform

2015-12-23 Thread Peter Stuge
Kevin O'Connor wrote: > SeaBIOS is careful to always disable IRQs while running C code to > prevent this issue, but disabling normal IRQs does not disable NMIs. > So, I believe this issue is specific to the nature of NMIs. Would a dedicated NMI handler stack be a good solution? //Peter

Re: [SeaBIOS] [Qemu-devel] [PATCH] SeaBios: Fix reset procedure reentrancy problem on qemu-kvm platform

2015-12-23 Thread Kevin O'Connor
On Wed, Dec 23, 2015 at 09:27:25PM +0100, Peter Stuge wrote: > Kevin O'Connor wrote: > > SeaBIOS is careful to always disable IRQs while running C code to > > prevent this issue, but disabling normal IRQs does not disable NMIs. > > So, I believe this issue is specific to the nature of NMIs. > >

Re: [SeaBIOS] SeaBIOS Digest, Vol 72, Issue 33

2015-12-23 Thread Wim Vervoorn
Hello Kevin, Understood. Thanks. Best Regards, Wim Vervoorn Eltan B.V. Ambachtstraat 23 5481 SM Schijndel The Netherlands T : +31-(0)73-594 46 64 E : wvervo...@eltan.com W : http://www.eltan.com "THIS MESSAGE CONTAINS CONFIDENTIAL INFORMATION. UNLESS YOU ARE THE INTENDED RECIPIENT OF THIS