summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2018-08-07 12:29:30 +0800
committerAaron Durbin <adurbin@chromium.org>2018-08-14 14:48:44 +0000
commit75b1f768d8eef24769ae9b559f66b3561d24b010 (patch)
tree53ea561d1de45350cb804052d32c7a6c84e29618 /payloads/libpayload
parent895439503954ab387f81061595bdfb1e27e6526c (diff)
cbmem: rename vdat to chromeos_acpi
There is a confusingly named section in cbmem called vdat. This section holds a data structure called chromeos_acpi_t, which exposes some system information to the Chrome OS userland utility crossystem. Within the chromeos_acpi_t structure, there is a member called vdat. This (currently) holds a VbSharedDataHeader. Rename the outer vdat to chromeos_acpi to make its purpose clear, and prevent the bizarreness of being able to access vdat->vdat. Additionally, disallow external references to the chromeos_acpi data structure in gnvs.c. BUG=b:112288216 TEST=emerge-eve coreboot, run on eve CQ-DEPEND=CL:1164722 Change-Id: Ia74e58cde21678f24b0bb6c1ca15048677116b2e Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://review.coreboot.org/27888 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/include/coreboot_tables.h2
-rw-r--r--payloads/libpayload/include/sysinfo.h4
-rw-r--r--payloads/libpayload/libc/coreboot.c12
3 files changed, 9 insertions, 9 deletions
diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h
index 6b6d1b421e..4cf57c53a3 100644
--- a/payloads/libpayload/include/coreboot_tables.h
+++ b/payloads/libpayload/include/coreboot_tables.h
@@ -200,7 +200,7 @@ struct cb_gpios {
struct cb_gpio gpios[0];
};
-#define CB_TAG_VDAT 0x0015
+#define CB_TAG_CHROMEOS_ACPI 0x0015
#define CB_TAG_VBNV 0x0019
#define CB_TAG_VBOOT_HANDOFF 0x0020
#define CB_TAG_DMA 0x0022
diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h
index f221a15faa..66933e3da0 100644
--- a/payloads/libpayload/include/sysinfo.h
+++ b/payloads/libpayload/include/sysinfo.h
@@ -97,8 +97,8 @@ struct sysinfo_t {
void *vboot_handoff;
u32 vboot_handoff_size;
- void *vdat_addr;
- u32 vdat_size;
+ void *chromeos_acpi_addr;
+ u32 chromeos_acpi_size;
#if IS_ENABLED(CONFIG_LP_ARCH_X86)
int x86_rom_var_mtrr_index;
diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c
index d831b96ba2..b8799871d5 100644
--- a/payloads/libpayload/libc/coreboot.c
+++ b/payloads/libpayload/libc/coreboot.c
@@ -106,12 +106,12 @@ static void cb_parse_gpios(unsigned char *ptr, struct sysinfo_t *info)
info->gpios[i] = gpios->gpios[i];
}
-static void cb_parse_vdat(unsigned char *ptr, struct sysinfo_t *info)
+static void cb_parse_chromeos_acpi(unsigned char *ptr, struct sysinfo_t *info)
{
- struct lb_range *vdat = (struct lb_range *) ptr;
+ struct lb_range *chromeos_acpi = (struct lb_range *) ptr;
- info->vdat_addr = phys_to_virt(vdat->range_start);
- info->vdat_size = vdat->range_size;
+ info->chromeos_acpi_addr = phys_to_virt(chromeos_acpi->range_start);
+ info->chromeos_acpi_size = chromeos_acpi->range_size;
}
static void cb_parse_mac_addresses(unsigned char *ptr,
@@ -357,8 +357,8 @@ int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
case CB_TAG_GPIO:
cb_parse_gpios(ptr, info);
break;
- case CB_TAG_VDAT:
- cb_parse_vdat(ptr, info);
+ case CB_TAG_CHROMEOS_ACPI:
+ cb_parse_chromeos_acpi(ptr, info);
break;
case CB_TAG_VBNV:
cb_parse_vbnv(ptr, info);