Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1299
-gerrit
commit 3d24e001d146e96eedd24fe54931116a6ec3070f
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Mon Jun 18 16:02:20 2012 -0700
ifdtool: Use perror for file write errors
The "Error while writing." error messages did not output a new line
which made the output look weird. With this patch, it should look like
this:
$ ifdtool -x 3rdparty/mainboard/google/parrot/descriptor.bin
File 3rdparty/mainboard/google/parrot/descriptor.bin is 4096 bytes
Found Flash Descriptor signature at 0x00000010
Flash Region 0 (Flash Descriptor): 00000000 - 00000fff
Flash Region 1 (BIOS): 00200000 - 007fffff
Error while writing: Bad address
Flash Region 2 (Intel ME): 00001000 - 001fffff
Error while writing: Bad address
Flash Region 3 (GbE): 00fff000 - 00000fff (unused)
Flash Region 4 (Platform Data): 00fff000 - 00000fff (unused)
Change-Id: I784ff72d0673f167dbf0bd10921406abd685ce72
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
---
util/ifdtool/ifdtool.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/ifdtool/ifdtool.c b/util/ifdtool/ifdtool.c
index e78ac60..1b418d1 100644
--- a/util/ifdtool/ifdtool.c
+++ b/util/ifdtool/ifdtool.c
@@ -296,7 +296,7 @@ static void write_regions(char *image, int size)
O_WRONLY | O_CREAT | O_TRUNC,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if (write(region_fd, image + region.base, region.size) != region.size)
- printf("Error while writing.");
+ perror("Error while writing");
close(region_fd);
}
}
@@ -317,7 +317,7 @@ static void write_image(char *filename, char *image, int size)
O_WRONLY | O_CREAT | O_TRUNC,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if (write(new_fd, image, size) != size)
- printf("Error while writing.");
+ perror("Error while writing");
close(new_fd);
}
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1297
-gerrit
commit a9a1fc5987493575c759af510647836138052a26
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Wed Jun 20 14:38:53 2012 -0700
Properly identify ACPI C3 states in _CST table.
Dump and disassemble ACPI tables and look in _CST.
In the last entry the state was getting set to 0:
Package (0x04)
{
ResourceTemplate ()
{
Register (FFixedHW,
0x01, // Bit Width
0x02, // Bit Offset
0x0000000000000030, // Address
0x01, // Access Size
)
},
0x00000000, // State
0x0000005A, // Latency
0x000000C8 // Power
}
Now it is properly identifed as state 3:
Package (0x04)
{
ResourceTemplate ()
{
Register (FFixedHW,
0x01, // Bit Width
0x02, // Bit Offset
0x0000000000000030, // Address
0x01, // Access Size
)
},
0x00000003, // State
0x0000005A, // Latency
0x000000C8 // Power
}
Change-Id: Ie0a68606c5a43ac5fb5ba7bb9a3fef933ad67b64
Signed-off-by: Duncan Laurie <dlaurie(a)google.com>
---
src/cpu/intel/model_206ax/acpi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/cpu/intel/model_206ax/acpi.c b/src/cpu/intel/model_206ax/acpi.c
index dea23e7..5d3f3a0 100644
--- a/src/cpu/intel/model_206ax/acpi.c
+++ b/src/cpu/intel/model_206ax/acpi.c
@@ -79,7 +79,7 @@ static int generate_cstate_entries(acpi_cstate_t *cstates,
length += acpigen_write_CST_package_entry(&cstates[c2]);
}
if (c3 > 0) {
- cstates[c2].ctype = 2;
+ cstates[c3].ctype = 3;
length += acpigen_write_CST_package_entry(&cstates[c3]);
}
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1295
-gerrit
commit 4199fe3d470a2a9e9f87058ede9037307647ca31
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Tue Jun 19 08:34:51 2012 -0700
Add microcode blob processing
When microcode storage in CBFS is enabled, the make system is supposed
to generate the microcode blob and place it into the generated ROM
image as a CBFS component.
The microcode source representation does not change: it is still an
array of 32 bit constants. This new addition compiles the array into a
separate object file and then strips all sections but data.
The raw data section is then included into CBFS as a file named
'microcode_blob.bin' of type 0x53, which is assigned to microcode
storage.
Change-Id: I84ae040be52f520b106e3471c7e391e64d7847d9
Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
---
src/arch/x86/Makefile.inc | 6 ++++++
src/cpu/intel/microcode/Makefile.inc | 14 ++++++++++++++
src/cpu/intel/microcode/microcode_blob.c | 22 ++++++++++++++++++++++
3 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index f498831..306f239 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -34,6 +34,12 @@ cmos_layout.bin-type = 0x01aa
OPTION_TABLE_H:=$(obj)/option_table.h
endif
+ifeq ($(CONFIG_MICROCODE_IN_CBFS),y)
+cbfs-files-y += microcode_blob.bin
+microcode_blob.bin-file = $(obj)/microcode_blob.bin
+microcode_blob.bin-type = 0x53
+endif
+
#######################################################################
# Build the final rom image
COREBOOT_ROM_DEPENDENCIES:=
diff --git a/src/cpu/intel/microcode/Makefile.inc b/src/cpu/intel/microcode/Makefile.inc
index 6631019..f4d0102 100644
--- a/src/cpu/intel/microcode/Makefile.inc
+++ b/src/cpu/intel/microcode/Makefile.inc
@@ -1 +1,15 @@
ramstage-y += microcode.c
+
+
+ifeq ($(CONFIG_MICROCODE_IN_CBFS),y)
+
+SRC_PATH = src/cpu/intel/microcode
+FLAGS = -I $(CONFIG_MICROCODE_INCLUDE_PATH) -include $(obj)/config.h
+$(obj)/microcode_blob.o: $(SRC_PATH)/microcode_blob.c
+ $(CC) $(FLAGS) -MMD -c -o $@ $<
+
+$(obj)/microcode_blob.bin: $(obj)/microcode_blob.o
+ objcopy -j .data -O binary $< $@
+
+-include $(obj)/microcode_blob.d
+endif
diff --git a/src/cpu/intel/microcode/microcode_blob.c b/src/cpu/intel/microcode/microcode_blob.c
new file mode 100644
index 0000000..69238a9
--- /dev/null
+++ b/src/cpu/intel/microcode/microcode_blob.c
@@ -0,0 +1,22 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 The ChromiumOS Authors. All rights reserved.
+ *
+ * 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
+ */
+
+unsigned microcode[] = {
+#include <microcode_blob.h>
+};
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1294
-gerrit
commit aa331657ff2fbabb32681809b6eab7d7b874deeb
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Tue Jun 19 05:25:41 2012 +0000
Rename microcode include file to be model agnostic
In preparation to support CBFS hosted microcode blobs, this change
renames the wrapper include file containing the microcode to be
independent of CPU model.
Change-Id: If1a4963a52e5037a3a3495b90708ffc08b23f4c1
Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
---
src/cpu/intel/model_206ax/bootblock.c | 2 +-
src/cpu/intel/model_206ax/microcode_blob.h | 31 ++++++++++++++++++++++++++
src/cpu/intel/model_206ax/model_206ax_init.c | 2 +-
src/cpu/intel/model_206ax/x06_microcode.h | 31 --------------------------
4 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/src/cpu/intel/model_206ax/bootblock.c b/src/cpu/intel/model_206ax/bootblock.c
index 9549d23..62d9b4e 100644
--- a/src/cpu/intel/model_206ax/bootblock.c
+++ b/src/cpu/intel/model_206ax/bootblock.c
@@ -24,7 +24,7 @@
#include <cpu/x86/mtrr.h>
static const uint32_t microcode_updates[] = {
- #include "x06_microcode.h"
+ #include "microcode_blob.h"
};
#include <cpu/intel/microcode/microcode.c>
diff --git a/src/cpu/intel/model_206ax/microcode_blob.h b/src/cpu/intel/model_206ax/microcode_blob.h
new file mode 100644
index 0000000..d055b2e
--- /dev/null
+++ b/src/cpu/intel/model_206ax/microcode_blob.h
@@ -0,0 +1,31 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2011 Google 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
+ */
+
+
+#if CONFIG_NORTHBRIDGE_INTEL_SANDYBRIDGE
+ #include "microcode-m12206a7_00000025.h"
+#elif CONFIG_NORTHBRIDGE_INTEL_IVYBRIDGE
+#else
+#error "Which microcode to use?"
+#endif
+ /* Dummy terminator */
+ 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0,
diff --git a/src/cpu/intel/model_206ax/model_206ax_init.c b/src/cpu/intel/model_206ax/model_206ax_init.c
index b88d7d4..dda7d35 100644
--- a/src/cpu/intel/model_206ax/model_206ax_init.c
+++ b/src/cpu/intel/model_206ax/model_206ax_init.c
@@ -116,7 +116,7 @@ static acpi_cstate_t cstate_map[] = {
};
static const uint32_t microcode_updates[] = {
- #include "x06_microcode.h"
+ #include "microcode_blob.h"
};
/* Convert time in seconds to POWER_LIMIT_1_TIME MSR value */
diff --git a/src/cpu/intel/model_206ax/x06_microcode.h b/src/cpu/intel/model_206ax/x06_microcode.h
deleted file mode 100644
index d055b2e..0000000
--- a/src/cpu/intel/model_206ax/x06_microcode.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2011 Google 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
- */
-
-
-#if CONFIG_NORTHBRIDGE_INTEL_SANDYBRIDGE
- #include "microcode-m12206a7_00000025.h"
-#elif CONFIG_NORTHBRIDGE_INTEL_IVYBRIDGE
-#else
-#error "Which microcode to use?"
-#endif
- /* Dummy terminator */
- 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0,
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1293
-gerrit
commit 1bd276a9a866c54c1d9ec4dbb00d14be2ef01a49
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Tue Jun 19 04:48:28 2012 +0000
Add standard header to prevent multiple inclusion
This include file needs to be prevented from being included multiple
times.
Change-Id: I42e0cbe38d332b919f22e331eaf7a0251929e1dc
Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
---
src/arch/x86/include/arch/cbfs.h | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/src/arch/x86/include/arch/cbfs.h b/src/arch/x86/include/arch/cbfs.h
index 635ff10..8a61d6e 100644
--- a/src/arch/x86/include/arch/cbfs.h
+++ b/src/arch/x86/include/arch/cbfs.h
@@ -1,3 +1,25 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 The ChromiumOS Authors. All rights reserved.
+ *
+ * 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 __INCLUDE_ARCH_CBFS__
+#define __INCLUDE_ARCH_CBFS__
+
static void *walkcbfs(char *target)
{
void *entry;
@@ -23,4 +45,4 @@ static inline void call(unsigned long addr, unsigned long bist)
{
asm volatile ("jmp *%0\n\t" : : "r" (addr), "a" (bist));
}
-
+#endif
Stefan Reinauer (stefan.reinauer(a)coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1292
-gerrit
commit fd2d35281ebb6d59d06fcd53a19f7e7d325dd5a3
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Tue Jun 19 04:20:20 2012 +0000
Config changes to support microcode in CBFS
Nothing is yet enabled, this is just a config skeleton change.
The MICROCODE_INCLUDE_PATH definition is going to be used by the
Makefile building the microcode blob for CBFS inclusion.
Change-Id: I7868db3cfd4b181500e361706e5f4dc08ca1c87d
Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
---
src/cpu/Kconfig | 9 +++++++++
src/cpu/intel/model_206ax/Kconfig | 6 ++++++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/cpu/Kconfig b/src/cpu/Kconfig
index 85e83d4..5196e1a 100644
--- a/src/cpu/Kconfig
+++ b/src/cpu/Kconfig
@@ -61,4 +61,13 @@ config SSE2
streaming SIMD instructions. Some parts of coreboot can be built
with more efficient code if SSE2 instructions are available.
+if CPU_INTEL_MODEL_206AX || CPU_INTEL_MODEL_306AX
+
+config MICROCODE_IN_CBFS
+ bool "Look for microcode in CBFS"
+ help
+ Load microcode updates from CBFS instead of compiling them in.
+
+endif
+
endif # ARCH_X86
diff --git a/src/cpu/intel/model_206ax/Kconfig b/src/cpu/intel/model_206ax/Kconfig
index 6c70993..1d4ff02 100644
--- a/src/cpu/intel/model_206ax/Kconfig
+++ b/src/cpu/intel/model_206ax/Kconfig
@@ -21,6 +21,12 @@ config SMM_TSEG_SIZE
hex
default 0x800000
+if MICROCODE_IN_CBFS
+config MICROCODE_INCLUDE_PATH
+ string
+ default "src/cpu/intel/model_206ax"
+endif
+
endif
if CPU_INTEL_MODEL_206AX
the following patch was just integrated into master:
commit 696dc0b6d66d34d0c15798f365387ff8f1436e17
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Fri May 25 10:04:17 2012 -0700
Fixes to enable RC6 on IvyBridge
- The unneeded poll on non-MT force-wake bit was timing out
and causing the gma_pm_init_pre_vbios() function to exit
early so it was not preparing PM registers properly.
I changed the gtt_poll() calls to not return on timeout
unless it can't proceed so we don't see half-initialized
registers.
- RC6+ (Deep Render Standby) is not working reliably so we
can just enable RC6 in the BIOS and let the kernel decide
if it wants to enable RC6+ later.
This Kernel message is new in kernel 3.4:
[drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off
Change-Id: I69d005ba56be8c7684a4ea1133a1d761f7c07acc
Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
Build-Tested: build bot (Jenkins) at Mon Jul 23 23:40:59 2012, giving +1
Reviewed-By: Ronald G. Minnich <rminnich(a)gmail.com> at Tue Jul 24 00:02:18 2012, giving +2
See http://review.coreboot.org/1268 for details.
-gerrit