[coreboot] New patch to review for coreboot: 6ff264a Hudson: Changes to support agesa/hudson for legacy free

Martin Roth (martin.roth@se-eng.com) gerrit at coreboot.org
Wed Jan 16 17:57:50 CET 2013


Martin Roth (martin.roth at se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2157

-gerrit

commit 6ff264aec7891c7e27c2e6ae8f09ae5d3f31025d
Author: Martin Roth <martin.roth at se-eng.com>
Date:   Wed Jan 16 09:07:30 2013 -0700

    Hudson: Changes to support agesa/hudson for legacy free
    
    Add Kconfig option for Legacy free and hook it into the parmer
    AGESA initialization as well as the FADT code. This should really
    be done inside the southbridge wrapper and not in the mainboard,
    but for now the code to attach it to is inside the mainboard.
    
    Update Kconfig for parmer and thatcher to default to legacy free.
    
    Change-Id: Ib899bd02ddc5506caae4aca2c589cc2526638cb8
    Signed-off-by: Martin Roth <martin.roth at se-eng.com>
---
 src/mainboard/amd/parmer/BiosCallOuts.c   | 5 ++++-
 src/mainboard/amd/parmer/Kconfig          | 4 ++++
 src/mainboard/amd/thatcher/BiosCallOuts.c | 5 ++++-
 src/mainboard/amd/thatcher/Kconfig        | 4 ++++
 src/southbridge/amd/agesa/hudson/Kconfig  | 6 ++++++
 src/southbridge/amd/agesa/hudson/fadt.c   | 8 ++++++--
 6 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/src/mainboard/amd/parmer/BiosCallOuts.c b/src/mainboard/amd/parmer/BiosCallOuts.c
index 24268d7..c3ac4de 100644
--- a/src/mainboard/amd/parmer/BiosCallOuts.c
+++ b/src/mainboard/amd/parmer/BiosCallOuts.c
@@ -717,9 +717,12 @@ AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr)
 	FCH_RESET_DATA_BLOCK *FchParams = (FCH_RESET_DATA_BLOCK *)FchData;
 
 	if (FchParams->StdHeader->Func == AMD_INIT_RESET) {
-		//FCH_RESET_DATA_BLOCK *FchParams_reset =  (FCH_RESET_DATA_BLOCK *) FchData;
+		FCH_RESET_DATA_BLOCK *FchParams_reset =  (FCH_RESET_DATA_BLOCK *) FchData;
 		printk(BIOS_DEBUG, "Fch OEM config in INIT RESET ");
 		//FchParams_reset->EcChannel0 = TRUE; /* logical devicd 3 */
+#if CONFIG_HUDSON_LEGACY_FREE
+		FchParams_reset->LegacyFree = 1;
+#endif
 	} else if (FchParams->StdHeader->Func == AMD_INIT_ENV) {
 		FCH_DATA_BLOCK *FchParams_env = (FCH_DATA_BLOCK *)FchData;
 		printk(BIOS_DEBUG, "Fch OEM config in INIT ENV ");
diff --git a/src/mainboard/amd/parmer/Kconfig b/src/mainboard/amd/parmer/Kconfig
index e3b153d..a4da2e2 100644
--- a/src/mainboard/amd/parmer/Kconfig
+++ b/src/mainboard/amd/parmer/Kconfig
@@ -104,4 +104,8 @@ config WARNINGS_ARE_ERRORS
 	bool
 	default n
 
+config HUDSON_LEGACY_FREE
+	bool
+	default y
+
 endif # BOARD_AMD_PARMER
diff --git a/src/mainboard/amd/thatcher/BiosCallOuts.c b/src/mainboard/amd/thatcher/BiosCallOuts.c
index d4da61a..ba32727 100644
--- a/src/mainboard/amd/thatcher/BiosCallOuts.c
+++ b/src/mainboard/amd/thatcher/BiosCallOuts.c
@@ -717,9 +717,12 @@ AGESA_STATUS Fch_Oem_config(UINT32 Func, UINT32 FchData, VOID *ConfigPtr)
 	FCH_RESET_DATA_BLOCK *FchParams = (FCH_RESET_DATA_BLOCK *)FchData;
 
 	if (FchParams->StdHeader->Func == AMD_INIT_RESET) {
-		//FCH_RESET_DATA_BLOCK *FchParams_reset =  (FCH_RESET_DATA_BLOCK *) FchData;
+		FCH_RESET_DATA_BLOCK *FchParams_reset =  (FCH_RESET_DATA_BLOCK *) FchData;
 		printk(BIOS_DEBUG, "Fch OEM config in INIT RESET ");
 		//FchParams_reset->EcChannel0 = TRUE; /* logical devicd 3 */
+#if CONFIG_HUDSON_LEGACY_FREE
+		FchParams_reset->LegacyFree = 1;
+#endif
 	} else if (FchParams->StdHeader->Func == AMD_INIT_ENV) {
 		FCH_DATA_BLOCK *FchParams_env = (FCH_DATA_BLOCK *)FchData;
 		printk(BIOS_DEBUG, "Fch OEM config in INIT ENV ");
diff --git a/src/mainboard/amd/thatcher/Kconfig b/src/mainboard/amd/thatcher/Kconfig
index 7700034..0fe97fa 100644
--- a/src/mainboard/amd/thatcher/Kconfig
+++ b/src/mainboard/amd/thatcher/Kconfig
@@ -105,4 +105,8 @@ config WARNINGS_ARE_ERRORS
 	bool
 	default n
 
+config HUDSON_LEGACY_FREE
+	bool
+	default y
+
 endif # BOARD_AMD_THATCHER
diff --git a/src/southbridge/amd/agesa/hudson/Kconfig b/src/southbridge/amd/agesa/hudson/Kconfig
index c315250..3a97e60 100644
--- a/src/southbridge/amd/agesa/hudson/Kconfig
+++ b/src/southbridge/amd/agesa/hudson/Kconfig
@@ -213,3 +213,9 @@ config S3_VOLATILE_POS
 	  non-volitile storage at cold boot stage.
 
 endif
+
+config HUDSON_LEGACY_FREE
+	bool "System is legacy free"
+	help
+	  Select y if there is no keyboard controller in the system.
+	  This sets variables in AGESA and ACPI.
diff --git a/src/southbridge/amd/agesa/hudson/fadt.c b/src/southbridge/amd/agesa/hudson/fadt.c
index 27b5600..bf1b0fc 100644
--- a/src/southbridge/amd/agesa/hudson/fadt.c
+++ b/src/southbridge/amd/agesa/hudson/fadt.c
@@ -28,7 +28,11 @@
 #include <device/device.h>
 #include "hudson.h"
 
-#define FADT_BOOT_ARCH (ACPI_FADT_LEGACY_DEVICES | ACPI_FADT_8042)
+#if CONFIG_HUDSON_LEGACY_FREE
+	#define FADT_BOOT_ARCH ACPI_FADT_LEGACY_FREE
+#else
+	#define FADT_BOOT_ARCH (ACPI_FADT_LEGACY_DEVICES | ACPI_FADT_8042)
+#endif
 
 #ifndef FADT_PM_PROFILE
 	#define FADT_PM_PROFILE PM_UNSPECIFIED
@@ -86,7 +90,7 @@ void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt)
 					* index 60-6B to decode ACPI I/O address.
 					* AcpiSmiEn & SmiCmdEn*/
 	/* RTC_En_En, TMR_En_En, GBL_EN_EN */
-	outl(0x1, ACPI_PM1_CNT_BLK);		  /* set SCI_EN */
+	outl(0x1, ACPI_PM1_CNT_BLK);			/* set SCI_EN */
 	fadt->pm1a_evt_blk = ACPI_PM_EVT_BLK;
 	fadt->pm1b_evt_blk = 0x0000;
 	fadt->pm1a_cnt_blk = ACPI_PM1_CNT_BLK;



More information about the coreboot mailing list