chromeos/gnvs: remove function and naming cleanup

- Remove unused acpi_get_chromeos_acpi_info (see CB:28190)
- Make function naming in gnvs.h consistent (start with "chromeos_")

BUG=b:112288216
TEST=compile and run on eve

Change-Id: I5b0066bc311b0ea995fa30bca1cd9235dc9b7d1b
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://review.coreboot.org/28406
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
Joel Kitching 2018-08-23 14:56:25 +08:00 committed by Patrick Georgi
parent 8e5e9cf1a8
commit 6fbd874391
12 changed files with 15 additions and 23 deletions

View File

@ -367,7 +367,8 @@ static int smbios_write_type0(unsigned long *current, int handle)
#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES) #if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
/* SMBIOS offsets start at 1 rather than 0 */ /* SMBIOS offsets start at 1 rather than 0 */
acpi_get_chromeos_acpi()->vbt10 = (u32)t->eos + (version_offset - 1); chromeos_get_chromeos_acpi()->vbt10 =
(u32)t->eos + (version_offset - 1);
#endif #endif
#endif /* CONFIG_CHROMEOS */ #endif /* CONFIG_CHROMEOS */

View File

@ -273,7 +273,7 @@ static void acpi_create_gnvs(struct global_nvs_t *gnvs)
if (IS_ENABLED(CONFIG_CHROMEOS)) { if (IS_ENABLED(CONFIG_CHROMEOS)) {
/* Initialize Verified Boot data */ /* Initialize Verified Boot data */
chromeos_init_vboot(&gnvs->chromeos); chromeos_init_chromeos_acpi(&gnvs->chromeos);
gnvs->chromeos.vbt2 = ACTIVE_ECFW_RO; gnvs->chromeos.vbt2 = ACTIVE_ECFW_RO;
} }

View File

@ -96,7 +96,7 @@ void acpi_create_gnvs(struct global_nvs_t *gnvs)
if (IS_ENABLED(CONFIG_CHROMEOS)) { if (IS_ENABLED(CONFIG_CHROMEOS)) {
/* Initialize Verified Boot data */ /* Initialize Verified Boot data */
chromeos_init_vboot(&gnvs->chromeos); chromeos_init_chromeos_acpi(&gnvs->chromeos);
gnvs->chromeos.vbt2 = ACTIVE_ECFW_RO; gnvs->chromeos.vbt2 = ACTIVE_ECFW_RO;
} }

View File

@ -92,7 +92,7 @@ void acpi_init_gnvs(global_nvs_t *gnvs)
#if IS_ENABLED(CONFIG_CHROMEOS) #if IS_ENABLED(CONFIG_CHROMEOS)
/* Initialize Verified Boot data */ /* Initialize Verified Boot data */
chromeos_init_vboot(&(gnvs->chromeos)); chromeos_init_chromeos_acpi(&(gnvs->chromeos));
#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC) #if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)
gnvs->chromeos.vbt2 = google_ec_running_ro() ? gnvs->chromeos.vbt2 = google_ec_running_ro() ?
ACTIVE_ECFW_RO : ACTIVE_ECFW_RW; ACTIVE_ECFW_RO : ACTIVE_ECFW_RW;

View File

@ -100,7 +100,7 @@ void acpi_init_gnvs(global_nvs_t *gnvs)
#if IS_ENABLED(CONFIG_CHROMEOS) #if IS_ENABLED(CONFIG_CHROMEOS)
/* Initialize Verified Boot data */ /* Initialize Verified Boot data */
chromeos_init_vboot(&(gnvs->chromeos)); chromeos_init_chromeos_acpi(&(gnvs->chromeos));
#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC) #if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)
gnvs->chromeos.vbt2 = google_ec_running_ro() ? gnvs->chromeos.vbt2 = google_ec_running_ro() ?
ACTIVE_ECFW_RO : ACTIVE_ECFW_RW; ACTIVE_ECFW_RO : ACTIVE_ECFW_RW;

View File

@ -177,7 +177,7 @@ void acpi_init_gnvs(global_nvs_t *gnvs)
#if IS_ENABLED(CONFIG_CHROMEOS) #if IS_ENABLED(CONFIG_CHROMEOS)
/* Initialize Verified Boot data */ /* Initialize Verified Boot data */
chromeos_init_vboot(&(gnvs->chromeos)); chromeos_init_chromeos_acpi(&(gnvs->chromeos));
#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC) #if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)
gnvs->chromeos.vbt2 = google_ec_running_ro() ? gnvs->chromeos.vbt2 = google_ec_running_ro() ?
ACTIVE_ECFW_RO : ACTIVE_ECFW_RW; ACTIVE_ECFW_RO : ACTIVE_ECFW_RW;

View File

@ -214,7 +214,7 @@ void acpi_create_gnvs(struct global_nvs_t *gnvs)
if (IS_ENABLED(CONFIG_CHROMEOS)) { if (IS_ENABLED(CONFIG_CHROMEOS)) {
/* Initialize Verified Boot data */ /* Initialize Verified Boot data */
chromeos_init_vboot(&(gnvs->chromeos)); chromeos_init_chromeos_acpi(&(gnvs->chromeos));
if (IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)) { if (IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)) {
gnvs->chromeos.vbt2 = google_ec_running_ro() ? gnvs->chromeos.vbt2 = google_ec_running_ro() ?
ACTIVE_ECFW_RO : ACTIVE_ECFW_RW; ACTIVE_ECFW_RO : ACTIVE_ECFW_RW;

View File

@ -192,7 +192,7 @@ static void acpi_create_gnvs(global_nvs_t *gnvs)
#if IS_ENABLED(CONFIG_CHROMEOS) #if IS_ENABLED(CONFIG_CHROMEOS)
/* Initialize Verified Boot data */ /* Initialize Verified Boot data */
chromeos_init_vboot(&(gnvs->chromeos)); chromeos_init_chromeos_acpi(&(gnvs->chromeos));
#if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC) #if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC)
gnvs->chromeos.vbt2 = google_ec_running_ro() ? gnvs->chromeos.vbt2 = google_ec_running_ro() ?
ACTIVE_ECFW_RO : ACTIVE_ECFW_RW; ACTIVE_ECFW_RO : ACTIVE_ECFW_RW;

View File

@ -739,7 +739,7 @@ static void southbridge_inject_dsdt(struct device *dev)
memcpy(gnvs->did, gfx->did, sizeof(gnvs->did)); memcpy(gnvs->did, gfx->did, sizeof(gnvs->did));
#if IS_ENABLED(CONFIG_CHROMEOS) #if IS_ENABLED(CONFIG_CHROMEOS)
chromeos_init_vboot(&(gnvs->chromeos)); chromeos_init_chromeos_acpi(&(gnvs->chromeos));
#endif #endif
/* And tell SMI about it */ /* And tell SMI about it */

View File

@ -770,7 +770,7 @@ static void southbridge_inject_dsdt(struct device *dev)
gnvs->pcnt = dev_count_cpu(); gnvs->pcnt = dev_count_cpu();
#if IS_ENABLED(CONFIG_CHROMEOS) #if IS_ENABLED(CONFIG_CHROMEOS)
chromeos_init_vboot(&(gnvs->chromeos)); chromeos_init_chromeos_acpi(&(gnvs->chromeos));
#endif #endif
/* Update the mem console pointer. */ /* Update the mem console pointer. */

View File

@ -30,7 +30,7 @@
static chromeos_acpi_t *chromeos_acpi; static chromeos_acpi_t *chromeos_acpi;
static u32 me_hash_saved[8]; static u32 me_hash_saved[8];
void chromeos_init_vboot(chromeos_acpi_t *init) void chromeos_init_chromeos_acpi(chromeos_acpi_t *init)
{ {
chromeos_acpi = init; chromeos_acpi = init;
@ -59,14 +59,7 @@ void chromeos_set_me_hash(u32 *hash, int len)
memcpy(me_hash_saved, hash, len*sizeof(u32)); memcpy(me_hash_saved, hash, len*sizeof(u32));
} }
void acpi_get_chromeos_acpi_info(uint64_t *chromeos_acpi_addr, chromeos_acpi_t *chromeos_get_chromeos_acpi(void)
uint32_t *chromeos_acpi_size)
{
*chromeos_acpi_addr = (intptr_t)chromeos_acpi;
*chromeos_acpi_size = sizeof(*chromeos_acpi);
}
chromeos_acpi_t *acpi_get_chromeos_acpi(void)
{ {
return chromeos_acpi; return chromeos_acpi;
} }

View File

@ -73,10 +73,8 @@ typedef struct {
u8 pad[314]; // dc6-eff u8 pad[314]; // dc6-eff
} __packed chromeos_acpi_t; } __packed chromeos_acpi_t;
void chromeos_init_vboot(chromeos_acpi_t *init); void chromeos_init_chromeos_acpi(chromeos_acpi_t *init);
void chromeos_set_me_hash(u32*, int); void chromeos_set_me_hash(u32*, int);
void acpi_get_chromeos_acpi_info(uint64_t *chromeos_acpi_addr, chromeos_acpi_t *chromeos_get_chromeos_acpi(void);
uint32_t *chromeos_acpi_size);
chromeos_acpi_t *acpi_get_chromeos_acpi(void);
#endif #endif