summaryrefslogtreecommitdiff
path: root/src/cpu/amd
diff options
context:
space:
mode:
authorPaul Menzel <pmenzel@molgen.mpg.de>2019-01-11 11:34:54 +0100
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-01-11 14:33:39 +0000
commite0368b434e63fc687f0f6b6709e41159bbc2e877 (patch)
tree1dbb9c59c77e3b51ce5e915fb59257edc28fc14b /src/cpu/amd
parentda8c12b54f431c544b173b98c7df8772fd63c6d7 (diff)
downloadcoreboot-e0368b434e63fc687f0f6b6709e41159bbc2e877.tar.xz
Revert "cpu/amd: Use `get_option()`"
This reverts commit 6fffd70435084fb1d3237fcb1a11f11849721e8f. Doing more tests on the Asus KGPE-D16, it seems to cause a reboot loop quite often. Therefore, revert the commit. The problem might be caused by the spinlocks used by `get_option()`, and which are not used by `read_option()`. Change-Id: Ic25129aa71c8e8e40a65bb2658de78005766fea8 Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> Reviewed-on: https://review.coreboot.org/c/30830 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/cpu/amd')
-rw-r--r--src/cpu/amd/family_10h-family_15h/init_cpus.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/cpu/amd/family_10h-family_15h/init_cpus.c b/src/cpu/amd/family_10h-family_15h/init_cpus.c
index b8e11e4ccc..2ddbc43ee6 100644
--- a/src/cpu/amd/family_10h-family_15h/init_cpus.c
+++ b/src/cpu/amd/family_10h-family_15h/init_cpus.c
@@ -147,9 +147,6 @@ static void for_each_ap(uint32_t bsp_apicid, uint32_t core_range, int8_t node,
// here assume the OS don't change our apicid
u32 ap_apicid;
- u8 nvram;
- bool multicore;
-
u32 nodes;
u32 disable_siblings;
u32 cores_found;
@@ -158,13 +155,12 @@ static void for_each_ap(uint32_t bsp_apicid, uint32_t core_range, int8_t node,
/* get_nodes define in ht_wrapper.c */
nodes = get_nodes();
- multicore = true;
- if (get_option(&nvram, "multi_core") == CB_SUCCESS)
- multicore = !!nvram;
-
- disable_siblings = 0;
- if (!IS_ENABLED(CONFIG_LOGICAL_CPUS) || !multicore)
+ if (!IS_ENABLED(CONFIG_LOGICAL_CPUS) ||
+ read_option(multi_core, 0) != 0) { // 0 means multi core
disable_siblings = 1;
+ } else {
+ disable_siblings = 0;
+ }
for (i = 0; i < nodes; i++) {
if ((node >= 0) && (i != node))
@@ -639,17 +635,11 @@ static void setup_remote_node(u8 node)
//it is running on core0 of node0
void start_other_cores(uint32_t bsp_apicid)
{
- u8 nvram;
u32 nodes;
u32 nodeid;
- bool multicore;
// disable multi_core
- multicore = true;
- if (get_option(&nvram, "multi_core") == CB_SUCCESS)
- multicore = !!nvram;
-
- if (!multicore) {
+ if (read_option(multi_core, 0) != 0) {
printk(BIOS_DEBUG, "Skip additional core init\n");
return;
}