vboot: Fix tpm_kernver value in crossystem unsychronize with the value in TPM.

crossystem tool will use acpi to get the data come from coreboot under x86 system
But in https://chromium-review.googlesource.com/#/c/191553/
It uses another way to get the value which is not compatible with x86/acpi in crossystem tool.
So, we put all data back to acpi vdat from vboot_handoff

BUG=chrome-os-partner:29715
BRANCH=None
TEST=emerge-beltino depthcharge successfully, verify tpm_kernver in crossystem

Change-Id: I97088681e237520db4c46e90ca4f79fda9867cef
Reviewed-on: https://chromium-review.googlesource.com/205570
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
diff --git a/src/vboot/crossystem/acpi.c b/src/vboot/crossystem/acpi.c
index 0d73a4f..9a9b03d 100644
--- a/src/vboot/crossystem/acpi.c
+++ b/src/vboot/crossystem/acpi.c
@@ -31,6 +31,7 @@
 #include "vboot/util/acpi.h"
 #include "vboot/util/commonparams.h"
 #include "vboot/util/flag.h"
+#include "vboot/util/vboot_handoff.h"
 
 enum {
 	VDAT_RW_A = 0,
@@ -41,6 +42,7 @@
 int crossystem_setup(void)
 {
 	chromeos_acpi_t *acpi_table = (chromeos_acpi_t *)lib_sysinfo.vdat_addr;
+	VbSharedDataHeader *vboot_handoff_shared_data;
 	VbSharedDataHeader *vdat = (VbSharedDataHeader *)&acpi_table->vdat;
 	int size;
 
@@ -128,6 +130,14 @@
 	memcpy(dest, fwid, size);
 	dest[size] = 0;
 
+	// Synchronize the value in vboot_handoff back to acpi vdat.
+	if (find_common_params((void**)(&vboot_handoff_shared_data), &size) == 0)
+		memcpy(vdat, vboot_handoff_shared_data, size);
+	else {
+		printf("Can't find common params.\n");
+		return 1;
+	}
+
 	return 0;
 }