diff options
author | Nico Huber <nico.h@gmx.de> | 2018-11-13 19:28:07 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-11-23 08:34:16 +0000 |
commit | d67edcae6e9d438f2e60f6b67d97a7d3f09cb18b (patch) | |
tree | 38d7fe7b769f4193ea3b4494dc7944b9718c678c /src/drivers/intel/fsp2_0 | |
parent | 3032d7677883eb726d14fcd85efae7a7c068259a (diff) |
soc/intel/common: Bring DISPLAY_MTRRS into the light
Initially, I wanted to move only the Kconfig DISPLAY_MTRRS into the
"Debug" menu. It turned out, though, that the code looks rather generic.
No need to hide it in soc/intel/.
To not bloat src/Kconfig up any further, start a new `Kconfig.debug`
hierarchy just for debug options.
If somebody wants to review the code if it's 100% generic, we could
even get rid of HAVE_DISPLAY_MTRRS.
Change-Id: Ibd0a64121bd6e4ab5d7fd835f3ac25d3f5011f24
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/29684
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/intel/fsp2_0')
-rw-r--r-- | src/drivers/intel/fsp2_0/debug.c | 22 | ||||
-rw-r--r-- | src/drivers/intel/fsp2_0/notify.c | 6 |
2 files changed, 8 insertions, 20 deletions
diff --git a/src/drivers/intel/fsp2_0/debug.c b/src/drivers/intel/fsp2_0/debug.c index 8f4dc1ea9b..d098772004 100644 --- a/src/drivers/intel/fsp2_0/debug.c +++ b/src/drivers/intel/fsp2_0/debug.c @@ -11,8 +11,8 @@ #include <console/console.h> #include <console/streams.h> +#include <cpu/x86/mtrr.h> #include <fsp/util.h> -#include <soc/intel/common/util.h> asmlinkage size_t fsp_write_line(uint8_t *buffer, size_t number_of_bytes) { @@ -28,9 +28,7 @@ void fsp_debug_before_memory_init(fsp_memory_init_fn memory_init, const FSPM_UPD *fspm_old_upd, const FSPM_UPD *fspm_new_upd) { - /* Display the MTRRs */ - if (IS_ENABLED(CONFIG_DISPLAY_MTRRS)) - soc_display_mtrrs(); + display_mtrrs(); /* Display the UPD values */ if (IS_ENABLED(CONFIG_DISPLAY_UPD_DATA)) @@ -62,9 +60,7 @@ void fsp_debug_after_memory_init(uint32_t status) if (IS_ENABLED(CONFIG_VERIFY_HOBS)) fsp_verify_memory_init_hobs(); - /* Display the MTRRs */ - if (IS_ENABLED(CONFIG_DISPLAY_MTRRS)) - soc_display_mtrrs(); + display_mtrrs(); } /*----------- @@ -75,9 +71,7 @@ void fsp_debug_before_silicon_init(fsp_silicon_init_fn silicon_init, const FSPS_UPD *fsps_old_upd, const FSPS_UPD *fsps_new_upd) { - /* Display the MTRRs */ - if (IS_ENABLED(CONFIG_DISPLAY_MTRRS)) - soc_display_mtrrs(); + display_mtrrs(); /* Display the UPD values */ if (IS_ENABLED(CONFIG_DISPLAY_UPD_DATA)) @@ -99,9 +93,7 @@ void fsp_debug_after_silicon_init(uint32_t status) if (IS_ENABLED(CONFIG_DISPLAY_HOBS)) fsp_display_hobs(); - /* Display the MTRRs */ - if (IS_ENABLED(CONFIG_DISPLAY_MTRRS)) - soc_display_mtrrs(); + display_mtrrs(); } /*----------- @@ -129,7 +121,5 @@ void fsp_debug_after_notify(uint32_t status) if (IS_ENABLED(CONFIG_DISPLAY_HOBS)) fsp_display_hobs(); - /* Display the MTRRs */ - if (IS_ENABLED(CONFIG_DISPLAY_MTRRS)) - soc_display_mtrrs(); + display_mtrrs(); } diff --git a/src/drivers/intel/fsp2_0/notify.c b/src/drivers/intel/fsp2_0/notify.c index c3a2804327..a5c7ef07da 100644 --- a/src/drivers/intel/fsp2_0/notify.c +++ b/src/drivers/intel/fsp2_0/notify.c @@ -12,8 +12,8 @@ #include <bootstate.h> #include <console/console.h> +#include <cpu/x86/mtrr.h> #include <fsp/util.h> -#include <soc/intel/common/util.h> #include <string.h> #include <timestamp.h> @@ -70,9 +70,7 @@ static void fsp_notify_dummy(void *arg) { enum fsp_notify_phase phase = (uint32_t)arg; - /* Display the MTRRs */ - if (IS_ENABLED(CONFIG_DISPLAY_MTRRS)) - soc_display_mtrrs(); + display_mtrrs(); fsp_notify(phase); if (phase == READY_TO_BOOT) |