From 5a1f9a87cb2f6a3e0699f3d13db41c7da2963b88 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 7 Sep 2017 21:17:33 -0600 Subject: cpu/x86/mp_init: remove adjust_cpu_apic_entry() The original purpose of adjust_cpu_apic_entry() was to set up an APIC map. That map was effectively only used for mapping *default* APIC id to CPU number in the SMM handler. The normal AP startup path didn't need this mapping because it was whoever won the race got the next cpu number. Instead of statically calculating (and wrong) just initialize the default APIC id map when the APs come online. Once the APs are online the SMM handler is loaded and the mapping is utilized. Change-Id: Idff3b8cfc17aef0729d3193b4499116a013b7930 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/21452 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Subrata Banik Reviewed-by: Marshall Dawson --- src/soc/intel/braswell/cpu.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/soc/intel/braswell/cpu.c') diff --git a/src/soc/intel/braswell/cpu.c b/src/soc/intel/braswell/cpu.c index 96c823a537..a2bd180da5 100644 --- a/src/soc/intel/braswell/cpu.c +++ b/src/soc/intel/braswell/cpu.c @@ -161,12 +161,6 @@ static void get_smm_info(uintptr_t *perm_smbase, size_t *perm_smsize, *smm_save_state_size = sizeof(em64t100_smm_state_save_area_t); } -/* The APIC id space on Bay Trail is sparse. Each id is separated by 2. */ -static int adjust_apic_id(int index, int apic_id) -{ - return 2 * index; -} - static void get_microcode_info(const void **microcode, int *parallel) { const struct pattrs *pattrs = pattrs_get(); @@ -215,7 +209,6 @@ static const struct mp_ops mp_ops = { .get_cpu_count = get_cpu_count, .get_smm_info = get_smm_info, .get_microcode_info = get_microcode_info, - .adjust_cpu_apic_entry = adjust_apic_id, .pre_mp_smm_init = southcluster_smm_clear_state, .per_cpu_smm_trigger = per_cpu_smm_trigger, .relocation_handler = relocation_handler, -- cgit v1.2.3