From 809ad764aaa6bacd626616da65afd6e08ab0ff80 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 21 May 2021 19:10:06 +0800 Subject: [PATCH] Update flash.md --- docs/flash.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/flash.md b/docs/flash.md index 1afa4ad54..e6dca0049 100644 --- a/docs/flash.md +++ b/docs/flash.md @@ -84,9 +84,11 @@ The EC update block is further structured as follows: The firmware control pages have the following structure: ``` -base + 0x0000: [u8; 32] = SHA-512/256 hash from base+0x20 to last byte of firmware -base + 0x0020: u32 = length of firmware in bytes, computed from start of first firmware page -base + 0x0024: [u8; 988] = [0xff as u8; 988] 0xff padding to start of first firmware page +base + 0x0000: [u8; 32] = SHA-512/256 hash from base+0x20 to last byte of firmware +base + 0x0020: [u8; 4] = [0x70, 0x72, 0x65, 0x63]; // signature 'prec' +base + 0x0024: u32 = firmware control page version number (currently 1) +base + 0x0028: u32 = length of firmware in bytes, computed from start of first firmware page +base + 0x002c: [u8; 4052] = [0xff as u8; 4052] 0xff padding to start of first firmware page base + 0x1000: [u8; FW_LEN] = actual firmware remainder of unused sectors are 0xff pad.