summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/via/nano/update_ucode.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/cpu/via/nano/update_ucode.c b/src/cpu/via/nano/update_ucode.c
index 7471928641..aa0adeb8dc 100644
--- a/src/cpu/via/nano/update_ucode.c
+++ b/src/cpu/via/nano/update_ucode.c
@@ -102,24 +102,24 @@ unsigned int nano_update_ucode(void)
{
size_t i;
unsigned int n_updates = 0;
- const struct cbfs_file *cbfs_ucode;
u32 fms = cpuid_eax(0x1);
+ /* Considering we are running with eXecute-In-Place (XIP), there's no
+ * need to worry that accessing data from ROM will slow us down.
+ * Microcode data should be aligned to a 4-byte boundary, but CBFS
+ * already does that for us (Do you, CBFS?) */
+ u32 *ucode_data;
+ size_t ucode_len;
- cbfs_ucode = cbfs_get_file(CBFS_DEFAULT_MEDIA, "cpu_microcode_blob.bin");
+ ucode_data = cbfs_get_file_content(CBFS_DEFAULT_MEDIA,
+ "cpu_microcode_blob.bin",
+ CBFS_TYPE_MICROCODE, &ucode_len);
/* Oops, did you forget to include the microcode ? */
- if(cbfs_ucode == NULL) {
+ if(ucode_data == NULL) {
printk(BIOS_ALERT, "WARNING: No microcode file found in CBFS. "
"Aborting microcode updates\n");
return 0;
}
- /* Considering we are running with eXecute-In-Place (XIP), there's no
- * need to worry that accessing data from ROM will slow us down.
- * Microcode data should be aligned to a 4-byte boundary, but CBFS
- * already does that for us (Do you, CBFS?) */
- const u32 *ucode_data = CBFS_SUBHEADER(cbfs_ucode);
- const u32 ucode_len = ntohl(cbfs_ucode->len);
-
/* We might do a lot of loops searching for the microcode updates, but
* keep in mind, nano_ucode_is_valid searches for the signature before
* doing anything else. */