Kerry Sheh (shekairui(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/555
-gerrit
commit 45052d32dd94a81330d80c4c4825a7fdadb5062e
Author: Kerry Sheh <shekairui(a)gmail.com>
Date: Fri Jan 20 13:58:14 2012 +0800
AGESA F15: AGESA family15 model 00-0fh cpu wrapper
Change-Id: I7580bc063c09d99d3fca8b20cd39df2384a6ad44
Signed-off-by: Kerry Sheh <kerry.she(a)amd.com>
Signed-off-by: Kerry Sheh <shekairui(a)gmail.com>
---
src/cpu/amd/agesa/Kconfig | 7 +-
src/cpu/amd/agesa/Makefile.inc | 3 +-
src/cpu/amd/agesa/family15/Kconfig | 82 +++++++++++++++
src/cpu/amd/agesa/family15/Makefile.inc | 30 ++++++
src/cpu/amd/agesa/family15/chip.h | 23 +++++
src/cpu/amd/agesa/family15/chip_name.c | 25 +++++
src/cpu/amd/agesa/family15/model_15_init.c | 147 ++++++++++++++++++++++++++++
src/include/cpu/amd/amdfam15.h | 41 ++++++++
8 files changed, 356 insertions(+), 2 deletions(-)
diff --git a/src/cpu/amd/agesa/Kconfig b/src/cpu/amd/agesa/Kconfig
index 60bb74b..8eaa11d 100644
--- a/src/cpu/amd/agesa/Kconfig
+++ b/src/cpu/amd/agesa/Kconfig
@@ -1,7 +1,7 @@
#
# This file is part of the coreboot project.
#
-# Copyright (C) 2011 Advanced Micro Devices, Inc.
+# Copyright (C) 2011 - 2012 Advanced Micro Devices, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,6 +17,11 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
+config AMD_AGESA
+ bool
+ default n
+
source src/cpu/amd/agesa/family10/Kconfig
source src/cpu/amd/agesa/family12/Kconfig
source src/cpu/amd/agesa/family14/Kconfig
+source src/cpu/amd/agesa/family15/Kconfig
diff --git a/src/cpu/amd/agesa/Makefile.inc b/src/cpu/amd/agesa/Makefile.inc
index 4331435..fb536dd 100644
--- a/src/cpu/amd/agesa/Makefile.inc
+++ b/src/cpu/amd/agesa/Makefile.inc
@@ -1,7 +1,7 @@
#
# This file is part of the coreboot project.
#
-# Copyright (C) 2011 Advanced Micro Devices, Inc.
+# Copyright (C) 2011 - 2012 Advanced Micro Devices, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
subdirs-$(CONFIG_CPU_AMD_AGESA_FAMILY10) += family10
subdirs-$(CONFIG_CPU_AMD_AGESA_FAMILY12) += family12
subdirs-$(CONFIG_CPU_AMD_AGESA_FAMILY14) += family14
+subdirs-$(CONFIG_CPU_AMD_AGESA_FAMILY15) += family15
ramstage-y += apic_timer.c
cpu_incs += $(src)/cpu/amd/agesa/cache_as_ram.inc
diff --git a/src/cpu/amd/agesa/family15/Kconfig b/src/cpu/amd/agesa/family15/Kconfig
new file mode 100644
index 0000000..0f2f920
--- /dev/null
+++ b/src/cpu/amd/agesa/family15/Kconfig
@@ -0,0 +1,82 @@
+#
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2012 Advanced Micro Devices, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+
+config CPU_AMD_AGESA_FAMILY15
+ bool
+ select PCI_IO_CFG_EXT
+ select AMD_AGESA
+
+if CPU_AMD_AGESA_FAMILY15
+
+config CPU_AMD_SOCKET_G34
+ bool
+ default n
+ help
+ AMD G34 Socket
+
+config CPU_AMD_SOCKET_C32
+ bool
+ default n
+ help
+ AMD C32 Socket
+
+config CPU_AMD_SOCKET_AM3R2
+ bool
+ default n
+ help
+ AMD AM3r2 Socket
+
+config EXT_RT_TBL_SUPPORT
+ bool
+ default n
+
+config EXT_CONF_SUPPORT
+ bool
+ default n
+
+config CBB
+ hex
+ default 0x0
+
+config CDB
+ hex
+ default 0x18
+
+config XIP_ROM_BASE
+ hex
+ default 0xfff80000
+
+config XIP_ROM_SIZE
+ hex
+ default 0x80000
+
+config HAVE_INIT_TIMER
+ bool
+ default y
+
+config REDIRECT_IDS_HDT_CONSOLE_TO_SERIAL
+ bool "Redirect AGESA IDS_HDT_CONSOLE to serial console"
+ default n
+ depends on CPU_AMD_AGESA_FAMILY15
+ help
+ This Option allows you to redirect the AMD AGESA IDS_HDT_CONSOLE debug information to the serial console.
+
+ Warning: Only enable this option when debuging or tracing AMD AGESA code.
+
+endif #CPU_AMD_AGESA_FAMILY15
diff --git a/src/cpu/amd/agesa/family15/Makefile.inc b/src/cpu/amd/agesa/family15/Makefile.inc
new file mode 100644
index 0000000..936d3c8
--- /dev/null
+++ b/src/cpu/amd/agesa/family15/Makefile.inc
@@ -0,0 +1,30 @@
+#
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2012 Advanced Micro Devices, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+
+subdirs-y += ../../mtrr
+subdirs-y += ../../../x86/tsc
+subdirs-y += ../../../x86/lapic
+subdirs-y += ../../../x86/cache
+subdirs-y += ../../../x86/mtrr
+subdirs-y += ../../../x86/pae
+subdirs-y += ../../../x86/smm
+
+ramstage-y += chip_name.c
+driver-y += model_15_init.c
+
diff --git a/src/cpu/amd/agesa/family15/chip.h b/src/cpu/amd/agesa/family15/chip.h
new file mode 100644
index 0000000..0171e7f
--- /dev/null
+++ b/src/cpu/amd/agesa/family15/chip.h
@@ -0,0 +1,23 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+extern struct chip_operations cpu_amd_agesa_family15_ops;
+
+struct cpu_amd_agesa_family15_config {
+};
diff --git a/src/cpu/amd/agesa/family15/chip_name.c b/src/cpu/amd/agesa/family15/chip_name.c
new file mode 100644
index 0000000..963a423
--- /dev/null
+++ b/src/cpu/amd/agesa/family15/chip_name.c
@@ -0,0 +1,25 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <device/device.h>
+#include "chip.h"
+
+struct chip_operations cpu_amd_agesa_family15_ops = {
+ CHIP_NAME("AMD CPU Family 15h")
+};
diff --git a/src/cpu/amd/agesa/family15/model_15_init.c b/src/cpu/amd/agesa/family15/model_15_init.c
new file mode 100644
index 0000000..d100338
--- /dev/null
+++ b/src/cpu/amd/agesa/family15/model_15_init.c
@@ -0,0 +1,147 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <console/console.h>
+#include <cpu/x86/msr.h>
+#include <cpu/amd/mtrr.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <string.h>
+#include <cpu/x86/msr.h>
+#include <cpu/x86/pae.h>
+
+#include <cpu/cpu.h>
+#include <cpu/x86/lapic.h>
+#include <cpu/x86/cache.h>
+#include <cpu/x86/mtrr.h>
+#include <cpu/amd/amdfam15.h>
+
+static msr_t rdmsr_amd(u32 index)
+{
+ msr_t result;
+ __asm__ __volatile__(
+ "rdmsr"
+ :"=a"(result.lo), "=d"(result.hi)
+ :"c"(index), "D"(0x9c5a203a)
+ );
+ return result;
+}
+
+static void wrmsr_amd(u32 index, msr_t msr)
+{
+ __asm__ __volatile__(
+ "wrmsr"
+ : /* No outputs */
+ :"c"(index), "a"(msr.lo), "d"(msr.hi), "D"(0x9c5a203a)
+ );
+}
+
+static void model_15_init(device_t dev)
+{
+ printk(BIOS_DEBUG, "Model 15 Init.\n");
+
+ u8 i;
+ msr_t msr;
+ int msrno;
+#if CONFIG_LOGICAL_CPUS == 1
+ u32 siblings;
+#endif
+
+ disable_cache ();
+ /* Enable access to AMD RdDram and WrDram extension bits */
+ msr = rdmsr(SYSCFG_MSR);
+ msr.lo |= SYSCFG_MSR_MtrrFixDramModEn;
+ wrmsr(SYSCFG_MSR, msr);
+
+ // BSP: make a0000-bffff UC, c0000-fffff WB, same as ApMtrrSettingsList for APs
+ msr.lo = msr.hi = 0;
+ wrmsr (0x259, msr);
+ msr.lo = msr.hi = 0x1e1e1e1e;
+ for (msrno = 0x268; msrno <= 0x26f; msrno++)
+ wrmsr (msrno, msr);
+
+ msr.lo = 0x04040404; msr.hi = 0x04040404;
+ wrmsr(0x259, msr);
+
+ /* disable access to AMD RdDram and WrDram extension bits */
+ msr = rdmsr(SYSCFG_MSR);
+ msr.lo &= ~SYSCFG_MSR_MtrrFixDramModEn;
+ wrmsr(SYSCFG_MSR, msr);
+ enable_cache ();
+
+ /* zero the machine check error status registers */
+ msr.lo = 0;
+ msr.hi = 0;
+ for (i = 0; i < 6; i++) {
+ wrmsr(MCI_STATUS + (i * 4), msr);
+ }
+
+ /* Enable the local cpu apics */
+ setup_lapic();
+
+#if CONFIG_LOGICAL_CPUS == 1
+ siblings = cpuid_ecx(0x80000008) & 0xff;
+
+ if (siblings > 0) {
+ msr = rdmsr_amd(CPU_ID_FEATURES_MSR);
+ msr.lo |= 1 << 28;
+ wrmsr_amd(CPU_ID_FEATURES_MSR, msr);
+
+ msr = rdmsr_amd(CPU_ID_EXT_FEATURES_MSR);
+ msr.hi |= 1 << (33 - 32);
+ wrmsr_amd(CPU_ID_EXT_FEATURES_MSR, msr);
+ }
+ printk(BIOS_DEBUG, "siblings = %02d, ", siblings);
+#endif
+
+ /* DisableCf8ExtCfg */
+ msr = rdmsr(NB_CFG_MSR);
+ msr.hi &= ~(1 << (46 - 32));
+ wrmsr(NB_CFG_MSR, msr);
+
+
+ /* Write protect SMM space with SMMLOCK. */
+ msr = rdmsr(HWCR_MSR);
+ msr.lo |= (1 << 0);
+ wrmsr(HWCR_MSR, msr);
+}
+
+static struct device_operations cpu_dev_ops = {
+ .init = model_15_init,
+};
+
+static struct cpu_device_id cpu_table[] = {
+ { X86_VENDOR_AMD, 0x100F80}, /* HY-D0 */
+ { X86_VENDOR_AMD, 0x100F90}, /* HY-D0 */
+ { X86_VENDOR_AMD, 0x100F81}, /* HY-D1 */
+ { X86_VENDOR_AMD, 0x100F91}, /* HY-D1 */
+ { X86_VENDOR_AMD, 0x600f00 }, /* OR_A0x */
+ { X86_VENDOR_AMD, 0x600f01 }, /* OR_A0x */
+ { X86_VENDOR_AMD, 0x600f10 }, /* OR_B0x */
+ { X86_VENDOR_AMD, 0x600f11 }, /* OR_B1x */
+ { X86_VENDOR_AMD, 0x600f12 }, /* OR_B2x */
+ { X86_VENDOR_AMD, 0x600f13 }, /* OR_B3x */
+ { X86_VENDOR_AMD, 0x600f20 }, /* OR_C0x */
+ { 0, 0 },
+};
+
+static const struct cpu_driver model_15 __cpu_driver = {
+ .ops = &cpu_dev_ops,
+ .id_table = cpu_table,
+};
diff --git a/src/include/cpu/amd/amdfam15.h b/src/include/cpu/amd/amdfam15.h
new file mode 100644
index 0000000..3d300de
--- /dev/null
+++ b/src/include/cpu/amd/amdfam15.h
@@ -0,0 +1,41 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef CPU_AMD_FAM15_H
+#define CPU_AMD_FAM15_H
+
+#include <cpu/x86/msr.h>
+
+#define MCI_STATUS 0x00000401
+#define HWCR_MSR 0xC0010015
+#define NB_CFG_MSR 0xC001001f
+
+#define LS_CFG_MSR 0xC0011020
+#define IC_CFG_MSR 0xC0011021
+#define DC_CFG_MSR 0xC0011022
+#define CU_CFG_MSR 0xC0011023
+#define CU_CFG2_MSR 0xC001102A
+
+#define CPU_ID_FEATURES_MSR 0xC0011004
+#define CPU_ID_EXT_FEATURES_MSR 0xC0011005
+
+static msr_t rdmsr_amd(u32 index);
+static void wrmsr_amd(u32 index, msr_t msr);
+
+#endif /* CPU_AMD_FAM15_H */
On Thu, Jan 19, 2012 at 6:27 AM, Wolfgang Kamp - datakamp
<wmkamp(a)datakamp.de> wrote:
>
>
> Hello Kerry,
>
> if someone could tell me how debugging coreboot with SmartProbe really works under Ubuntu,
> I will proceed. The Sage Wiki is not sufficient.
> What happens if the LAN Chip GDB82574 generates interrupts after enumeration?
>
It depends on the mptable and/or acpi table. The kernel will ussually
tellyou if it is getting spurious interrupts, or not getting interrupt
is thinks it should.
You can contact me in IRC or gtalk if you want to talk about the
smartprobe setup.
Marc
> Regards
>
> Wolfgang
>
>
>
> Hello, Wolfgang
>
>> -----Original Message-----
>> From: coreboot-bounces(a)coreboot.org [mailto:coreboot-bounces@coreboot.org]
>> On Behalf Of Wolfgang Kamp - datakamp
>> Sent: Wednesday, January 18, 2012 11:11 PM
>> To: coreboot(a)coreboot.org
>> Subject: Re: [coreboot] Issue with CIMX/SB800 PCIe Port Initialization
>>
>> Hello Kerry, hello Marc,
>>
>> sounds good but solves not my problem. The enumeration of the SB800 GPP
>> ports works fine with Linux.
>> But coreboot fails because the SB GPP ports are not yet initialized when
>> coreboot probes them.
>> The function sbPcieGppEarlyInit will be executed after coreboot PCI
>> probing of the SB GPP ports.
>> You can see that in late.c.
>> I put that function now in the right place in the case (0x15<<0 | 0)
>> statement so probing succeeds.
>> And my Intel LAN GB82574 will be enumerated as I can see in the log.
>> But if I do that coreboot hangs in tables.c with postcode 0x9c and I
>> can't imagine why.
> It seems that there is a resource allocation problem.
> If you have a smartprobe to trace the code, you can find out what memory address read/write fail in tables.c
>
> Thanks
> Kerry
>
>> I need the correct enumeration in coreboot because the Intel LAN chip
>> tools only works under DOS.
>>
>> Wolfgang
>>
>> -----Ursprüngliche Nachricht-----
>> Von: She, Kerry [mailto:Kerry.She@amd.com]
>> Gesendet: Mittwoch, 18. Januar 2012 08:49
>> An: She, Kerry; Marc Jones; Wolfgang Kamp - datakamp
>> Cc: coreboot(a)coreboot.org; chia, kenneth
>> Betreff: Re: [coreboot] Issue with CIMX/SB800 PCIe Port Initialization
>>
>> Hello Marc and Wolfgang
>>
>> > -----Original Message-----
>> > From: coreboot-bounces(a)coreboot.org
>> > [mailto:coreboot-bounces@coreboot.org]
>> > On Behalf Of She, Kerry
>> > Sent: Tuesday, January 17, 2012 4:07 PM
>> > To: Marc Jones; Wolfgang Kamp - datakamp
>> > Cc: coreboot(a)coreboot.org
>> > Subject: Re: [coreboot] Issue with CIMX/SB800 PCIe Port Initialization
>> >
>> > Hello Walfqang,
>> >
>> > > -----Original Message-----
>> > > From: coreboot-bounces(a)coreboot.org [mailto:coreboot-
>> > bounces(a)coreboot.org]
>> > > On Behalf Of Marc Jones
>> > > Sent: Tuesday, January 17, 2012 3:23 AM
>> > > To: Wolfgang Kamp - datakamp
>> > > Cc: coreboot(a)coreboot.org
>> > > Subject: Re: [coreboot] Issue with CIMX/SB800 PCIe Port
>> > > Initialization
>> > >
>> > > On Mon, Jan 16, 2012 at 10:18 AM, Wolfgang Kamp - datakamp
>> > > <wmkamp(a)datakamp.de> wrote:
>> > > > Hello,
>> > > >
>> > > >
>> > > >
>> > > > I found a problem with the PCI enumeration of the PCIe Ports in
>> > > > the CIMX/SB800 Southbridge for the INAGUA platform.
>> > > >
>> > > > The .../southbridge/amd/cimx/sb800/late.c routine calls the
>> > > > function sb_Before_PCI_Init after
>> > > >
>> > > > case (0x16 >>3) | 2. This means when the PCI Express ports (0x15
>> > > > <<3)
>> > |
>> > > 0
>> > > > are probed in the routine ../devices/pci_device.c function
>> > > >
>> > > > pci_probe_dev they are not yet initialized. The probing fails and
>> > also
>> > > > devices behind the bridge are not recognized.
>> > > >
>> > > > Behind the PCIe bridge I have an Intel 82574 LAN chip.
>> > > >
>> > > > But if I move the call to sb_Before_PCI_Init behind case  (0x15
>> > > > <<3)
>> > |
>> > > 0 the
>> > > > enumeration succeed but coreboot crashes later into nothing. The
>> > > > Sage Debugger fails.
>> > > >
>> > > > I can't imagine why.
>> > > >
>> > > >
>> > > >
>> > > > Marc have you any idea?
>> > >
>> > > This looks like a problem in the sb800 cimx wrapper logic. Cimx
>> > > doesn't treat the devices separately. it lumps all the configuration
>> > > and enables together, making the coreboot chipset device enable
>> > > callback fail to enable the device, so it gets disabled. The sb900
>> > > wrapper appears to fix this issue with cimx setup in early init. You
>> > > may want to try porting those changes to the sb800.
>> > >
>> > > I don't know why it fails later, but I assume it is due to the
>> > > missing config since you moved the call earlier in the process. You
>> > > could try calling it multiple times. I'm not sure how it handles that,
>> though.
>> > >
>> > > Kerry,
>> > > Do you have any comments?
>> > If the enumeration fail, I suggest you should check the PCIE deassert
>> > GPIO setting.
>> > Thanks
>>
>> I found the recent amd/inagua code in the git tree is not boot on my
>> platform and more.
>> I made an update to make my platform works now.
>> The missing mainboard specific GPIO setting also added back, So the sb800
>> GPP enumeration works now.
>>
>> Please reference following link and the attachment.
>> http://review.coreboot.org/#change,542
>> http://review.coreboot.org/#change,543
>> http://review.coreboot.org/#change,544
>> http://review.coreboot.org/#change,545
>> http://review.coreboot.org/#change,546
>>
>> Thanks
>> Kerry
>>
>>
>> --
>> coreboot mailing list: coreboot(a)coreboot.org
>> http://www.coreboot.org/mailman/listinfo/coreboot
>
>
>
>
>
>
> --
> coreboot mailing list: coreboot(a)coreboot.org
> http://www.coreboot.org/mailman/listinfo/coreboot
--
http://se-eng.com
Hello, Marc
> -----Original Message-----
> From: coreboot-bounces(a)coreboot.org [mailto:coreboot-bounces@coreboot.org]
> On Behalf Of Marc Jones
> Sent: Thursday, January 19, 2012 2:28 AM
> To: Wolfgang Kamp - datakamp
> Cc: coreboot(a)coreboot.org
> Subject: Re: [coreboot] Issue with CIMX/SB800 PCIe Port Initialization
>
> On Wed, Jan 18, 2012 at 8:11 AM, Wolfgang Kamp - datakamp
> <wmkamp(a)datakamp.de> wrote:
> > Hello Kerry, hello Marc,
> >
> > sounds good but solves not my problem. The enumeration of the SB800 GPP
> ports works fine with Linux.
> > But coreboot fails because the SB GPP ports are not yet initialized
> when coreboot probes them.
> > The function sbPcieGppEarlyInit will be executed after coreboot PCI
> probing of the SB GPP ports.
> > You can see that in late.c.
> > I put that function now in the right place in the case (0x15<<0 | 0)
> statement so probing succeeds.
> > And my Intel LAN GB82574 will be enumerated as I can see in the log.
> > But if I do that coreboot hangs in tables.c with postcode 0x9c and I
> can't imagine why.
> > I need the correct enumeration in coreboot because the Intel LAN chip
> tools only works under DOS.
> >
> > Wolfgang
> >
>
> Kerry,
>
> I agree with Wolfgang. I think that the sb800 has an issue.
>
> >> > The sb900 wrapper appears to fix this issue with cimx setup in early
> init.
Yes, sb900 put the sb_before_pci_init wrapper call at romstage.
The problem is we can't get the configuration information from devicetree.cb in this way,
all the configuration option is defined in a header file.
> The device isn't visible in late init. The coreboot chip device scan
> will disable the device when it isn't found. The configuration needs
> to be set in early init like the sb900. Do you agree?
I think this is a compromise choice, we can unhide/hide the gpp device according to the devicetree.cb setting in sb800 dev_enable(), and then call the cimx function.
BTW. We using this way in the RD890 wrapper.
Thanks
Kerry
> Marc
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: She, Kerry [mailto:Kerry.She@amd.com]
> > Gesendet: Mittwoch, 18. Januar 2012 08:49
> > An: She, Kerry; Marc Jones; Wolfgang Kamp - datakamp
> > Cc: coreboot(a)coreboot.org; chia, kenneth
> > Betreff: Re: [coreboot] Issue with CIMX/SB800 PCIe Port Initialization
> >
> > Hello Marc and Wolfgang
> >
> >> -----Original Message-----
> >> From: coreboot-bounces(a)coreboot.org
> >> [mailto:coreboot-bounces@coreboot.org]
> >> On Behalf Of She, Kerry
> >> Sent: Tuesday, January 17, 2012 4:07 PM
> >> To: Marc Jones; Wolfgang Kamp - datakamp
> >> Cc: coreboot(a)coreboot.org
> >> Subject: Re: [coreboot] Issue with CIMX/SB800 PCIe Port Initialization
> >>
> >> Hello Walfqang,
> >>
> >> > -----Original Message-----
> >> > From: coreboot-bounces(a)coreboot.org [mailto:coreboot-
> >> bounces(a)coreboot.org]
> >> > On Behalf Of Marc Jones
> >> > Sent: Tuesday, January 17, 2012 3:23 AM
> >> > To: Wolfgang Kamp - datakamp
> >> > Cc: coreboot(a)coreboot.org
> >> > Subject: Re: [coreboot] Issue with CIMX/SB800 PCIe Port
> >> > Initialization
> >> >
> >> > On Mon, Jan 16, 2012 at 10:18 AM, Wolfgang Kamp - datakamp
> >> > <wmkamp(a)datakamp.de> wrote:
> >> > > Hello,
> >> > >
> >> > >
> >> > >
> >> > > I found a problem with the PCI enumeration of the PCIe Ports in
> >> > > the CIMX/SB800 Southbridge for the INAGUA platform.
> >> > >
> >> > > The .../southbridge/amd/cimx/sb800/late.c routine calls the
> >> > > function sb_Before_PCI_Init after
> >> > >
> >> > > case (0x16 >>3) | 2. This means when the PCI Express ports (0x15
> >> > > <<3)
> >> |
> >> > 0
> >> > > are probed in the routine ../devices/pci_device.c function
> >> > >
> >> > > pci_probe_dev they are not yet initialized. The probing fails and
> >> also
> >> > > devices behind the bridge are not recognized.
> >> > >
> >> > > Behind the PCIe bridge I have an Intel 82574 LAN chip.
> >> > >
> >> > > But if I move the call to sb_Before_PCI_Init behind case  (0x15
> >> > > <<3)
> >> |
> >> > 0 the
> >> > > enumeration succeed but coreboot crashes later into nothing. The
> >> > > Sage Debugger fails.
> >> > >
> >> > > I can't imagine why.
> >> > >
> >> > >
> >> > >
> >> > > Marc have you any idea?
> >> >
> >> > This looks like a problem in the sb800 cimx wrapper logic. Cimx
> >> > doesn't treat the devices separately. it lumps all the configuration
> >> > and enables together, making the coreboot chipset device enable
> >> > callback fail to enable the device, so it gets disabled. The sb900
> >> > wrapper appears to fix this issue with cimx setup in early init. You
> >> > may want to try porting those changes to the sb800.
> >> >
> >> > I don't know why it fails later, but I assume it is due to the
> >> > missing config since you moved the call earlier in the process. You
> >> > could try calling it multiple times. I'm not sure how it handles
> that, though.
> >> >
> >> > Kerry,
> >> > Do you have any comments?
> >> If the enumeration fail, I suggest you should check the PCIE deassert
> >> GPIO setting.
> >> Thanks
> >
> > I found the recent amd/inagua code in the git tree is not boot on my
> platform and more.
> > I made an update to make my platform works now.
> > The missing mainboard specific GPIO setting also added back, So the
> sb800 GPP enumeration works now.
> >
> > Please reference following link and the attachment.
> > http://review.coreboot.org/#change,542
> > http://review.coreboot.org/#change,543
> > http://review.coreboot.org/#change,544
> > http://review.coreboot.org/#change,545
> > http://review.coreboot.org/#change,546
> >
> > Thanks
> > Kerry
> >
> >
> > --
> > coreboot mailing list: coreboot(a)coreboot.org
> > http://www.coreboot.org/mailman/listinfo/coreboot
>
>
>
> --
> http://se-eng.com
>
> --
> coreboot mailing list: coreboot(a)coreboot.org
> http://www.coreboot.org/mailman/listinfo/coreboot
Hello, Wolfgang
> -----Original Message-----
> From: coreboot-bounces(a)coreboot.org [mailto:coreboot-bounces@coreboot.org]
> On Behalf Of Wolfgang Kamp - datakamp
> Sent: Wednesday, January 18, 2012 11:11 PM
> To: coreboot(a)coreboot.org
> Subject: Re: [coreboot] Issue with CIMX/SB800 PCIe Port Initialization
>
> Hello Kerry, hello Marc,
>
> sounds good but solves not my problem. The enumeration of the SB800 GPP
> ports works fine with Linux.
> But coreboot fails because the SB GPP ports are not yet initialized when
> coreboot probes them.
> The function sbPcieGppEarlyInit will be executed after coreboot PCI
> probing of the SB GPP ports.
> You can see that in late.c.
> I put that function now in the right place in the case (0x15<<0 | 0)
> statement so probing succeeds.
> And my Intel LAN GB82574 will be enumerated as I can see in the log.
> But if I do that coreboot hangs in tables.c with postcode 0x9c and I
> can't imagine why.
It seems that there is a resource allocation problem.
If you have a smartprobe to trace the code, you can find out what memory address read/write fail in tables.c
Thanks
Kerry
> I need the correct enumeration in coreboot because the Intel LAN chip
> tools only works under DOS.
>
> Wolfgang
>
> -----Ursprüngliche Nachricht-----
> Von: She, Kerry [mailto:Kerry.She@amd.com]
> Gesendet: Mittwoch, 18. Januar 2012 08:49
> An: She, Kerry; Marc Jones; Wolfgang Kamp - datakamp
> Cc: coreboot(a)coreboot.org; chia, kenneth
> Betreff: Re: [coreboot] Issue with CIMX/SB800 PCIe Port Initialization
>
> Hello Marc and Wolfgang
>
> > -----Original Message-----
> > From: coreboot-bounces(a)coreboot.org
> > [mailto:coreboot-bounces@coreboot.org]
> > On Behalf Of She, Kerry
> > Sent: Tuesday, January 17, 2012 4:07 PM
> > To: Marc Jones; Wolfgang Kamp - datakamp
> > Cc: coreboot(a)coreboot.org
> > Subject: Re: [coreboot] Issue with CIMX/SB800 PCIe Port Initialization
> >
> > Hello Walfqang,
> >
> > > -----Original Message-----
> > > From: coreboot-bounces(a)coreboot.org [mailto:coreboot-
> > bounces(a)coreboot.org]
> > > On Behalf Of Marc Jones
> > > Sent: Tuesday, January 17, 2012 3:23 AM
> > > To: Wolfgang Kamp - datakamp
> > > Cc: coreboot(a)coreboot.org
> > > Subject: Re: [coreboot] Issue with CIMX/SB800 PCIe Port
> > > Initialization
> > >
> > > On Mon, Jan 16, 2012 at 10:18 AM, Wolfgang Kamp - datakamp
> > > <wmkamp(a)datakamp.de> wrote:
> > > > Hello,
> > > >
> > > >
> > > >
> > > > I found a problem with the PCI enumeration of the PCIe Ports in
> > > > the CIMX/SB800 Southbridge for the INAGUA platform.
> > > >
> > > > The .../southbridge/amd/cimx/sb800/late.c routine calls the
> > > > function sb_Before_PCI_Init after
> > > >
> > > > case (0x16 >>3) | 2. This means when the PCI Express ports (0x15
> > > > <<3)
> > |
> > > 0
> > > > are probed in the routine ../devices/pci_device.c function
> > > >
> > > > pci_probe_dev they are not yet initialized. The probing fails and
> > also
> > > > devices behind the bridge are not recognized.
> > > >
> > > > Behind the PCIe bridge I have an Intel 82574 LAN chip.
> > > >
> > > > But if I move the call to sb_Before_PCI_Init behind case  (0x15
> > > > <<3)
> > |
> > > 0 the
> > > > enumeration succeed but coreboot crashes later into nothing. The
> > > > Sage Debugger fails.
> > > >
> > > > I can't imagine why.
> > > >
> > > >
> > > >
> > > > Marc have you any idea?
> > >
> > > This looks like a problem in the sb800 cimx wrapper logic. Cimx
> > > doesn't treat the devices separately. it lumps all the configuration
> > > and enables together, making the coreboot chipset device enable
> > > callback fail to enable the device, so it gets disabled. The sb900
> > > wrapper appears to fix this issue with cimx setup in early init. You
> > > may want to try porting those changes to the sb800.
> > >
> > > I don't know why it fails later, but I assume it is due to the
> > > missing config since you moved the call earlier in the process. You
> > > could try calling it multiple times. I'm not sure how it handles that,
> though.
> > >
> > > Kerry,
> > > Do you have any comments?
> > If the enumeration fail, I suggest you should check the PCIE deassert
> > GPIO setting.
> > Thanks
>
> I found the recent amd/inagua code in the git tree is not boot on my
> platform and more.
> I made an update to make my platform works now.
> The missing mainboard specific GPIO setting also added back, So the sb800
> GPP enumeration works now.
>
> Please reference following link and the attachment.
> http://review.coreboot.org/#change,542
> http://review.coreboot.org/#change,543
> http://review.coreboot.org/#change,544
> http://review.coreboot.org/#change,545
> http://review.coreboot.org/#change,546
>
> Thanks
> Kerry
>
>
> --
> coreboot mailing list: coreboot(a)coreboot.org
> http://www.coreboot.org/mailman/listinfo/coreboot
Kerry Sheh (shekairui(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/545
-gerrit
commit 18d1ed4c01ca2f9c8286347d9c8987d098072254
Author: Kerry Sheh <shekairui(a)gmail.com>
Date: Thu Jan 19 13:18:37 2012 +0800
Inagua: devicetree.cb update
Add the slots connection comments to devicetree.cb
Change-Id: I3ccb2641c8d04a6a3c66ac11a562ba3b0dc0578a
Signed-off-by: Kerry Sheh <shekairui(a)gmail.com>
Signed-off-by: Kerry Sheh <kerry.she(a)amd.com>
---
src/mainboard/amd/inagua/devicetree.cb | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/mainboard/amd/inagua/devicetree.cb b/src/mainboard/amd/inagua/devicetree.cb
index 62cf32d..60bb29b 100644
--- a/src/mainboard/amd/inagua/devicetree.cb
+++ b/src/mainboard/amd/inagua/devicetree.cb
@@ -30,10 +30,10 @@ chip northbridge/amd/agesa/family14/root_complex
device pci 0.0 on end # Root Complex
device pci 1.0 on end # Internal Graphics P2P bridge, 9802 to 9806
device pci 1.1 on end # Internal Multimedia
- device pci 4.0 on end # PCIE P2P bridge 0x9604
- device pci 5.0 off end # PCIE P2P bridge 0x9605
- device pci 6.0 on end # PCIE P2P bridge 0x9606
- device pci 7.0 off end # PCIE P2P bridge 0x9607
+ device pci 4.0 on end # PCIE P2P bridge MXM lane 0
+ device pci 5.0 off end # PCIE P2P bridge MXM lane 1
+ device pci 6.0 on end # PCIE P2P bridge LAN
+ device pci 7.0 on end # PCIE P2P bridge MINIPCIE SLOT1
device pci 8.0 off end # NB/SB Link P2P bridge
end # agesa northbridge
@@ -67,10 +67,10 @@ chip northbridge/amd/agesa/family14/root_complex
end #LPC
device pci 14.4 off end # PCIB 0x4384, NOTE: PCI interface pins shared with GPIO {GPIO 35:0}
device pci 14.5 on end # USB 2
- device pci 15.0 on end # PCIe PortA
- device pci 15.1 on end # PCIe PortB
- device pci 15.2 on end # PCIe PortC
- device pci 15.3 on end # PCIe PortD
+ device pci 15.0 on end # PCIe PortA Express Card
+ device pci 15.1 on end # PCIe PortB NEC USB3.0
+ device pci 15.2 on end # PCIe PortC MINIPCIE SLOT2
+ device pci 15.3 on end # PCIe PortD PCIE X1 SLOT
device pci 16.0 on end # OHCI USB3
device pci 16.2 on end # EHCI USB3
register "gpp_configuration" = "4" #1:1:1:1