[coreboot] [commit] r4986 - trunk/src/cpu/amd/model_gx2

svn at coreboot.org svn at coreboot.org
Mon Dec 21 13:32:29 CET 2009


Author: oxygene
Date: 2009-12-21 13:32:29 +0100 (Mon, 21 Dec 2009)
New Revision: 4986

Modified:
   trunk/src/cpu/amd/model_gx2/vsmsetup.c
Log:
Make coreboot load VSA from CBFS on amd/gx2.

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 at coresystems.de>
Acked-by: Peter Stuge <peter at stuge.se>


Modified: trunk/src/cpu/amd/model_gx2/vsmsetup.c
===================================================================
--- trunk/src/cpu/amd/model_gx2/vsmsetup.c	2009-12-18 16:43:30 UTC (rev 4985)
+++ trunk/src/cpu/amd/model_gx2/vsmsetup.c	2009-12-21 12:32:29 UTC (rev 4986)
@@ -33,6 +33,7 @@
 #include <cpu/x86/lapic.h>
 #include <cpu/x86/cache.h>
 #include <arch/io.h>
+#include <cbfs.h>
 
 u32 VSA_vrRead(u16 classIndex);
 void do_vsmbios(void);
@@ -190,18 +191,11 @@
 	/* Clear VSM BIOS data area. */
 	for (i = 0x400; i < 0x500; i++)
 		*(volatile unsigned char *)i = 0;
-	/* set up cbfs and find the vsa file -- later */
-/*
-	init_archive(&archive);
+	if ((unsigned int)cbfs_load_stage("vsa") != VSA2_ENTRY_POINT) {
+		printk_err("do_vsmbios: Failed to load VSA.\n");
+	}
+	buf = VSA2_BUFFER;
 
-	if (find_file(&archive, "blob/vsa", &file))
-		die("FATAL: NO VSA found!\n");
-
-	if (process_file(&file, (void *)VSA2_BUFFER))
-		die("FATAL: Processing /blob/vsa failed\n");
- */
-
-	buf = (unsigned char *)VSA2_BUFFER;
 	printk_debug("buf[0x20] signature is %x:%x:%x:%x\n",
 	       buf[0x20], buf[0x21], buf[0x22], buf[0x23]);
 	/* Check for POST code at start of vsainit.bin. If you don't see it,





More information about the coreboot mailing list