Aaron Durbin (adurbin(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3008
-gerrit
commit 3fe48146cd3dd8a2e2f1010e39cd682d3e79ddc3
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Mon Apr 1 16:49:31 2013 -0500
haswell: keep ROM cache enabled
The MP code on haswell was mirroring the BSPs MTRRs. In addition it
was cleaning up the ROM cache so that the MTRR register values were
the same once the OS was booted. Since the hyperthread sibling of
the BSP was going through this path the ROM cache was getting torn
down once the hyperthread was brought up.
That said, there was no differnce in observed boot time keeping the
ROM cache enabled.
Change-Id: I2a59988fcfeea9291202c961636ea761c2538837
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/cpu/intel/haswell/mp_init.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/cpu/intel/haswell/mp_init.c b/src/cpu/intel/haswell/mp_init.c
index cc13892..ddcff6c 100644
--- a/src/cpu/intel/haswell/mp_init.c
+++ b/src/cpu/intel/haswell/mp_init.c
@@ -181,8 +181,12 @@ ap_init(unsigned int cpu, void *microcode_ptr)
/* After SMM relocation a 2nd microcode load is required. */
intel_microcode_load_unlocked(microcode_ptr);
- /* Cleanup ROM caching. */
- cleanup_rom_caching();
+ /* The MTRR resources are core scoped. Therefore, there is no need
+ * to do the same work twice. Additionally, this check keeps the
+ * ROM cache enabled on the BSP since its hyperthread sibling won't
+ * call cleanup_rom_caching(). */
+ if ((lapicid() & 1) == 0)
+ cleanup_rom_caching();
/* FIXME(adurbin): park CPUs properly -- preferably somewhere in a
* reserved part of memory that the OS cannot get to. */
Aaron Durbin (adurbin(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3007
-gerrit
commit a85f3b132c3142e6052b7262e03063559352519c
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Mon Apr 1 15:40:45 2013 -0500
haswell: use new interface to disable rom caching
The haswell code was using the old assumption of which MTRR
was used for the ROM cache. Now that there is an API for doing
this use it as the old assumption is no longer valid.
Change-Id: I59ef897becfc9834d36d28840da6dc4f1145b0c7
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/cpu/intel/haswell/mp_init.c | 23 +----------------------
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/src/cpu/intel/haswell/mp_init.c b/src/cpu/intel/haswell/mp_init.c
index c8bd5c2..cc13892 100644
--- a/src/cpu/intel/haswell/mp_init.c
+++ b/src/cpu/intel/haswell/mp_init.c
@@ -145,28 +145,7 @@ void release_aps_for_smm_relocation(int do_parallel)
* ensure the caching is disabled for tha APs before going to sleep. */
static void cleanup_rom_caching(void)
{
-#if CONFIG_CACHE_ROM
- msr_t msr;
- unsigned int last_var_mtrr;
-
- msr = rdmsr(MTRRcap_MSR);
- last_var_mtrr = (msr.lo & 0xff) - 1;
-
- /* Check if the MTRR is valid. */
- msr = rdmsr(MTRRphysMask_MSR(last_var_mtrr));
- if ((msr.lo & MTRRphysMaskValid) == 0)
- return;
- msr = rdmsr(MTRRphysBase_MSR(last_var_mtrr));
- /* Assum that if the MTRR is of write protected type, the MTRR is used
- * to cache the ROM. */
- if ((msr.lo & MTRR_NUM_TYPES) == MTRR_TYPE_WRPROT) {
- msr.lo = msr.hi = 0;
- disable_cache();
- wrmsr(MTRRphysMask_MSR(last_var_mtrr), msr);
- wrmsr(MTRRphysBase_MSR(last_var_mtrr), msr);
- enable_cache();
- }
-#endif
+ x86_mtrr_disable_rom_caching();
}
/* By the time APs call ap_init() caching has been setup, and microcode has
Siyuan Wang (wangsiyuanbuaa(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3013
-gerrit
commit 7145d141503f4898de895a41974c6236bdd089c7
Author: Siyuan Wang <wangsiyuanbuaa(a)gmail.com>
Date: Wed Apr 3 17:02:58 2013 +0800
Add PXE ROM selection to Kconfig menu
Adding a pxe rom manually is inconvenient.
With this patch, PXE ROM can be added automatically by selecting PXE_ROM in Kconfig.
I have tested this patch on AMD Parmer and Thatcher with iPXE.
iPXE would be a boot device in Seabios when pressing F12.
iPXE works well with coreboot and Seabios.
Change-Id: I2c4fc73fd9ae6c979f0af2290d410935f600e2c8
Signed-off-by: Siyuan Wang <SiYuan.Wang(a)amd.com>
Signed-off-by: Siyuan Wang <wangsiyuanbuaa(a)gmail.com>
---
src/arch/x86/Makefile.inc | 3 +++
src/device/Kconfig | 31 +++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+)
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index bbf2336..ee2bc47 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -113,6 +113,9 @@ endif
ifeq ($(CONFIG_VBOOT_VERIFY_FIRMWARE),y)
$(CBFSTOOL) $@.tmp add-stage -f $(VBOOT_STUB_ELF) -n $(CONFIG_CBFS_PREFIX)/vboot -c $(CBFS_COMPRESS_FLAG)
endif
+ifeq ($(CONFIG_PXE_ROM),y)
+ $(CBFSTOOL) $@.tmp add -f $(CONFIG_PXE_ROM_FILE) -n pci$(CONFIG_PXE_ROM_ID).rom -t raw
+endif
mv $@.tmp $@
@printf " CBFSPRINT $(subst $(obj)/,,$(@))\n\n"
$(CBFSTOOL) $@ print
diff --git a/src/device/Kconfig b/src/device/Kconfig
index 159bc0e..ca2fb33 100644
--- a/src/device/Kconfig
+++ b/src/device/Kconfig
@@ -467,3 +467,34 @@ config BOOTSPLASH_FILE
The path and filename of the file to use as graphical bootsplash
screen. The file format has to be jpg.
endmenu
+
+menu "PXE ROM"
+config PXE_ROM
+ bool "Add a PXE ROM image"
+ help
+ Select this option if you have a PXE ROM image that you would
+ like to add to your ROM.
+
+config PXE_ROM_FILE
+ string "PXE ROM filename"
+ depends on PXE_ROM
+ default "pxe.rom"
+ help
+ The path and filename of the file to use as PXE ROM.
+
+config PXE_ROM_ID
+ string "network card PCI IDs"
+ depends on PXE_ROM
+ default "10ec,8168"
+ help
+ The comma-separated PCI vendor and device ID that would associate
+ your PXE ROM to your network card.
+
+ Example: 10ec,8168
+
+ In the above example 10ec is the PCI vendor ID (in hex, but without
+ the "0x" prefix) and 8168 specifies the PCI device ID of the
+ network card (also in hex, without "0x" prefix).
+
+ Under GNU/Linux you can run `lspci -nn` to list the IDs of your PCI devices.
+endmenu
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3015
-gerrit
commit 9d0e63535e228d2d4bd0d5ed523c2d7ac692202c
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Wed Apr 3 10:00:33 2013 +0200
inteltool: pcie.c: Cast `0xff` to `uint64_t` to avoid shift overflow
When building inteltool with Clang, it warns about the following.
$ clang --version
Debian clang version 3.2-1~exp6 (tags/RELEASE_32/final) (based on LLVM 3.2)
Target: i386-pc-linux-gnu
Thread model: posix
$ CC=clang make
[…]
clang -O2 -g -Wall -W -c -o pcie.o pcie.c
pcie.c:297:40: warning: signed shift result (0xFF0000000) requires 37 bits to represent, but 'int' only has 32 bits [-Wshift-overflow]
pciexbar_phys = pciexbar_reg & (0xff << 28);
~~~~ ^ ~~
pcie.c:301:41: warning: signed shift result (0xFF8000000) requires 37 bits to represent, but 'int' only has 32 bits [-Wshift-overflow]
pciexbar_phys = pciexbar_reg & (0x1ff << 27);
~~~~~ ^ ~~
pcie.c:305:41: warning: signed shift result (0xFFC000000) requires 37 bits to represent, but 'int' only has 32 bits [-Wshift-overflow]
pciexbar_phys = pciexbar_reg & (0x3ff << 26);
~~~~~ ^ ~~
3 warnings generated.
[…]
Casting the numbers to `(uint64_t)` fixes these issues as now enough
bits are available.
These issues were introduced in commit 1162f25a [1].
commit 1162f25a49e8f39822123d664cda10fef466b351
Author: Stefan Reinauer <stepan(a)coresystems.de>
Date: Thu Dec 4 15:18:20 2008 +0000
Patch to util/inteltool:
* PMBASE dumping now knows the registers.
* Add support for i965, i975, ICH8M
* Add support for Darwin OS using DirectIO
[1] http://review.coreboot.org/gitweb?p=coreboot.git;a=commit;h=1162f25a49e8f39…
Change-Id: I7b9a15b04ef3bcae64e06266667597d0f9f07b79
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
util/inteltool/pcie.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/util/inteltool/pcie.c b/util/inteltool/pcie.c
index 752d7b0..29e1759 100644
--- a/util/inteltool/pcie.c
+++ b/util/inteltool/pcie.c
@@ -294,15 +294,15 @@ int print_pciexbar(struct pci_dev *nb)
switch ((pciexbar_reg >> 1) & 3) {
case 0: // 256MB
- pciexbar_phys = pciexbar_reg & (0xff << 28);
+ pciexbar_phys = pciexbar_reg & ((uint64_t)0xff << 28);
max_busses = 256;
break;
case 1: // 128M
- pciexbar_phys = pciexbar_reg & (0x1ff << 27);
+ pciexbar_phys = pciexbar_reg & ((uint64_t)0x1ff << 27);
max_busses = 128;
break;
case 2: // 64M
- pciexbar_phys = pciexbar_reg & (0x3ff << 26);
+ pciexbar_phys = pciexbar_reg & ((uint64_t)0x3ff << 26);
max_busses = 64;
break;
default: // RSVD
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3014
-gerrit
commit f723fd1143c4242cf22cc8d5fabcaece2e9c0d26
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Wed Apr 3 11:36:50 2013 +0200
ASRock E350M1: Kconfig: Remove `WARNINGS_ARE_ERRORS` to treat warnings as errors
Now that the ASRock E350M1 builds without any warnings, remove the
config option `WARNINGS_ARE_ERRORS` set to no by default from
the file `Kconfig` so warnings are treated as errors to prevent
code from being added in the future introducing warnings.
Change-Id: Idfecfb1434158969334a4b37972b5fc6fd76e72a
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
src/mainboard/asrock/e350m1/Kconfig | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/mainboard/asrock/e350m1/Kconfig b/src/mainboard/asrock/e350m1/Kconfig
index 96f6712..a308850 100644
--- a/src/mainboard/asrock/e350m1/Kconfig
+++ b/src/mainboard/asrock/e350m1/Kconfig
@@ -108,9 +108,5 @@ config DRIVERS_PS2_KEYBOARD
bool
default n
-config WARNINGS_ARE_ERRORS
- bool
- default n
-
endif # BOARD_ASROCK_E350M1
the following patch was just integrated into master:
commit a8db717d4af799fabd26383e6a748de94318d280
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Sun Mar 31 22:02:16 2013 +0200
inteltool: Use `ll` instead of `l` as the length modifier for `uint64_t`
When buidling inteltool with GCC, the following warning is printed.
$ make
[…]
gcc -O2 -g -Wall -W -c -o memory.o memory.c
memory.c: In function ‘print_mchbar’:
memory.c:287:7: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat]
[…]
This was introduced in commit »inteltool: Add support for H65 Express
chipset« (c7fc4422) [1].
Address this warning, by using `%llx` instead of `%lx`.
[1] http://review.coreboot.org/1258
Change-Id: I4f714edce7e8b405e1a7a417d02fa498322c88a8
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/2994
Reviewed-by: Anton Kochkov <anton.kochkov(a)gmail.com>
Tested-by: build bot (Jenkins)
Build-Tested: build bot (Jenkins) at Tue Apr 2 01:22:51 2013, giving +1
Reviewed-By: Anton Kochkov <anton.kochkov(a)gmail.com> at Sun Mar 31 22:38:33 2013, giving +2
See http://review.coreboot.org/2994 for details.
-gerrit
Siyuan Wang (wangsiyuanbuaa(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3013
-gerrit
commit 438f77dfdd0b3e1dd9d5f8ee895204522d94055e
Author: Siyuan Wang <wangsiyuanbuaa(a)gmail.com>
Date: Wed Apr 3 17:02:58 2013 +0800
Add PXE ROM on config menu
Adding a pxe rom manually is inconvenient.
With this patch, PXE ROM can be added automatically.
I have tested this patch on AMD Parmer and Thatcher with iPXE.
Change-Id: I2c4fc73fd9ae6c979f0af2290d410935f600e2c8
Signed-off-by: Siyuan Wang <SiYuan.Wang(a)amd.com>
Signed-off-by: Siyuan Wang <wangsiyuanbuaa(a)gmail.com>
---
src/arch/x86/Makefile.inc | 3 +++
src/device/Kconfig | 29 +++++++++++++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index bbf2336..ee2bc47 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -113,6 +113,9 @@ endif
ifeq ($(CONFIG_VBOOT_VERIFY_FIRMWARE),y)
$(CBFSTOOL) $@.tmp add-stage -f $(VBOOT_STUB_ELF) -n $(CONFIG_CBFS_PREFIX)/vboot -c $(CBFS_COMPRESS_FLAG)
endif
+ifeq ($(CONFIG_PXE_ROM),y)
+ $(CBFSTOOL) $@.tmp add -f $(CONFIG_PXE_ROM_FILE) -n pci$(CONFIG_PXE_ROM_ID).rom -t raw
+endif
mv $@.tmp $@
@printf " CBFSPRINT $(subst $(obj)/,,$(@))\n\n"
$(CBFSTOOL) $@ print
diff --git a/src/device/Kconfig b/src/device/Kconfig
index 159bc0e..12ff3aa 100644
--- a/src/device/Kconfig
+++ b/src/device/Kconfig
@@ -467,3 +467,32 @@ config BOOTSPLASH_FILE
The path and filename of the file to use as graphical bootsplash
screen. The file format has to be jpg.
endmenu
+
+menu "PXE ROM"
+config PXE_ROM
+ bool "Add a PXE ROM image"
+ help
+ Select this option if you have a PXE ROM image that you would
+ like to add to your ROM.
+
+config PXE_ROM_FILE
+ string "PXE ROM filename"
+ depends on PXE_ROM
+ default "10ec8168.rom"
+ help
+ The path and filename of the file to use as PXE ROM.
+
+config PXE_ROM_ID
+ string "network card PCI IDs"
+ depends on PXE_ROM
+ default "10ec,8168"
+ help
+ The comma-separated PCI vendor and device ID that would associate
+ your PXE ROM to your network card.
+
+ Example: 10ec,8168
+
+ In the above example 10ec is the PCI vendor ID (in hex, but without
+ the "0x" prefix) and 8168 specifies the PCI device ID of the
+ network card (also in hex, without "0x" prefix).
+endmenu
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3002
-gerrit
commit 830d213b3da006c488a83e1fcae36e7c0b087ed0
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Mon Apr 1 18:26:58 2013 +0200
inteltool: Cast to `intptr_t` instead of `uint64_t`
When building inteltool under x86-32, the following warnings are
shown.
$ gcc --version
gcc-4.7.real (Debian 4.7.2-15) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ make
[…]
amb.c: In function ‘amb_read_config32’:
amb.c:31:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
amb.c:31:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
amb.c: In function ‘amb_read_config16’:
amb.c:45:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
amb.c:45:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
amb.c: In function ‘amb_read_config8’:
amb.c:60:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
amb.c:60:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
[…]
Nico Huber commented the following [1].
I don't see those warnings because I build for x86-64. I guess
they could be fixed by casting to `ptrdiff_t` (from stddef.h)
instead of `uint64_t`.
And indeed, using `ptrdiff_t` fixes the warning. But as Stefan
Reinauer commented in [2], `intptr_t` is more appropriate as this
is just a pointer and no pointer difference.
So `intptr_t` is taken, which fixes these issues warned about too.
These warnings were introduced in commit »inteltool: Add support for
dumping AMB registers« (4b7b320f) [3].
[1] http://review.coreboot.org/#/c/2996/1//COMMIT_MSG
[2] http://review.coreboot.org/#/c/3002/1/util/inteltool/amb.c
[3] http://review.coreboot.org/525
Change-Id: I2ea1a31dc1e3db129e767d6a9e0433fd75a77d0f
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
util/inteltool/amb.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/util/inteltool/amb.c b/util/inteltool/amb.c
index a3ee01d..a1761ee 100644
--- a/util/inteltool/amb.c
+++ b/util/inteltool/amb.c
@@ -17,7 +17,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
+#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include "inteltool.h"
@@ -28,7 +28,7 @@
static uint32_t amb_read_config32(volatile void *base, int fn, int reg)
{
- return *(uint32_t *)(AMB_ADDR((uint64_t)base, fn, reg));
+ return *(uint32_t *)(AMB_ADDR((intptr_t)base, fn, reg));
}
static void amb_printreg32(volatile void *base, int fn, int reg,
@@ -42,7 +42,7 @@ static void amb_printreg32(volatile void *base, int fn, int reg,
static uint16_t amb_read_config16(volatile void *base, int fn, int reg)
{
- return *(uint16_t *)(AMB_ADDR((uint64_t)base, fn, reg));
+ return *(uint16_t *)(AMB_ADDR((intptr_t)base, fn, reg));
}
static void amb_printreg16(volatile void *base, int fn, int reg,
@@ -57,7 +57,7 @@ static void amb_printreg16(volatile void *base, int fn, int reg,
static uint8_t amb_read_config8(volatile void *base, int fn, int reg)
{
- return *(uint8_t *)(AMB_ADDR((uint64_t)base, fn, reg));
+ return *(uint8_t *)(AMB_ADDR((intptr_t)base, fn, reg));
}
static void amb_printreg8(volatile void *base, int fn, int reg,
Jens Rottmann (JRottmann(a)LiPPERTembedded.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3012
-gerrit
commit 8a4eab961e543cc679d048e9523f3f992180debf
Author: Jens Rottmann <JRottmann(a)LiPPERTembedded.de>
Date: Wed Apr 3 10:12:55 2013 +0200
Partially revert "AMD Inagua: broadcom.c: Add missing prototype for `broadcom_init()`"
Commit 5d741567 added a prototype to broadcom.c to fix a warning. This part
is fine.
It also changed mainboard.c to #include broadcom.c. But broadcom.c is
already in Makefile.inc, now building will fail because the linker gets
broadcom_init() twice.
Undo the change to mainboard.c but keep the change to broadcom.c.
Change-Id: Ieccc098f477ffacccf4174056998034a220a9744
Signed-off-by: Jens Rottmann <JRottmann(a)LiPPERTembedded.de>
---
src/mainboard/amd/inagua/mainboard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mainboard/amd/inagua/mainboard.c b/src/mainboard/amd/inagua/mainboard.c
index 7e9f1d9..dc23007 100644
--- a/src/mainboard/amd/inagua/mainboard.c
+++ b/src/mainboard/amd/inagua/mainboard.c
@@ -26,8 +26,8 @@
#include <device/pci_def.h>
#include <southbridge/amd/sb800/sb800.h>
#include "SBPLATFORM.h" /* Platfrom Specific Definitions */
-// #include "broadcom.c" /* broadcom_init() */
+void broadcom_init(void);
void set_pcie_reset(void);
void set_pcie_dereset(void);