cpu/x86: Make mp_get_apic_id() function externally available
This function returns APIC id for respective cpu core. BUG=b:74436746 BRANCH=none TEST=mp_get_apic_id() can be accessed in other files now. Change-Id: I5c5eda8325f941ab84d8a3fe0dae64be71c44855 Signed-off-by: Subrata Banik <subrata.banik@intel.com> Reviewed-on: https://review.coreboot.org/c/25620 Reviewed-by: Aamir Bohra <aamir.bohra@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
78c919bdc8
commit
befa72b208
|
@ -665,12 +665,12 @@ static void mp_initialize_cpu(void)
|
|||
}
|
||||
|
||||
/* Returns APIC id for coreboot CPU number or < 0 on failure. */
|
||||
static int mp_get_apic_id(int cpu_slot)
|
||||
int mp_get_apic_id(int logical_cpu)
|
||||
{
|
||||
if (cpu_slot >= CONFIG_MAX_CPUS || cpu_slot < 0)
|
||||
if (logical_cpu >= CONFIG_MAX_CPUS || logical_cpu < 0)
|
||||
return -1;
|
||||
|
||||
return cpus[cpu_slot].default_apic_id;
|
||||
return cpus[logical_cpu].default_apic_id;
|
||||
}
|
||||
|
||||
void smm_initiate_relocation_parallel(void)
|
||||
|
|
|
@ -145,6 +145,9 @@ int mp_run_on_all_cpus(void (*func)(void *), void *arg, long expire_us);
|
|||
*/
|
||||
int mp_park_aps(void);
|
||||
|
||||
/* Returns APIC id for coreboot CPU number or < 0 on failure. */
|
||||
int mp_get_apic_id(int logical_cpu);
|
||||
|
||||
/*
|
||||
* SMM helpers to use with initializing CPUs.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue