Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47761 )
Change subject: drivers/fsp/fsp2_0: Use more direct includes ......................................................................
drivers/fsp/fsp2_0: Use more direct includes
* Forwared declare structs in fsp/util.h * Include the correct header files in source files directly * Stop including everything in fsp/util.h and fsp/debug.h * This reduces the used headers to prevent conflicts with non FSP header files included in the following patch
Change-Id: I8668608a6867876268b08cbd6d9eeafd9cd35687 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/intel/fsp2_0/debug.c M src/drivers/intel/fsp2_0/hand_off_block.c M src/drivers/intel/fsp2_0/hob_display.c M src/drivers/intel/fsp2_0/hob_verify.c M src/drivers/intel/fsp2_0/include/fsp/api.h M src/drivers/intel/fsp2_0/include/fsp/debug.h M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/memory_init.c M src/drivers/intel/fsp2_0/notify.c M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/fsp2_0/util.c M src/soc/intel/apollolake/meminit.c 12 files changed, 21 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/47761/1
diff --git a/src/drivers/intel/fsp2_0/debug.c b/src/drivers/intel/fsp2_0/debug.c index 3d66587..650e648 100644 --- a/src/drivers/intel/fsp2_0/debug.c +++ b/src/drivers/intel/fsp2_0/debug.c @@ -3,7 +3,7 @@ #include <console/console.h> #include <console/streams.h> #include <cpu/x86/mtrr.h> -#include <fsp/util.h> +#include <fsp/debug.h>
asmlinkage size_t fsp_write_line(uint8_t *buffer, size_t number_of_bytes) { diff --git a/src/drivers/intel/fsp2_0/hand_off_block.c b/src/drivers/intel/fsp2_0/hand_off_block.c index 60ab7cb..9d29f4e 100644 --- a/src/drivers/intel/fsp2_0/hand_off_block.c +++ b/src/drivers/intel/fsp2_0/hand_off_block.c @@ -6,6 +6,7 @@ #include <console/console.h> #include <fsp/api.h> #include <fsp/util.h> +#include <fsp/debug.h> #include <stdint.h> #include <string.h>
diff --git a/src/drivers/intel/fsp2_0/hob_display.c b/src/drivers/intel/fsp2_0/hob_display.c index f21ebfe..1529148 100644 --- a/src/drivers/intel/fsp2_0/hob_display.c +++ b/src/drivers/intel/fsp2_0/hob_display.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
#include <console/console.h> -#include <fsp/util.h> +#include <fsp/debug.h>
struct hob_type_name { uint16_t type; diff --git a/src/drivers/intel/fsp2_0/hob_verify.c b/src/drivers/intel/fsp2_0/hob_verify.c index 9bfb0f1..28b45af 100644 --- a/src/drivers/intel/fsp2_0/hob_verify.c +++ b/src/drivers/intel/fsp2_0/hob_verify.c @@ -2,7 +2,7 @@
#include <cbmem.h> #include <console/console.h> -#include <fsp/util.h> +#include <fsp/debug.h>
void fsp_verify_memory_init_hobs(void) { diff --git a/src/drivers/intel/fsp2_0/include/fsp/api.h b/src/drivers/intel/fsp2_0/include/fsp/api.h index 97e2fea..3c2978c 100644 --- a/src/drivers/intel/fsp2_0/include/fsp/api.h +++ b/src/drivers/intel/fsp2_0/include/fsp/api.h @@ -31,6 +31,10 @@ END_OF_FIRMWARE = 0xF0 };
+struct fsp_notify_params { + enum fsp_notify_phase phase; +}; + /* Main FSP stages */ void fsp_memory_init(bool s3wake); void fsp_silicon_init(bool s3wake); diff --git a/src/drivers/intel/fsp2_0/include/fsp/debug.h b/src/drivers/intel/fsp2_0/include/fsp/debug.h index e3d1918..5afaec3 100644 --- a/src/drivers/intel/fsp2_0/include/fsp/debug.h +++ b/src/drivers/intel/fsp2_0/include/fsp/debug.h @@ -3,7 +3,9 @@ #ifndef _FSP2_0_DEBUG_H_ #define _FSP2_0_DEBUG_H_
+#include <fsp/api.h> #include <fsp/util.h> +#include <fsp/info_header.h>
/* FSP debug API */ void fsp_debug_before_memory_init(fsp_memory_init_fn memory_init, diff --git a/src/drivers/intel/fsp2_0/include/fsp/util.h b/src/drivers/intel/fsp2_0/include/fsp/util.h index a57b1bb..077f9cd 100644 --- a/src/drivers/intel/fsp2_0/include/fsp/util.h +++ b/src/drivers/intel/fsp2_0/include/fsp/util.h @@ -6,8 +6,6 @@ #include <boot/coreboot_tables.h> #include <commonlib/region.h> #include <arch/cpu.h> -#include <fsp/api.h> -#include <fsp/info_header.h> #include <memrange.h> #include <program_loading.h> #include <types.h> @@ -19,10 +17,6 @@ uint16_t length; } __packed;
-struct fsp_notify_params { - enum fsp_notify_phase phase; -}; - enum fsp_multi_phase_action { GET_NUMBER_OF_PHASES = 0, EXECUTE_PHASE = 1 @@ -91,6 +85,7 @@ void lb_string_platform_blob_version(struct lb_header *header); void report_fspt_output(void);
+struct fsp_header; /* Fill in header and validate sanity of component within region device. */ enum cb_err fsp_validate_component(struct fsp_header *hdr, const struct region_device *rdev); @@ -131,7 +126,6 @@ (void *raminit_upd, void **hob_list); typedef asmlinkage uint32_t (*fsp_silicon_init_fn)(void *silicon_upd); typedef asmlinkage uint32_t (*fsp_multi_phase_si_init_fn)(struct fsp_multi_phase_params *); +struct fsp_notify_params; typedef asmlinkage uint32_t (*fsp_notify_fn)(struct fsp_notify_params *); -#include <fsp/debug.h> - #endif /* _FSP2_0_UTIL_H_ */ diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c index 68cc121..3542c8b 100644 --- a/src/drivers/intel/fsp2_0/memory_init.c +++ b/src/drivers/intel/fsp2_0/memory_init.c @@ -11,6 +11,7 @@ #include <elog.h> #include <fsp/api.h> #include <fsp/util.h> +#include <fsp/debug.h> #include <memrange.h> #include <mrc_cache.h> #include <program_loading.h> diff --git a/src/drivers/intel/fsp2_0/notify.c b/src/drivers/intel/fsp2_0/notify.c index 76cdf12..3632fca 100644 --- a/src/drivers/intel/fsp2_0/notify.c +++ b/src/drivers/intel/fsp2_0/notify.c @@ -3,6 +3,9 @@ #include <bootstate.h> #include <console/console.h> #include <cpu/x86/mtrr.h> +#include <fsp/api.h> +#include <fsp/info_header.h> +#include <fsp/debug.h> #include <fsp/util.h> #include <timestamp.h>
diff --git a/src/drivers/intel/fsp2_0/silicon_init.c b/src/drivers/intel/fsp2_0/silicon_init.c index 0b6540e..a9b39c0 100644 --- a/src/drivers/intel/fsp2_0/silicon_init.c +++ b/src/drivers/intel/fsp2_0/silicon_init.c @@ -6,6 +6,7 @@ #include <commonlib/stdlib.h> #include <console/console.h> #include <fsp/api.h> +#include <fsp/debug.h> #include <fsp/util.h> #include <program_loading.h> #include <soc/intel/common/vbt.h> diff --git a/src/drivers/intel/fsp2_0/util.c b/src/drivers/intel/fsp2_0/util.c index acc3f4b..3a980be 100644 --- a/src/drivers/intel/fsp2_0/util.c +++ b/src/drivers/intel/fsp2_0/util.c @@ -7,7 +7,10 @@ #include <commonlib/bsd/compression.h> #include <commonlib/fsp.h> #include <console/console.h> +#include <fsp/api.h> #include <fsp/util.h> +#include <fsp/info_header.h> +#include <fsp/debug.h> #include <string.h> #include <types.h>
diff --git a/src/soc/intel/apollolake/meminit.c b/src/soc/intel/apollolake/meminit.c index 8601571..6d969b2 100644 --- a/src/soc/intel/apollolake/meminit.c +++ b/src/soc/intel/apollolake/meminit.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <console/console.h> +#include <fsp/api.h> #include <fsp/util.h> #include <memory_info.h> #include <soc/meminit.h>
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47761 )
Change subject: drivers/fsp/fsp2_0: Use more direct includes ......................................................................
Patch Set 1: Code-Review+1
(2 comments)
https://review.coreboot.org/c/coreboot/+/47761/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47761/1//COMMIT_MSG@9 PS1, Line 9: Forwared Forward
https://review.coreboot.org/c/coreboot/+/47761/1/src/drivers/intel/fsp2_0/in... File src/drivers/intel/fsp2_0/include/fsp/api.h:
https://review.coreboot.org/c/coreboot/+/47761/1/src/drivers/intel/fsp2_0/in... PS1, Line 34: struct fsp_notify_params { Why move this one but not the rest?
Hello build bot (Jenkins), Angel Pons, Andrey Petrov, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47761
to look at the new patch set (#2).
Change subject: drivers/fsp/fsp2_0: Use more direct includes ......................................................................
drivers/fsp/fsp2_0: Use more direct includes
* Forwared declare structs in fsp/util.h * Include the correct header files in source files directly * Stop including everything in fsp/util.h and fsp/debug.h * This reduces the used headers to prevent conflicts with non FSP header files included in the following patch
Change-Id: I8668608a6867876268b08cbd6d9eeafd9cd35687 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/intel/fsp2_0/debug.c M src/drivers/intel/fsp2_0/hand_off_block.c M src/drivers/intel/fsp2_0/hob_display.c M src/drivers/intel/fsp2_0/hob_verify.c M src/drivers/intel/fsp2_0/include/fsp/api.h M src/drivers/intel/fsp2_0/include/fsp/debug.h M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/memory_init.c M src/drivers/intel/fsp2_0/notify.c M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/fsp2_0/temp_ram_exit.c M src/drivers/intel/fsp2_0/util.c M src/mainboard/intel/harcuvar/hsio.h M src/soc/amd/picasso/dmi.c M src/soc/intel/apollolake/meminit.c M src/soc/intel/quark/chip.h M src/soc/intel/xeon_sp/cpx/include/soc/soc_util.h 17 files changed, 26 insertions(+), 13 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/47761/2
Hello build bot (Jenkins), David Guckian, Vanessa Eusebio, Angel Pons, Andrey Petrov, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47761
to look at the new patch set (#3).
Change subject: drivers/fsp/fsp2_0: Use more direct includes ......................................................................
drivers/fsp/fsp2_0: Use more direct includes
* Forwared declare structs in fsp/util.h * Include the correct header files in source files directly * Stop including everything in fsp/util.h and fsp/debug.h * This reduces the used headers to prevent conflicts with non FSP header files included in the following patch
Change-Id: I8668608a6867876268b08cbd6d9eeafd9cd35687 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/intel/fsp2_0/debug.c M src/drivers/intel/fsp2_0/hand_off_block.c M src/drivers/intel/fsp2_0/hob_display.c M src/drivers/intel/fsp2_0/hob_verify.c M src/drivers/intel/fsp2_0/include/fsp/api.h M src/drivers/intel/fsp2_0/include/fsp/debug.h M src/drivers/intel/fsp2_0/include/fsp/util.h M src/drivers/intel/fsp2_0/memory_init.c M src/drivers/intel/fsp2_0/notify.c M src/drivers/intel/fsp2_0/silicon_init.c M src/drivers/intel/fsp2_0/temp_ram_exit.c M src/drivers/intel/fsp2_0/util.c M src/mainboard/intel/harcuvar/hsio.h M src/mainboard/ocp/deltalake/ramstage.c M src/soc/amd/picasso/dmi.c M src/soc/amd/picasso/root_complex.c M src/soc/intel/apollolake/meminit.c M src/soc/intel/denverton_ns/include/soc/fiamux.h M src/soc/intel/quark/chip.h M src/soc/intel/quark/romstage/fsp_params.c M src/soc/intel/xeon_sp/cpx/hob_display.c M src/soc/intel/xeon_sp/cpx/include/soc/soc_util.h M src/soc/intel/xeon_sp/include/soc/util.h M src/soc/intel/xeon_sp/skx/include/soc/pci_devs.h M src/soc/intel/xeon_sp/skx/include/soc/soc_util.h M src/soc/intel/xeon_sp/skx/soc_util.c 26 files changed, 35 insertions(+), 15 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/47761/3
Patrick Rudolph has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/47761 )
Change subject: drivers/fsp/fsp2_0: Use more direct includes ......................................................................
Abandoned
no no no NO NOOOOO!