Skip to content

Commit 4bdd883

Browse files
mkardous-silabsrcasallas-silabslpbeliveau-silabsandy31415jmartinez-silabs
authored
[Silabs] Cherry-pick changes to support PSA keys for the SessionKeyStore (project-chip#41143)
* [Silabs] PSA Crypto PAL customized for EFR32. (project-chip#36575) * [Silabs] PSA Crypto PAL customized for EFR32. * Pull request project-chip#2067: Provision SPAM (project-chip#36404) Merge in WMN_TOOLS/matter from provision_SPAM to dev/provision_source_code Squashed commit of the following: commit ae6d6bd09b963838fa8ae70efefa0770c33c5b73 Author: lpbeliveau-silabs <[email protected]> Date: Wed Sep 25 11:08:23 2024 -0400 Updated the GsdkSpam for series 3 now that provisioning relies on it commit fb0cb797ca3eea51856e2b62e5b2c0a4dfb8cac3 Author: lpbeliveau-silabs <[email protected]> Date: Tue Sep 24 17:53:54 2024 -0400 Updated provisioning to use Silabs Platform Abstraction Manager Co-authored-by: Andrei Litvin <[email protected]> * [Silabs] Trustzone-compatibility. (project-chip#36643) * [Silabs] Bugfix: PSA Crypto keystore for Wi-fi. (project-chip#36963) * [Silabs] Provision: Dynamic buffer allocation. (project-chip#36964) * [Silabs] Provision: Dynamic buffer allocation. * Code review. * [Silabs] AES_CCM_encrypt/decrypt output buffers fixed. (project-chip#37580) * [Silabs] AES_CCM_decrypt output buffer fixed. * Code review. * [Silabs] Bugfix: PSA AEAD encryption/decryption fixed. (project-chip#37663) * [Silabs] Update silabs sdks versions (project-chip#37034) * Bump submodule for sdk updates and docker image version * Update files and libs pulled from sisdk. add -fno-lto ld flag. update mg24 linkerfile * Bring PSA crypto changes from sisdk Co-authored-by: Ricardo Casallas <[email protected]> * fixup merge conflict on CHIPCryptoPALPsaEfr32.cpp * Update mgm24 linkerfile. add no-lto to test-driver * update mg26 linkerfile * Adds mbedTLS 3.x support with tinycrypt uECC APIs (project-chip#132) * [SL-UP] Add BRD4338A support for Wiseconnect 3.4 in GN (project-chip#104) * Update for siwx917 * Changes for wifi sdk 3.4.0 (project-chip#89) * fix slc-gen build * fix wifi ncp build * Fixup nxp submodule desync * Fix ot_lib builds * Fix linking issue with coapi lib. address comments * Cleanup commented lines and bump merged matter_support sha * move some psa define from coap config to the right header * Add segger_rtt reference in linkerfile * fix rebase to master conflict issue --------- Co-authored-by: Ricardo Casallas <[email protected]> Co-authored-by: Rohan Sahay <[email protected]> Co-authored-by: Mathieu Kardous <[email protected]> Co-authored-by: bhmanda-silabs <[email protected]> * Split UniqueId and PersistentUniqueId (project-chip#36292) * Update specific changes * Update src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp --------- Co-authored-by: Ricardo Casallas <[email protected]> Co-authored-by: lpbeliveau-silabs <[email protected]> Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: Junior Martinez <[email protected]> Co-authored-by: Rohan Sahay <[email protected]> Co-authored-by: bhmanda-silabs <[email protected]>
1 parent e37a112 commit 4bdd883

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1183
-962
lines changed

.github/workflows/examples-efr32.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
if: github.actor != 'restyled-io[bot]'
4242

4343
container:
44-
image: ghcr.io/project-chip/chip-build-efr32:85
44+
image: ghcr.io/project-chip/chip-build-efr32:95
4545
volumes:
4646
- "/tmp/bloat_reports:/tmp/bloat_reports"
4747
steps:

examples/platform/silabs/BaseApplication.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ void BaseApplicationDelegate::OnCommissioningWindowClosed()
183183
#if CHIP_CONFIG_ENABLE_ICD_SERVER && SLI_SI917
184184
if (!BaseApplication::GetProvisionStatus() && !isComissioningStarted)
185185
{
186-
int32_t status = wfx_power_save(RSI_SLEEP_MODE_8, STANDBY_POWER_SAVE_WITH_RAM_RETENTION);
186+
int32_t status = wfx_power_save(RSI_SLEEP_MODE_8, DEEP_SLEEP_WITH_RAM_RETENTION);
187187
if (status != SL_STATUS_OK)
188188
{
189189
ChipLogError(AppServer, "Failed to enable the TA Deep Sleep");

examples/platform/silabs/FreeRTOSConfig.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,10 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
205205
#define configENABLE_FPU 1
206206
#define configENABLE_MPU 0
207207
/* FreeRTOS Secure Side Only and TrustZone Security Extension */
208+
#ifndef configRUN_FREERTOS_SECURE_ONLY
209+
// prevent redefinition with Series 3
208210
#define configRUN_FREERTOS_SECURE_ONLY 1
211+
#endif
209212
#define configENABLE_TRUSTZONE 0
210213
/* FreeRTOS MPU specific definitions. */
211214
#define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS (0)

examples/platform/silabs/efr32/BUILD.gn

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,10 @@ config("efr32-common-config") {
166166
defines += [ "CHIP_DEVICE_CONFIG_ENABLE_MULTI_OTA_REQUESTOR=1" ]
167167
}
168168

169-
ldflags = [ "-Wl,--no-warn-rwx-segment" ]
169+
ldflags = [
170+
"-Wl,--no-warn-rwx-segment",
171+
"-fno-lto",
172+
]
170173
}
171174

172175
config("silabs-wifi-config") {

examples/platform/silabs/efr32/rs911x/hal/efx32_ncp_host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ uint32_t sl_si91x_host_get_wake_indicator(void)
151151
return GPIO_PinInGet(WAKE_INDICATOR_PIN.port, WAKE_INDICATOR_PIN.pin);
152152
}
153153

154-
sl_status_t sl_si91x_host_init(sl_si91x_host_init_configuration * config)
154+
sl_status_t sl_si91x_host_init(const sl_si91x_host_init_configuration * config)
155155
{
156156
#if SL_SPICTRL_MUX
157157
sl_status_t status = sl_board_disable_display();

examples/platform/silabs/efr32/rs911x/rs9117.gni

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,21 @@ rs9117_src_sapi = [
2222
# sl_si91x_wireless component
2323
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/src/sl_si91x_driver.c",
2424
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/src/sl_rsi_utility.c",
25-
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/src/sl_si91x_callback_framework.c",
2625
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/threading/sli_si91x_multithreaded.c",
2726
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/sl_net/src/sl_net_rsi_utility.c",
27+
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/sl_net/src/sl_net_si91x_callback_framework.c",
2828
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/sl_net/src/sl_net_si91x_integration_handler.c",
2929
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/sl_net/src/sl_si91x_net_credentials.c",
3030
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/ncp_interface/spi/sl_si91x_spi.c",
3131
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/ncp_interface/sl_si91x_ncp_driver.c",
3232

3333
# wifi component
34+
"${wifi_sdk_root}/components/protocol/wifi/src/sl_wifi_basic_credentials.c",
3435
"${wifi_sdk_root}/components/protocol/wifi/src/sl_wifi_callback_framework.c",
3536
"${wifi_sdk_root}/components/protocol/wifi/si91x/sl_wifi.c",
3637

3738
# basic_network_manager component
38-
"${wifi_sdk_root}/components/service/network_manager/src/sl_net_basic_credentials.c",
39+
"${wifi_sdk_root}/components/service/network_manager/src/sl_net_credentials.c",
3940
"${wifi_sdk_root}/components/service/network_manager/src/sl_net_basic_profiles.c",
4041

4142
# si91x_basic_buffers component

examples/platform/silabs/ldscripts/SiWx917-common.ld

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ SECTIONS
152152
*sl_si91x_low_power_tickless_mode.c.o(.text*)
153153
*sl_core_cortexm.c.o(.text*)
154154

155+
/* ipmu calibration data */
156+
*(.common_ipmu_ram*)
157+
155158
. = ALIGN(4);
156159
/* preinit data */
157160
PROVIDE_HIDDEN (__preinit_array_start = .);

examples/platform/silabs/ldscripts/efr32mg24.ld

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
MEMORY
3131
{
3232
FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 0x178000
33-
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x40000
33+
RAM (rwx) : ORIGIN = 0x20000004, LENGTH = 0x3fffc
34+
BOOTLOADER_RESET_REGION (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4
3435
}
3536

3637
ENTRY(Reset_Handler)
@@ -48,6 +49,13 @@ SECTIONS
4849
__Vectors_Size = __Vectors_End - __Vectors;
4950
__lma_ramfuncs_start__ = .;
5051
} > FLASH
52+
.bootloader_reset_section (NOLOAD):
53+
{
54+
__ResetReasonStart__ = .;
55+
. = . + 4;
56+
. = ALIGN(4);
57+
__ResetReasonEnd__ = .;
58+
} > BOOTLOADER_RESET_REGION
5159

5260
.stack (NOLOAD):
5361
{
@@ -59,31 +67,33 @@ SECTIONS
5967
PROVIDE(__stack = __StackTop);
6068
} > RAM
6169

62-
63-
.noinit (NOLOAD):
64-
{
65-
*(.noinit*);
66-
} > RAM
67-
6870
.bss :
6971
{
7072
. = ALIGN(4);
7173
__bss_start__ = .;
7274
*(SORT_BY_ALIGNMENT(.bss*))
7375
*(COMMON)
74-
. = ALIGN(4);
76+
. = ALIGN(32);
7577
__bss_end__ = .;
7678
} > RAM
7779

80+
81+
.noinit (NOLOAD):
82+
{
83+
*(.noinit*);
84+
. = ALIGN(32);
85+
} > RAM
86+
87+
7888
text_application_ram :
7989
{
80-
. = ALIGN(4);
90+
. = ALIGN(32);
8191
__vma_ramfuncs_start__ = .;
8292
__text_application_ram_start__ = .;
8393

8494
*(text_application_ram)
8595

86-
. = ALIGN(4);
96+
. = ALIGN(32);
8797
__vma_ramfuncs_end__ = .;
8898
__text_application_ram_end__ = .;
8999
} > RAM AT > FLASH
@@ -196,16 +206,24 @@ SECTIONS
196206
KEEP(*(SORT(.fini_array.*)))
197207
KEEP(*(.fini_array))
198208
PROVIDE_HIDDEN (__fini_array_end = .);
209+
. = ALIGN(4);
210+
*(SEGGER_RTT)
199211

200212
. = ALIGN(4);
201213
/* All data end */
202214
__data_end__ = .;
203215

204216
} > RAM AT > FLASH
217+
218+
219+
/* Calculate heap size based on RAM limits. */
220+
heap_limit = ORIGIN(RAM) + LENGTH(RAM); /* End of RAM */
221+
heap_size = heap_limit - __HeapBase;
205222
.memory_manager_heap (NOLOAD):
206223
{
207224
. = ALIGN(8);
208225
__HeapBase = .;
226+
. += heap_size;
209227
__end__ = .;
210228
end = __end__;
211229
_end = __end__;
@@ -214,7 +232,7 @@ SECTIONS
214232
} > RAM
215233

216234
__heap_size = __HeapLimit - __HeapBase;
217-
__ram_end__ = 0x20000000 + 0x40000;
235+
__ram_end__ = 0x20000004 + 0x3fffc;
218236
__main_flash_end__ = 0x8006000 + 0x178000;
219237

220238
/* This is where we handle flash storage blocks. We use dummy sections for finding the configured

examples/platform/silabs/ldscripts/efr32mg26.ld

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
MEMORY
3131
{
3232
FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 0x318000
33-
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x80000
33+
RAM (rwx) : ORIGIN = 0x20000004, LENGTH = 0x7fffc
34+
BOOTLOADER_RESET_REGION (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4
3435
}
3536

3637
ENTRY(Reset_Handler)
@@ -48,6 +49,13 @@ SECTIONS
4849
__Vectors_Size = __Vectors_End - __Vectors;
4950
__lma_ramfuncs_start__ = .;
5051
} > FLASH
52+
.bootloader_reset_section (NOLOAD):
53+
{
54+
__ResetReasonStart__ = .;
55+
. = . + 4;
56+
. = ALIGN(4);
57+
__ResetReasonEnd__ = .;
58+
} > BOOTLOADER_RESET_REGION
5159

5260
.stack (NOLOAD):
5361
{
@@ -59,31 +67,33 @@ SECTIONS
5967
PROVIDE(__stack = __StackTop);
6068
} > RAM
6169

62-
63-
.noinit (NOLOAD):
64-
{
65-
*(.noinit*);
66-
} > RAM
67-
6870
.bss :
6971
{
7072
. = ALIGN(4);
7173
__bss_start__ = .;
7274
*(SORT_BY_ALIGNMENT(.bss*))
7375
*(COMMON)
74-
. = ALIGN(4);
76+
. = ALIGN(32);
7577
__bss_end__ = .;
7678
} > RAM
7779

80+
81+
.noinit (NOLOAD):
82+
{
83+
*(.noinit*);
84+
. = ALIGN(32);
85+
} > RAM
86+
87+
7888
text_application_ram :
7989
{
80-
. = ALIGN(4);
90+
. = ALIGN(32);
8191
__vma_ramfuncs_start__ = .;
8292
__text_application_ram_start__ = .;
8393

8494
*(text_application_ram)
8595

86-
. = ALIGN(4);
96+
. = ALIGN(32);
8797
__vma_ramfuncs_end__ = .;
8898
__text_application_ram_end__ = .;
8999
} > RAM AT > FLASH
@@ -196,16 +206,24 @@ SECTIONS
196206
KEEP(*(SORT(.fini_array.*)))
197207
KEEP(*(.fini_array))
198208
PROVIDE_HIDDEN (__fini_array_end = .);
209+
. = ALIGN(4);
210+
*(SEGGER_RTT)
199211

200212
. = ALIGN(4);
201213
/* All data end */
202214
__data_end__ = .;
203215

204216
} > RAM AT > FLASH
217+
218+
219+
/* Calculate heap size based on RAM limits. */
220+
heap_limit = ORIGIN(RAM) + LENGTH(RAM); /* End of RAM */
221+
heap_size = heap_limit - __HeapBase;
205222
.memory_manager_heap (NOLOAD):
206223
{
207224
. = ALIGN(8);
208225
__HeapBase = .;
226+
. += heap_size;
209227
__end__ = .;
210228
end = __end__;
211229
_end = __end__;
@@ -214,7 +232,7 @@ SECTIONS
214232
} > RAM
215233

216234
__heap_size = __HeapLimit - __HeapBase;
217-
__ram_end__ = 0x20000000 + 0x80000;
235+
__ram_end__ = 0x20000004 + 0x7fffc;
218236
__main_flash_end__ = 0x8006000 + 0x318000;
219237

220238
/* This is where we handle flash storage blocks. We use dummy sections for finding the configured

examples/platform/silabs/ldscripts/mgm24.ld

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
MEMORY
3131
{
3232
FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 0x178000
33-
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x40000
33+
RAM (rwx) : ORIGIN = 0x20000004, LENGTH = 0x3fffc
34+
BOOTLOADER_RESET_REGION (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4
3435
}
3536

3637
ENTRY(Reset_Handler)
@@ -48,6 +49,13 @@ SECTIONS
4849
__Vectors_Size = __Vectors_End - __Vectors;
4950
__lma_ramfuncs_start__ = .;
5051
} > FLASH
52+
.bootloader_reset_section (NOLOAD):
53+
{
54+
__ResetReasonStart__ = .;
55+
. = . + 4;
56+
. = ALIGN(4);
57+
__ResetReasonEnd__ = .;
58+
} > BOOTLOADER_RESET_REGION
5159

5260
.stack (NOLOAD):
5361
{
@@ -59,31 +67,33 @@ SECTIONS
5967
PROVIDE(__stack = __StackTop);
6068
} > RAM
6169

62-
63-
.noinit (NOLOAD):
64-
{
65-
*(.noinit*);
66-
} > RAM
67-
6870
.bss :
6971
{
7072
. = ALIGN(4);
7173
__bss_start__ = .;
7274
*(SORT_BY_ALIGNMENT(.bss*))
7375
*(COMMON)
74-
. = ALIGN(4);
76+
. = ALIGN(32);
7577
__bss_end__ = .;
7678
} > RAM
7779

80+
81+
.noinit (NOLOAD):
82+
{
83+
*(.noinit*);
84+
. = ALIGN(32);
85+
} > RAM
86+
87+
7888
text_application_ram :
7989
{
80-
. = ALIGN(4);
90+
. = ALIGN(32);
8191
__vma_ramfuncs_start__ = .;
8292
__text_application_ram_start__ = .;
8393

8494
*(text_application_ram)
8595

86-
. = ALIGN(4);
96+
. = ALIGN(32);
8797
__vma_ramfuncs_end__ = .;
8898
__text_application_ram_end__ = .;
8999
} > RAM AT > FLASH
@@ -196,16 +206,24 @@ SECTIONS
196206
KEEP(*(SORT(.fini_array.*)))
197207
KEEP(*(.fini_array))
198208
PROVIDE_HIDDEN (__fini_array_end = .);
209+
. = ALIGN(4);
210+
*(SEGGER_RTT)
199211

200212
. = ALIGN(4);
201213
/* All data end */
202214
__data_end__ = .;
203215

204216
} > RAM AT > FLASH
217+
218+
219+
/* Calculate heap size based on RAM limits. */
220+
heap_limit = ORIGIN(RAM) + LENGTH(RAM); /* End of RAM */
221+
heap_size = heap_limit - __HeapBase;
205222
.memory_manager_heap (NOLOAD):
206223
{
207224
. = ALIGN(8);
208225
__HeapBase = .;
226+
. += heap_size;
209227
__end__ = .;
210228
end = __end__;
211229
_end = __end__;
@@ -214,7 +232,7 @@ SECTIONS
214232
} > RAM
215233

216234
__heap_size = __HeapLimit - __HeapBase;
217-
__ram_end__ = 0x20000000 + 0x40000;
235+
__ram_end__ = 0x20000004 + 0x3fffc;
218236
__main_flash_end__ = 0x8006000 + 0x178000;
219237

220238
/* This is where we handle flash storage blocks. We use dummy sections for finding the configured

0 commit comments

Comments
 (0)