mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
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. - Show quoted text - Marc -- Marc Jones Senior Firmware Engineer (970) 226-9684 Office mailto:Marc.Jones@amd.com http://www.amd.com/embeddedprocessors Reduce the amount of compilation errors for Geode LX targets if x86emu or no emulation is selected instead of vm86. Factor out GDT code from vm86.c to vm86_gdt.c Remove IDT setup for VSA init. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Signed-of-by: Marc Jones <marc.jones@amd.com> This has booted to runlevel 3 and the ethernet works fine. Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://coreboot.org/repository/coreboot-v3@613 f3766cd6-281f-0410-b1cd-43a5c92072e9
47 lines
1.7 KiB
Makefile
47 lines
1.7 KiB
Makefile
##
|
|
## This file is part of the coreboot project.
|
|
##
|
|
## Copyright (C) 2007 coresystems GmbH
|
|
##
|
|
## This program is free software; you can redistribute it and/or modify
|
|
## it under the terms of the GNU General Public License as published by
|
|
## the Free Software Foundation; either version 2 of the License, or
|
|
## (at your option) any later version.
|
|
##
|
|
## This program is distributed in the hope that it will be useful,
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
## GNU General Public License for more details.
|
|
##
|
|
## You should have received a copy of the GNU General Public License
|
|
## along with this program; if not, write to the Free Software
|
|
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
##
|
|
|
|
X86EMU_OBJ = debug.o decode.o fpu.o ops.o ops2.o prim_ops.o sys.o
|
|
BIOSEMU_OBJ = biosemu.o pcbios/pcibios.o
|
|
VM86_OBJ = vm86.o vm86_gdt.o
|
|
|
|
ifeq ($(CONFIG_PCI_OPTION_ROM_RUN_X86EMU),y)
|
|
LIBX86EMU_OBJS = $(patsubst %,$(obj)/util/x86emu/x86emu/%,$(X86EMU_OBJ)) \
|
|
$(patsubst %,$(obj)/util/x86emu/%,$(BIOSEMU_OBJ))
|
|
endif
|
|
|
|
ifeq ($(CONFIG_PCI_OPTION_ROM_RUN_VM86),y)
|
|
LIBX86EMU_OBJS := $(patsubst %,$(obj)/util/x86emu/%,$(VM86_OBJ))
|
|
endif
|
|
|
|
$(obj)/util/x86emu/libx86emu.a: $(LIBX86EMU_OBJS) $(src)/.config
|
|
$(Q)printf " AR $(subst $(shell pwd)/,,$(@))\n"
|
|
$(Q)rm -f $@ # otherwise we always add to the archive
|
|
$(Q)$(AR) qcs $@ $(LIBX86EMU_OBJS)
|
|
|
|
#
|
|
# This rule is also valid for all subdirectories
|
|
#
|
|
|
|
$(obj)/util/x86emu/%.o: $(src)/util/x86emu/%.c
|
|
$(Q)mkdir -p $(dir $@)
|
|
$(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n"
|
|
$(Q)$(CC) $(INITCFLAGS) -I$(src)/util/x86emu/include -c $< -o $@
|
|
|