From 6dc53b485a60b66c7ac9361ab9eb1a52ad3ee1a6 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 24 Dec 2015 13:26:18 -0600 Subject: mainboard/asus/kgpe-d16: Enable romstage microcode spinlocks Change-Id: I93687efc5405359286d3197f0e59ec3b118c5100 Signed-off-by: Timothy Pearson Reviewed-on: https://review.coreboot.org/12809 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Tested-by: Raptor Engineering Automated Test Stand Reviewed-by: Martin Roth --- src/mainboard/asus/kgpe-d16/Kconfig | 1 + src/mainboard/asus/kgpe-d16/romstage.c | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'src/mainboard/asus') diff --git a/src/mainboard/asus/kgpe-d16/Kconfig b/src/mainboard/asus/kgpe-d16/Kconfig index 49dd37b7fa..f394ca9c7a 100644 --- a/src/mainboard/asus/kgpe-d16/Kconfig +++ b/src/mainboard/asus/kgpe-d16/Kconfig @@ -16,6 +16,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy select PARALLEL_CPU_INIT select HAVE_ROMSTAGE_CONSOLE_SPINLOCK select HAVE_ROMSTAGE_NVRAM_CBFS_SPINLOCK + select HAVE_ROMSTAGE_MICROCODE_CBFS_SPINLOCK select HAVE_HARD_RESET select HAVE_OPTION_TABLE select HAVE_CMOS_DEFAULT diff --git a/src/mainboard/asus/kgpe-d16/romstage.c b/src/mainboard/asus/kgpe-d16/romstage.c index f9af195729..09de4b59c9 100644 --- a/src/mainboard/asus/kgpe-d16/romstage.c +++ b/src/mainboard/asus/kgpe-d16/romstage.c @@ -336,6 +336,18 @@ void initialize_romstage_nvram_cbfs_lock(void) car_get_var(nvram_cbfs_spinlock) = SPIN_LOCK_UNLOCKED; } +static spinlock_t microcode_cbfs_spinlock CAR_GLOBAL; + +spinlock_t* romstage_microcode_cbfs_lock(void) +{ + return car_get_var_ptr(µcode_cbfs_spinlock); +} + +void initialize_romstage_microcode_cbfs_lock(void) +{ + car_get_var(microcode_cbfs_spinlock) = SPIN_LOCK_UNLOCKED; +} + void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx) { uint32_t esp; @@ -362,9 +374,10 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx) timestamp_init(timestamp_get()); timestamp_add_now(TS_START_ROMSTAGE); - /* Initialize the printk and nvram CBFS spinlocks */ + /* Initialize the printk, nvram CBFS, and microcode CBFS spinlocks */ initialize_romstage_console_lock(); initialize_romstage_nvram_cbfs_lock(); + initialize_romstage_microcode_cbfs_lock(); /* Nothing special needs to be done to find bus 0 */ /* Allow the HT devices to be found */ -- cgit v1.2.3