1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/esp_common
bors[bot] 03d3874e51
Merge #19465 #19981 #19995
19465: drivers/mtd: use XFA for pointers to defined MTDs r=benpicco a=gschorcht

### Contribution description

This PR provides the support to hold pointers to defined MTDs within a XFA. The XFA allows
- to access MTDs of different types (`mtd_flashpage`, `mtd_sdcard`, `mtd_emulated`, ...) by an index
- to determine the number of MTDs defined in the system.

### Testing procedure

To be defined once PR #19443 is merged because emulated MTDs will allow to test this PR on arbitrary boards.

### Porting Guide

For external boards:
 - remove the `MTD_NUMOF` definition from `board.h`
 - add `MTD_XFA_ADD(<mtd_dev>, <idx>);` to the definition of `<mtd_dev>`.
 - `MTD_0`, `MTD_1`, … defines are no longer needed.

### Issues/PRs references

 Related to PR #19443

19981: Fletcher32: Add incremental API r=benpicco a=bergzand

### Contribution description

This PR extends the current fletcher32 checksum with an incremental API mode. This way the bytes to be checksummed can be supplied via multiple successive calls and do not have to be provided in a single consecutive buffer.

I've also rephrased the warning with the original function a bit as that function uses an `unaligned_get_u16` to access the data. The data thus does not require alignment, but the length does need to be supplied as number of 16 bit words.

### Testing procedure

The test has been extended


### Issues/PRs references

None

19995: sys/psa_crypto: Fix macro for public key max size and SE example r=benpicco a=Einhornhool

### Contribution description
#### 1. Wrong public key size when using secure elements, introduced by  #19954
Fixed conditions for key size macros in `crypto_sizes.h`.

#### 2. EdDSA and ECDSA examples fail when using a secure element because of unsopported changes introduced by #19954
Updated `example/psa_crypto` to use only supported functions for secure elements.

### Testing procedure
Build `example/psa_crypto` for secure elements and run application

Output on master:
```
2023-10-19 14:33:24,372 # main(): This is RIOT! (Version: 2019.07-devel-22378-gb6772)
2023-10-19 14:33:24,372 # HMAC SHA256 took 56393 us
2023-10-19 14:33:24,372 # Cipher AES 128 took 68826 us
2023-10-19 14:33:24,372 # *** RIOT kernel panic:
2023-10-19 14:33:24,373 # HARD FAULT HANDLER
2023-10-19 14:33:24,373 # 
2023-10-19 14:33:24,373 # *** rebooting...

```
Output with fixes:
```
2023-10-19 13:35:24,715 # main(): This is RIOT! (Version: 2019.07-devel-22384-g8ef66-dev/psa-crypto-fixes)
2023-10-19 13:35:24,715 # HMAC SHA256 took 56374 us
2023-10-19 13:35:24,715 # Cipher AES 128 took 68805 us
2023-10-19 13:35:24,715 # ECDSA took 281164 us
2023-10-19 13:35:24,715 # All Done
```


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: Lena Boeckmann <lena.boeckmann@haw-hamburg.de>
2023-10-19 19:01:12 +00:00
..
esp-now cpu/esp_common: fix compilation issues gcc 12.2 2023-04-05 13:46:26 +02:00
esp-riscv cpu/esp_common: add module esp_riscv to Kconfig 2022-07-18 13:52:13 +02:00
esp-wifi tree-wide: fix typos in doc and comments 2023-10-16 12:17:48 +02:00
esp-xtensa cpu/esp_common: fix compilation issues gcc 12.2 2023-04-05 13:46:26 +02:00
freertos cpu/esp_common: fix compilation issues gcc 12.2 2023-04-05 13:46:26 +02:00
include cpu/esp_common: add RINGBUF_TYPE_NOSPLIT to ringbuffer 2023-03-28 18:48:55 +02:00
periph cpu/esp_common: use XFA with MTD pointers for Flash MTD 2023-10-02 12:28:08 +02:00
vendor cpu/esp_common: MODULE_XTENSA has to depend on HAS_ARCH_ESP_XTENSA 2022-07-18 14:44:02 +02:00
doc.txt cpu/esp_common: added for common files for ESP SoC 2018-12-27 17:28:46 +01:00
esp_common.config sys/random/kconfig: remove HWRNG default in backend choice 2022-04-27 15:41:23 +02:00
esp_events.c cpu/esp_common: changes in event handling for ESP-IDF v4.4 2022-06-01 13:27:31 +02:00
irq_arch.c cpu/esp_common: move irq_arch xtensa code to module esp_xtensa 2022-06-25 23:22:59 +02:00
Kconfig cpu/esp*: cleanup of CPU_ARCH* and CPU_CORE* 2022-08-24 17:15:37 +02:00
lib_printf.c cpu/esp_common: small fix of lib_printf 2022-05-18 07:27:23 +02:00
Makefile cpu/esp_common: add module esp_riscv to makefiles 2022-07-18 13:51:33 +02:00
Makefile.dep cpu: always rely on stdio.inc.mk for default stdio selection 2022-11-09 10:42:47 +01:00
Makefile.features cpu/esp_common: rename architecture to riscv_esp32 to rv32 2022-07-20 17:18:56 +02:00
Makefile.include cpu/esp32: add flashpage support 2023-01-07 14:49:36 +01:00
syscalls.c cpu/esp_common: improve thread safety for locking functions 2022-09-02 08:54:31 +02:00
thread_arch.c cpu/esp_common: move thread_arch xtensa code to module esp_xtensa 2022-06-25 23:22:59 +02:00
tools.c esp/esp*: move common code to cpu/esp_common 2020-02-21 09:09:34 +01:00