Hello build bot (Jenkins), Bao Zheng, Raul Rangel, Furquan Shaikh, Patrick Georgi, Julius Werner, Eric Peers, Aaron Durbin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/41816
to look at the new patch set (#12).
Change subject: soc/amd/picasso: add psp_verstage
......................................................................
soc/amd/picasso: add psp_verstage
This is the main code for building coreboot's verstage as a userspace
application to run on the PSP. It does a minimal setup of hardware,
then runs verstage_main. It uses hardware hashing to increase the speed
and will directly reboot into recovery mode if there are any failures.
BUG=b:158124527
TEST=Build & boot trembyle
Signed-off-by: Martin Roth <martin(a)coreboot.org>
Change-Id: Ia58839caa5bfbae0408702ee8d02ef482f2861c4
---
M src/soc/amd/picasso/Kconfig
M src/soc/amd/picasso/Makefile.inc
M src/soc/amd/picasso/chip.h
M src/soc/amd/picasso/memlayout.ld
A src/soc/amd/picasso/memlayout_psp_verstage.ld
A src/soc/amd/picasso/memlayout_x86.ld
A src/soc/amd/picasso/psp_verstage/Makefile.inc
A src/soc/amd/picasso/psp_verstage/delay.c
A src/soc/amd/picasso/psp_verstage/fch.c
A src/soc/amd/picasso/psp_verstage/include/arch/io.h
A src/soc/amd/picasso/psp_verstage/pmutil.c
A src/soc/amd/picasso/psp_verstage/post.c
A src/soc/amd/picasso/psp_verstage/printk.c
A src/soc/amd/picasso/psp_verstage/psp.c
A src/soc/amd/picasso/psp_verstage/psp_verstage.c
A src/soc/amd/picasso/psp_verstage/psp_verstage.h
A src/soc/amd/picasso/psp_verstage/reset.c
A src/soc/amd/picasso/psp_verstage/svc.c
A src/soc/amd/picasso/psp_verstage/svc.h
A src/soc/amd/picasso/psp_verstage/timer.c
A src/soc/amd/picasso/psp_verstage/timestamp.c
A src/soc/amd/picasso/psp_verstage/vboot_crypto.c
22 files changed, 1,125 insertions(+), 107 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/41816/12
--
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: 12
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Bao Zheng <fishbaozi(a)gmail.com>
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-MessageType: newpatchset
Sugnan Prabhu S has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43003 )
Change subject: drivers/intel/mipi_camera: Add guard to protect camera resources
......................................................................
Patch Set 6:
(14 comments)
https://review.coreboot.org/c/coreboot/+/43003/5//COMMIT_MSG
Commit Message:
https://review.coreboot.org/c/coreboot/+/43003/5//COMMIT_MSG@7
PS5, Line 7: drivers/intel/mipi_camera: Add guard variables to protect shared resource
:
: This change updates the mipi_camera driver to handle shared power resource
: between multiple cameras. This is achieved by adding a guard variable and
: methods manipulate the guard variable and guard the call to actual method
: while enables or disables the resource. This protects the shared lines
: from being enabled or disabled multiple times while the resources are
: being used by multiple cameras.
:
> reflow for 72 characters wide
Done.
https://review.coreboot.org/c/coreboot/+/43003/5/src/drivers/intel/mipi_cam…
File src/drivers/intel/mipi_camera/camera.c:
https://review.coreboot.org/c/coreboot/+/43003/5/src/drivers/intel/mipi_cam…
PS5, Line 26: .cnt = 0
> it should get initialized to 0 as it's a file-level static variable, so . […]
Done
https://review.coreboot.org/c/coreboot/+/43003/5/src/drivers/intel/mipi_cam…
PS5, Line 477: printk(BIOS_ERR, "Unsupported power operation: %x\n", type);
: printk(BIOS_ERR, "OS camera driver will likely not work");
> nit: this can be combined into one printk call: […]
Done
https://review.coreboot.org/c/coreboot/+/43003/5/src/drivers/intel/mipi_cam…
PS5, Line 485: if (action == ENABLE) {
: snprintf(method_name, sizeof(method_name), ENABLE_METHOD_FORMAT,
: res_index);
: } else if (action == DISABLE) {
: snprintf(method_name, sizeof(method_name), DISABLE_METHOD_FORMAT,
: res_index);
: } else {
: snprintf(method_name, sizeof(method_name), UNKNOWN_METHOD_FORMAT,
: res_index);
: acpigen_write_debug_string("Unsupported action");
: printk(BIOS_ERR, "Unsupported resource action: %x\n", action);
: }
> a switch statement may be more clear on intention here. […]
Done
https://review.coreboot.org/c/coreboot/+/43003/5/src/drivers/intel/mipi_cam…
PS5, Line 502: uint8_t
> enum action_type
Done
https://review.coreboot.org/c/coreboot/+/43003/5/src/drivers/intel/mipi_cam…
PS5, Line 502: uint8_t
> enum ctrl_type
Done
https://review.coreboot.org/c/coreboot/+/43003/5/src/drivers/intel/mipi_cam…
PS5, Line 502: void *res_config
> Sugnan, I'm not a big fan of the void* for res_config... […]
Done
https://review.coreboot.org/c/coreboot/+/43003/5/src/drivers/intel/mipi_cam…
PS5, Line 569: printk(BIOS_ERR, "Unsupported power operation: %x\n", seq->ops[i].type);
: printk(BIOS_ERR, "OS camera driver will likely not work\n");
> nit: you can squash this into one printk call
Done
https://review.coreboot.org/c/coreboot/+/43003/5/src/drivers/intel/mipi_cam…
PS5, Line 571: res_config = NULL;
: break;
: }
:
: if (res_config == NULL)
: continue;
> just return from within the `default:` block, I think it's easier to see the intent.
Done
https://review.coreboot.org/c/coreboot/+/43003/5/src/drivers/intel/mipi_cam…
PS5, Line 582: printk(BIOS_ERR, "Unable to add guarded camera resource\n");
: printk(BIOS_ERR, "OS camera driver will likely not work\n");
> nit: you can squash this into one printk call
Done
https://review.coreboot.org/c/coreboot/+/43003/5/src/drivers/intel/mipi_cam…
PS5, Line 596: acpigen_write_if();
: acpigen_emit_byte(LEQUAL_OP);
: acpigen_emit_namestring(varname);
: acpigen_write_integer(0);
> acpigen_write_if_lequal_namestr_int
Done
https://review.coreboot.org/c/coreboot/+/43003/5/src/drivers/intel/mipi_cam…
PS5, Line 602:
: acpigen_emit_byte(ADD_OP);
: acpigen_emit_namestring(varname);
: acpigen_emit_byte(0x01);
: acpigen_emit_namestring(varname);
: acpigen_pop_len(); /* _ON */
> there is an INCREMENT_OP 😊
Done
https://review.coreboot.org/c/coreboot/+/43003/5/src/drivers/intel/mipi_cam…
PS5, Line 612: acpigen_emit_byte(SUBTRACT_OP);
: acpigen_emit_namestring(varname);
: acpigen_emit_byte(0x01);
: acpigen_emit_namestring(varname);
> DECREMENT_OP
Done
https://review.coreboot.org/c/coreboot/+/43003/5/src/drivers/intel/mipi_cam…
PS5, Line 616: acpigen_write_if();
: acpigen_emit_byte(LEQUAL_OP);
: acpigen_emit_namestring(varname);
: acpigen_write_integer(0);
> acpigen_write_if_lequal_namestr_int
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/43003
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1468459d5bbb2fb07bef4e0590c96dd4dbab0d9c
Gerrit-Change-Number: 43003
Gerrit-PatchSet: 6
Gerrit-Owner: Sugnan Prabhu S <sugnan.prabhu.s(a)intel.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Matt Delco <delco(a)chromium.org>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Varshit B Pandya <varshit.b.pandya(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 08 Jul 2020 15:39:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-MessageType: comment
Hello Varshit B Pandya, build bot (Jenkins), Matt Delco, Furquan Shaikh, Tim Wawrzynczak, Rizwan Qureshi, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43003
to look at the new patch set (#6).
Change subject: drivers/intel/mipi_camera: Add guard to protect camera resources
......................................................................
drivers/intel/mipi_camera: Add guard to protect camera resources
This change updates the mipi_camera driver to handle shared power
resource between multiple cameras. This is achieved by adding a guard
variable and methods to manipulate the guard variable before calling
the actual method which enables or disables the resource. This protects
the shared resources from being enabled or disabled multiple times
while the resources are being used by multiple cameras.
Change-Id: I1468459d5bbb2fb07bef4e0590c96dd4dbab0d9c
Signed-off-by: Sugnan Prabhu S <sugnan.prabhu.s(a)intel.com>
---
M src/drivers/intel/mipi_camera/camera.c
M src/drivers/intel/mipi_camera/chip.h
2 files changed, 316 insertions(+), 39 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/43003/6
--
To view, visit https://review.coreboot.org/c/coreboot/+/43003
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1468459d5bbb2fb07bef4e0590c96dd4dbab0d9c
Gerrit-Change-Number: 43003
Gerrit-PatchSet: 6
Gerrit-Owner: Sugnan Prabhu S <sugnan.prabhu.s(a)intel.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Matt Delco <delco(a)chromium.org>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Varshit B Pandya <varshit.b.pandya(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset
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 11:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41816/10/src/soc/amd/picasso/memla…
File src/soc/amd/picasso/memlayout_psp_verstage.ld:
https://review.coreboot.org/c/coreboot/+/41816/10/src/soc/amd/picasso/memla…
PS10, Line 55: VERSTAGE_START + VERSTAGE_SIZE
> Don't you want VBOOT_WORK_START? Or if you don't really care where it's located you can just use `. […]
Sorry, I missed this comment until just now.
This actually gives the same value as VBOOT_WORK_START. I'll update it in a follow-on patch and merge that with this patch if I need to repush this.
60K = 0xF000
0xF000 + 0x15000 = 0x24000
--
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: 11
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Bao Zheng <fishbaozi(a)gmail.com>
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: Wed, 08 Jul 2020 15:31:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Raul Rangel <rrangel(a)chromium.org>
Gerrit-MessageType: comment
Hello Bao Zheng, build bot (Jenkins), Raul Rangel, Furquan Shaikh, Patrick Georgi, Julius Werner, Eric Peers, Aaron Durbin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/41816
to look at the new patch set (#11).
Change subject: soc/amd/picasso: add psp_verstage
......................................................................
soc/amd/picasso: add psp_verstage
This is the main code for building coreboot's verstage as a userspace
application to run on the PSP. It does a minimal setup of hardware,
then runs verstage_main. It uses hardware hashing to increase the speed
and will directly reboot into recovery mode if there are any failures.
BUG=b:158124527
TEST=Build & boot trembyle
Signed-off-by: Martin Roth <martin(a)coreboot.org>
Change-Id: Ia58839caa5bfbae0408702ee8d02ef482f2861c4
---
M src/soc/amd/picasso/Kconfig
M src/soc/amd/picasso/Makefile.inc
M src/soc/amd/picasso/chip.h
M src/soc/amd/picasso/memlayout.ld
A src/soc/amd/picasso/memlayout_psp_verstage.ld
A src/soc/amd/picasso/memlayout_x86.ld
A src/soc/amd/picasso/psp_verstage/Makefile.inc
A src/soc/amd/picasso/psp_verstage/delay.c
A src/soc/amd/picasso/psp_verstage/fch.c
A src/soc/amd/picasso/psp_verstage/include/arch/io.h
A src/soc/amd/picasso/psp_verstage/pmutil.c
A src/soc/amd/picasso/psp_verstage/post.c
A src/soc/amd/picasso/psp_verstage/printk.c
A src/soc/amd/picasso/psp_verstage/psp.c
A src/soc/amd/picasso/psp_verstage/psp_verstage.c
A src/soc/amd/picasso/psp_verstage/psp_verstage.h
A src/soc/amd/picasso/psp_verstage/reset.c
A src/soc/amd/picasso/psp_verstage/svc.c
A src/soc/amd/picasso/psp_verstage/svc.h
A src/soc/amd/picasso/psp_verstage/timer.c
A src/soc/amd/picasso/psp_verstage/timestamp.c
A src/soc/amd/picasso/psp_verstage/vboot_crypto.c
22 files changed, 1,125 insertions(+), 107 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/41816/11
--
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: 11
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Bao Zheng <fishbaozi(a)gmail.com>
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-MessageType: newpatchset