booster: change magic number for booster

Since the USB and flash communication layers are different, change the
magic number for booster.  This will prevent previous versions of foboot
from trying to launch our updater with the wrong version.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2019-11-28 16:36:45 +08:00
parent 5b5b98c6d4
commit acdccf5f98
4 changed files with 5 additions and 5 deletions

View File

@ -56,7 +56,7 @@ The SPI flash image looks something like this:
| 0x05a01c | 368668 | SPI ID of the target device |
| 0x1FFFFF | 20097151 | End of flash |
The "Booster Signature" is `0x4260fa37` -- if it contains this value, then
The "Booster Signature" is `0xfaa999b1` -- if it contains this value, then
this might be a Booster program.
The "Booster Checksum" is the result of summing together `[Booster length]`

View File

@ -11,11 +11,11 @@
#include "xxhash.h"
#define BOOSTER_SEED 0xc38b9e66L
#define BOOSTER_SIGNATURE 0x4260fa37
#define BOOSTER_SIGNATURE 0xfaa999b1
struct booster_data
{
uint32_t xxhash;
};
#endif /* FOBOOSTER_H_ */
#endif /* FOBOOSTER_H_ */

View File

@ -14,7 +14,7 @@
_start:
j crt_init
booster_signature:
.word 0x4260fa37
.word 0xfaa999b1
booster_length:
.word 0
booster_checksum:

View File

@ -109,7 +109,7 @@ void maybe_boot_updater(void) {
extern uint32_t spi_id;
uint32_t booster_base = SPIFLASH_BASE + 0x5a000;
if (csr_readl(booster_base + 4) != 0x4260fa37)
if (csr_readl(booster_base + 4) != 0xfaa999b1)
return;
if (csr_readl(booster_base + 28) != spi_id)
return;