summaryrefslogtreecommitdiff
path: root/src/mainboard/amd
diff options
context:
space:
mode:
authorzbao <fishbaozi@gmail.com>2012-07-24 17:59:43 +0800
committerRonald G. Minnich <rminnich@gmail.com>2012-07-25 22:22:09 +0200
commit3726670edf1b6fef826b9f009d3be84af8d18805 (patch)
tree05a692b2049e10ebbd9a2b705c8461bd7f15064b /src/mainboard/amd
parenta36d8b38a673f8792df0e36c94ef571b08b229b5 (diff)
AMD family15tn: Add BIOS callback hook for getting VBIOS Image
This is for GfxInitSview(GnbSview.c). It would create warning message if it could not get VBIOS image. Change-Id: I3b2726f612b4b7a237644a4b63b56efad52b7ab5 Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: zbao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/1351 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/mainboard/amd')
-rw-r--r--src/mainboard/amd/parmer/BiosCallOuts.c12
-rw-r--r--src/mainboard/amd/parmer/BiosCallOuts.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/src/mainboard/amd/parmer/BiosCallOuts.c b/src/mainboard/amd/parmer/BiosCallOuts.c
index a50e5322e9..a4898ea52c 100644
--- a/src/mainboard/amd/parmer/BiosCallOuts.c
+++ b/src/mainboard/amd/parmer/BiosCallOuts.c
@@ -25,6 +25,7 @@
#include "OptionsIds.h"
#include "heapManager.h"
#include "FchPlatform.h"
+#include "cbfs.h"
STATIC CONST BIOS_CALLOUT_STRUCT BiosCallouts[] =
{
@@ -71,6 +72,9 @@ STATIC CONST BIOS_CALLOUT_STRUCT BiosCallouts[] =
{AGESA_FCH_OEM_CALLOUT,
Fch_Oem_config
},
+ {AGESA_GNB_GFX_GET_VBIOS_IMAGE,
+ BiosHookGfxGetVbiosImage
+ }
};
AGESA_STATUS GetBiosCallout (UINT32 Func, UINT32 Data, VOID *ConfigPtr)
@@ -733,3 +737,11 @@ AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr)
return AGESA_SUCCESS;
}
+
+AGESA_STATUS BiosHookGfxGetVbiosImage(UINT32 Func, UINT32 FchData, VOID *ConfigPrt)
+{
+ GFX_VBIOS_IMAGE_INFO *pVbiosImageInfo = (GFX_VBIOS_IMAGE_INFO *)ConfigPrt;
+ pVbiosImageInfo->ImagePtr = cbfs_find_file("pci"CONFIG_VGA_BIOS_ID".rom", CBFS_TYPE_OPTIONROM);
+ /* printk(BIOS_DEBUG, "IMGptr=%x\n", pVbiosImageInfo->ImagePtr); */
+ return pVbiosImageInfo->ImagePtr == NULL ? AGESA_WARNING : AGESA_SUCCESS;
+}
diff --git a/src/mainboard/amd/parmer/BiosCallOuts.h b/src/mainboard/amd/parmer/BiosCallOuts.h
index 1993c64b62..b7b9eaf2e3 100644
--- a/src/mainboard/amd/parmer/BiosCallOuts.h
+++ b/src/mainboard/amd/parmer/BiosCallOuts.h
@@ -71,6 +71,8 @@ AGESA_STATUS BiosHookBeforeExitSelfRefresh (UINT32 Func, UINT32 Data, VOID *Conf
AGESA_STATUS BiosGnbPcieSlotReset (UINT32 Func, UINT32 Data, VOID *ConfigPtr);
/* FCH OEM Config*/
AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr);
+/* Get Vbios Image */
+AGESA_STATUS BiosHookGfxGetVbiosImage(UINT32 Func, UINT32 FchData, VOID *ConfigPrt);
#define SB_GPIO_REG02 2
#define SB_GPIO_REG09 9
#define SB_GPIO_REG10 10