the following patch was just integrated into master:
commit dcea700762bc97bd7fcabf2e960d47805129aeb1
Author: Damien Zammit <damien(a)zamaudio.com>
Date: Wed Jul 17 23:59:40 2013 +1000
inteltool: Print raw CPUID and make hexadecimal values unambiguous
The raw CPUID is useful for matching the directories under 'src/cpu/intel'
and is not easy to find out otherwise because it is most often decoded
already. The decoded values are not obviously hexadecimal so prepend
them with 0x to make sure they are unambiguous.
The output differences look like this:
- CPU: Processor Type: 0, Family 6, Model 25, Stepping 2
+ CPU: ID 0x20652, Processor Type 0x0, Family 0x6, Model 0x25, Stepping 0x2
Change-Id: Id47f0b00f8db931f0000451c8f63ac1e966442c4
Signed-off-by: Damien Zammit <damien(a)zamaudio.com>
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/3788
Reviewed-by: Stefan Tauner <stefan.tauner(a)gmx.at>
Tested-by: build bot (Jenkins)
See http://review.coreboot.org/3788 for details.
-gerrit
Stefan Tauner (stefan.tauner(a)gmx.at) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3788
-gerrit
commit 161026a57928dc312689794dca7fe130b4d9015f
Author: Damien Zammit <damien(a)zamaudio.com>
Date: Wed Jul 17 23:59:40 2013 +1000
inteltool: Print raw CPUID and make hexadecimal values unambiguous
The raw CPUID is useful for matching the directories under 'src/cpu/intel'
and is not easy to find out otherwise because it is most often decoded
already. The decoded values are not obviously hexadecimal so prepend
them with 0x to make sure they are unambiguous.
The output differences look like this:
- CPU: Processor Type: 0, Family 6, Model 25, Stepping 2
+ CPU: ID 0x20652, Processor Type 0x0, Family 0x6, Model 0x25, Stepping 0x2
Change-Id: Id47f0b00f8db931f0000451c8f63ac1e966442c4
Signed-off-by: Damien Zammit <damien(a)zamaudio.com>
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
util/inteltool/inteltool.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/inteltool/inteltool.c b/util/inteltool/inteltool.c
index 5cd964a..219d84e 100644
--- a/util/inteltool/inteltool.c
+++ b/util/inteltool/inteltool.c
@@ -374,8 +374,8 @@ int main(int argc, char *argv[])
* left-shifted "Extended Model" fields.
* http://download.intel.com/design/processor/applnots/24161832.pdf
*/
- printf("CPU: Processor Type: %x, Family %x, Model %x, Stepping %x\n",
- (id >> 12) & 0x3, ((id >> 8) & 0xf) + ((id >> 20) & 0xff),
+ printf("CPU: ID 0x%x, Processor Type 0x%x, Family 0x%x, Model 0x%x, Stepping 0x%x\n",
+ id, (id >> 12) & 0x3, ((id >> 8) & 0xf) + ((id >> 20) & 0xff),
((id >> 12) & 0xf0) + ((id >> 4) & 0xf), (id & 0xf));
/* Determine names */
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3468
-gerrit
commit 7bb29d72ab89c300fa899a8cf39803ae8f101ff4
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Fri Jun 14 23:42:45 2013 +0200
cpu/amd/agesa/Kconfig: Only send one startup IPI for AMD AGESA processors
Current AMD processors (Family 10h to 15h/15tn) only need to send
one startup IPI, so overwrite the default of 2 with 1.
Successfully tested on ASRock E350M1 with a Family 14h processor.
Change-Id: Ib310f2e5ab4b463a82bf0fa9fa9141b556cabf60
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
src/cpu/amd/agesa/Kconfig | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/cpu/amd/agesa/Kconfig b/src/cpu/amd/agesa/Kconfig
index c660470..8ac16ad 100644
--- a/src/cpu/amd/agesa/Kconfig
+++ b/src/cpu/amd/agesa/Kconfig
@@ -31,6 +31,10 @@ config CPU_AMD_AGESA
if CPU_AMD_AGESA
+config NUM_IPI_STARTS
+ int
+ default 1
+
config UDELAY_IO
bool
default n
the following patch was just integrated into master:
commit 0d2119da465fac01949385a74fc4ff4896550842
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Wed Jul 10 14:27:56 2013 -0700
buildgcc: Update reference toolchain
* GCC 4.8.1
* binutils 2.23.2
* GDB 7.6
* ACPICA 20130626
* Python 3.3.2
... this adds support for Aarch64. For Ron.
Change-Id: Idec91bcd615bc35c83373bd23d4681f1c8eb015c
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
Reviewed-on: http://review.coreboot.org/3758
Tested-by: build bot (Jenkins)
Reviewed-by: David Hubbard <david.c.hubbard+coreboot(a)gmail.com>
Reviewed-by: Ronald G. Minnich <rminnich(a)gmail.com>
See http://review.coreboot.org/3758 for details.
-gerrit
the following patch was just integrated into master:
commit b5e777c433642950fbe6e907a234995ed7f34b8d
Author: Ronald G. Minnich <rminnich(a)gmail.com>
Date: Mon Jul 22 20:17:18 2013 +0200
X86: make the SIPI num_starts a config variable
The code to figure out how to set num_starts was
starting to get kludgy. It's a constant for a given
CPU; constants should be constant; make it a config variable.
This change includes an example of how to override it.
Build but not boot tested; drivers welcome.
Change-Id: Iddd906a707bb16251615c7b42f2bfb5a044379b4
Signed-off-by: Ronald G. Minnich <rminnich(a)gmail.com>
Reviewed-on: http://review.coreboot.org/3796
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc.jones(a)se-eng.com>
Reviewed-by: Bruce Griffith <Bruce.Griffith(a)se-eng.com>
See http://review.coreboot.org/3796 for details.
-gerrit
Ronald G. Minnich (rminnich(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3796
-gerrit
commit b086132df15971624b80e10abeabc98fc5d58677
Author: Ronald G. Minnich <rminnich(a)gmail.com>
Date: Mon Jul 22 20:17:18 2013 +0200
X86: make the SIPI num_starts a config variable
The code to figure out how to set num_starts was
starting to get kludgy. It's a constant for a given
CPU; constants should be constant; make it a config variable.
This change includes an example of how to override it.
Build but not boot tested; drivers welcome.
Change-Id: Iddd906a707bb16251615c7b42f2bfb5a044379b4
Signed-off-by: Ronald G. Minnich <rminnich(a)gmail.com>
---
src/arch/x86/Kconfig | 9 +++++++++
src/cpu/amd/model_10xxx/Kconfig | 4 ++++
src/cpu/x86/lapic/lapic_cpu_init.c | 12 +++---------
3 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig
index 581a048..0a21fcc 100644
--- a/src/arch/x86/Kconfig
+++ b/src/arch/x86/Kconfig
@@ -48,6 +48,15 @@ config MAX_REBOOT_CNT
int
default 3
+# This is something you almost certainly don't want to mess with.
+# How many SIPIs do we send when starting up APs and cores?
+# The answer in 2000 or so was '2'. Nowadays, on many systems,
+# it is 1. Set a safe default here, and you can override it
+# on reasonable platforms.
+config NUM_IPI_STARTS
+ int
+ default 2
+
# We had to rename the choice options under arch/ because otherwise
# the options would conflict between different architectures despite
# the if ARCH_xxx guarding the arch/xxx/Kconfig sourcing.
diff --git a/src/cpu/amd/model_10xxx/Kconfig b/src/cpu/amd/model_10xxx/Kconfig
index e4367f9..99358e0 100644
--- a/src/cpu/amd/model_10xxx/Kconfig
+++ b/src/cpu/amd/model_10xxx/Kconfig
@@ -8,6 +8,10 @@ config CPU_AMD_MODEL_10XXX
if CPU_AMD_MODEL_10XXX
+config NUM_IPI_STARTS
+ int
+ default 1
+
config CPU_ADDR_BITS
int
default 48
diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c
index a3bab46..cd09280 100644
--- a/src/cpu/x86/lapic/lapic_cpu_init.c
+++ b/src/cpu/x86/lapic/lapic_cpu_init.c
@@ -101,7 +101,7 @@ static int lapic_start_cpu(unsigned long apicid)
{
int timeout;
unsigned long send_status, accept_status;
- int j, num_starts, maxlvt;
+ int j, maxlvt;
/*
* Starting actual IPI sequence...
@@ -167,20 +167,14 @@ static int lapic_start_cpu(unsigned long apicid)
return 0;
}
-#if !CONFIG_CPU_AMD_MODEL_10XXX
- num_starts = 2;
-#else
- num_starts = 1;
-#endif
-
/*
* Run STARTUP IPI loop.
*/
- printk(BIOS_SPEW, "#startup loops: %d.\n", num_starts);
+ printk(BIOS_SPEW, "#startup loops: %d.\n", CONFIG_NUM_IPI_STARTS);
maxlvt = 4;
- for (j = 1; j <= num_starts; j++) {
+ for (j = 1; j <= CONFIG_NUM_IPI_STARTS; j++) {
printk(BIOS_SPEW, "Sending STARTUP #%d to %lu.\n", j, apicid);
lapic_read_around(LAPIC_SPIV);
lapic_write(LAPIC_ESR, 0);
the following patch was just integrated into master:
commit 4c2ebeba78e437df2d156a4c68f1fb15b62926f5
Author: Damien Zammit <damien(a)zamaudio.com>
Date: Sat Jul 20 17:44:15 2013 +1000
it8728f: Add ITE IT8728F superio early serial support.
This is the first of a series of patches to provide support
for a new mainboard, Gigabyte GA-B75M-D3V.
This patch provides early serial for the superio and has been
tested on this mainboard. The code is based on IT8718F superio.
Change-Id: I5636199b49314166ed3b81e60b41131964dd44ff
Signed-off-by: Damien Zammit <damien(a)zamaudio.com>
Reviewed-on: http://review.coreboot.org/3794
Reviewed-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Tested-by: build bot (Jenkins)
See http://review.coreboot.org/3794 for details.
-gerrit
Damien Zammit (damien(a)zamaudio.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3794
-gerrit
commit dc26b94c480ad67985ad7ad3fafbfe9c0088084e
Author: Damien Zammit <damien(a)zamaudio.com>
Date: Sat Jul 20 17:44:15 2013 +1000
it8728f: Add ITE IT8728F superio early serial support.
This is the first of a series of patches to provide support
for a new mainboard, Gigabyte GA-B75M-D3V.
This patch provides early serial for the superio and has been
tested on this mainboard. The code is based on IT8718F superio.
Change-Id: I5636199b49314166ed3b81e60b41131964dd44ff
Signed-off-by: Damien Zammit <damien(a)zamaudio.com>
---
src/superio/ite/Kconfig | 2 +
src/superio/ite/Makefile.inc | 1 +
src/superio/ite/it8728f/Makefile.inc | 21 ++++++++++
src/superio/ite/it8728f/early_serial.c | 71 ++++++++++++++++++++++++++++++++++
src/superio/ite/it8728f/early_serial.h | 40 +++++++++++++++++++
src/superio/ite/it8728f/it8728f.h | 42 ++++++++++++++++++++
6 files changed, 177 insertions(+)
diff --git a/src/superio/ite/Kconfig b/src/superio/ite/Kconfig
index e1970e8..0cf112f 100644
--- a/src/superio/ite/Kconfig
+++ b/src/superio/ite/Kconfig
@@ -38,5 +38,7 @@ config SUPERIO_ITE_IT8718F
bool
config SUPERIO_ITE_IT8721F
bool
+config SUPERIO_ITE_IT8728F
+ bool
config SUPERIO_ITE_IT8772F
bool
diff --git a/src/superio/ite/Makefile.inc b/src/superio/ite/Makefile.inc
index ce595b8..8610eea 100644
--- a/src/superio/ite/Makefile.inc
+++ b/src/superio/ite/Makefile.inc
@@ -25,4 +25,5 @@ subdirs-y += it8712f
subdirs-y += it8716f
subdirs-y += it8718f
subdirs-y += it8721f
+subdirs-y += it8728f
subdirs-y += it8772f
diff --git a/src/superio/ite/it8728f/Makefile.inc b/src/superio/ite/it8728f/Makefile.inc
new file mode 100644
index 0000000..d8d4f6a
--- /dev/null
+++ b/src/superio/ite/it8728f/Makefile.inc
@@ -0,0 +1,21 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2013 Damien Zammit <damien(a)zamaudio.com>
+##
+## 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; either version 2 of the License, or
+## (at your option) any later version.
+##
+## 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
+##
+
+romstage-$(CONFIG_SUPERIO_ITE_IT8728F) += early_serial.c
diff --git a/src/superio/ite/it8728f/early_serial.c b/src/superio/ite/it8728f/early_serial.c
new file mode 100644
index 0000000..7fbd061
--- /dev/null
+++ b/src/superio/ite/it8728f/early_serial.c
@@ -0,0 +1,71 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2006 Uwe Hermann <uwe(a)hermann-uwe.de>
+ * Copyright (C) 2013 Damien Zammit <damien(a)zamaudio.com>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 "early_serial.h"
+
+/* Superio raw commands */
+static void it8728f_sio_write(device_t dev, u8 index, u8 value)
+{
+ pnp_set_logical_device(dev);
+ pnp_write_config(dev, index, value);
+}
+
+static void it8728f_enter_conf(device_t dev)
+{
+ u16 port = dev >> 8;
+
+ outb(0x87, port);
+ outb(0x01, port);
+ outb(0x55, port);
+ outb((port == 0x4e) ? 0xaa : 0x55, port);
+}
+
+static void it8728f_exit_conf(device_t dev)
+{
+ it8728f_sio_write(dev, IT8728F_CONFIG_REG_CC, 0x02);
+}
+
+/* Superio low level commands */
+void it8728f_reg_write(device_t dev, u8 index, u8 value)
+{
+ it8728f_enter_conf(dev);
+ it8728f_sio_write(dev, index, value);
+ it8728f_exit_conf(dev);
+}
+
+void it8728f_24mhz_clkin(device_t dev)
+{
+ it8728f_reg_write(dev, IT8728F_CONFIG_REG_CLOCKSEL, 0x1);
+}
+
+void it8728f_enable_serial(device_t dev, u16 iobase)
+{
+ /* (1) Enter the configuration state (MB PnP mode). */
+ it8728f_enter_conf(dev);
+
+ /* (2) Modify the data of configuration registers. */
+ pnp_set_logical_device(dev);
+ pnp_set_enable(dev, 0);
+ pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
+ pnp_set_enable(dev, 1);
+
+ /* (3) Exit the configuration state (MB PnP mode). */
+ it8728f_exit_conf(dev);
+}
diff --git a/src/superio/ite/it8728f/early_serial.h b/src/superio/ite/it8728f/early_serial.h
new file mode 100644
index 0000000..a146f4c
--- /dev/null
+++ b/src/superio/ite/it8728f/early_serial.h
@@ -0,0 +1,40 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2013 Damien Zammit <damien(a)zamaudio.com>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 SUPERIO_ITE_IT8728F_EARLY_SERIAL_H
+#define SUPERIO_ITE_IT8728F_EARLY_SERIAL_H
+
+#include <stdint.h>
+#include <arch/io.h>
+#include <device/pnp_def.h>
+#include "it8728f.h"
+
+/*
+ * Superio low level commands
+ * Pass dev = PNP_DEV(superiobase, LDN)
+ */
+void it8728f_reg_write(device_t dev, u8 index, u8 value);
+
+/* Select 24MHz CLKIN (48MHz default). */
+void it8728f_24mhz_clkin(device_t dev);
+
+/* Enable the serial port(s). */
+void it8728f_enable_serial(device_t dev, u16 iobase);
+
+#endif
diff --git a/src/superio/ite/it8728f/it8728f.h b/src/superio/ite/it8728f/it8728f.h
new file mode 100644
index 0000000..603e467
--- /dev/null
+++ b/src/superio/ite/it8728f/it8728f.h
@@ -0,0 +1,42 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2006 Uwe Hermann <uwe(a)hermann-uwe.de>
+ * Copyright (C) 2013 Damien Zammit <damien(a)zamaudio.com>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 SUPERIO_ITE_IT8728F_IT8728F_H
+#define SUPERIO_ITE_IT8728F_IT8728F_H
+
+#define IT8728F_FDC 0x00 /* Floppy */
+#define IT8728F_SP1 0x01 /* Com1 */
+#define IT8728F_SP2 0x02 /* Com2 */
+#define IT8728F_PP 0x03 /* Parallel port */
+#define IT8728F_EC 0x04 /* Environment controller */
+#define IT8728F_KBCK 0x05 /* PS/2 keyboard */
+#define IT8728F_KBCM 0x06 /* PS/2 mouse */
+#define IT8728F_GPIO 0x07 /* GPIO */
+#define IT8728F_IR 0x0a /* Consumer IR */
+
+/* Global configuration registers. */
+#define IT8728F_CONFIG_REG_CC 0x02 /* Configure Control (write-only). */
+#define IT8728F_CONFIG_REG_LDN 0x07 /* Logical Device Number. */
+#define IT8728F_CONFIG_REG_CHIPVERS 0x22 /* Chip version */
+#define IT8728F_CONFIG_REG_CLOCKSEL 0x23 /* Clock Selection. */
+#define IT8728F_CONFIG_REG_SWSUSP 0x24 /* Software Suspend, Flash I/F. 'Special register' */
+
+#endif