Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/641
-gerrit
commit 265da9b2659d2e18bb59e6a99792492fac71bdc8
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Tue Feb 28 00:24:15 2012 +0200
Intel cpus: cache actual size of the Flash ROM device
Cache was enabled for the last 4 MB below 4 GB when ramstage is
loaded. This does not cover the case of a 8 MB Flash and could
overlap with some system device placed at high memory.
Use the actual device size for the cache region. Mainboard
may override this with Kconfig CACHE_ROM_SIZE if necessary.
Change-Id: I622223b1e2af0b3c1831f3570b74eacfde7189dc
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/cpu/intel/car/cache_as_ram_ht.inc | 9 ++++++---
src/mainboard/Kconfig | 4 ++++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/cpu/intel/car/cache_as_ram_ht.inc b/src/cpu/intel/car/cache_as_ram_ht.inc
index 08f5b11..ed207db 100644
--- a/src/cpu/intel/car/cache_as_ram_ht.inc
+++ b/src/cpu/intel/car/cache_as_ram_ht.inc
@@ -25,6 +25,9 @@
#define CPU_MAXPHYADDR 36
#define CPU_PHYSMASK_HI (1 << (CPU_MAXPHYADDR - 32) - 1)
+/* Base address to cache all of Flash ROM, just below 4GB. */
+#define CACHE_ROM_BASE ((1<<22 - CONFIG_CACHE_ROM_SIZE>>10)<<10)
+
#define CACHE_AS_RAM_SIZE CONFIG_DCACHE_RAM_SIZE
#define CACHE_AS_RAM_BASE CONFIG_DCACHE_RAM_BASE
@@ -203,13 +206,13 @@ clear_mtrrs:
movl $CPU_PHYSMASK_HI, %edx
wrmsr
- /* Enable caching and Speculative Reads for the last 4MB. */
+ /* Enable caching and Speculative Reads for Flash ROM device. */
movl $MTRRphysBase_MSR(1), %ecx
- movl $(0xffc00000 | MTRR_TYPE_WRPROT), %eax
+ movl $(CACHE_ROM_BASE | MTRR_TYPE_WRPROT), %eax
xorl %edx, %edx
wrmsr
movl $MTRRphysMask_MSR(1), %ecx
- movl $(~(4 * 1024 * 1024 - 1) | MTRRphysMaskValid), %eax
+ movl $(~(CONFIG_CACHE_ROM_SIZE - 1) | MTRRphysMaskValid), %eax
movl $CPU_PHYSMASK_HI, %edx
wrmsr
diff --git a/src/mainboard/Kconfig b/src/mainboard/Kconfig
index cc4e14f..a34bd85 100644
--- a/src/mainboard/Kconfig
+++ b/src/mainboard/Kconfig
@@ -285,6 +285,10 @@ config ROM_SIZE
default 0x800000 if COREBOOT_ROMSIZE_KB_8192
default 0x1000000 if COREBOOT_ROMSIZE_KB_16384
+config CACHE_ROM_SIZE
+ hex
+ default ROM_SIZE
+
config ENABLE_POWER_BUTTON
bool "Enable the power button" if POWER_BUTTON_IS_OPTIONAL
default y if POWER_BUTTON_DEFAULT_ENABLE
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/454
-gerrit
commit ed3743123e4f832be6761a9b550cab5cc8a3f934
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Tue Feb 14 10:39:17 2012 +0200
Add support for RAM-less multi-processor init
For a hyper-threading processor, enabling cache requires that both the
BSP and AP CPU clear CR0.CD (Cache Disable) bit. For a Cache-As-Ram
implementation, partial multi-processor initialisation precedes
raminit and AP CPUs' 16bit entry must be run from ROM.
The AP CPU can only start execute real-mode code at a 4kB aligned
address below 1MB. The protected mode entry code for AP is identical
with the BSP code, which is already located at the top of bootblock.
This patch takes the simplest approach and aligns the bootblock
16 bit entry at highest possible 4kB boundary below 1MB.
The symbol ap_sipi_vector is tested to match CONFIG_AP_SIPI_VECTOR
used by the CAR code in romstage. Adress is not expected to ever
change, but if it does, link will fail.
Change-Id: I82e4edbf208c9ba863f51a64e50cd92871c528ef
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/arch/x86/init/ldscript_failover.lb | 13 +++++++++----
src/cpu/Kconfig | 6 ++++++
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/src/arch/x86/init/ldscript_failover.lb b/src/arch/x86/init/ldscript_failover.lb
index 83e5eb3..61c3d2a 100644
--- a/src/arch/x86/init/ldscript_failover.lb
+++ b/src/arch/x86/init/ldscript_failover.lb
@@ -29,17 +29,18 @@ MEMORY {
TARGET(binary)
SECTIONS
{
- /* Align .rom to next 4 byte boundary so no pad byte appears
- * between _rom and _start.
+ /* Symbol ap_sipi_vector must be aligned to 4kB to start AP CPUs
+ * with Startup IPI message without RAM.
*/
.bogus ROMLOC_MIN : {
- . = ALIGN(4);
+ . = ALIGN(4096);
ROMLOC = .;
} >rom = 0xff
/* This section might be better named .setup */
.rom ROMLOC : {
_rom = .;
+ ap_sipi_vector = .;
*(.rom.text);
*(.rom.data);
*(.rom.data.*);
@@ -51,7 +52,11 @@ SECTIONS
* may cause the total size of a section to change when the start
* address gets applied.
*/
- ROMLOC_MIN = 0xffffff00 - (_erom - _rom + 16);
+ ROMLOC_MIN = 0xffffff00 - (_erom - _rom + 16) - 4096;
+
+ /* Post-check proper SIPI vector. */
+ _bogus = ASSERT(((ap_sipi_vector & 0x0fff) == 0x0), "Bad SIPI vector alignment");
+ _bogus = ASSERT((ap_sipi_vector == CONFIG_AP_SIPI_VECTOR), "Address mismatch on AP_SIPI_VECTOR");
/DISCARD/ : {
*(.comment)
diff --git a/src/cpu/Kconfig b/src/cpu/Kconfig
index 6e65186..0bdef34 100644
--- a/src/cpu/Kconfig
+++ b/src/cpu/Kconfig
@@ -31,6 +31,12 @@ config SMP
This option is used to enable certain functions to make coreboot
work correctly on symmetric multi processor (SMP) systems.
+config AP_SIPI_VECTOR
+ hex
+ default 0xfffff000
+ help
+ This must equal address of ap_sipi_vector from bootblock build.
+
config MMX
bool
help
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/644
-gerrit
commit 6b350da4fd2a1f504340fdeed75c2b916220fab1
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Thu Feb 16 23:12:04 2012 +0200
Intel cpus: improve CPU compatibility of new CAR
Most or many Xeons have no MSR 0x11e.
I have previously tested that a HT-enabled P4 (model f25) can
execute this but will not have cache-as-ram enabled. Should work
for non-HT P4.
Change-Id: I28cbfa68858df45a69aa0d5b050cd829d070ad66
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/cpu/intel/car/cache_as_ram_ht.inc | 31 ++++++++++++++++++++++++++++++-
1 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/src/cpu/intel/car/cache_as_ram_ht.inc b/src/cpu/intel/car/cache_as_ram_ht.inc
index a6cbd6b..641a2f3 100644
--- a/src/cpu/intel/car/cache_as_ram_ht.inc
+++ b/src/cpu/intel/car/cache_as_ram_ht.inc
@@ -83,11 +83,40 @@ clear_mtrrs:
orl $MTRRdefTypeEn, %eax
wrmsr
- /* Enable L2 cache. */
+ /* Enable L2 cache Write-Back (WBINVD and FLUSH#).
+ *
+ * MSR is set when DisplayFamily_DisplayModel is one of:
+ * 06_0x, 06_17, 06_1C
+ *
+ * Description says this bit enables use of WBINVD and FLUSH#.
+ * Should this be set only after the system bus and/or memory
+ * controller can successfully handle write cycles?
+ */
+
+#define EAX_FAMILY(a) (a << 8) /* for family <= 0fH */
+#define EAX_MODEL(a) (((a & 0xf0) << 12) | ((a & 0xf) << 4))
+
+ movl $1, %eax
+ cpuid
+ movl %eax, %ebx
+ andl $EAX_FAMILY(0x0f), %eax
+ cmpl $EAX_FAMILY(0x06), %eax
+ jne no_msr_11e
+ movl %ebx, %eax
+ andl $EAX_MODEL(0xff), %eax
+ cmpl $EAX_MODEL(0x17), %eax
+ je has_msr_11e
+ cmpl $EAX_MODEL(0x1c), %eax
+ je has_msr_11e
+ andl $EAX_MODEL(0xf0), %eax
+ cmpl $EAX_MODEL(0x00), %eax
+ jne no_msr_11e
+has_msr_11e:
movl $0x11e, %ecx
rdmsr
orl $(1 << 8), %eax
wrmsr
+no_msr_11e:
/* Enable cache (CR0.CD = 0, CR0.NW = 0). */
movl %cr0, %eax
kindly reminder that GSOC 2012 is coming~~~
Best wishes
QingPei Wang
Phone: 86+018930528086
---------- Forwarded message ----------
From: Carol Smith <carols(a)google.com>
Date: Tue, Feb 28, 2012 at 3:47 AM
Subject: [Announce] Now Accepting Applications for Mentoring Organizations
for GSoC 2012
To: Google Summer of Code Mentors List <
google-summer-of-code-mentors-list(a)googlegroups.com>
Hi all,
We're pleased to announce the applications for mentoring organizations
for GoogleSummer of Code 2012 are now being accepted [1]. Please go
Melange [2] to apply on behalf of your organization. Please note that
the application period [3] closes on 9 March at 23:00 UTC. We will not
accept any late applications for any reason.
[1] -
http://google-opensource.blogspot.com/2012/02/mentoring-organization-applic…
[2] - http://www.google-melange.com
[3] - http://www.google-melange.com/gsoc/events/google/gsoc2012
Cheers,
Carol
--
You received this message because you are subscribed to the Google Groups
"Google Summer of Code Mentors List" group.
To post to this group, send email to
google-summer-of-code-mentors-list(a)googlegroups.com.
To unsubscribe from this group, send email to
google-summer-of-code-mentors-list+unsubscribe(a)googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-summer-of-code-mentors-list?hl=en.
the following patch was just integrated into master:
commit 6bfce95ce462ea42f08b20a846e07b4c37681b2c
Author: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org>
Date: Tue Feb 21 22:29:30 2012 +0100
asus/m4a785t-m: correct the CPU microcode patch selection
Thanks to ruik on #coreboot Freenode IRC channel for
explaining to me how to get the cpu revision:
Feb 21 22:07:32 <ruik> ruik@ruik:~/coreboot$ cpuid | grep ^00000001
Feb 21 22:07:32 <ruik> 00000001 00020f32 00020800 00000001 178bfbff
[..]
Feb 21 22:07:44 <ruik> the 20f32 is mine CPUID
The rest was just looking at the correspondance in
src/cpu/amd/model_10xxx/update_microcode.c
like Marc Jones explained(thanks Marc Jones) in the mailing list here:
http://www.coreboot.org/pipermail/coreboot/2012-February/068332.html
Change-Id: Ie0f004990e6b65456de009a4dcc306498bdb47e9
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo(a)no-log.org>
Build-Tested: build bot (Jenkins) at Tue Feb 21 23:49:42 2012, giving +1
Reviewed-By: Marc Jones <marcj303(a)gmail.com> at Tue Feb 21 23:02:04 2012, giving +2
See http://review.coreboot.org/669 for details.
-gerrit