Aaron Durbin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/41355 )
Change subject: soc/{amd,intel}: remove soc specific directory from include path ......................................................................
soc/{amd,intel}: remove soc specific directory from include path
We shouldn't be providing -I include paths to the root of the soc specific directory. It allows for lazy includes that can collide, but there's no way of knowing the winning path since the winning path is determined by Makefile.inc parsing order.
Change-Id: I2dea1b7e01ea1d40686acd8f06fa8df193bf1769 Signed-off-by: Aaron Durbin adurbin@chromium.org --- M src/soc/amd/picasso/Makefile.inc A src/soc/amd/picasso/early_memmap.c M src/soc/amd/stoneyridge/Makefile.inc M src/soc/intel/braswell/Makefile.inc M src/soc/intel/cannonlake/Makefile.inc M src/soc/intel/icelake/Makefile.inc M src/soc/intel/jasperlake/Makefile.inc M src/soc/intel/quark/Makefile.inc M src/soc/intel/skylake/Makefile.inc M src/soc/intel/tigerlake/Makefile.inc 10 files changed, 77 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/41355/1
diff --git a/src/soc/amd/picasso/Makefile.inc b/src/soc/amd/picasso/Makefile.inc index 0e54661..e2765b6 100644 --- a/src/soc/amd/picasso/Makefile.inc +++ b/src/soc/amd/picasso/Makefile.inc @@ -69,7 +69,6 @@ smm-y += gpio.c smm-y += psp.c
-CPPFLAGS_common += -I$(src)/soc/amd/picasso CPPFLAGS_common += -I$(src)/soc/amd/picasso/include CPPFLAGS_common += -I$(src)/soc/amd/picasso/acpi CPPFLAGS_common += -I$(src)/vendorcode/amd/fsp/picasso diff --git a/src/soc/amd/picasso/early_memmap.c b/src/soc/amd/picasso/early_memmap.c new file mode 100644 index 0000000..b7de324 --- /dev/null +++ b/src/soc/amd/picasso/early_memmap.c @@ -0,0 +1,77 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* This file is part of the coreboot project. */ + +#include <console/console.h> +#include <imd.h> +#include <rules.h> + +static inline size_t early_mmap_imd_size(void) +{ + return CONFIG_EARLY_MEMMAP_SIZE; +} + +static inline void *early_mmap_imd_top(void) +{ + uintptr_t imd_base = (uintptr_t)CONFIG_EARLY_MEMMAP_BASE_ADDR; + + return (void *)(imd_base + early_mmap_imd_size()); +} + +static struct imd *get_imd(void) +{ + static struct imd gimd; + static struct imd *gimd_ptr; + + if (gimd_ptr) + return gimd_ptr; + + if (ENV_BOOTBLOCK) { + imd_handle_init(&gimd, early_mmap_imd_top()); + if (imd_create_emtpy(&gimd, 2*KiB, 2*KiB)) { + printk(BIOS_ERR, "Unable to create empty imd for early memmap.\n"); + return NULL; + } + if (imd_limit_size(&gimd, early_mmap_imd_size())) { + printk(BIOS_ERR, "Unable to limit early memmap size.\n"); + return NULL; + } + } else { + imd_handle_init(&gimd, early_mmap_imd_top()); + if (imd_recover(&gimd)) { + printk(BIOS_ERR, "Unable to recover early memmap.\n"); + return NULL; + } + } + + gimd_ptr = &gimd; + + return gimd_ptr; +} + +int early_memmap_reserved_memory(uintptr_t *base, size_t size) +{ + void *imd_base; + const struct imd *imd = get_imd(); + + *base = 0; + size = 0; + if (imd == NULL) + return -1; + + if (imd_region_used(imd, &imd_base, &size)) { + printk(BIOS_ERR, "Couldn't obtain early memmap usage.\n"); + return -1; + } + + *base = (uintptr_t)imd_base; + + return 0; +} + +enum early_memmap_entry { + EARLY_MEMMAP_BOOTBLOCK, + EARLY_MEMMAP_APOB, + EARLY_MEMMAP_VBOOT_WORKBUF, + EARLY_MEMMAP_ROMSTAGE, + EARLY_MEMMAP_FSP_M, +}; diff --git a/src/soc/amd/stoneyridge/Makefile.inc b/src/soc/amd/stoneyridge/Makefile.inc index 0d7b5d1..9bbbd0a 100644 --- a/src/soc/amd/stoneyridge/Makefile.inc +++ b/src/soc/amd/stoneyridge/Makefile.inc @@ -82,7 +82,6 @@ smm-y += gpio.c smm-y += psp.c
-CPPFLAGS_common += -I$(src)/soc/amd/stoneyridge CPPFLAGS_common += -I$(src)/soc/amd/stoneyridge/include CPPFLAGS_common += -I$(src)/soc/amd/stoneyridge/acpi
diff --git a/src/soc/intel/braswell/Makefile.inc b/src/soc/intel/braswell/Makefile.inc index 5923e39..c54a21d 100644 --- a/src/soc/intel/braswell/Makefile.inc +++ b/src/soc/intel/braswell/Makefile.inc @@ -62,7 +62,6 @@ verstage-y += pmutil.c verstage-y += tsc_freq.c
-CPPFLAGS_common += -I$(src)/soc/intel/braswell/ CPPFLAGS_common += -I$(src)/soc/intel/braswell/include CPPFLAGS_common += -I$(call strip_quotes,$(CONFIG_FSP_HEADER_PATH))
diff --git a/src/soc/intel/cannonlake/Makefile.inc b/src/soc/intel/cannonlake/Makefile.inc index e060581..fab15ee 100644 --- a/src/soc/intel/cannonlake/Makefile.inc +++ b/src/soc/intel/cannonlake/Makefile.inc @@ -115,7 +115,6 @@ endif endif
-CPPFLAGS_common += -I$(src)/soc/intel/cannonlake CPPFLAGS_common += -I$(src)/soc/intel/cannonlake/include
# DSP firmware settings files. diff --git a/src/soc/intel/icelake/Makefile.inc b/src/soc/intel/icelake/Makefile.inc index f30816e..fc48cdd 100644 --- a/src/soc/intel/icelake/Makefile.inc +++ b/src/soc/intel/icelake/Makefile.inc @@ -52,7 +52,6 @@ smm-y += smihandler.c smm-y += uart.c
-CPPFLAGS_common += -I$(src)/soc/intel/icelake CPPFLAGS_common += -I$(src)/soc/intel/icelake/include
endif diff --git a/src/soc/intel/jasperlake/Makefile.inc b/src/soc/intel/jasperlake/Makefile.inc index 4a65adc..4db137f 100644 --- a/src/soc/intel/jasperlake/Makefile.inc +++ b/src/soc/intel/jasperlake/Makefile.inc @@ -54,7 +54,6 @@
verstage-y += gpio.c
-CPPFLAGS_common += -I$(src)/soc/intel/jasperlake CPPFLAGS_common += -I$(src)/soc/intel/jasperlake/include
endif diff --git a/src/soc/intel/quark/Makefile.inc b/src/soc/intel/quark/Makefile.inc index b49ee3e..e41436b 100644 --- a/src/soc/intel/quark/Makefile.inc +++ b/src/soc/intel/quark/Makefile.inc @@ -53,7 +53,6 @@ ramstage-$(CONFIG_ENABLE_BUILTIN_HSUART1) += uart_common.c ramstage-$(CONFIG_ENABLE_BUILTIN_HSUART1) += uart.c
-CPPFLAGS_common += -I$(src)/soc/intel/quark CPPFLAGS_common += -I$(src)/soc/intel/quark/include CPPFLAGS_common += -I$(src)/soc/intel/quark/include/soc/fsp
diff --git a/src/soc/intel/skylake/Makefile.inc b/src/soc/intel/skylake/Makefile.inc index 75121ab..77f9a23 100644 --- a/src/soc/intel/skylake/Makefile.inc +++ b/src/soc/intel/skylake/Makefile.inc @@ -104,7 +104,6 @@ # Missing for Skylake C0 (0x406e2), Kabylake G0 (0x406e8), Kabylake HA0 (0x506e8) # since those are probably pre-release samples.
-CPPFLAGS_common += -I$(src)/soc/intel/skylake CPPFLAGS_common += -I$(src)/soc/intel/skylake/include
# Currently used for microcode path. diff --git a/src/soc/intel/tigerlake/Makefile.inc b/src/soc/intel/tigerlake/Makefile.inc index f62bfaf..12c7198 100644 --- a/src/soc/intel/tigerlake/Makefile.inc +++ b/src/soc/intel/tigerlake/Makefile.inc @@ -54,7 +54,6 @@
verstage-y += gpio.c
-CPPFLAGS_common += -I$(src)/soc/intel/tigerlake CPPFLAGS_common += -I$(src)/soc/intel/tigerlake/include
endif
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41355 )
Change subject: soc/{amd,intel}: remove soc specific directory from include path ......................................................................
Patch Set 1:
Seeing what will break.
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41355 )
Change subject: soc/{amd,intel}: remove soc specific directory from include path ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41355/1/src/soc/amd/picasso/early_m... File src/soc/amd/picasso/early_memmap.c:
https://review.coreboot.org/c/coreboot/+/41355/1/src/soc/amd/picasso/early_m... PS1, Line 30: if (imd_create_emtpy(&gimd, 2*KiB, 2*KiB)) { 'emtpy' may be misspelled - perhaps 'empty'?
Hello Patrick Georgi, Martin Roth, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/41355
to look at the new patch set (#2).
Change subject: soc/{amd,intel}: remove soc specific directory from include path ......................................................................
soc/{amd,intel}: remove soc specific directory from include path
We shouldn't be providing -I include paths to the root of the soc specific directory. It allows for lazy includes that can collide, but there's no way of knowing the winning path since the winning path is determined by Makefile.inc parsing order.
Change-Id: I2dea1b7e01ea1d40686acd8f06fa8df193bf1769 Signed-off-by: Aaron Durbin adurbin@chromium.org --- M src/soc/amd/picasso/Makefile.inc M src/soc/amd/stoneyridge/Makefile.inc M src/soc/intel/braswell/Makefile.inc M src/soc/intel/cannonlake/Makefile.inc M src/soc/intel/icelake/Makefile.inc M src/soc/intel/jasperlake/Makefile.inc M src/soc/intel/quark/Makefile.inc M src/soc/intel/skylake/Makefile.inc M src/soc/intel/tigerlake/Makefile.inc 9 files changed, 0 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/41355/2
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/41355
to look at the new patch set (#3).
Change subject: soc/{amd,intel}: remove soc specific directory from include path ......................................................................
soc/{amd,intel}: remove soc specific directory from include path
We shouldn't be providing -I include paths to the root of the soc specific directory. It allows for lazy includes that can collide, but there's no way of knowing the winning path since the winning path is determined by Makefile.inc parsing order.
Change-Id: I2dea1b7e01ea1d40686acd8f06fa8df193bf1769 Signed-off-by: Aaron Durbin adurbin@chromium.org --- M src/mainboard/amd/gardenia/OemCustomize.c M src/mainboard/amd/padmelon/OemCustomize.c M src/mainboard/facebook/fbg1701/romstage.c M src/mainboard/google/fizz/mainboard.c M src/mainboard/google/hatch/variants/akemi/variant.c M src/mainboard/google/hatch/variants/duffy/mainboard.c M src/mainboard/google/hatch/variants/kaisa/mainboard.c M src/mainboard/google/hatch/variants/kindred/variant.c M src/mainboard/google/hatch/variants/puff/mainboard.c M src/mainboard/google/kahlee/OemCustomize.c M src/mainboard/google/kahlee/variants/baseboard/OemCustomize.c M src/mainboard/google/poppy/variants/atlas/mainboard.c M src/mainboard/google/poppy/variants/nami/mainboard.c M src/mainboard/google/poppy/variants/nautilus/mainboard.c M src/mainboard/google/poppy/variants/nocturne/mainboard.c M src/mainboard/portwell/m107/romstage.c M src/soc/amd/picasso/Makefile.inc M src/soc/amd/stoneyridge/Makefile.inc M src/soc/amd/stoneyridge/include/soc/southbridge.h M src/soc/intel/braswell/Makefile.inc M src/soc/intel/cannonlake/Makefile.inc M src/soc/intel/icelake/Makefile.inc M src/soc/intel/jasperlake/Makefile.inc M src/soc/intel/quark/Makefile.inc M src/soc/intel/skylake/Makefile.inc M src/soc/intel/skylake/romstage/systemagent.c M src/soc/intel/tigerlake/Makefile.inc M src/soc/intel/xeon_sp/lpc.c 28 files changed, 25 insertions(+), 28 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/41355/3
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41355 )
Change subject: soc/{amd,intel}: remove soc specific directory from include path ......................................................................
Patch Set 3: Code-Review+2
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41355 )
Change subject: soc/{amd,intel}: remove soc specific directory from include path ......................................................................
Patch Set 3:
src/mainboard/google/cyan/dsdt.asl:13:11: fatal error: acpi/platform.asl: No such file or directory #include <acpi/platform.asl> ^~~~~~~~~~~~~~~~~~~
acpi directory will kill us here. So we can fix up the includes in C files, but we can't remove the -I include path... hrmm.
Furquan Shaikh has removed a vote from this change. ( https://review.coreboot.org/c/coreboot/+/41355 )
Change subject: soc/{amd,intel}: remove soc specific directory from include path ......................................................................
Removed Code-Review+2 by Furquan Shaikh furquan@google.com
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41355 )
Change subject: soc/{amd,intel}: remove soc specific directory from include path ......................................................................
Patch Set 3:
Patch Set 3:
src/mainboard/google/cyan/dsdt.asl:13:11: fatal error: acpi/platform.asl: No such file or directory #include <acpi/platform.asl> ^~~~~~~~~~~~~~~~~~~
acpi directory will kill us here. So we can fix up the includes in C files, but we can't remove the -I include path... hrmm.
Looks like it might be majority braswell devices?
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41355 )
Change subject: soc/{amd,intel}: remove soc specific directory from include path ......................................................................
Patch Set 3:
Patch Set 3:
Patch Set 3:
src/mainboard/google/cyan/dsdt.asl:13:11: fatal error: acpi/platform.asl: No such file or directory #include <acpi/platform.asl> ^~~~~~~~~~~~~~~~~~~
acpi directory will kill us here. So we can fix up the includes in C files, but we can't remove the -I include path... hrmm.
Looks like it might be majority braswell devices?
Yeah. It looks like all braswell devices.
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41355 )
Change subject: soc/{amd,intel}: remove soc specific directory from include path ......................................................................
Patch Set 3:
Can we split this into a couple of patches? I think we should be able to get the AMD side in. I'd be willing to take that over if you want.
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41355 )
Change subject: soc/{amd,intel}: remove soc specific directory from include path ......................................................................
Patch Set 3:
Patch Set 3:
Can we split this into a couple of patches? I think we should be able to get the AMD side in. I'd be willing to take that over if you want.
I'm not planning on picking this up anytime soon. Feel free to do whatever, Martin.
Attention is currently required from: Angel Pons, Aaron Durbin. Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41355 )
Change subject: soc/{amd,intel}: remove soc specific directory from include path ......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS3: for the soc/amd specific part of this patch, i created the following patch train CB:60201
Martin L Roth has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/41355?usp=email )
Change subject: soc/{amd,intel}: remove soc specific directory from include path ......................................................................
Abandoned
This patch has not been touched in over 12 months. Anyone who wants to take over work on this patch, please feel free to restore it and do any work needed to get it merged. If you create a new patch based on this work, please credit the original author.