Skip to content

DRAFT: espressif: port: add MCUBOOT_FLASH_HAS_HW_ENCRYPTION config to mcuboot_config header #446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: zephyr
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions zephyr/port/include/boot/mcuboot_config/mcuboot_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#ifndef __MCUBOOT_CONFIG_H__
#define __MCUBOOT_CONFIG_H__

#include <zephyr/devicetree.h>

/*
* Signature types
*
Expand All @@ -29,8 +31,21 @@
#define MCUBOOT_SIGN_ED25519
#endif

#if defined(CONFIG_SECURE_FLASH_ENC_ENABLED)
#define MCUBOOT_BOOT_MAX_ALIGN 32
/* This mcuboot_config.h is used only by Zephyr builds, such as MCUboot
* Zephyr Port for ESP chips or a Zephyr application with MCUboot
* compatibilty (that builds the bootutil lib).
* In these cases, MCUBOOT_BOOT_MAX_ALIGN value must be taken from DT if
* the write-block-size is greater than 8 */
#if DT_PROP(DT_CHOSEN(zephyr_flash), write_block_size) > 8
#define MCUBOOT_BOOT_MAX_ALIGN DT_PROP(DT_CHOSEN(zephyr_flash), write_block_size)
#endif

#if defined(CONFIG_SECURE_FLASH_ENC_ENABLED) || (MCUBOOT_BOOT_MAX_ALIGN == 32)
#define MCUBOOT_FLASH_HAS_HW_ENCRYPTION 1
#endif

#ifdef MCUBOOT_FLASH_HAS_HW_ENCRYPTION
#define FLASH_AUX_WRITE_BUFFER_SIZE 0x100
#endif

/*
Expand Down