cpu/amd (non-AGESA): Remove terminator from microcode blob

Change-Id: I6370e971922dee5e8d476a883c5f0f32fbbc8911
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-on: http://review.coreboot.org/4534
Tested-by: build bot (Jenkins)
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
This commit is contained in:
Kyösti Mälkki
2013-12-16 07:19:09 +02:00
committed by Alexandru Gagniuc
parent d15cb519ad
commit 1608f3651f
3 changed files with 4 additions and 14 deletions

View File

@@ -80,9 +80,11 @@ static void amd_update_microcode(const void *ucode, size_t ucode_len,
uint32_t equivalent_processor_rev_id)
{
const struct microcode *m;
const void *c;
const uint8_t *c = ucode;
const uint8_t *ucode_end = (uint8_t*)ucode + ucode_len;
for(m = c = ucode; m->date_code; m = c) {
while (c <= (ucode_end - 2048)) {
m = (struct microcode *)c;
if (m->processor_rev_id == equivalent_processor_rev_id) {
apply_microcode_patch(m);
break;