psp_verstage: report developer mode to PSP

Add platform_report_mode function which report current developer mode
status to the PSP. L1 widevine app in the PSP will use this information
to select key box.

BUG=b:211058864
TEST=build and boot guybrush
TEST=build picasso chrome os boards

Signed-off-by: Kangheui Won <khwon@chromium.org>
Change-Id: I04b5fcfa338b485b36f1b946203f32823385c0b1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61369
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
This commit is contained in:
Kangheui Won 2022-01-25 18:55:04 +11:00 committed by Raul Rangel
parent 506ca3ef4e
commit 7e91db7148
4 changed files with 17 additions and 0 deletions

View File

@ -33,6 +33,14 @@ int platform_set_sha_op(enum vb2_hash_algorithm hash_alg,
return 0;
}
void platform_report_mode(int developer_mode_enabled)
{
if (developer_mode_enabled)
svc_set_platform_boot_mode(CHROME_BOOK_BOOT_MODE_DEVELOPER);
else
svc_set_platform_boot_mode(CHROME_BOOK_BOOT_MODE_PRODUCTION);
}
/* Functions below are stub functions for not-yet-implemented PSP features.
* These functions should be replaced with proper implementations later.

View File

@ -65,5 +65,6 @@ uint32_t save_uapp_data(void *address, uint32_t size);
uint32_t get_bios_dir_addr(struct embedded_firmware *ef_table);
int platform_set_sha_op(enum vb2_hash_algorithm hash_alg,
struct sha_generic_data *sha_op);
void platform_report_mode(int developer_mode_enabled);
#endif /* PSP_VERSTAGE_H */

View File

@ -314,6 +314,8 @@ void Main(void)
if (retval)
reboot_into_recovery(ctx, retval);
platform_report_mode(vboot_developer_mode_enabled());
post_code(POSTCODE_UPDATE_BOOT_REGION);
/*

View File

@ -38,3 +38,9 @@ int platform_set_sha_op(enum vb2_hash_algorithm hash_alg,
}
return 0;
}
void platform_report_mode(int developer_mode_enabled)
{
/* Picasso PSP doesn't support this */
(void)developer_mode_enabled;
}