[coreboot] VSA and vm86/x86emu

Marc Jones marc.jones at amd.com
Tue Feb 19 22:38:15 CET 2008

Carl-Daniel Hailfinger wrote:
> On 18.02.2008 23:55, Marc Jones wrote:
>> Carl-Daniel Hailfinger wrote:
>>> it seems that executing VSA requires vm86 to be useful. Since we
>>> unconditionally execute the VSA, we should unconditionally require vm86
>>> support (PCI_OPTION_ROM_RUN_VM86) via Kconfig for Geode targets. Not
>>> doing so will either cause compile failures or runtime failures.
>>> Adding
>>> select PCI_OPTION_ROM_RUN_VM86
>>> below
>>> config CPU_AMD_GEODELX
>>> did not work out for me.
>> Sorry I missed this.
>> VSA requires the GDT that is in vm86.c. VSA loads similar to an option 
>> ROM so the loader does go into VM86 mode. All the other stuff like 
>> interrupt support and PCI BIOS isn't needed by VSA. I think that the 
>> GDT at the top of vm86.c can be moved to a header file, gdt.h or 
>> something like that.
> northbridge/amd/geodelx/vsmsetup.c uses 
> util/x86emu/vm86.c:setup_realmode_idt() but it seems most/all of the 
> setup there is not needed at all for VSA. Pulling in setup_realmode_idt 
> pulls in the rest of vm86 through direct and indirect dependencies.
>> Care to make a patch? :)

I am also leaning towards removing the IDT for VSA init. There is a risk 
if either an exception happens or a software interrupt is used you will 
get unexpected results. What probably happens is that you jump off to 
something that will eventually cause a triple fault and reboot. You may 
think this is bad (and it is) but it is the same risk that coreboot runs 
today. If coreboot had a generic IDT to handle exceptions, VSA init 
would use the same IDT. Note that hardware INT (even timers) should 
never happen as they are always masked.

I have built with no PCI_OPTION_ROM_RUN_VM86 and run this to filo.


Marc Jones
Senior Firmware Engineer
(970) 226-9684 Office
mailto:Marc.Jones at amd.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cd_vm86.patch
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20080219/60c2b929/attachment.ksh>

More information about the coreboot mailing list