|
CycloneBOOT 2.6.6
Secure Bootloader for ARM Cortex-M MCU
|
Boot Mailbox mangement functions. More...
#include "mailbox.h"Macros | |
| #define | TRACE_LEVEL CBOOT_TRACE_LEVEL |
Functions | |
| cboot_error_t | mailBoxInit (void) |
| Initializes the shared bootloader mailbox if signature is not valid. The NVM flag storage is initialized on every call when BOOT_MAILBOX_NVM_SUPPORT is enabled. | |
| bool_t | mailBoxIsUpdateRequested (void) |
| Checks whether UPDATE_REQUESTED message is present in the mailbox. | |
| void | mailBoxSetUpdateRequested (bool_t state) |
| Posts UPDATE_REQUESTED message to the mailbox. | |
| bool_t | mailBoxIsUpdatePerformed (void) |
| Checks whether UPDATE_PERFORMED message is present in the mailbox. | |
| void | mailBoxSetUpdatePerformed (bool_t state) |
| Posts UPDATE_PERFORMED message to the mailbox. | |
| bool_t | mailBoxIsUpdateConfirmed (void) |
| Checks whether UPDATE_CONFIRMED message is present in the mailbox. | |
| void | mailBoxSetUpdateConfirmed (bool_t state) |
| Posts UPDATE_REQUESTED message to the mailbox. | |
| bool_t | mailBoxIsFallbackRequested (void) |
| Checks whether FALLBACK_REQUESTED message is present in the mailbox. | |
| void | mailBoxSetFallbackRequested (bool_t state) |
| Posts FALLBACK_REQUESTED message to the mailbox. | |
| bool_t | mailBoxIsFallbackPerformed (void) |
| Checks whether FALLBACK_PERFORMED message is present in the mailbox. | |
| void | mailBoxSetFallbackPerformed (bool_t state) |
| Posts FALLBACK_PERFORMED message to the mailbox. | |
| bool_t | mailBoxIsFallbackAvailable (void) |
| Checks whether a fall back to a previous firmware is possible. | |
| void | mailBoxSetFallbackAvailable (bool_t state) |
| Posts FALLBACK_AVAILABLE message to the mailbox. | |
| bool_t | mailBoxIsRepairPerformed (void) |
| Tells whether the bootloader already reinstalled a candidate to repair the application. | |
| void | mailBoxSetRepairPerformed (bool_t state) |
| Posts REPAIR_PERFORMED message to the mailbox. | |
| void | mailBoxSetFirstStageVersion (const ImageVersion *version) |
| Publish the first-stage version for later stages (HDP/HDPL-safe). | |
| const ImageVersion * | mailBoxGetFirstStageVersion (void) |
| Get the first-stage version published in the mailbox. | |
| void | mailBoxSetSecondStageVersion (const ImageVersion *version) |
| Publish the second-stage version for the application to read. | |
| const ImageVersion * | mailBoxGetSecondStageVersion (void) |
| Get the second-stage version published in the mailbox. | |
| void | mailBoxIncrementBootCounter (void) |
| Increments the boot counter in the mailbox. | |
| uint32_t | mailBoxGetBootCounter (void) |
| Returns the current value of the boot counter in the mailbox. | |
| void | mailBoxClearBootCounter (void) |
| Clears the current value of the boot counter in the mailbox. | |
| void | mailBoxSetPsk (const uint8_t *psk, size_t pskSize) |
| Set Pre-Shared Key value of the mailbox. | |
| void | mailBoxGetPsk (uint8_t *psk, size_t *pskSize) |
| Returns a copy of Pre-Shared Key value of the mailbox. | |
| void | mailBoxClearPsk (void) |
| Clear the Pre-Shared Key from the mailbox. | |
Boot Mailbox mangement functions.
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2021-2026 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneBOOT Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
| const ImageVersion * mailBoxGetFirstStageVersion | ( | void | ) |
Get the first-stage version published in the mailbox.
| void mailBoxGetPsk | ( | uint8_t * | psk, |
| size_t * | pskSize | ||
| ) |
Returns a copy of Pre-Shared Key value of the mailbox.
| [in] | psk | pointer to a buffer where pre-shared key will be copied |
| [in] | pskSize | pointer to a variable where the length of the pre-shared key will be copied |
| const ImageVersion * mailBoxGetSecondStageVersion | ( | void | ) |
Get the second-stage version published in the mailbox.
| void mailBoxIncrementBootCounter | ( | void | ) |
Increments the boot counter in the mailbox.
| cboot_error_t mailBoxInit | ( | void | ) |
Initializes the shared bootloader mailbox if signature is not valid. The NVM flag storage is initialized on every call when BOOT_MAILBOX_NVM_SUPPORT is enabled.
| bool_t mailBoxIsFallbackAvailable | ( | void | ) |
Checks whether a fall back to a previous firmware is possible.
| bool_t mailBoxIsFallbackPerformed | ( | void | ) |
Checks whether FALLBACK_PERFORMED message is present in the mailbox.
| bool_t mailBoxIsFallbackRequested | ( | void | ) |
Checks whether FALLBACK_REQUESTED message is present in the mailbox.
| bool_t mailBoxIsRepairPerformed | ( | void | ) |
Tells whether the bootloader already reinstalled a candidate to repair the application.
| bool_t mailBoxIsUpdateConfirmed | ( | void | ) |
Checks whether UPDATE_CONFIRMED message is present in the mailbox.
| bool_t mailBoxIsUpdatePerformed | ( | void | ) |
Checks whether UPDATE_PERFORMED message is present in the mailbox.
| bool_t mailBoxIsUpdateRequested | ( | void | ) |
Checks whether UPDATE_REQUESTED message is present in the mailbox.
| void mailBoxSetFallbackAvailable | ( | bool_t | state | ) |
Posts FALLBACK_AVAILABLE message to the mailbox.
| [in] | state | state of the flag, TRUE or FALSE |
| void mailBoxSetFallbackPerformed | ( | bool_t | state | ) |
Posts FALLBACK_PERFORMED message to the mailbox.
| [in] | state | state of the flag, TRUE or FALSE |
| void mailBoxSetFallbackRequested | ( | bool_t | state | ) |
Posts FALLBACK_REQUESTED message to the mailbox.
| [in] | state | state of the flag, TRUE or FALSE |
| void mailBoxSetFirstStageVersion | ( | const ImageVersion * | version | ) |
Publish the first-stage version for later stages (HDP/HDPL-safe).
| [in] | version | First-stage image version |
| void mailBoxSetPsk | ( | const uint8_t * | psk, |
| size_t | pskSize | ||
| ) |
Set Pre-Shared Key value of the mailbox.
| [in] | psk | pointer to the pre-shared key |
| [in] | pskSize | length of the pre-shared key |
| void mailBoxSetRepairPerformed | ( | bool_t | state | ) |
Posts REPAIR_PERFORMED message to the mailbox.
| [in] | state | state of the flag, TRUE or FALSE |
| void mailBoxSetSecondStageVersion | ( | const ImageVersion * | version | ) |
Publish the second-stage version for the application to read.
| [in] | version | Second-stage image version |
| void mailBoxSetUpdateConfirmed | ( | bool_t | state | ) |
Posts UPDATE_REQUESTED message to the mailbox.
| [in] | state | state of the flag, TRUE or FALSE |
| void mailBoxSetUpdatePerformed | ( | bool_t | state | ) |
Posts UPDATE_PERFORMED message to the mailbox.
| [in] | state | state of the flag, TRUE or FALSE |
| void mailBoxSetUpdateRequested | ( | bool_t | state | ) |
Posts UPDATE_REQUESTED message to the mailbox.
| [in] | state | state of the flag, TRUE or FALSE |