Update flash.md

This commit is contained in:
bunnie 2021-05-21 19:10:06 +08:00 committed by GitHub
parent 6a44a7f08d
commit 809ad764aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.