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@google.com>
Reviewed-on: http://review.coreboot.org/1282
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
Stefan Reinauer 2012-06-13 13:12:19 -07:00 committed by Patrick Georgi
parent d59d62484d
commit be1ef2329e
3 changed files with 9 additions and 5 deletions

View File

@ -523,8 +523,4 @@ void generate_cpu_entries(void);
#endif /* CONFIG_GENERATE_ACPI_TABLES */
#if CONFIG_CHROMEOS
void acpi_get_vdat_info(void **vdat_addr, uint32_t *vdat_size);
#endif /* CONFIG_CHROMEOS */
#endif /* __ASM_ACPI_H */

View File

@ -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));
else
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);
}

View File

@ -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);
#endif