[coreboot-gerrit] New patch to review for coreboot: WIP: Wait for `start_cpu_lock` before updating APs microcode
Nico Huber (nico.h@gmx.de)
gerrit at coreboot.org
Thu Oct 29 17:14:44 CET 2015
Nico Huber (nico.h at gmx.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12254
-gerrit
commit e6a9853eb26bc9e8a686a5f76843f7f16df8837a
Author: Nico Huber <nico.huber at secunet.com>
Date: Thu Oct 29 17:11:38 2015 +0100
WIP: Wait for `start_cpu_lock` before updating APs microcode
Change-Id: Idf23505e052fcfc40dccb244e35447d8762012f5
Signed-off-by: Nico Huber <nico.huber at secunet.com>
---
src/cpu/intel/model_206ax/model_206ax_init.c | 4 ++++
src/cpu/x86/lapic/lapic_cpu_init.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/cpu/intel/model_206ax/model_206ax_init.c b/src/cpu/intel/model_206ax/model_206ax_init.c
index 922eb49..c0ed89d 100644
--- a/src/cpu/intel/model_206ax/model_206ax_init.c
+++ b/src/cpu/intel/model_206ax/model_206ax_init.c
@@ -32,6 +32,7 @@
#include <cpu/intel/turbo.h>
#include <cpu/x86/cache.h>
#include <cpu/x86/name.h>
+#include <smp/spinlock.h>
#include <pc80/mc146818rtc.h>
#include "model_206ax.h"
#include "chip.h"
@@ -553,6 +554,8 @@ static void intel_cores_init(struct device *cpu)
}
}
+extern spinlock_t start_cpu_lock;
+
static void model_206ax_init(struct device *cpu)
{
char processor_name[49];
@@ -561,6 +564,7 @@ static void model_206ax_init(struct device *cpu)
/* Turn on caching if we haven't already */
x86_enable_cache();
+ spin_unlock_wait(&start_cpu_lock);
intel_update_microcode_from_cbfs();
/* Clear out pending MCEs */
diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c
index 7fedd00..5749e13 100644
--- a/src/cpu/x86/lapic/lapic_cpu_init.c
+++ b/src/cpu/x86/lapic/lapic_cpu_init.c
@@ -247,7 +247,7 @@ static atomic_t active_cpus = ATOMIC_INIT(1);
* start_cpu returns.
*/
-static spinlock_t start_cpu_lock = SPIN_LOCK_UNLOCKED;
+spinlock_t start_cpu_lock = SPIN_LOCK_UNLOCKED;
static unsigned int last_cpu_index = 0;
static void *stacks[CONFIG_MAX_CPUS];
volatile unsigned long secondary_stack;
More information about the coreboot-gerrit
mailing list