summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2020-03-04 16:52:08 -0800
committerPatrick Georgi <pgeorgi@google.com>2020-12-02 22:13:17 +0000
commit834b3ecd7cbefbad8f09a9bda4f10cd7842cdbcd (patch)
tree13db079f261e5fd3854f85e7f03c2d177fa7dbbb /src/mainboard/google
parent0d9072b1a196627755164288a9f334ef844628f5 (diff)
cbfs: Simplify load/map API names, remove type arguments
This patch renames cbfs_boot_map_with_leak() and cbfs_boot_load_file() to cbfs_map() and cbfs_load() respectively. This is supposed to be the start of a new, better organized CBFS API where the most common operations have the most simple and straight-forward names. Less commonly used variants of these operations (e.g. cbfs_ro_load() or cbfs_region_load()) can be introduced later. It seems unnecessary to keep carrying around "boot" in the names of most CBFS APIs if the vast majority of accesses go to the boot CBFS (instead, more unusual operations should have longer names that describe how they diverge from the common ones). cbfs_map() is paired with a new cbfs_unmap() to allow callers to cleanly reap mappings when desired. A few new cbfs_unmap() calls are added to generic code where it makes sense, but it seems unnecessary to introduce this everywhere in platform or architecture specific code where the boot medium is known to be memory-mapped anyway. In fact, even for non-memory-mapped platforms, sometimes leaking a mapping to the CBFS cache is a much cleaner solution than jumping through hoops to provide some other storage for some long-lived file object, and it shouldn't be outright forbidden when it makes sense. Additionally, remove the type arguments from these function signatures. The goal is to eventually remove type arguments for lookup from the whole CBFS API. Filenames already uniquely identify CBFS files. The type field is just informational, and there should be APIs to allow callers to check it when desired, but it's not clear what we gain from forcing this as a parameter into every single CBFS access when the vast majority of the time it provides no additional value and is just clutter. Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: Ib24325400815a9c3d25f66c61829a24a239bb88e Reviewed-on: https://review.coreboot.org/c/coreboot/+/39304 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Wim Vervoorn <wvervoorn@eltan.com> Reviewed-by: Mariusz SzafraƄski <mariuszx.szafranski@intel.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/asurada/sdram_configs.c3
-rw-r--r--src/mainboard/google/auron/variants/auron_paine/spd/spd.c2
-rw-r--r--src/mainboard/google/auron/variants/auron_yuna/spd/spd.c2
-rw-r--r--src/mainboard/google/auron/variants/buddy/variant.c4
-rw-r--r--src/mainboard/google/auron/variants/gandof/spd/spd.c2
-rw-r--r--src/mainboard/google/auron/variants/lulu/spd/spd.c2
-rw-r--r--src/mainboard/google/auron/variants/samus/spd/spd.c2
-rw-r--r--src/mainboard/google/beltino/lan.c4
-rw-r--r--src/mainboard/google/butterfly/mainboard.c3
-rw-r--r--src/mainboard/google/cyan/spd/spd.c3
-rw-r--r--src/mainboard/google/eve/spd/spd.c3
-rw-r--r--src/mainboard/google/glados/spd/spd.c3
-rw-r--r--src/mainboard/google/gru/sdram_configs.c3
-rw-r--r--src/mainboard/google/jecht/lan.c4
-rw-r--r--src/mainboard/google/kahlee/variants/baseboard/mainboard.c4
-rw-r--r--src/mainboard/google/kahlee/variants/nuwani/mainboard.c4
-rw-r--r--src/mainboard/google/kahlee/variants/treeya/mainboard.c4
-rw-r--r--src/mainboard/google/kukui/mainboard.c3
-rw-r--r--src/mainboard/google/kukui/sdram_configs.c3
-rw-r--r--src/mainboard/google/link/early_init.c3
-rw-r--r--src/mainboard/google/poppy/romstage.c3
-rw-r--r--src/mainboard/google/poppy/variants/nami/mainboard.c5
-rw-r--r--src/mainboard/google/rambi/romstage.c3
-rw-r--r--src/mainboard/google/rambi/variants/ninja/lan.c4
-rw-r--r--src/mainboard/google/rambi/variants/sumo/lan.c4
-rw-r--r--src/mainboard/google/slippy/variants/falco/romstage.c3
-rw-r--r--src/mainboard/google/slippy/variants/leon/romstage.c3
-rw-r--r--src/mainboard/google/slippy/variants/peppy/romstage.c3
-rw-r--r--src/mainboard/google/slippy/variants/wolf/romstage.c3
29 files changed, 30 insertions, 62 deletions
diff --git a/src/mainboard/google/asurada/sdram_configs.c b/src/mainboard/google/asurada/sdram_configs.c
index 9efcb32dae..e1eb527720 100644
--- a/src/mainboard/google/asurada/sdram_configs.c
+++ b/src/mainboard/google/asurada/sdram_configs.c
@@ -17,8 +17,7 @@ const struct sdram_info *get_sdram_config(void)
uint32_t ramcode = ram_code();
if (ramcode >= ARRAY_SIZE(sdram_configs) ||
- cbfs_boot_load_file(sdram_configs[ramcode], &params, sizeof(params),
- CBFS_TYPE_STRUCT) != sizeof(params))
+ cbfs_load(sdram_configs[ramcode], &params, sizeof(params)) != sizeof(params))
die("Cannot load SDRAM parameter file for RAM code: %#x", ramcode);
return &params;
diff --git a/src/mainboard/google/auron/variants/auron_paine/spd/spd.c b/src/mainboard/google/auron/variants/auron_paine/spd/spd.c
index da00ad9dfb..12a9d7cb12 100644
--- a/src/mainboard/google/auron/variants/auron_paine/spd/spd.c
+++ b/src/mainboard/google/auron/variants/auron_paine/spd/spd.c
@@ -88,7 +88,7 @@ void mainboard_fill_spd_data(struct pei_data *pei_data)
spd_bits[1], spd_gpio[1],
spd_bits[0], spd_gpio[0]);
- spd_file = cbfs_boot_map_with_leak("spd.bin", 0xab, &spd_file_len);
+ spd_file = cbfs_map("spd.bin", &spd_file_len);
if (!spd_file)
die("SPD data not found.");
diff --git a/src/mainboard/google/auron/variants/auron_yuna/spd/spd.c b/src/mainboard/google/auron/variants/auron_yuna/spd/spd.c
index da00ad9dfb..12a9d7cb12 100644
--- a/src/mainboard/google/auron/variants/auron_yuna/spd/spd.c
+++ b/src/mainboard/google/auron/variants/auron_yuna/spd/spd.c
@@ -88,7 +88,7 @@ void mainboard_fill_spd_data(struct pei_data *pei_data)
spd_bits[1], spd_gpio[1],
spd_bits[0], spd_gpio[0]);
- spd_file = cbfs_boot_map_with_leak("spd.bin", 0xab, &spd_file_len);
+ spd_file = cbfs_map("spd.bin", &spd_file_len);
if (!spd_file)
die("SPD data not found.");
diff --git a/src/mainboard/google/auron/variants/buddy/variant.c b/src/mainboard/google/auron/variants/buddy/variant.c
index 81bb828047..2ffc38a185 100644
--- a/src/mainboard/google/auron/variants/buddy/variant.c
+++ b/src/mainboard/google/auron/variants/buddy/variant.c
@@ -129,9 +129,7 @@ static void program_mac_address(u16 io_base)
search_length = region_device_sz(&rdev);
}
} else {
- search_address = cbfs_boot_map_with_leak("vpd.bin",
- CBFS_TYPE_RAW,
- &search_length);
+ search_address = cbfs_map("vpd.bin", &search_length);
}
if (search_address == NULL)
diff --git a/src/mainboard/google/auron/variants/gandof/spd/spd.c b/src/mainboard/google/auron/variants/gandof/spd/spd.c
index da00ad9dfb..12a9d7cb12 100644
--- a/src/mainboard/google/auron/variants/gandof/spd/spd.c
+++ b/src/mainboard/google/auron/variants/gandof/spd/spd.c
@@ -88,7 +88,7 @@ void mainboard_fill_spd_data(struct pei_data *pei_data)
spd_bits[1], spd_gpio[1],
spd_bits[0], spd_gpio[0]);
- spd_file = cbfs_boot_map_with_leak("spd.bin", 0xab, &spd_file_len);
+ spd_file = cbfs_map("spd.bin", &spd_file_len);
if (!spd_file)
die("SPD data not found.");
diff --git a/src/mainboard/google/auron/variants/lulu/spd/spd.c b/src/mainboard/google/auron/variants/lulu/spd/spd.c
index 750470e89c..905e196f7b 100644
--- a/src/mainboard/google/auron/variants/lulu/spd/spd.c
+++ b/src/mainboard/google/auron/variants/lulu/spd/spd.c
@@ -92,7 +92,7 @@ void mainboard_fill_spd_data(struct pei_data *pei_data)
spd_bits[1], spd_gpio[1],
spd_bits[0], spd_gpio[0]);
- spd_file = cbfs_boot_map_with_leak("spd.bin", 0xab, &spd_file_len);
+ spd_file = cbfs_map("spd.bin", &spd_file_len);
if (!spd_file)
die("SPD data not found.");
diff --git a/src/mainboard/google/auron/variants/samus/spd/spd.c b/src/mainboard/google/auron/variants/samus/spd/spd.c
index 4684d86dce..4cad47432c 100644
--- a/src/mainboard/google/auron/variants/samus/spd/spd.c
+++ b/src/mainboard/google/auron/variants/samus/spd/spd.c
@@ -88,7 +88,7 @@ void mainboard_fill_spd_data(struct pei_data *pei_data)
spd_bits[3], spd_gpio[3], spd_bits[2], spd_gpio[2],
spd_bits[1], spd_gpio[1], spd_bits[0], spd_gpio[0]);
- spd_file = cbfs_boot_map_with_leak("spd.bin", 0xab, &spd_file_len);
+ spd_file = cbfs_map("spd.bin", &spd_file_len);
if (!spd_file)
die("SPD data not found.");
diff --git a/src/mainboard/google/beltino/lan.c b/src/mainboard/google/beltino/lan.c
index c14a1e4584..d9df5a1404 100644
--- a/src/mainboard/google/beltino/lan.c
+++ b/src/mainboard/google/beltino/lan.c
@@ -110,9 +110,7 @@ static void program_mac_address(u16 io_base)
search_length = region_device_sz(&rdev);
}
} else {
- search_address = cbfs_boot_map_with_leak("vpd.bin",
- CBFS_TYPE_RAW,
- &search_length);
+ search_address = cbfs_map("vpd.bin", &search_length);
}
if (search_address == NULL)
diff --git a/src/mainboard/google/butterfly/mainboard.c b/src/mainboard/google/butterfly/mainboard.c
index d2e2aa552a..d9cf1b9434 100644
--- a/src/mainboard/google/butterfly/mainboard.c
+++ b/src/mainboard/google/butterfly/mainboard.c
@@ -180,8 +180,7 @@ static void mainboard_init(struct device *dev)
}
}
} else {
- vpd_file = cbfs_boot_map_with_leak("vpd.bin", CBFS_TYPE_RAW,
- &search_length);
+ vpd_file = cbfs_map("vpd.bin", &search_length);
if (vpd_file) {
search_address = (unsigned long)vpd_file;
} else {
diff --git a/src/mainboard/google/cyan/spd/spd.c b/src/mainboard/google/cyan/spd/spd.c
index 1c08d9069a..21a298e88a 100644
--- a/src/mainboard/google/cyan/spd/spd.c
+++ b/src/mainboard/google/cyan/spd/spd.c
@@ -35,8 +35,7 @@ static void *get_spd_pointer(int *dual)
int spd_index = 0;
/* Find the SPD data in CBFS. */
- spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD,
- &spd_file_len);
+ spd_file = cbfs_map("spd.bin", &spd_file_len);
if (!spd_file)
die("SPD data not found.");
diff --git a/src/mainboard/google/eve/spd/spd.c b/src/mainboard/google/eve/spd/spd.c
index 330ea5201c..e9405f08cb 100644
--- a/src/mainboard/google/eve/spd/spd.c
+++ b/src/mainboard/google/eve/spd/spd.c
@@ -82,8 +82,7 @@ uintptr_t mainboard_get_spd_data(void)
printk(BIOS_INFO, "SPD index %d\n", spd_index);
/* Load SPD data from CBFS */
- spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD,
- &spd_file_len);
+ spd_file = cbfs_map("spd.bin", &spd_file_len);
if (!spd_file)
die("SPD data not found.");
diff --git a/src/mainboard/google/glados/spd/spd.c b/src/mainboard/google/glados/spd/spd.c
index 627dc3f4e5..9bfb202bb9 100644
--- a/src/mainboard/google/glados/spd/spd.c
+++ b/src/mainboard/google/glados/spd/spd.c
@@ -79,8 +79,7 @@ void spd_memory_init_params(FSPM_UPD *mupd, int spd_index)
printk(BIOS_INFO, "SPD index %d\n", spd_index);
/* Load SPD data from CBFS */
- spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD,
- &spd_file_len);
+ spd_file = cbfs_map("spd.bin", &spd_file_len);
if (!spd_file)
die("SPD data not found.");
diff --git a/src/mainboard/google/gru/sdram_configs.c b/src/mainboard/google/gru/sdram_configs.c
index 87a5009eb6..2aceb9f084 100644
--- a/src/mainboard/google/gru/sdram_configs.c
+++ b/src/mainboard/google/gru/sdram_configs.c
@@ -53,8 +53,7 @@ const struct rk3399_sdram_params *get_sdram_config()
if (ramcode >= ARRAY_SIZE(sdram_configs) ||
!snprintf(config_file, sizeof(config_file), "%s-%d",
sdram_configs[ramcode], get_sdram_target_mhz()) ||
- (cbfs_boot_load_file(config_file, &params, sizeof(params),
- CBFS_TYPE_STRUCT) != sizeof(params)))
+ (cbfs_load(config_file, &params, sizeof(params)) != sizeof(params)))
die("Cannot load SDRAM parameter file!");
return &params;
diff --git a/src/mainboard/google/jecht/lan.c b/src/mainboard/google/jecht/lan.c
index 3d19f99953..4dedb56c70 100644
--- a/src/mainboard/google/jecht/lan.c
+++ b/src/mainboard/google/jecht/lan.c
@@ -110,9 +110,7 @@ static void program_mac_address(u16 io_base)
search_length = region_device_sz(&rdev);
}
} else {
- search_address = cbfs_boot_map_with_leak("vpd.bin",
- CBFS_TYPE_RAW,
- &search_length);
+ search_address = cbfs_map("vpd.bin", &search_length);
}
if (search_address == NULL)
diff --git a/src/mainboard/google/kahlee/variants/baseboard/mainboard.c b/src/mainboard/google/kahlee/variants/baseboard/mainboard.c
index 95f0a8d642..860190a2b6 100644
--- a/src/mainboard/google/kahlee/variants/baseboard/mainboard.c
+++ b/src/mainboard/google/kahlee/variants/baseboard/mainboard.c
@@ -89,9 +89,7 @@ const char *smbios_mainboard_manufacturer(void)
if (manuf)
return manuf;
- if (cbfs_boot_load_file("oem.bin", oem_bin_data,
- sizeof(oem_bin_data) - 1,
- CBFS_TYPE_RAW))
+ if (cbfs_load("oem.bin", oem_bin_data, sizeof(oem_bin_data) - 1))
manuf = &oem_bin_data[0];
else
manuf = CONFIG_MAINBOARD_SMBIOS_MANUFACTURER;
diff --git a/src/mainboard/google/kahlee/variants/nuwani/mainboard.c b/src/mainboard/google/kahlee/variants/nuwani/mainboard.c
index df31c6f42f..ce98d62c18 100644
--- a/src/mainboard/google/kahlee/variants/nuwani/mainboard.c
+++ b/src/mainboard/google/kahlee/variants/nuwani/mainboard.c
@@ -101,9 +101,7 @@ const char *smbios_mainboard_manufacturer(void)
if (manuf)
return manuf;
- if (cbfs_boot_load_file("oem.bin", oem_bin_data,
- sizeof(oem_bin_data) - 1,
- CBFS_TYPE_RAW))
+ if (cbfs_load("oem.bin", oem_bin_data, sizeof(oem_bin_data) - 1))
manuf = &oem_bin_data[0];
else
manuf = CONFIG_MAINBOARD_SMBIOS_MANUFACTURER;
diff --git a/src/mainboard/google/kahlee/variants/treeya/mainboard.c b/src/mainboard/google/kahlee/variants/treeya/mainboard.c
index df31c6f42f..ce98d62c18 100644
--- a/src/mainboard/google/kahlee/variants/treeya/mainboard.c
+++ b/src/mainboard/google/kahlee/variants/treeya/mainboard.c
@@ -101,9 +101,7 @@ const char *smbios_mainboard_manufacturer(void)
if (manuf)
return manuf;
- if (cbfs_boot_load_file("oem.bin", oem_bin_data,
- sizeof(oem_bin_data) - 1,
- CBFS_TYPE_RAW))
+ if (cbfs_load("oem.bin", oem_bin_data, sizeof(oem_bin_data) - 1))
manuf = &oem_bin_data[0];
else
manuf = CONFIG_MAINBOARD_SMBIOS_MANUFACTURER;
diff --git a/src/mainboard/google/kukui/mainboard.c b/src/mainboard/google/kukui/mainboard.c
index cbcb5da1c6..4220810d17 100644
--- a/src/mainboard/google/kukui/mainboard.c
+++ b/src/mainboard/google/kukui/mainboard.c
@@ -112,8 +112,7 @@ struct panel_description *get_panel_from_cbfs(struct panel_description *desc)
return NULL;
snprintf(cbfs_name, sizeof(cbfs_name), "panel-%s", desc->name);
- if (cbfs_boot_load_file(cbfs_name, buffer.raw, sizeof(buffer),
- CBFS_TYPE_STRUCT))
+ if (cbfs_load(cbfs_name, buffer.raw, sizeof(buffer)))
desc->s = &buffer.s;
else
printk(BIOS_ERR, "Missing %s in CBFS.\n", cbfs_name);
diff --git a/src/mainboard/google/kukui/sdram_configs.c b/src/mainboard/google/kukui/sdram_configs.c
index 523958788b..57f5e6e765 100644
--- a/src/mainboard/google/kukui/sdram_configs.c
+++ b/src/mainboard/google/kukui/sdram_configs.c
@@ -43,8 +43,7 @@ const struct sdram_params *get_sdram_config(void)
if (ramcode < ARRAY_SIZE(sdram_configs))
name = sdram_configs[ramcode];
- if (!name || cbfs_boot_load_file(name, &params, sizeof(params),
- CBFS_TYPE_STRUCT) != sizeof(params))
+ if (!name || cbfs_load(name, &params, sizeof(params)) != sizeof(params))
die("Cannot load SDRAM parameter file for RAM code %#02x: %s!",
ramcode, name ? name : "unknown");
diff --git a/src/mainboard/google/link/early_init.c b/src/mainboard/google/link/early_init.c
index f3da77cd6b..de8f749770 100644
--- a/src/mainboard/google/link/early_init.c
+++ b/src/mainboard/google/link/early_init.c
@@ -66,8 +66,7 @@ static uint8_t *locate_spd(void)
int spd_index = get_gpios(gpio_vector);
printk(BIOS_DEBUG, "spd index %d\n", spd_index);
- spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD,
- &spd_file_len);
+ spd_file = cbfs_map("spd.bin", &spd_file_len);
if (!spd_file)
die("SPD data not found.");
diff --git a/src/mainboard/google/poppy/romstage.c b/src/mainboard/google/poppy/romstage.c
index 0c1fc02133..7fd4409401 100644
--- a/src/mainboard/google/poppy/romstage.c
+++ b/src/mainboard/google/poppy/romstage.c
@@ -112,8 +112,7 @@ static uintptr_t mainboard_get_spd_data(enum memory_type type, bool use_sec_spd)
printk(BIOS_INFO, "SPD index %d\n", spd_index);
/* Load SPD data from CBFS */
- spd_file = cbfs_boot_map_with_leak(spd_bin, CBFS_TYPE_SPD,
- &spd_file_len);
+ spd_file = cbfs_map(spd_bin, &spd_file_len);
if (!spd_file)
die("SPD data not found.");
diff --git a/src/mainboard/google/poppy/variants/nami/mainboard.c b/src/mainboard/google/poppy/variants/nami/mainboard.c
index 8d5d0c482b..1387716298 100644
--- a/src/mainboard/google/poppy/variants/nami/mainboard.c
+++ b/src/mainboard/google/poppy/variants/nami/mainboard.c
@@ -155,9 +155,8 @@ const char *smbios_mainboard_manufacturer(void)
if (oem_id == OEM_UNKNOWN)
return CONFIG_MAINBOARD_SMBIOS_MANUFACTURER;
- oem_data_size = cbfs_boot_load_file("oem.bin", oem_bin_data,
- sizeof(oem_bin_data),
- CBFS_TYPE_RAW);
+ oem_data_size = cbfs_load("oem.bin", oem_bin_data,
+ sizeof(oem_bin_data));
while ((curr < oem_data_size) &&
((oem_data_size - curr) >= sizeof(*oem_entry))) {
diff --git a/src/mainboard/google/rambi/romstage.c b/src/mainboard/google/rambi/romstage.c
index 6487f43121..28496b15ba 100644
--- a/src/mainboard/google/rambi/romstage.c
+++ b/src/mainboard/google/rambi/romstage.c
@@ -48,8 +48,7 @@ void mainboard_fill_mrc_params(struct mrc_params *mp)
void *spd_file;
size_t spd_fsize;
- spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD,
- &spd_fsize);
+ spd_file = cbfs_map("spd.bin", &spd_fsize);
if (!spd_file)
die("SPD data not found.");
diff --git a/src/mainboard/google/rambi/variants/ninja/lan.c b/src/mainboard/google/rambi/variants/ninja/lan.c
index e5688df0f2..1304071444 100644
--- a/src/mainboard/google/rambi/variants/ninja/lan.c
+++ b/src/mainboard/google/rambi/variants/ninja/lan.c
@@ -109,9 +109,7 @@ static void program_mac_address(u16 io_base)
search_length = region_device_sz(&rdev);
}
} else {
- search_address = cbfs_boot_map_with_leak("vpd.bin",
- CBFS_TYPE_RAW,
- &search_length);
+ search_address = cbfs_map("vpd.bin", &search_length);
}
if (search_address == NULL)
diff --git a/src/mainboard/google/rambi/variants/sumo/lan.c b/src/mainboard/google/rambi/variants/sumo/lan.c
index 53bd4fb02f..29bc0fe336 100644
--- a/src/mainboard/google/rambi/variants/sumo/lan.c
+++ b/src/mainboard/google/rambi/variants/sumo/lan.c
@@ -109,9 +109,7 @@ static void program_mac_address(u16 io_base)
search_length = region_device_sz(&rdev);
}
} else {
- search_address = cbfs_boot_map_with_leak("vpd.bin",
- CBFS_TYPE_RAW,
- &search_length);
+ search_address = cbfs_map("vpd.bin", &search_length);
}
if (search_address == NULL)
diff --git a/src/mainboard/google/slippy/variants/falco/romstage.c b/src/mainboard/google/slippy/variants/falco/romstage.c
index eba4a8b648..516b26c9c5 100644
--- a/src/mainboard/google/slippy/variants/falco/romstage.c
+++ b/src/mainboard/google/slippy/variants/falco/romstage.c
@@ -21,8 +21,7 @@ void copy_spd(struct pei_data *peid)
size_t spd_len = sizeof(peid->spd_data[0]);
printk(BIOS_DEBUG, "SPD index %d\n", spd_index);
- spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD,
- &spd_file_len);
+ spd_file = cbfs_map("spd.bin", &spd_file_len);
if (!spd_file)
die("SPD data not found.");
diff --git a/src/mainboard/google/slippy/variants/leon/romstage.c b/src/mainboard/google/slippy/variants/leon/romstage.c
index 2b1b5ca6bd..e24dcb9808 100644
--- a/src/mainboard/google/slippy/variants/leon/romstage.c
+++ b/src/mainboard/google/slippy/variants/leon/romstage.c
@@ -20,8 +20,7 @@ void copy_spd(struct pei_data *peid)
size_t spd_len = sizeof(peid->spd_data[0]);
printk(BIOS_DEBUG, "SPD index %d\n", spd_index);
- spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD,
- &spd_file_len);
+ spd_file = cbfs_map("spd.bin", &spd_file_len);
if (!spd_file)
die("SPD data not found.");
diff --git a/src/mainboard/google/slippy/variants/peppy/romstage.c b/src/mainboard/google/slippy/variants/peppy/romstage.c
index 230595e205..92e1e8dd5e 100644
--- a/src/mainboard/google/slippy/variants/peppy/romstage.c
+++ b/src/mainboard/google/slippy/variants/peppy/romstage.c
@@ -24,8 +24,7 @@ void copy_spd(struct pei_data *peid)
uint32_t board_version = PEPPY_BOARD_VERSION_PROTO;
printk(BIOS_DEBUG, "SPD index %d\n", spd_index);
- spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD,
- &spd_file_len);
+ spd_file = cbfs_map("spd.bin", &spd_file_len);
if (!spd_file)
die("SPD data not found.");
diff --git a/src/mainboard/google/slippy/variants/wolf/romstage.c b/src/mainboard/google/slippy/variants/wolf/romstage.c
index 405e86acef..a0b5055457 100644
--- a/src/mainboard/google/slippy/variants/wolf/romstage.c
+++ b/src/mainboard/google/slippy/variants/wolf/romstage.c
@@ -21,8 +21,7 @@ void copy_spd(struct pei_data *peid)
size_t spd_len = sizeof(peid->spd_data[0]);
printk(BIOS_DEBUG, "SPD index %d\n", spd_index);
- spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD,
- &spd_file_len);
+ spd_file = cbfs_map("spd.bin", &spd_file_len);
if (!spd_file)
die("SPD data not found.");