[coreboot] Patch set updated for coreboot: ac9c349 chromeos: Pass pointer to ChromeOS ACPI structure instead of VB Shared Data

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Wed Jul 25 00:51:00 CEST 2012

Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1282


commit ac9c349576511d4c8e67a4964fe777a9658c9534
Author: Stefan Reinauer <reinauer at chromium.org>
Date:   Wed Jun 13 13:12:19 2012 -0700

    chromeos: Pass pointer to ChromeOS ACPI structure instead of VB Shared Data
    coreboot used to pass some information to u-boot in the coreboot table
    and other information in a modified flat device tree. Since the FDT code
    was never upstreamed and removed from our tree, u-boot was changed to
    get the information it needs from the coreboot table alone. However,
    in the process of this change only the vboot shared data structure was
    passed on by coreboot, so when u-boot tried to update the ChromeOS
    specific ACPI entries, it would accidently overwrite the vboot data.
    This patch passes on the ChromeOS specific ACPI data structure instead
    of the vboot shared data. Another change to u-boot will teach it how
    to get to the vboot shared data from there.
    Change-Id: Ifbb64eafc0d9967887b4cdeebf97d0c4ce019290
    Signed-off-by: Stefan Reinauer <reinauer at google.com>
 src/arch/x86/include/arch/acpi.h      |    4 ----
 src/vendorcode/google/chromeos/gnvs.c |    9 ++++++++-
 src/vendorcode/google/chromeos/gnvs.h |    1 +
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h
index 8c8106d..0b2cbf4 100644
--- a/src/arch/x86/include/arch/acpi.h
+++ b/src/arch/x86/include/arch/acpi.h
@@ -523,8 +523,4 @@ void generate_cpu_entries(void);
-void acpi_get_vdat_info(void **vdat_addr, uint32_t *vdat_size);
-#endif /* CONFIG_CHROMEOS */
 #endif  /* __ASM_ACPI_H */
diff --git a/src/vendorcode/google/chromeos/gnvs.c b/src/vendorcode/google/chromeos/gnvs.c
index 024dbf8..aaca95a 100644
--- a/src/vendorcode/google/chromeos/gnvs.c
+++ b/src/vendorcode/google/chromeos/gnvs.c
@@ -23,7 +23,7 @@
 #include <console/console.h>
 #include "gnvs.h"
-chromeos_acpi_t *vboot_data;
+chromeos_acpi_t *vboot_data = NULL;
 static u32 me_hash_saved[8];
 void chromeos_init_vboot(chromeos_acpi_t *chromeos)
@@ -41,7 +41,14 @@ void chromeos_set_me_hash(u32 *hash, int len)
 	/* Copy to NVS or save until it is ready */
 	if (vboot_data)
+		/* This does never happen! */
 		memcpy(vboot_data->mehh, hash, len*sizeof(u32));
 		memcpy(me_hash_saved, hash, len*sizeof(u32));
+void acpi_get_vdat_info(void **vdat_addr, uint32_t *vdat_size)
+	*vdat_addr = vboot_data;
+	*vdat_size = sizeof(*vboot_data);
diff --git a/src/vendorcode/google/chromeos/gnvs.h b/src/vendorcode/google/chromeos/gnvs.h
index 6dd740f..4067494 100644
--- a/src/vendorcode/google/chromeos/gnvs.h
+++ b/src/vendorcode/google/chromeos/gnvs.h
@@ -64,5 +64,6 @@ typedef struct {
 extern chromeos_acpi_t *vboot_data;
 void chromeos_init_vboot(chromeos_acpi_t *chromeos);
 void chromeos_set_me_hash(u32*, int);
+void acpi_get_vdat_info(void **vdat_addr, uint32_t *vdat_size);

More information about the coreboot mailing list