[SeaBIOS] SeaBIOS not fully working when compiled on FreeBSD

Roger Pau Monné roger.pau at citrix.com
Thu Apr 30 09:06:37 CEST 2015


Hello,

El 20/04/15 a les 17.20, Kevin O'Connor ha escrit:
> On Mon, Apr 20, 2015 at 04:28:03PM +0200, Roger Pau Monné wrote:
>> Hello,
>>
>> El 16/04/15 a les 19.51, Kevin O'Connor ha escrit:
>>> On Thu, Apr 16, 2015 at 06:37:29PM +0200, Roger Pau Monné wrote:
>>>> El 16/04/15 a les 17.52, Kevin O'Connor ha escrit:
>>>>> Seems like the same problem.  You wont be able to set a gdb breakpoint
>>>>> for the freebsd call because freebsd isn't calling the bios - it's
>>>>> attempting to interpret the bios code.
>>>>>
>>>>> Does the seabios patch below fix the problem for you?
>>>>
>>>> Seems to kind of fix it, but it's hard to tell.
>>>>
>>>> Most of the time the original SeaBIOS binary works without problems.
>>>> There's sometimes were the int 0x15 call with ah=0xc0 returns what seem 
>>>> to be valid values in ah and flg, but the values in es and bx are 
>>>> corrupted so when freebsd tries to access this region (es << 4 + bx) it 
>>>> gets a page fault.
>>>>
>>>> This is what I see now with the patch applied:
>>>>
>>>> atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
>>>> atkbd0: <AT Keyboard> irq 1 on atkbdc0
>>>> Calling INT 0x15 (ax=0xc000 bx=0x0000 cx=0x0000 dx=0x0000 es=0x0000 di=0x0000)
>>>> Exiting INT 0x15 (ax=0xf9c0 bx=0xf9c0 cx=0xf99e dx=0xdf80 es=0x0000 di=0x0000)
>>>> kbd0 at atkbd0
>>>> atkbd0: [GIANT-LOCKED]
>>>
>>> Ah, looks like the freebsd code isn't even checking if x86emu exited
>>> abnormally.
>>
>> Yes, this is something that can be solved without much work AFAICT, so 
>> that we know if the emulator exited correctly or not. However this is 
>> only a side-effect of what's actually happening.
> 
> If changing freebsd code, I would change it to set the repeat rate to
> a standard default irrespective of what the bios uses, and thus not
> call the bios at all.

Following commit gets rid of the usage of the BIOS from atkbd:

https://svnweb.freebsd.org/base?view=revision&revision=282269

The remaining usage of x86emu should be fine AFAICT because it's only
used with int10h. I will backport it to stable branches in two weeks, so
next FreeBSD releases should be fine.

Roger.




More information about the SeaBIOS mailing list