diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-12-22 19:23:29 +0000 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2024-03-31 16:57:19 +0100 |
commit | 6ffd42548bf10cda13a01555ff4fa56d4213cdf2 (patch) | |
tree | 975d6a4f88a0a3469c1450476e841ef0bf8fbb85 /firmware/export/multiboot.h | |
parent | af644e02a151bb6d4c229cc1d4846c7ffe952135 (diff) | |
download | rockbox-6ffd42548bf10cda13a01555ff4fa56d4213cdf2.tar.gz rockbox-6ffd42548bf10cda13a01555ff4fa56d4213cdf2.zip |
multiboot: Refactor boot data validation, add version numbers
Instead of verifying the CRC before every access of the boot data,
verify the CRC once at startup and set a flag to indicate the boot
data is valid.
Also add a framework to support multiple boot protocol versions.
Firmware declares the maximum supported protocol version using a
version byte in the boot data header. The bootloader chooses the
highest version supported by it and the firmware when deciding
what boot protocol to use.
Change-Id: I810194625dc0833f026d2a23b8d64ed467fa6aca
Diffstat (limited to 'firmware/export/multiboot.h')
-rw-r--r-- | firmware/export/multiboot.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/export/multiboot.h b/firmware/export/multiboot.h index 0132b8531f..4174e71d61 100644 --- a/firmware/export/multiboot.h +++ b/firmware/export/multiboot.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #ifndef __MULTIBOOT_H__ | 21 | #ifndef __MULTIBOOT_H__ |
22 | #define __MULTIBOOT_H__ | 22 | #define __MULTIBOOT_H__ |
23 | 23 | ||
24 | extern int write_bootdata(unsigned char* buf, int len, unsigned int boot_volume); | 24 | extern bool write_bootdata(unsigned char* buf, int len, unsigned int boot_volume); |
25 | #ifdef HAVE_MULTIBOOT | 25 | #ifdef HAVE_MULTIBOOT |
26 | extern int get_redirect_dir(char* buf, int buffer_size, int volume, | 26 | extern int get_redirect_dir(char* buf, int buffer_size, int volume, |
27 | const char* rootdir, const char* firmware); | 27 | const char* rootdir, const char* firmware); |