Commit 8a388085 authored by Simon Glass's avatar Simon Glass
Browse files

x86: Correct ifdtool microcode calculation

This currently assumes that U-Boot resides at the start of ROM. Update
it to remove this assumption.
Signed-off-by: default avatarSimon Glass <>
Tested-by: default avatarBin Meng <>
parent 6c911c43
......@@ -788,9 +788,9 @@ static int write_uboot(char *image, int size, struct input_file *uboot,
return -ENOENT;
offset = ucode_ptr - uboot->addr;
offset = (uint32_t)(ucode_ptr + size);
ptr = (void *)image + offset;
ptr[0] = uboot->addr + (data - image);
ptr[0] = (data - image) - size;
ptr[1] = data_size;
debug("Wrote microcode pointer at %x: addr=%x, size=%x\n",
ucode_ptr, ptr[0], ptr[1]);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment