coreboot-kgpe-d16/src/soc/intel/broadwell
Julius Werner 01f9aa5e54 Consolidate reset API, add generic reset_prepare mechanism
There are many good reasons why we may want to run some sort of generic
callback before we're executing a reset. Unfortunateley, that is really
hard right now: code that wants to reset simply calls the hard_reset()
function (or one of its ill-differentiated cousins) which is directly
implemented by a myriad of different mainboards, northbridges, SoCs,
etc. More recent x86 SoCs have tried to solve the problem in their own
little corner of soc/intel/common, but it's really something that would
benefit all of coreboot.

This patch expands the concept onto all boards: hard_reset() and friends
get implemented in a generic location where they can run hooks before
calling the platform-specific implementation that is now called
do_hard_reset(). The existing Intel reset_prepare() gets generalized as
soc_reset_prepare() (and other hooks for arch, mainboard, etc. can now
easily be added later if necessary). We will also use this central point
to ensure all platforms flush their cache before reset, which is
generally useful for all cases where we're trying to persist information
in RAM across reboots (like the new persistent CBMEM console does).

Also remove cpu_reset() completely since it's not used anywhere and
doesn't seem very useful compared to the others.

Change-Id: I41b89ce4a923102f0748922496e1dd9bce8a610f
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/19789
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-06-13 20:53:09 +02:00
..
acpi src: change coreboot to lowercase 2017-06-07 12:09:15 +02:00
bootblock soc/intel: Unify timestamp.inc 2017-04-25 18:47:35 +02:00
include/soc src: change coreboot to lowercase 2017-06-07 12:09:15 +02:00
romstage Use more secure HTTPS URLs for coreboot sites 2017-06-07 12:04:50 +02:00
acpi.c soc/intel/broadwell: Fix spacing issues detected by checkpatch 2017-03-17 18:03:36 +01:00
adsp.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
chip.c soc/intel/broadwell: Add int to unsigned 2017-03-17 18:03:59 +01:00
chip.h Broadwell/Sata: Add support for setting IOBP registers for Ports 2 and 3. 2017-02-22 22:24:50 +01:00
cpu.c soc/intel/broadwell: Fix {}, () and conditional issues 2017-03-17 19:21:35 +01:00
cpu_info.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
ehci.c soc/intel/broadwell: Add int to unsigned 2017-03-17 18:03:59 +01:00
elog.c soc/intel/broadwell: use common Intel ACPI hardware definitions 2016-07-15 08:32:49 +02:00
finalize.c broadwell: Fix CONFIG_SPI_CONSOLE usage 2015-12-27 17:42:46 +01:00
gpio.c soc/intel/broadwell: Add int to unsigned 2017-03-17 18:03:59 +01:00
hda.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
igd.c soc/intel/broadwell: Fix {}, () and conditional issues 2017-03-17 19:21:35 +01:00
iobp.c soc/intel/broadwell: Add int to unsigned 2017-03-17 18:03:59 +01:00
Kconfig soc/broadwell: Allow disabling of PCIe ASPM options 2017-06-09 16:59:41 +02:00
lpc.c soc/intel/broadwell: Fix other issues detected by checkpatch 2017-03-17 19:21:53 +01:00
Makefile.inc cpu/intel/common: Add/Use common function to set virtualization 2016-12-27 02:30:08 +01:00
me.c soc/intel/broadwell: Fix other issues detected by checkpatch 2017-03-17 19:21:53 +01:00
me_status.c broadwell/me: Fix out-of-bounds array access error 2016-05-04 16:33:24 +02:00
memmap.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
minihd.c soc/broadwell: set EM4/EM5 registers based on cdclk 2016-12-07 23:54:14 +01:00
monotonic_timer.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
pch.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
pcie.c soc/intel/broadwell: Fix other issues detected by checkpatch 2017-03-17 19:21:53 +01:00
pei_data.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
pmutil.c soc/intel/broadwell: Fix spacing issues detected by checkpatch 2017-03-17 18:03:36 +01:00
ramstage.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
refcode.c soc/intel/broadwell: Fix {}, () and conditional issues 2017-03-17 19:21:35 +01:00
reset.c Consolidate reset API, add generic reset_prepare mechanism 2017-06-13 20:53:09 +02:00
sata.c intel/broadwell: Use the correct SATA port config for setting IOBP register 2017-03-02 09:21:55 +01:00
serialio.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
smbus.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
smbus_common.c soc/intel/broadwell: Fix {}, () and conditional issues 2017-03-17 19:21:35 +01:00
smi.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
smihandler.c soc/intel/broadwell: Fix other issues detected by checkpatch 2017-03-17 19:21:53 +01:00
smmrelocate.c soc/intel/broadwell: Fix other issues detected by checkpatch 2017-03-17 19:21:53 +01:00
spi.c soc/intel: Move spi driver to use spi_bus_map 2017-05-24 04:41:21 +02:00
stage_cache.c src/soc: Capitalize CPU, ACPI, RAM and ROM 2016-07-31 19:27:53 +02:00
systemagent.c soc/intel/broadwell: Fix {}, () and conditional issues 2017-03-17 19:21:35 +01:00
tsc_freq.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
usb_debug.c soc/intel/broadwell: Add back support for EHCI debug setup 2015-12-27 17:45:06 +01:00
xhci.c soc/intel/broadwell: use common Intel ACPI hardware definitions 2016-07-15 08:32:49 +02:00