Esempio n. 1
0
static int vboot_get_handoff_flag(uint32_t flag)
{
	struct vboot_handoff *vbho;

	/*
	 * If vboot_handoff cannot be found, return default value of flag as 0.
	 */
	if (vboot_get_handoff_info((void **)&vbho, NULL))
		return 0;

	return !!(vbho->init_params.out_flags & flag);
}
Esempio n. 2
0
int vboot_handoff_get_recovery_reason(void)
{
	struct vboot_handoff *vbho;
	VbSharedDataHeader *sd;

	if (vboot_get_handoff_info((void **)&vbho, NULL))
		return 0;

	sd = (VbSharedDataHeader *)vbho->shared_data;

	return sd->recovery_reason;
}
Esempio n. 3
0
static void lb_vboot_handoff(struct lb_header *header)
{
	void *addr;
	uint32_t size;
	struct lb_vboot_handoff* vbho;

	if (vboot_get_handoff_info(&addr, &size))
		return;

	vbho = (struct lb_vboot_handoff *)lb_new_record(header);
	vbho->tag = LB_TAB_VBOOT_HANDOFF;
	vbho->size = sizeof(*vbho);
	vbho->vboot_handoff_addr = addr;
	vbho->vboot_handoff_size = size;
}
Esempio n. 4
0
void chromeos_init_vboot(chromeos_acpi_t *chromeos)
{
	vboot_data = chromeos;

	/* Copy saved ME hash into NVS */
	memcpy(vboot_data->mehh, me_hash_saved, sizeof(vboot_data->mehh));

	struct vboot_handoff *vboot_handoff;

	if (vboot_get_handoff_info((void **)&vboot_handoff, NULL) == 0)
		memcpy(&chromeos->vdat[0], &vboot_handoff->shared_data[0],
		       ARRAY_SIZE(chromeos->vdat));

	chromeos_ram_oops_init(chromeos);
}