diff options
author | zbao <fishbaozi@gmail.com> | 2012-08-03 17:12:45 +0800 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2012-08-04 19:54:04 +0200 |
commit | 695cc769e6dfdabc4891342f0b949d948d42cf3c (patch) | |
tree | 6fa82239d61b87940f177e5d7bc7dce80a7e8dce /src | |
parent | f88204e02b2ece82a76544070f37a4e2e2bd0f11 (diff) |
AMD Thatcher: Add BIOS callback hook for getting VBIOS Image
Apply the change
http://review.coreboot.org/1351
to thatcher.
Change-Id: I33e7ad0cad2ae06f5934c60939d60a18444aa24e
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: zbao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/1407
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/amd/thatcher/BiosCallOuts.c | 12 | ||||
-rw-r--r-- | src/mainboard/amd/thatcher/BiosCallOuts.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/mainboard/amd/thatcher/BiosCallOuts.c b/src/mainboard/amd/thatcher/BiosCallOuts.c index 34936e050d..8660e05410 100644 --- a/src/mainboard/amd/thatcher/BiosCallOuts.c +++ b/src/mainboard/amd/thatcher/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) @@ -735,3 +739,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/thatcher/BiosCallOuts.h b/src/mainboard/amd/thatcher/BiosCallOuts.h index 1993c64b62..b7b9eaf2e3 100644 --- a/src/mainboard/amd/thatcher/BiosCallOuts.h +++ b/src/mainboard/amd/thatcher/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 |