Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41815 )
Change subject: console: Update for vboot before bootblock ......................................................................
Patch Set 6:
(3 comments)
https://review.coreboot.org/c/coreboot/+/41815/4/src/console/Makefile.inc File src/console/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/41815/4/src/console/Makefile.inc@14 PS4, Line 14: ifneq ($(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),y)
The files here should be arch-agnostic. […]
It's not the architecture that's the problem, it's the implementation. The interface to print inside the PSP is an SVC call with a string, so we've reimplemented the calls.
Updated in a later patch to use post.c, so it's jut printk & console.c that are excluded.
The entire patch train is now pushed.
https://review.coreboot.org/c/coreboot/+/41815/4/src/console/init.c File src/console/init.c:
https://review.coreboot.org/c/coreboot/+/41815/4/src/console/init.c@72 PS4, Line 72: pci_early_bridge_init
We could probably change this to EARLY_PCI_BRIDGE && (ENV_BOOTBLOCK || ENV_ROMSTAGE). […]
That seems like a reasonable solution to me.
https://review.coreboot.org/c/coreboot/+/41815/6/src/console/init.c File src/console/init.c:
https://review.coreboot.org/c/coreboot/+/41815/6/src/console/init.c@70 PS6, Line 70: CONFIG(EARLY_PCI_BRIDGE)
No negation missed. I just concluded from the cluttered condition […]
Well, we can use early EARLY_PCI_BRIDGE on the system with VBOOT_STARTS_BEFORE_BOOTBLOCK, just not inside the PSP, which is why the ENV_SEPARATE_VERSTAGE condition is there. Just because we don't get output out of the console in the psp shouldn't disallow its use later.
As Kyosti suggested on patch set 4, I can change it to (CONFIG(EARLY_PCI_BRIDGE) && (ENV_BOOTBLOCK || ENV_ROMSTAGE))
I'd imagine we'd generally want to init this in bootblock if we're using it for verstage.