[coreboot-gerrit] Patch set updated for coreboot: 0a651c4 AGESA fam15tn fam15rl fam16kb: Add OemInitMid()

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Tue Dec 16 22:37:59 CET 2014


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7825

-gerrit

commit 0a651c4e3352c6cf72226f680cec4d37242d7e25
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Tue Dec 16 09:29:56 2014 +0200

    AGESA fam15tn fam15rl fam16kb: Add OemInitMid()
    
    Change-Id: Icbad42168ec3afb7780c0c2ddc17aa405e08d693
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/mainboard/amd/olivehill/PlatformGnbPcie.c         | 8 ++++++++
 src/mainboard/amd/parmer/PlatformGnbPcie.c            | 8 ++++++++
 src/mainboard/amd/thatcher/PlatformGnbPcie.c          | 8 ++++++++
 src/mainboard/asrock/imb-a180/PlatformGnbPcie.c       | 8 ++++++++
 src/mainboard/asus/f2a85-m/PlatformGnbPcie.c          | 8 ++++++++
 src/mainboard/gizmosphere/gizmo2/PlatformGnbPcie.c    | 8 ++++++++
 src/mainboard/hp/pavilion_m6_1035dx/PlatformGnbPcie.c | 8 ++++++++
 src/mainboard/lenovo/g505s/PlatformGnbPcie.c          | 8 ++++++++
 src/northbridge/amd/agesa/agesawrapper.h              | 9 +++++++++
 src/northbridge/amd/agesa/family15rl/agesawrapper.c   | 2 +-
 src/northbridge/amd/agesa/family15tn/agesawrapper.c   | 2 +-
 src/northbridge/amd/agesa/family16kb/agesawrapper.c   | 2 +-
 12 files changed, 76 insertions(+), 3 deletions(-)

diff --git a/src/mainboard/amd/olivehill/PlatformGnbPcie.c b/src/mainboard/amd/olivehill/PlatformGnbPcie.c
index e959925..1f5b750 100644
--- a/src/mainboard/amd/olivehill/PlatformGnbPcie.c
+++ b/src/mainboard/amd/olivehill/PlatformGnbPcie.c
@@ -149,6 +149,14 @@ static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
 	return AGESA_SUCCESS;
 }
 
+static AGESA_STATUS OemInitMid(AMD_MID_PARAMS * InitMid)
+{
+	/* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */
+	InitMid->GnbMidConfiguration.iGpuVgaMode = 0;
+	return AGESA_SUCCESS;
+}
+
 const struct OEM_HOOK OemCustomize = {
 	.InitEarly = OemInitEarly,
+	.InitMid = OemInitMid,
 };
diff --git a/src/mainboard/amd/parmer/PlatformGnbPcie.c b/src/mainboard/amd/parmer/PlatformGnbPcie.c
index 91326ef..7ab91cd 100644
--- a/src/mainboard/amd/parmer/PlatformGnbPcie.c
+++ b/src/mainboard/amd/parmer/PlatformGnbPcie.c
@@ -196,6 +196,14 @@ static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
 	return AGESA_SUCCESS;
 }
 
+static AGESA_STATUS OemInitMid(AMD_MID_PARAMS * InitMid)
+{
+	/* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */
+	InitMid->GnbMidConfiguration.iGpuVgaMode = 0;
+	return AGESA_SUCCESS;
+}
+
 const struct OEM_HOOK OemCustomize = {
 	.InitEarly = OemInitEarly,
+	.InitMid = OemInitMid,
 };
diff --git a/src/mainboard/amd/thatcher/PlatformGnbPcie.c b/src/mainboard/amd/thatcher/PlatformGnbPcie.c
index 4a985d1..5df2691 100644
--- a/src/mainboard/amd/thatcher/PlatformGnbPcie.c
+++ b/src/mainboard/amd/thatcher/PlatformGnbPcie.c
@@ -222,6 +222,14 @@ static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
 	return AGESA_SUCCESS;
 }
 
+static AGESA_STATUS OemInitMid(AMD_MID_PARAMS * InitMid)
+{
+	/* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */
+	InitMid->GnbMidConfiguration.iGpuVgaMode = 0;
+	return AGESA_SUCCESS;
+}
+
 const struct OEM_HOOK OemCustomize = {
 	.InitEarly = OemInitEarly,
+	.InitMid = OemInitMid,
 };
diff --git a/src/mainboard/asrock/imb-a180/PlatformGnbPcie.c b/src/mainboard/asrock/imb-a180/PlatformGnbPcie.c
index cd3fdd6..da1910e 100644
--- a/src/mainboard/asrock/imb-a180/PlatformGnbPcie.c
+++ b/src/mainboard/asrock/imb-a180/PlatformGnbPcie.c
@@ -149,6 +149,14 @@ static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
 	return AGESA_SUCCESS;
 }
 
+static AGESA_STATUS OemInitMid(AMD_MID_PARAMS * InitMid)
+{
+	/* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */
+	InitMid->GnbMidConfiguration.iGpuVgaMode = 0;
+	return AGESA_SUCCESS;
+}
+
 const struct OEM_HOOK OemCustomize = {
 	.InitEarly = OemInitEarly,
+	.InitMid = OemInitMid,
 };
diff --git a/src/mainboard/asus/f2a85-m/PlatformGnbPcie.c b/src/mainboard/asus/f2a85-m/PlatformGnbPcie.c
index ecfe926..f837925 100644
--- a/src/mainboard/asus/f2a85-m/PlatformGnbPcie.c
+++ b/src/mainboard/asus/f2a85-m/PlatformGnbPcie.c
@@ -197,6 +197,14 @@ static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
 	return AGESA_SUCCESS;
 }
 
+static AGESA_STATUS OemInitMid(AMD_MID_PARAMS * InitMid)
+{
+	/* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */
+	InitMid->GnbMidConfiguration.iGpuVgaMode = 0;
+	return AGESA_SUCCESS;
+}
+
 const struct OEM_HOOK OemCustomize = {
 	.InitEarly = OemInitEarly,
+	.InitMid = OemInitMid,
 };
diff --git a/src/mainboard/gizmosphere/gizmo2/PlatformGnbPcie.c b/src/mainboard/gizmosphere/gizmo2/PlatformGnbPcie.c
index f27a1c3..d48475c 100644
--- a/src/mainboard/gizmosphere/gizmo2/PlatformGnbPcie.c
+++ b/src/mainboard/gizmosphere/gizmo2/PlatformGnbPcie.c
@@ -143,6 +143,14 @@ static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
 	return AGESA_SUCCESS;
 }
 
+static AGESA_STATUS OemInitMid(AMD_MID_PARAMS * InitMid)
+{
+	/* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */
+	InitMid->GnbMidConfiguration.iGpuVgaMode = 0;
+	return AGESA_SUCCESS;
+}
+
 const struct OEM_HOOK OemCustomize = {
 	.InitEarly = OemInitEarly,
+	.InitMid = OemInitMid,
 };
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/PlatformGnbPcie.c b/src/mainboard/hp/pavilion_m6_1035dx/PlatformGnbPcie.c
index 4522379..450bbd3 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/PlatformGnbPcie.c
+++ b/src/mainboard/hp/pavilion_m6_1035dx/PlatformGnbPcie.c
@@ -195,6 +195,14 @@ static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
 	return AGESA_SUCCESS;
 }
 
+static AGESA_STATUS OemInitMid(AMD_MID_PARAMS * InitMid)
+{
+	/* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */
+	InitMid->GnbMidConfiguration.iGpuVgaMode = 0;
+	return AGESA_SUCCESS;
+}
+
 const struct OEM_HOOK OemCustomize = {
 	.InitEarly = OemInitEarly,
+	.InitMid = OemInitMid,
 };
diff --git a/src/mainboard/lenovo/g505s/PlatformGnbPcie.c b/src/mainboard/lenovo/g505s/PlatformGnbPcie.c
index 4522379..450bbd3 100644
--- a/src/mainboard/lenovo/g505s/PlatformGnbPcie.c
+++ b/src/mainboard/lenovo/g505s/PlatformGnbPcie.c
@@ -195,6 +195,14 @@ static AGESA_STATUS OemInitEarly(AMD_EARLY_PARAMS * InitEarly)
 	return AGESA_SUCCESS;
 }
 
+static AGESA_STATUS OemInitMid(AMD_MID_PARAMS * InitMid)
+{
+	/* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */
+	InitMid->GnbMidConfiguration.iGpuVgaMode = 0;
+	return AGESA_SUCCESS;
+}
+
 const struct OEM_HOOK OemCustomize = {
 	.InitEarly = OemInitEarly,
+	.InitMid = OemInitMid,
 };
diff --git a/src/northbridge/amd/agesa/agesawrapper.h b/src/northbridge/amd/agesa/agesawrapper.h
index 8147f85..7c32bf1 100644
--- a/src/northbridge/amd/agesa/agesawrapper.h
+++ b/src/northbridge/amd/agesa/agesawrapper.h
@@ -64,6 +64,9 @@ struct OEM_HOOK
 	/* romstage */
 	AGESA_STATUS (*InitEarly)(AMD_EARLY_PARAMS *);
 	AGESA_STATUS (*InitPost)(AMD_POST_PARAMS *);
+
+	/* ramstage */
+	AGESA_STATUS (*InitMid)(AMD_MID_PARAMS *);
 };
 
 extern const struct OEM_HOOK OemCustomize;
@@ -80,4 +83,10 @@ static inline void OemCustomizeInitPost(AMD_POST_PARAMS *PostParams)
 		OemCustomize.InitPost(PostParams);
 }
 
+static inline void OemCustomizeInitMid(AMD_MID_PARAMS *MidParams)
+{
+	if (OemCustomize.InitMid)
+		OemCustomize.InitMid(MidParams);
+}
+
 #endif /* _AGESAWRAPPER_H_ */
diff --git a/src/northbridge/amd/agesa/family15rl/agesawrapper.c b/src/northbridge/amd/agesa/family15rl/agesawrapper.c
index 09a4179..a69ecb0 100644
--- a/src/northbridge/amd/agesa/family15rl/agesawrapper.c
+++ b/src/northbridge/amd/agesa/family15rl/agesawrapper.c
@@ -157,8 +157,8 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
 	AmdParamStruct.StdHeader.ImageBasePtr = 0;
 
 	AmdCreateStruct(&AmdParamStruct);
+	OemCustomizeInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
 
-	((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr)->GnbMidConfiguration.iGpuVgaMode = 0;	/* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */
 	status = AmdInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
 	AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
 	AmdReleaseStruct(&AmdParamStruct);
diff --git a/src/northbridge/amd/agesa/family15tn/agesawrapper.c b/src/northbridge/amd/agesa/family15tn/agesawrapper.c
index 09a4179..a69ecb0 100644
--- a/src/northbridge/amd/agesa/family15tn/agesawrapper.c
+++ b/src/northbridge/amd/agesa/family15tn/agesawrapper.c
@@ -157,8 +157,8 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
 	AmdParamStruct.StdHeader.ImageBasePtr = 0;
 
 	AmdCreateStruct(&AmdParamStruct);
+	OemCustomizeInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
 
-	((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr)->GnbMidConfiguration.iGpuVgaMode = 0;	/* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */
 	status = AmdInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
 	AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
 	AmdReleaseStruct(&AmdParamStruct);
diff --git a/src/northbridge/amd/agesa/family16kb/agesawrapper.c b/src/northbridge/amd/agesa/family16kb/agesawrapper.c
index 09a4179..a69ecb0 100644
--- a/src/northbridge/amd/agesa/family16kb/agesawrapper.c
+++ b/src/northbridge/amd/agesa/family16kb/agesawrapper.c
@@ -157,8 +157,8 @@ AGESA_STATUS agesawrapper_amdinitmid(void)
 	AmdParamStruct.StdHeader.ImageBasePtr = 0;
 
 	AmdCreateStruct(&AmdParamStruct);
+	OemCustomizeInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
 
-	((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr)->GnbMidConfiguration.iGpuVgaMode = 0;	/* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */
 	status = AmdInitMid((AMD_MID_PARAMS *) AmdParamStruct.NewStructPtr);
 	AGESA_EVENTLOG(status, &AmdParamStruct.StdHeader);
 	AmdReleaseStruct(&AmdParamStruct);



More information about the coreboot-gerrit mailing list