Home
last modified time | relevance | path

Searched full:magic (Results 1 – 25 of 38) sorted by relevance

12

/mcuboot-latest/boot/bootutil/src/
Dbootutil_public.c72 .magic = {
148 * Determines if a status source table is satisfied by the specified magic
151 * @param tbl_val A magic field from a status source table.
152 * @param val The magic value in a trailer, encoded as a
223 uint8_t magic[BOOT_MAGIC_SZ]; in boot_read_swap_state() local
229 rc = flash_area_read(fap, off, magic, BOOT_MAGIC_SZ); in boot_read_swap_state()
233 if (bootutil_buffer_is_erased(fap, magic, BOOT_MAGIC_SZ)) { in boot_read_swap_state()
234 state->magic = BOOT_MAGIC_UNSET; in boot_read_swap_state()
236 state->magic = boot_magic_decode(magic); in boot_read_swap_state()
285 uint8_t magic[BOOT_MAGIC_ALIGN_SIZE]; in boot_write_magic() local
[all …]
Dbootutil_misc.c203 * by looking for the magic in the possible locations.
205 * If the magic is successfully found, a flash_area * is returned and it
223 * storing a valid magic, first on the primary slot, then on scratch. in boot_find_status()
225 * is assumed that if magic is valid then other metadata is too, in boot_find_status()
226 * because magic is always written in the last step. in boot_find_status()
230 uint8_t magic[BOOT_MAGIC_SZ]; in boot_find_status() local
236 if (flash_area_read(*fap, boot_magic_off(*fap), magic, BOOT_MAGIC_SZ)) { in boot_find_status()
241 if (BOOT_MAGIC_GOOD == boot_magic_decode(magic)) { in boot_find_status()
248 /* If we got here, no magic was found */ in boot_find_status()
Dbootutil_misc.h20 boot_magic_decode(const uint8_t *magic) in boot_magic_decode() argument
22 if (memcmp(magic, BOOT_IMG_MAGIC, BOOT_MAGIC_SZ) == 0) { in boot_magic_decode()
Dswap_move.c332 BOOT_LOG_INF("%s: magic=%s, swap_type=0x%x, copy_done=0x%x, " \
335 ((state)->magic == BOOT_MAGIC_GOOD ? "good" : \
336 (state)->magic == BOOT_MAGIC_UNSET ? "unset" : \
369 if (state_primary_slot.magic == BOOT_MAGIC_GOOD && in swap_status_source()
371 state_secondary_slot.magic != BOOT_MAGIC_GOOD) { in swap_status_source()
502 if (swap_state.magic == BOOT_MAGIC_UNSET) { in fixup_revert()
Dswap_scratch.c244 BOOT_LOG_INF("%s: magic=%s, swap_type=0x%x, copy_done=0x%x, " \
247 ((state)->magic == BOOT_MAGIC_GOOD ? "good" : \
248 (state)->magic == BOOT_MAGIC_UNSET ? "unset" : \
269 * magic | Good | Any |
284 * magic | Good | Any |
299 * magic | Any | Good |
313 * magic | Unset | Any |
376 state_primary_slot.magic) && in swap_status_source()
379 state_scratch.magic) && in swap_status_source()
Dbootutil_priv.h142 * | (BOOT_MAX_ALIGN minus 16 octets from MAGIC) |
144 * | MAGIC (16 octets) |
156 uint8_t magic[14]; member
171 _Static_assert(sizeof(boot_img_magic) == BOOT_MAGIC_SZ, "Invalid size for image magic");
/mcuboot-latest/scripts/imgtool/
Ddumpinfo.py29 HEADER_ITEMS = ("magic", "load_addr", "hdr_size", "protected_tlv_size",
70 magic = ""
72 magic += "{0:#04x} ".format(trailer_magic[i])
74 magic += ("\n" + " ")
75 return magic
161 tlv_area["tlv_hdr_prot"]["magic"] = _tlv_prot_head[0]
178 tlv_area["tlv_hdr"]["magic"] = _tlv_head[0]
201 trailer["magic"] = trailer_magic
207 # The alignment value is encoded in the magic field
210 # Invalid magic: the rest of the image trailer cannot be processed.
[all …]
Dimage.py123 def __init__(self, endian, magic=TLV_INFO_MAGIC): argument
124 self.magic = magic
152 header = struct.pack(e + 'HH', self.magic, len(self))
707 'I' + # Magic uint32
785 magic, _, header_size, _, img_size = struct.unpack('IIHHI', b[:16])
788 if magic != IMAGE_MAGIC:
793 magic, tlv_tot = struct.unpack('HH', tlv_info)
794 if magic == TLV_PROT_INFO_MAGIC:
797 magic, tlv_tot = struct.unpack('HH', tlv_info)
799 if magic != TLV_INFO_MAGIC:
/mcuboot-latest/scripts/
Dmcubin.bt40 Warning("Invalid magic on ptable header");
58 uint32 magic <format=hex>;
69 uint16 magic;
111 if (ihdr.magic == 0x96f3b83d) {
117 if (tlv_hdr.magic == 0x6907) {
/mcuboot-latest/boot/espressif/hal/include/
Desp_mcuboot_image.h9 /* Magic is derived from sha256sum of the string "espmcuboot"
10 * The application header magic must match this number
18 uint32_t header_magic; /* Magic for load header */
/mcuboot-latest/docs/
Ddesign.md127 If protected TLVs are present then a TLV info header with magic equal to
478 | (BOOT_MAX_ALIGN minus 16 octets from MAGIC) |
480 | MAGIC (16 octets) |
557 7. MAGIC: A 16-byte field identifying the image trailer layout. It may assume
566 uint8_t magic[14];
571 If `BOOT_MAX_ALIGN` is **8 bytes**, then MAGIC contains the following 16 bytes:
585 supported write alignment value is encoded in the MAGIC field, followed by a fixed
591 .magic = {
639 magic | Any | Good |
650 magic | Any | Good |
[all …]
/mcuboot-latest/boot/mbed/include/utils/
DDataShare.h55 * Validates the magic number of the shared data section
56 * @return true if magic number is found, false otherwise
DDataShare.cpp37 /* Validate magic word */ in DataShare()
/mcuboot-latest/boot/boot_serial/
Dsyscfg.yml77 Magic number, to be saved in a retained (reset-surviving) register.
87 magic value.
/mcuboot-latest/sim/src/
Dimage.rs939 // Tests a new image written to the primary slot that already has magic and
992 // Tests a new image written to the primary slot that already has magic and
1618 magic: Option<u8>, image_ok: Option<u8>, in verify_trailers_loose()
1622 magic, image_ok, copy_done) in verify_trailers_loose()
1629 magic: Option<u8>, image_ok: Option<u8>, in verify_trailers()
1633 magic, image_ok, copy_done) in verify_trailers()
1812 magic: tlv.get_magic(), in install_image()
2064 magic: Option<u8>, image_ok: Option<u8>, in verify_trailer()
2079 failed |= match magic { in verify_trailer()
2081 let magic_off = (c::boot_max_align() * 3) + (c::boot_magic_sz() - MAGIC.len()); in verify_trailer()
[all …]
/mcuboot-latest/boot/zephyr/
Dsingle_loader.c74 if (state.magic != BOOT_MAGIC_GOOD in boot_image_validate_once()
81 if (state.magic != BOOT_MAGIC_GOOD) { in boot_image_validate_once()
Dfirmware_loader.c78 if (state.magic != BOOT_MAGIC_GOOD in boot_image_validate_once()
85 if (state.magic != BOOT_MAGIC_GOOD) { in boot_image_validate_once()
Dhooks_sample.c68 state->magic = BOOT_MAGIC_UNSET; in boot_read_swap_state_primary_slot_hook()
/mcuboot-latest/boot/mynewt/src/
Dsingle_loader.c74 if (state.magic != BOOT_MAGIC_GOOD in boot_image_validate_once()
81 if (state.magic != BOOT_MAGIC_GOOD) { in boot_image_validate_once()
/mcuboot-latest/boot/espressif/hal/src/
Dsecure_boot.c29 /* A signature block is valid when it has correct magic byte, crc and image digest. */
38 ESP_LOGE(TAG, "Magic byte correct but incorrect crc."); in validate_signature_block()
42 ESP_LOGE(TAG, "Magic byte & CRC correct but incorrect image digest."); in validate_signature_block()
/mcuboot-latest/ci/fih_test_docker/
Ddamage_image.py145 …raise Exception("Invalid magic in image_header: 0x{:X} instead of 0x{:X}".format(image_header.ih_m…
168 …raise Exception("Invalid magic in tlv info: 0x{:X} instead of 0x{:X}".format(tlv_info.it_magic, TL…
/mcuboot-latest/boot/bootutil/include/bootutil/
Dboot_status.h36 * This contains a magic number and a size field which covers the entire
78 /* Magic value which marks the beginning of shared data area in memory */
Dbootutil.h77 uint8_t magic[BOOT_MAGIC_SZ]; member
/mcuboot-latest/boot/espressif/port/
Desp_loader.c58 BOOT_LOG_ERR("Load header magic verification failed. Aborting"); in esp_app_image_load()
/mcuboot-latest/boot/cypress/MCUBootApp/
Dcy_serial_flash_prog.c81 0x01211220, /* Offset=0x0004: Magic Number (TOC Part 2, ID) */

12