Hello Raul Rangel, Felix Held,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/42531
to review the following change.
Change subject: soc/amd/picasso: Set BERT_SIZE to 0 when no table generated
......................................................................
soc/amd/picasso: Set BERT_SIZE to 0 when no table generated
BUG=b:136987699
TEST=Verify no region reserved when CONFIG_ACPI_BERT=n
Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Change-Id: I95d511e454e7f2998e46e14112eea5e8b09d59b6
---
M src/soc/amd/picasso/Kconfig
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/42531/1
diff --git a/src/soc/amd/picasso/Kconfig b/src/soc/amd/picasso/Kconfig
index dd5731d..40e3c90 100644
--- a/src/soc/amd/picasso/Kconfig
+++ b/src/soc/amd/picasso/Kconfig
@@ -331,7 +331,8 @@
config ACPI_BERT_SIZE
hex
- default 0x4000
+ default 0x4000 if ACPI_BERT
+ default 0x0
help
Specify the amount of DRAM reserved for gathering the data used to
generate the ACPI table.
--
To view, visit https://review.coreboot.org/c/coreboot/+/42531
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I95d511e454e7f2998e46e14112eea5e8b09d59b6
Gerrit-Change-Number: 42531
Gerrit-PatchSet: 1
Gerrit-Owner: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-MessageType: newchange
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41816 )
Change subject: soc/amd/picasso: add psp_verstage
......................................................................
Patch Set 7:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41816/7/src/soc/amd/picasso/psp_ve…
File src/soc/amd/picasso/psp_verstage/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/41816/7/src/soc/amd/picasso/psp_ve…
PS7, Line 5: CPPFLAGS_verstage += -I$(src)/soc/amd/picasso/psp_verstage/include
> Exactly, and the same for io.h. […]
Why are you replacing arch/mmio.h at all? Looks like your versions aren't doing anything fundamentally different, they're just removing the dmb()s and the __builtin_assume_aligned(). The dmb()s are there so that programmers don't need to explicitly put memory barriers in their hardware access code (this roughly matches Linux behavior of readl()/writel() type functions). While that could be done differently (I've thought about this a couple of times but never enough to do anything) to save some instructions where this isn't necessary, that would be something that should be done at the whole architecture level, not one individual SoC (e.g. we'd probably introduce separate write8_relaxed() calls like Linux has them for people who explicitly know they don't need barriers). Right now the global assumption is that MMIO accessors are implicitly ordered against each other and SoCs shouldn't individually break that.
The __builtin_assume_aligned() was there because some specific compiler version would otherwise sometimes generate LDRB instead of LDR instructions in certain specific inlining edge cases. This just fixes that rare bug, but in most cases it has no effect.
(I don't think you should rely on include order magic if possible, so at least getting rid of arch/mmio.h would be good. arch/io.h doesn't seem as bad because at least there's no other version of that under arch/arm, although an SoC providing an arch/ header is still kinda weird.)
--
To view, visit https://review.coreboot.org/c/coreboot/+/41816
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia58839caa5bfbae0408702ee8d02ef482f2861c4
Gerrit-Change-Number: 41816
Gerrit-PatchSet: 7
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Eric Peers <epeers(a)google.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-CC: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Mon, 22 Jun 2020 20:34:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Martin Roth <martinroth(a)google.com>
Comment-In-Reply-To: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-MessageType: comment
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41816 )
Change subject: soc/amd/picasso: add psp_verstage
......................................................................
Patch Set 7:
(2 comments)
https://review.coreboot.org/c/coreboot/+/41816/7/src/soc/amd/picasso/memlay…
File src/soc/amd/picasso/memlayout.ld:
https://review.coreboot.org/c/coreboot/+/41816/7/src/soc/amd/picasso/memlay…
PS7, Line 3: #if ENV_SEPARATE_VERSTAGE && CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)
> I had done it based on ENV_X86/ENV_ARM here: https://chromium.googlesource. […]
Sounds good. I definitely like that option better.
https://review.coreboot.org/c/coreboot/+/41816/7/src/soc/amd/picasso/psp_ve…
File src/soc/amd/picasso/psp_verstage/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/41816/7/src/soc/amd/picasso/psp_ve…
PS7, Line 5: CPPFLAGS_verstage += -I$(src)/soc/amd/picasso/psp_verstage/include
> Are there now two candidates for <arch/mmio. […]
Exactly, and the same for io.h. The other way I saw to do this cleanly was to put them in the ARMv7 code, which didn't seem to make sense since it's only used in the one place.
This is safe (until the makefiles gets refactored) as the other include path gets added to verstage-generic-ccopts which gets evaluated after CPPFLAGS_verstage by create_cc_template in the top level Makefile.
$(CC_$(1)) \
-MMD $$$$(CPPFLAGS_$(1)) $$$$(CFLAGS_$(1)) -MT $$$$(@) \
$(3) -c -o $$$$@ $$$$<
verstage-generic-ccopts is the '$(3)' here.
I'll add a comment as to why this is getting added to CPPFLAGS_verstage instead of verstage-generic-ccopts. The other 2 include paths can be added to whichever, so I just added them to the same variable, but could switch them if that's the preference.
--
To view, visit https://review.coreboot.org/c/coreboot/+/41816
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia58839caa5bfbae0408702ee8d02ef482f2861c4
Gerrit-Change-Number: 41816
Gerrit-PatchSet: 7
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Eric Peers <epeers(a)google.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-CC: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Mon, 22 Jun 2020 18:59:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Furquan Shaikh <furquan(a)google.com>
Comment-In-Reply-To: Julius Werner <jwerner(a)chromium.org>
Comment-In-Reply-To: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Comment-In-Reply-To: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: comment
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42423 )
Change subject: ACPI: Add framework for GNVS initialisation
......................................................................
Patch Set 6:
(2 comments)
https://review.coreboot.org/c/coreboot/+/42423/5/src/acpi/chromeos-gnvs.c
File src/acpi/chromeos-gnvs.c:
https://review.coreboot.org/c/coreboot/+/42423/5/src/acpi/chromeos-gnvs.c@14
PS5, Line 14: gnvs_chromeos->vbt2 = ACTIVE_ECFW_RO;
> Why not just put this inside chromeos_init_chromeos_acpi()?
I do not want to span under vendorcode/ with my change.
https://review.coreboot.org/c/coreboot/+/42423/5/src/acpi/gnvs.c
File src/acpi/gnvs.c:
https://review.coreboot.org/c/coreboot/+/42423/5/src/acpi/gnvs.c@55
PS5, Line 55: gnvs_assign_chromeos();
> Briefly looking it's just assigning to fields. I don't see any side effects.
Ack
--
To view, visit https://review.coreboot.org/c/coreboot/+/42423
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iccad533c3824d70f6cbae52cc8dd79f142ece944
Gerrit-Change-Number: 42423
Gerrit-PatchSet: 6
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Mon, 22 Jun 2020 18:36:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Comment-In-Reply-To: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-MessageType: comment