1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu
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
..
arm7_common cpu/arm7: Fix undefined behavior based on invalid assembly 2023-05-19 11:34:30 +02:00
atmega8 cpu/atmega_common: some additional periph drivers fixed for atmega8 cpu 2023-07-11 21:22:02 +02:00
atmega32u4 cpu/atmega_common: implement periph/gpio_ll{,_irq} 2022-05-02 14:44:55 +02:00
atmega128rfa1 cpu/atmega128rfa1/Kconfig: select default transceiver 2023-01-19 15:34:19 +01:00
atmega256rfr2 cpu/atmega256rfr2/Kconfig: select default transceiver 2023-01-19 15:34:19 +01:00
atmega328p cpu/atmega_common: implement periph/gpio_ll{,_irq} 2022-05-02 14:44:55 +02:00
atmega1281 cpu/atmega_common: implement periph/gpio_ll{,_irq} 2022-05-02 14:44:55 +02:00
atmega1284p cpu/atmega_common: implement periph/gpio_ll{,_irq} 2022-05-02 14:44:55 +02:00
atmega2560 cpu/atmega_common: implement periph/gpio_ll{,_irq} 2022-05-02 14:44:55 +02:00
atmega_common cpu/atmega_common: hook up BAT LOW irq to power bus 2023-07-12 14:52:05 +02:00
atxmega cpu/avr8_common: Add AVR8_ISR macro 2023-07-05 20:00:19 +02:00
avr8_common cpu/avr8_common: Add AVR8_ISR macro 2023-07-05 20:00:19 +02:00
cc26x0_cc13x0 cpu/cc26x0_cc13x0: Drop feature cortexm_mpu 2023-04-26 10:51:52 +02:00
cc26x2_cc13x2 cpu: call early_init() 2023-01-08 22:26:12 +01:00
cc26xx_cc13xx cpu/cc26xx_cc13xx: Fix bogus array-bound warning 2023-04-25 15:31:27 +02:00
cc2538 cpu: call early_init() 2023-01-08 22:26:12 +01:00
cortexm_common core/thread: drop unused thread_arch_t 2023-05-21 22:17:52 +02:00
efm32 cpu/efm32: add EFM32GG11 family 2023-09-18 12:40:33 +02:00
esp32 cpu/esp32: fix RISC-V ISA for ESP32-C3 with GCC 12.2 2023-10-02 01:44:17 +02:00
esp8266 tree-wide: fix typos in doc and comments 2023-10-16 12:17:48 +02:00
esp_common Merge #19465 #19981 #19995 2023-10-19 19:01:12 +00:00
fe310 cpu/riscv: Add PMP driver 2023-06-28 11:55:34 +02:00
gd32v tree wide: fix typos in comments found by codespell 2023-05-02 09:52:06 +02:00
kinetis cpu: call early_init() 2023-01-08 22:26:12 +01:00
lm4f120 cpu: call early_init() 2023-01-08 22:26:12 +01:00
lpc23xx cpu: Add TLS symbols for newer picolibc to linker scripts 2023-03-02 22:55:22 -08:00
lpc1768 cpu: call early_init() 2023-01-08 22:26:12 +01:00
msp430 cpu/msp430: make use of vendor header files 2023-07-04 20:21:05 +02:00
native drivers/periph/rtc: improve doc on rtc_set_alarm 2023-05-30 17:41:36 +02:00
nrf5x_common Merge #19634 2023-07-18 10:47:46 +00:00
nrf51 cpu/nrfxx: simplify LFCLK source selection 2023-07-06 15:47:22 +02:00
nrf52 tree-wide: fix typos in doc and comments 2023-10-16 12:17:48 +02:00
nrf53 boards/nrf5340dk-app: add SPI flash configuration and I2C pins 2023-07-12 21:51:50 +02:00
nrf9160 cpu/nrfxx: use shared serial IRQ 2023-07-11 22:42:10 +02:00
qn908x cpu/qn908x/periph_i2c: enable internal pull-up on SCL 2023-06-13 14:43:36 +02:00
riscv_common cpu/riscv_common: remove picolibc from blacklisting in CI 2023-08-07 13:21:40 +02:00
rpx0xx cpu/rpx0xx: Fix kconfig model 2023-05-24 09:53:23 +02:00
sam0_common tree-wide: fix typos in doc and comments 2023-10-16 12:17:48 +02:00
sam3 cpu/sam3: assert valid freq in timer_init() 2023-09-15 12:58:31 +02:00
sam_common cpu/sam_common: make use of cortexm.ld 2022-09-23 15:55:12 +02:00
samd5x cpu/samd5x: define power modes 2023-09-23 19:26:30 +02:00
samd21 cpu/sam0_common: move adc_res_t to common code 2023-01-17 17:18:07 +01:00
saml1x cpu/sam0_common: move adc_res_t to common code 2023-01-17 17:18:07 +01:00
saml21 treewide: fix path to ztimer test applications 2023-05-13 19:08:38 +02:00
stellaris_common
stm32 Merge #19943 #19978 2023-10-16 11:12:04 +00:00
doc.txt docs/doxygen : Add CPU section 2021-07-09 10:47:42 +02:00
Kconfig treewide: change Kconfig prefix for module symbols 2020-08-31 09:57:28 +02:00