Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/42810 )
Change subject: soc/amd/picasso: Halt if workbuf is absent after psp_verstage ......................................................................
soc/amd/picasso: Halt if workbuf is absent after psp_verstage
Check for the workbuf in bootblock if psp_verstage is being used.
BUG=b:158124527 TEST=Build & boot Trembyle with psp_verstage
Signed-off-by: Martin Roth martin@coreboot.org Change-Id: I0ec8d2c953bce4c44cde5102d2765e0ab9b5875e --- M src/soc/amd/picasso/bootblock/bootblock.c 1 file changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/42810/1
diff --git a/src/soc/amd/picasso/bootblock/bootblock.c b/src/soc/amd/picasso/bootblock/bootblock.c index a3935cc..f633767 100644 --- a/src/soc/amd/picasso/bootblock/bootblock.c +++ b/src/soc/amd/picasso/bootblock/bootblock.c @@ -14,6 +14,11 @@ #include <amdblocks/amd_pci_mmconf.h> #include <acpi/acpi.h>
+/* vboot includes directory may bot be in include path if vboot is not enabled */ +#if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK) +#include <2struct.h> +#endif + asmlinkage void bootblock_resume_entry(void);
/* PSP performs the memory training and setting up DRAM map prior to x86 cores @@ -123,5 +128,17 @@ u32 val = cpuid_eax(1); printk(BIOS_DEBUG, "Family_Model: %08x\n", val);
+#if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK) +#include <2struct.h> + unsigned int *workbuf_location = (unsigned int *)CONFIG_PSP_SHAREDMEM_BASE; + if (*workbuf_location != VB2_SHARED_DATA_MAGIC) { + printk(BIOS_ERR,"ERROR: VBOOT workbuf not valid.\n"); + + printk(BIOS_DEBUG,"Signature: %#08x\n",*workbuf_location); + + die("Halting.\n"); + } +#endif + fch_early_init(); }
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42810 )
Change subject: soc/amd/picasso: Halt if workbuf is absent after psp_verstage ......................................................................
Patch Set 1:
(4 comments)
https://review.coreboot.org/c/coreboot/+/42810/1/src/soc/amd/picasso/bootblo... File src/soc/amd/picasso/bootblock/bootblock.c:
https://review.coreboot.org/c/coreboot/+/42810/1/src/soc/amd/picasso/bootblo... PS1, Line 135: printk(BIOS_ERR,"ERROR: VBOOT workbuf not valid.\n"); space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/42810/1/src/soc/amd/picasso/bootblo... PS1, Line 137: printk(BIOS_DEBUG,"Signature: %#08x\n",*workbuf_location); space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/42810/1/src/soc/amd/picasso/bootblo... PS1, Line 137: printk(BIOS_DEBUG,"Signature: %#08x\n",*workbuf_location); space required after that ',' (ctx:VxO)
https://review.coreboot.org/c/coreboot/+/42810/1/src/soc/amd/picasso/bootblo... PS1, Line 137: printk(BIOS_DEBUG,"Signature: %#08x\n",*workbuf_location); space required before that '*' (ctx:OxV)
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/42810
to look at the new patch set (#2).
Change subject: soc/amd/picasso: Halt if workbuf is absent after psp_verstage ......................................................................
soc/amd/picasso: Halt if workbuf is absent after psp_verstage
Check for the workbuf in bootblock if psp_verstage is being used.
BUG=b:158124527 TEST=Build & boot Trembyle with psp_verstage
Signed-off-by: Martin Roth martin@coreboot.org Change-Id: I0ec8d2c953bce4c44cde5102d2765e0ab9b5875e --- M src/soc/amd/picasso/bootblock/bootblock.c 1 file changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/42810/2
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42810 )
Change subject: soc/amd/picasso: Halt if workbuf is absent after psp_verstage ......................................................................
Patch Set 2:
(3 comments)
https://review.coreboot.org/c/coreboot/+/42810/2/src/soc/amd/picasso/bootblo... File src/soc/amd/picasso/bootblock/bootblock.c:
https://review.coreboot.org/c/coreboot/+/42810/2/src/soc/amd/picasso/bootblo... PS2, Line 17: bot not
https://review.coreboot.org/c/coreboot/+/42810/2/src/soc/amd/picasso/bootblo... PS2, Line 132: #include <2struct.h> Why the include again?
https://review.coreboot.org/c/coreboot/+/42810/2/src/soc/amd/picasso/bootblo... PS2, Line 133: CONFIG_PSP_SHAREDMEM_BASE Can we use the symbol defined in the mamlayout.ld?
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42810 )
Change subject: soc/amd/picasso: Halt if workbuf is absent after psp_verstage ......................................................................
Patch Set 2:
(3 comments)
https://review.coreboot.org/c/coreboot/+/42810/2/src/soc/amd/picasso/bootblo... File src/soc/amd/picasso/bootblock/bootblock.c:
https://review.coreboot.org/c/coreboot/+/42810/2/src/soc/amd/picasso/bootblo... PS2, Line 17: bot
not
Done
https://review.coreboot.org/c/coreboot/+/42810/2/src/soc/amd/picasso/bootblo... PS2, Line 132: #include <2struct.h>
Why the include again?
Just forgot to remove it when I moved it above. I initially tried putting it here so we only had one #if , but it blew up being included inside the function.
Removed.
https://review.coreboot.org/c/coreboot/+/42810/2/src/soc/amd/picasso/bootblo... PS2, Line 133: CONFIG_PSP_SHAREDMEM_BASE
Can we use the symbol defined in the mamlayout. […]
Done
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/42810
to look at the new patch set (#3).
Change subject: soc/amd/picasso: Halt if workbuf is absent after psp_verstage ......................................................................
soc/amd/picasso: Halt if workbuf is absent after psp_verstage
Check for the workbuf in bootblock if psp_verstage is being used.
BUG=b:158124527 TEST=Build & boot Trembyle with psp_verstage
Signed-off-by: Martin Roth martin@coreboot.org Change-Id: I0ec8d2c953bce4c44cde5102d2765e0ab9b5875e --- M src/soc/amd/picasso/bootblock/bootblock.c 1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/42810/3
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42810 )
Change subject: soc/amd/picasso: Halt if workbuf is absent after psp_verstage ......................................................................
Patch Set 3:
(4 comments)
https://review.coreboot.org/c/coreboot/+/42810/3/src/soc/amd/picasso/bootblo... File src/soc/amd/picasso/bootblock/bootblock.c:
https://review.coreboot.org/c/coreboot/+/42810/3/src/soc/amd/picasso/bootblo... PS3, Line 134: printk(BIOS_ERR,"ERROR: VBOOT workbuf not valid.\n"); space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/42810/3/src/soc/amd/picasso/bootblo... PS3, Line 136: printk(BIOS_DEBUG,"Signature: %#08x\n",*(uint32_t *)_vboot2_work); space required after that ',' (ctx:VxV)
https://review.coreboot.org/c/coreboot/+/42810/3/src/soc/amd/picasso/bootblo... PS3, Line 136: printk(BIOS_DEBUG,"Signature: %#08x\n",*(uint32_t *)_vboot2_work); space required after that ',' (ctx:VxO)
https://review.coreboot.org/c/coreboot/+/42810/3/src/soc/amd/picasso/bootblo... PS3, Line 136: printk(BIOS_DEBUG,"Signature: %#08x\n",*(uint32_t *)_vboot2_work); space required before that '*' (ctx:OxV)
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42810 )
Change subject: soc/amd/picasso: Halt if workbuf is absent after psp_verstage ......................................................................
Patch Set 3: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/42810/3/src/soc/amd/picasso/bootblo... File src/soc/amd/picasso/bootblock/bootblock.c:
https://review.coreboot.org/c/coreboot/+/42810/3/src/soc/amd/picasso/bootblo... PS3, Line 134: printk(BIOS_ERR,"ERROR: VBOOT workbuf not valid.\n");
space required after that ',' (ctx:VxV)
clang-format please
Hello build bot (Jenkins), Raul Rangel,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/42810
to look at the new patch set (#4).
Change subject: soc/amd/picasso: Halt if workbuf is absent after psp_verstage ......................................................................
soc/amd/picasso: Halt if workbuf is absent after psp_verstage
Check for the workbuf in bootblock if psp_verstage is being used.
BUG=b:158124527 TEST=Build & boot Trembyle with psp_verstage
Signed-off-by: Martin Roth martin@coreboot.org Change-Id: I0ec8d2c953bce4c44cde5102d2765e0ab9b5875e --- M src/soc/amd/picasso/bootblock/bootblock.c 1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/42810/4
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42810 )
Change subject: soc/amd/picasso: Halt if workbuf is absent after psp_verstage ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42810/3/src/soc/amd/picasso/bootblo... File src/soc/amd/picasso/bootblock/bootblock.c:
https://review.coreboot.org/c/coreboot/+/42810/3/src/soc/amd/picasso/bootblo... PS3, Line 134: printk(BIOS_ERR,"ERROR: VBOOT workbuf not valid.\n");
clang-format please
Done
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42810 )
Change subject: soc/amd/picasso: Halt if workbuf is absent after psp_verstage ......................................................................
Patch Set 4: Code-Review+2
Martin Roth has submitted this change. ( https://review.coreboot.org/c/coreboot/+/42810 )
Change subject: soc/amd/picasso: Halt if workbuf is absent after psp_verstage ......................................................................
soc/amd/picasso: Halt if workbuf is absent after psp_verstage
Check for the workbuf in bootblock if psp_verstage is being used.
BUG=b:158124527 TEST=Build & boot Trembyle with psp_verstage
Signed-off-by: Martin Roth martin@coreboot.org Change-Id: I0ec8d2c953bce4c44cde5102d2765e0ab9b5875e Reviewed-on: https://review.coreboot.org/c/coreboot/+/42810 Reviewed-by: Raul Rangel rrangel@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/amd/picasso/bootblock/bootblock.c 1 file changed, 16 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Raul Rangel: Looks good to me, approved
diff --git a/src/soc/amd/picasso/bootblock/bootblock.c b/src/soc/amd/picasso/bootblock/bootblock.c index a3935cc..556fbad 100644 --- a/src/soc/amd/picasso/bootblock/bootblock.c +++ b/src/soc/amd/picasso/bootblock/bootblock.c @@ -13,6 +13,12 @@ #include <soc/i2c.h> #include <amdblocks/amd_pci_mmconf.h> #include <acpi/acpi.h> +#include <security/vboot/symbols.h> + +/* vboot includes directory may not be in include path if vboot is not enabled */ +#if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK) +#include <2struct.h> +#endif
asmlinkage void bootblock_resume_entry(void);
@@ -123,5 +129,15 @@ u32 val = cpuid_eax(1); printk(BIOS_DEBUG, "Family_Model: %08x\n", val);
+#if CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK) + if (*(uint32_t *)_vboot2_work != VB2_SHARED_DATA_MAGIC) { + printk(BIOS_ERR, "ERROR: VBOOT workbuf not valid.\n"); + + printk(BIOS_DEBUG, "Signature: %#08x\n", *(uint32_t *)_vboot2_work); + + die("Halting.\n"); + } +#endif + fch_early_init(); }