LAR currently overwrites the top 13 bytes (0xfffff3-0xffffff) of the bootblock with zeros, then it stores the ROM size in 0xfffff4-0xfffff7. The top 8 bytes are unused in that scheme. Leave the top 8 bytes as they are and allow us to store something in there during the bootblock build process. The byte at 0xfffff3 is 0xff by default on x86 and setting it to 0 is not needed.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: corebootv3-lar_dont_erase_top_8_bytes/util/lar/stream.c =================================================================== --- corebootv3-lar_dont_erase_top_8_bytes/util/lar/stream.c (Revision 1061) +++ corebootv3-lar_dont_erase_top_8_bytes/util/lar/stream.c (Arbeitskopie) @@ -245,8 +245,9 @@ }
/** - * Add the LAR archive size to the bootblock, and clean up some other params - * in what we're loosely calling the "bootblockh header" + * Add the LAR archive size to the bootblock at 0xfffffff4 + * in what we're loosely calling the "bootblock header". + * Leave anything else alone. * @param ptr Pointer to the start of the bootblock * @param size The size value to write to the bootblock header */ @@ -255,7 +256,6 @@ int i; u32 *p;
- memset(ptr + (BOOTBLOCK_SIZE - 13), 0, 13); p = (u32 *) (ptr + BOOTBLOCK_SIZE - 12); p[0] = size; }