cpu/x86/mp: pass pointers to structures for AP callbacks
commit223fb436fe89a265f4ddbe7f8fe38a35b47a8253
authorAaron Durbin <adurbin@chromium.org>
Thu, 3 May 2018 19:49:41 +0000 (3 13:49 -0600)
committerPatrick Georgi <pgeorgi@google.com>
Mon, 14 May 2018 08:39:18 +0000 (14 08:39 +0000)
treee4c4b0d95dadf15da2a8946ae50930c637d3f8c6
parente6cc21e262aec4846831dd1da57d34cc8fc9099f
cpu/x86/mp: pass pointers to structures for AP callbacks

In order to extend the MP callback infrastructure prepare for
easier changes by making the AP callback get signalled by a
single pointer to a local variable on the signaller's stack.
When the APs see the callback they will copy the structure
to a local variable and then set the acknowledgement by
clearing out the slot.

The reading and writing to the slots were implemented using inline
assembly which forces a memory access and a compiler barrier.

BUG=b:74436746

Change-Id: Ia46133a49c03ce3ce0e73ae3d30547316c7ec43c
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/26043
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
src/cpu/x86/mp_init.c