Hi Paul,
  I'm still working on moving things from the mainboard directories into the wrapper.  I've got fixes pending right now for the fan control and SPD reads that I should get submitted later this week.  Beyond that, I've got plans for agesawrapper.c, acpi_tables.c, get_bus_conf.c, irq_tables.c, and parts of buildopts.c and PlatformGnbPcie.c.

I also plan to roll these changes back to some of the previous AGESA/CIMX versions.

Martin


On 01/22/2013 04:41 PM, Paul Menzel wrote:
Dear coreboot folks,


after

        $ git show --stat 2892023fd422794bb82658dde3e8d489af2bdd55
        commit 2892023fd422794bb82658dde3e8d489af2bdd55
        Author: Martin Roth <martin.roth@se-eng.com>
        Date:   Thu Jan 17 12:04:08 2013 -0700

            AGESA F15tn: Move callouts into northbridge wrapper
            
            There are currently too many things in the mainboard directories that
            are really more suited to being in the northbridge / southbridge
            wrappers.  This is a start at moving some of those functions down
            into the wrappers.

            Move the bios callback functions into the northbridge/amd/agesa/family15tn
            directory from the mainboard directories.  These can still be overridden
            by any mainboard just by updating the pointer in the callback table to
            point to a customized version of the function.

            Change-Id: Icefaa014f4a4abbe51870aee7aa2fa1164e324c1
            Signed-off-by: Martin Roth <martin.roth@se-eng.com>
            Reviewed-on: http://review.coreboot.org/2169
            Tested-by: build bot (Jenkins)
            Reviewed-by: Marc Jones <marcj303@gmail.com>

         src/mainboard/amd/parmer/BiosCallOuts.c                 |  464 ++-------------------------------------------------------------------------
         src/mainboard/amd/parmer/BiosCallOuts.h                 |   55 +--------
         src/mainboard/amd/thatcher/BiosCallOuts.c               |  464 ++-------------------------------------------------------------------------
         src/mainboard/amd/thatcher/BiosCallOuts.h               |   55 +--------
         src/northbridge/amd/agesa/family15tn/Makefile.inc       |    4 +
         src/northbridge/amd/agesa/family15tn/fam15tn_callouts.c |  405 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
         src/northbridge/amd/agesa/family15tn/fam15tn_callouts.h |   53 +++++++++

the following differences remain.

        $ diff -u src/mainboard/amd/{parmer,thatcher}/BiosCallOuts.c
        --- src/mainboard/amd/parmer/BiosCallOuts.c	2013-01-23 00:25:21.150153420 +0100
        +++ src/mainboard/amd/thatcher/BiosCallOuts.c	2013-01-23 00:25:21.150153420 +0100
        @@ -72,9 +72,9 @@
         }

         /**
        - * AMD Parmer Platform ALC272 Verb Table
        + * AMD Thatcher Platform ALC272 Verb Table
          */
        -const CODEC_ENTRY Parmer_Alc272_VerbTbl[] = {
        +const CODEC_ENTRY Thatcher_Alc272_VerbTbl[] = {
         	{0x11, 0x411111F0},
         	{0x12, 0x411111F0},
         	{0x13, 0x411111F0},
        @@ -92,9 +92,9 @@
         	{0xff, 0xffffffff}
         };

        -const CODEC_TBL_LIST ParmerCodecTableList[] =
        +const CODEC_TBL_LIST ThatcherCodecTableList[] =
         {
        -	{0x10ec0272, (CODEC_ENTRY*)&Parmer_Alc272_VerbTbl[0]},
        +	{0x10ec0272, (CODEC_ENTRY*)&Thatcher_Alc272_VerbTbl[0]},
         	{(UINT32)0x0FFFFFFFF, (CODEC_ENTRY*)0x0FFFFFFFFUL}
         };

Could these objects be named the same?

        @@ -165,33 +165,33 @@
         	/* Thermal Zone Parameter */
         	FchParams->Imc.EcStruct.MsgFun81Zone0MsgReg0 = 0x00;
         	FchParams->Imc.EcStruct.MsgFun81Zone0MsgReg1 = 0x00;	/* Zone */
        -	FchParams->Imc.EcStruct.MsgFun81Zone0MsgReg2 = 0x00; //BIT0 | BIT2 | BIT5;
        -	FchParams->Imc.EcStruct.MsgFun81Zone0MsgReg3 = 0x00;//6 | BIT3;
        +	FchParams->Imc.EcStruct.MsgFun81Zone0MsgReg2 = 0x35; //BIT0 | BIT2 | BIT5;
        +	FchParams->Imc.EcStruct.MsgFun81Zone0MsgReg3 = 0x0E;//6 | BIT3;
         	FchParams->Imc.EcStruct.MsgFun81Zone0MsgReg4 = 0x00;
        -	FchParams->Imc.EcStruct.MsgFun81Zone0MsgReg5 = 0x00;
        +	FchParams->Imc.EcStruct.MsgFun81Zone0MsgReg5 = 0x54;
         	FchParams->Imc.EcStruct.MsgFun81Zone0MsgReg6 = 0x98;	/* SMBUS Address for SMBUS based temperature sensor such as SB-TSI and ADM1032 */
         	FchParams->Imc.EcStruct.MsgFun81Zone0MsgReg7 = 2;
        -	FchParams->Imc.EcStruct.MsgFun81Zone0MsgReg8 = 0;	/* PWM steping rate in unit of PWM level percentage */
        +	FchParams->Imc.EcStruct.MsgFun81Zone0MsgReg8 = 1;	/* PWM steping rate in unit of PWM level percentage */
         	FchParams->Imc.EcStruct.MsgFun81Zone0MsgReg9 = 0;

         	/* IMC Fan Policy temperature thresholds */
         	FchParams->Imc.EcStruct.MsgFun83Zone0MsgReg0 = 0x00;
         	FchParams->Imc.EcStruct.MsgFun83Zone0MsgReg1 = 0x00;	/* Zone */
        -	FchParams->Imc.EcStruct.MsgFun83Zone0MsgReg2 = 0;///80;	/*AC0 threshold in Celsius */
        -	FchParams->Imc.EcStruct.MsgFun83Zone0MsgReg3 = 0;	/*AC1 threshold in Celsius */
        +	FchParams->Imc.EcStruct.MsgFun83Zone0MsgReg2 = 105;///80;	/*AC0 threshold in Celsius */
        +	FchParams->Imc.EcStruct.MsgFun83Zone0MsgReg3 = 60;	/*AC1 threshold in Celsius */
         	FchParams->Imc.EcStruct.MsgFun83Zone0MsgReg4 = 0;	/*AC2 threshold in Celsius */
         	FchParams->Imc.EcStruct.MsgFun83Zone0MsgReg5 = 0;	/*AC3 threshold in Celsius, 0xFF is not define */
         	FchParams->Imc.EcStruct.MsgFun83Zone0MsgReg6 = 0;	/*AC4 threshold in Celsius, 0xFF is not define */
         	FchParams->Imc.EcStruct.MsgFun83Zone0MsgReg7 = 0;	/*AC5 threshold in Celsius, 0xFF is not define */
         	FchParams->Imc.EcStruct.MsgFun83Zone0MsgReg8 = 0;	/*AC6 threshold in Celsius, 0xFF is not define */
         	FchParams->Imc.EcStruct.MsgFun83Zone0MsgReg9 = 0;	/*AC7 lowest threshold in Celsius, 0xFF is not define */
        -	FchParams->Imc.EcStruct.MsgFun83Zone0MsgRegA = 0;	/*critical threshold* in Celsius, 0xFF is not define */
        +	FchParams->Imc.EcStruct.MsgFun83Zone0MsgRegA = 105;	/*critical threshold* in Celsius, 0xFF is not define */
         	FchParams->Imc.EcStruct.MsgFun83Zone0MsgRegB = 0x00;

         	/* IMC Fan Policy PWM Settings */
         	FchParams->Imc.EcStruct.MsgFun85Zone0MsgReg0 = 0x00;
         	FchParams->Imc.EcStruct.MsgFun85Zone0MsgReg1 = 0x00;	/* Zone */
        -	FchParams->Imc.EcStruct.MsgFun85Zone0MsgReg2 = 0;	/* AL0 percentage */
        +	FchParams->Imc.EcStruct.MsgFun85Zone0MsgReg2 = 100;	/* AL0 percentage */
         	FchParams->Imc.EcStruct.MsgFun85Zone0MsgReg3 = 0;	/* AL1 percentage */
         	FchParams->Imc.EcStruct.MsgFun85Zone0MsgReg4 = 0;	/* AL2 percentage */
         	FchParams->Imc.EcStruct.MsgFun85Zone0MsgReg5 = 0x00;	/* AL3 percentage */
        @@ -205,10 +205,10 @@
         	FchParams->Imc.EcStruct.MsgFun81Zone1MsgReg2 = 0x55;//BIT0 | BIT2 | BIT5;
         	FchParams->Imc.EcStruct.MsgFun81Zone1MsgReg3 = 0x17;
         	FchParams->Imc.EcStruct.MsgFun81Zone1MsgReg4 = 0x00;
        -	FchParams->Imc.EcStruct.MsgFun81Zone1MsgReg5 = 0x00;
        +	FchParams->Imc.EcStruct.MsgFun81Zone1MsgReg5 = 0x54;
         	FchParams->Imc.EcStruct.MsgFun81Zone1MsgReg6 = 0x90;	/* SMBUS Address for SMBUS based temperature sensor such as SB-TSI and ADM1032 */
         	FchParams->Imc.EcStruct.MsgFun81Zone1MsgReg7 = 0;
        -	FchParams->Imc.EcStruct.MsgFun81Zone1MsgReg8 = 0;	/* PWM steping rate in unit of PWM level percentage */
        +	FchParams->Imc.EcStruct.MsgFun81Zone1MsgReg8 = 1;	/* PWM steping rate in unit of PWM level percentage */
         	FchParams->Imc.EcStruct.MsgFun81Zone1MsgReg9 = 0;

         	FchParams->Imc.EcStruct.MsgFun83Zone1MsgReg0 = 0x00;
        @@ -221,12 +221,12 @@
         	FchParams->Imc.EcStruct.MsgFun83Zone1MsgReg7 = 0;	/*AC5 threshold in Celsius, 0xFF is not define */
         	FchParams->Imc.EcStruct.MsgFun83Zone1MsgReg8 = 0;	/*AC6 threshold in Celsius, 0xFF is not define */
         	FchParams->Imc.EcStruct.MsgFun83Zone1MsgReg9 = 0;	/*AC7 lowest threshold in Celsius, 0xFF is not define */
        -	FchParams->Imc.EcStruct.MsgFun83Zone1MsgRegA = 0;	/*critical threshold* in Celsius, 0xFF is not define */
        +	FchParams->Imc.EcStruct.MsgFun83Zone1MsgRegA = 80;	/*critical threshold* in Celsius, 0xFF is not define */
         	FchParams->Imc.EcStruct.MsgFun83Zone1MsgRegB = 0x00;

         	FchParams->Imc.EcStruct.MsgFun85Zone1MsgReg0 = 0x00;
         	FchParams->Imc.EcStruct.MsgFun85Zone1MsgReg1 = 0x01;	/*Zone */
        -	FchParams->Imc.EcStruct.MsgFun85Zone1MsgReg2 = 0;	/* AL0 percentage */
        +	FchParams->Imc.EcStruct.MsgFun85Zone1MsgReg2 = 100;	/* AL0 percentage */
         	FchParams->Imc.EcStruct.MsgFun85Zone1MsgReg3 = 0;	/* AL1 percentage */
         	FchParams->Imc.EcStruct.MsgFun85Zone1MsgReg4 = 0;	/* AL2 percentage */
         	FchParams->Imc.EcStruct.MsgFun85Zone1MsgReg5 = 0x00;	/* AL3 percentage */

In Parmer most of this stuff seems to be set to 0. Do the values in
Thatcher’s file be used for Parmer too?

        @@ -296,13 +296,15 @@
         		printk(BIOS_DEBUG, "Fch OEM config in INIT ENV ");

         		/* Azalia Controller OEM Codec Table Pointer */
        -		FchParams_env->Azalia.AzaliaOemCodecTablePtr = (CODEC_TBL_LIST *)(&ParmerCodecTableList[0]);
        +		FchParams_env->Azalia.AzaliaOemCodecTablePtr = (CODEC_TBL_LIST *)(&ThatcherCodecTableList[0]);
         		/* Azalia Controller Front Panel OEM Table Pointer */

         		/* Fan Control */
         		oem_fan_control(FchParams_env);

        -		/* sata configuration */
        +		/* XHCI configuration */
        +		FchParams_env->Usb.Xhci0Enable = FALSE;
        +		FchParams_env->Usb.Xhci1Enable = FALSE;

Does the Parmer board have XHCI?

         	}
         	printk(BIOS_DEBUG, "Done\n");

So if there are no problems with that, first a patch to unify the object
names should be made, then one to use Thatcher’s values for Parmer too
and then moving everything to the northbridge directory.


Thanks,

Paul