diff options
author | Patrick Georgi <patrick.georgi@coresystems.de> | 2009-12-10 17:38:30 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2009-12-10 17:38:30 +0000 |
commit | b66fb79d56feeb7cdcf5123cca7609fa2b3a8103 (patch) | |
tree | 11bf490bc9158852f8e02c915cf91c17cd8eccfb /src/cpu/amd | |
parent | f4aca1da486d06fbb8e2da080558b982e05dfbd8 (diff) | |
download | coreboot-b66fb79d56feeb7cdcf5123cca7609fa2b3a8103.tar.xz |
Push VSA into CBFS for amd/lx systems. It's not hooked up to
the build system yet, so some additional steps are necessary.
It's not that bad, given that the code didn't work before.
You have to convert the VSA bios image to ELF using the following
commands (assuming i386/32bit binutils, if in doubt, use crossgcc's
i386-elf-* tools):
objcopy --set-start 0x20 --adjust-vma 0x60000 -I binary -O elf32-i386 -B i386 vsa.binary vsa.o
ld -e 0x60020 --section-start .data=0x60000 vsa.o -o vsa.elf
Then, after build, use
cbfstool coreboot.rom add-stage vsa.elf vsa l
to add it to the image.
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4976 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/cpu/amd')
-rw-r--r-- | src/cpu/amd/model_lx/vsmsetup.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/cpu/amd/model_lx/vsmsetup.c b/src/cpu/amd/model_lx/vsmsetup.c index c98fc0a7b0..eb94e23a2e 100644 --- a/src/cpu/amd/model_lx/vsmsetup.c +++ b/src/cpu/amd/model_lx/vsmsetup.c @@ -7,9 +7,7 @@ #include <string.h> #include <cpu/amd/lxdef.h> #include <cpu/amd/vr.h> - -// andrei: use the /lib copy of nrv2b -#include "../lib/nrv2b.c" +#include <cbfs.h> #define VSA2_BUFFER 0x60000 #define VSA2_ENTRY_POINT 0x60020 @@ -272,11 +270,9 @@ void do_vsmbios(void) { device_t dev; unsigned long busdevfn; - unsigned int rom = 0; unsigned char *buf; unsigned int size = SMM_SIZE * 1024; int i; - unsigned long ilen, olen; printk_err("do_vsmbios\n"); /* clear vsm bios data area */ @@ -291,12 +287,10 @@ void do_vsmbios(void) * much better parameterized */ - // TODO this is a CBFS candidate - //VSA is cat onto the end after LB builds - rom = ((unsigned long)0) - (CONFIG_ROM_SIZE + 36 * 1024); - buf = (unsigned char *)VSA2_BUFFER; - olen = unrv2b((uint8_t *) rom, buf, &ilen); - printk_debug("buf ilen %d olen%d\n", ilen, olen); + if ((unsigned int)cbfs_load_stage("vsa") != VSA2_ENTRY_POINT) { + printk_err("do_vsmbios: Failed to load VSA.\n"); + } + buf = VSA2_BUFFER; printk_debug("buf %p *buf %d buf[256k] %d\n", buf, buf[0], buf[SMM_SIZE * 1024]); printk_debug("buf[0x20] signature is %x:%x:%x:%x\n", |