Implement BootReason config

This commit is contained in:
Michael Scire
2018-03-08 01:48:57 -08:00
parent ff9322a468
commit 3d8ff446ad
5 changed files with 33 additions and 4 deletions

View File

@@ -73,14 +73,13 @@ uint32_t configitem_get(ConfigItem item, uint64_t *p_outvalue) {
*p_outvalue = fuse_get_retail_type();
break;
case CONFIGITEM_ISRECOVERYBOOT:
/* TODO: This requires reading values passed to crt0 via NX_Bootloader. TBD pending crt0 implementation. */
*p_outvalue = 0;
*p_outvalue = (int)(bootconfig_is_recovery_boot());
break;
case CONFIGITEM_DEVICEID:
*p_outvalue = fuse_get_device_id();
break;
case CONFIGITEM_BOOTREASON:
/* TODO: This requires reading values passed to crt0 via NX_Bootloader. TBD pending crt0 implementation. */
*p_outvalue = bootconfig_get_boot_reason();
break;
case CONFIGITEM_MEMORYARRANGE:
*p_outvalue = bootconfig_get_memory_arrangement();