[coreboot-gerrit] Patch set updated for coreboot: 2f3ee56 libpayload: move MRC processing to x86 path and remove ACPI_GNVS duplication
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Thu Mar 19 12:11:04 CET 2015
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8752
-gerrit
commit 2f3ee566fba2accbe5291c5c34b577a8f81eae65
Author: Vadim Bendebury <vbendeb at chromium.org>
Date: Fri Oct 24 13:29:43 2014 -0700
libpayload: move MRC processing to x86 path and remove ACPI_GNVS duplication
It turns out that CB_TAG_ACPI_GNVS is handled in both x86 specific and
common coreboot table parsing code. The MRC cache case used only by
x86 is handled in the common code.
This patch restores sanity and moves processing to where it belongs.
BRANCH=none
BUG=none
TEST=verified that arm and x86 targets build.
Change-Id: Iaddaa3380725be6d08a51a96c68b70522531bafe
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Original-Commit-Id: 0afae893d5027026cb666cd46e054aeae4e71f83
Original-Change-Id: I2c114a8469455002c51593cb8be80585925969a7
Original-Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/225457
Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
---
payloads/libpayload/arch/x86/coreboot.c | 18 +++++++++---------
payloads/libpayload/libc/coreboot.c | 9 ---------
2 files changed, 9 insertions(+), 18 deletions(-)
diff --git a/payloads/libpayload/arch/x86/coreboot.c b/payloads/libpayload/arch/x86/coreboot.c
index 1f37b80..3a9eb1a 100644
--- a/payloads/libpayload/arch/x86/coreboot.c
+++ b/payloads/libpayload/arch/x86/coreboot.c
@@ -42,27 +42,27 @@
/* === Parsing code === */
/* This is the generic parsing code. */
-static void cb_parse_acpi_gnvs(void *ptr, struct sysinfo_t *info)
-{
- struct cb_cbmem_tab *const cbmem = (struct cb_cbmem_tab *)ptr;
- info->acpi_gnvs = phys_to_virt(cbmem->cbmem_tab);
-}
-
static void cb_parse_x86_rom_var_mtrr(void *ptr, struct sysinfo_t *info)
{
struct cb_x86_rom_mtrr *rom_mtrr = ptr;
info->x86_rom_var_mtrr_index = rom_mtrr->index;
}
+static void cb_parse_mrc_cache(void *ptr, struct sysinfo_t *info)
+{
+ struct cb_cbmem_tab *const cbmem = (struct cb_cbmem_tab *)ptr;
+ info->mrc_cache = phys_to_virt(cbmem->cbmem_tab);
+}
+
int cb_parse_arch_specific(struct cb_record *rec, struct sysinfo_t *info)
{
switch(rec->tag) {
- case CB_TAG_ACPI_GNVS:
- cb_parse_acpi_gnvs(rec, info);
- break;
case CB_TAG_X86_ROM_MTRR:
cb_parse_x86_rom_var_mtrr(rec, info);
break;
+ case CB_TAG_MRC_CACHE:
+ cb_parse_mrc_cache(rec, info);
+ break;
default:
return 0;
}
diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c
index 8ed0307..b777e47 100644
--- a/payloads/libpayload/libc/coreboot.c
+++ b/payloads/libpayload/libc/coreboot.c
@@ -142,12 +142,6 @@ static void cb_parse_cbmem_cons(unsigned char *ptr, struct sysinfo_t *info)
info->cbmem_cons = phys_to_virt(cbmem->cbmem_tab);
}
-static void cb_parse_mrc_cache(unsigned char *ptr, struct sysinfo_t *info)
-{
- struct cb_cbmem_tab *const cbmem = (struct cb_cbmem_tab *)ptr;
- info->mrc_cache = phys_to_virt(cbmem->cbmem_tab);
-}
-
static void cb_parse_acpi_gnvs(unsigned char *ptr, struct sysinfo_t *info)
{
struct cb_cbmem_tab *const cbmem = (struct cb_cbmem_tab *)ptr;
@@ -315,9 +309,6 @@ int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
case CB_TAG_CBMEM_CONSOLE:
cb_parse_cbmem_cons(ptr, info);
break;
- case CB_TAG_MRC_CACHE:
- cb_parse_mrc_cache(ptr, info);
- break;
case CB_TAG_ACPI_GNVS:
cb_parse_acpi_gnvs(ptr, info);
break;
More information about the coreboot-gerrit
mailing list