@@ -66,3 +66,35 @@ the two images again.
6666For more information about the update process, see [ Firmware Update] ( firmware_update.md )
6767
6868For the image format, see [ Firmware Image] ( firmware_image.md )
69+
70+ ## NSC API
71+
72+ If you're running wolfBoot on an ARM TrustZone-enabled device (see for example
73+ [ STM32-TZ] ( STM32-TZ.md ) ) you may wish to run your application in non-secure
74+ mode, while keeping the UPDATE and SWAP partitions in the secure domain. In
75+ order to accomplish this, any operation by the application that requires access
76+ to those partitions needs to be performed via wolfBoot code running in the
77+ secure domain. For this purpose, wolfBoot provides Non-Secure Callable (NSC)
78+ APIs that allow code running in the non-secure domain to call into the secure
79+ domain managed by wolfBoot.
80+
81+ These APIs are listed below.
82+
83+ - ` void wolfBoot_nsc_success(void) ` : wrapper for ` wolfBoot_success() `
84+ - ` void wolfBoot_nsc_update_trigger(void) ` : wrapper for
85+ ` wolfBoot_update_trigger() `
86+ - ` uint32_t wolfBoot_nsc_get_image_version(uint8_t part) ` : wrapper for
87+ ` wolfBoot_get_image_version() `
88+ - ` uint32_t wolfBoot_nsc_current_firmware_version(void) ` : wrapper for
89+ ` wolfBoot_current_firmware_version() `
90+ - ` uint32_t wolfBoot_nsc_update_firmware_version(void) ` : wrapper for
91+ ` wolfBoot_update_firmware_version() `
92+ - ` int wolfBoot_nsc_get_partition_state(uint8_t part, uint8_t *st) ` : wrapper
93+ for ` wolfBoot_get_partition_state() `
94+ - ` int wolfBoot_nsc_erase_update(uint32_t address, uint32_t len) ` : allows the
95+ application to erase the update partition in secure mode. The ` address `
96+ parameter is an offset from the beginning of the partition.
97+ - `int wolfBoot_nsc_write_update(uint32_t address, const uint8_t * buf, uint32_t
98+ len)`: allows the application to write to the update partition in secure
99+ mode. The ` address ` parameter is an offset from the beginning of the
100+ partition.
0 commit comments