Skip to content

Release candidate for mbed-os-5.11.0-rc3 #9064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 106 commits into from
Dec 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
094fedf
Add SPM code generation test to Travis-CI
Nov 28, 2018
3b4750b
Run SPM code generator
Nov 28, 2018
d95f666
SPM code generator support for python 2 & 3
orenc17 Nov 28, 2018
5ee7a2f
Introduce mbed-crypto tests
Nov 15, 2018
14bd3c3
Add mbed-crypto asymmetric encrypt decrypt test
Nov 15, 2018
e580d1e
Add mbed-crypto hash verify test
Nov 15, 2018
51b1181
Add mbed-crypto symmetric cipher encrypt decrypt test
Nov 15, 2018
4d55d53
Add mbed-crypto asymmetric sign verify test
Nov 15, 2018
5ceeb6f
Add mbed-crypto key derivation test
Nov 15, 2018
447cd74
Add license
Nov 18, 2018
132f00e
Test modifications
Nov 26, 2018
df1d36a
Skip Mbed Crypto tests when when Mbed Crypto is OFF
Nov 27, 2018
63c219a
Drops std:: because string.h is included
Nov 19, 2018
7d878f4
Truncates data to be send to modem to 2048 bytes
Nov 19, 2018
ca7fef2
Dropping duplicate "using namespace mbed;"
Nov 19, 2018
54136e7
Fixes return value check when calling ATCmdParser::read()
Nov 19, 2018
1108d8d
Truncates TCP stream and NACKs UDP datagram when sending too much data
Nov 23, 2018
a10e299
ESP8266 disconnect returns ERROR_NO_CONNECTION
michalpasztamobica Nov 28, 2018
891d756
Reports NSAPI_STATUS_CONNECTING when trying to reconnect
Nov 22, 2018
fee5e42
Fix PSA crypto partiotion and tests
Dec 2, 2018
f07943d
The inject test can run also on single core CPU's such as K64F
Dec 4, 2018
74f5322
Fix includes
Dec 4, 2018
6c1d08a
Basic test can run on single v7's
Dec 4, 2018
6b87427
Use entropy injection on any NVseed platform or PSA dual-core/v8
Dec 5, 2018
b4a77f6
Add FUTURE_SEQUANA_PSA target
Dec 4, 2018
dc71ec4
License
Dec 5, 2018
1efee65
Fix initial_sp on psa sequana
Dec 5, 2018
709d924
fix mbedmicro-rtos-mbed tests
Dec 5, 2018
2469539
disable nvstore for sequana_psa
Dec 5, 2018
412bfcf
fix for flash iap test
Dec 5, 2018
f9b9810
Fix PSA-HAL, TRNG, TLS tests
Dec 5, 2018
5bff3ad
Prepare postbuild for prebuilt images
Dec 6, 2018
8ee3b1d
Prebuilt images
Dec 6, 2018
ef7df31
Ignore PSA secure targets
Dec 6, 2018
5812ae7
Ensure macros and parameters with the same name are not repeated.
bridadan Dec 5, 2018
b4f4ac6
Adding unit test for macro config
bridadan Dec 6, 2018
7f418f4
Config parameters override macros
bridadan Dec 6, 2018
a7c5523
Cordio: Assert if memory pool is not exactly the right size
Dec 5, 2018
4ece902
Cordio: Split get_buffer_pool_description() in pure virtual + default…
Dec 5, 2018
346622b
Cordio Nordic LL: Optimize memory for smaller targets
Dec 5, 2018
f994bc3
Cordio Nordic LL: Readjust memory pool requirements for NRF52840
Dec 5, 2018
ed479e5
Cordio: Make allocating too much memory for pool a warning, not a fat…
Dec 5, 2018
b0962bb
Cordio: Update ODIN-W2 Driver to use default memory pool
Dec 5, 2018
00496d3
Cordio: Update CYW4343X Driver to use default memory pool
Dec 5, 2018
a008e79
Cordio: Update CY8C63XX Driver to use default memory pool
Dec 5, 2018
62dd1c1
Update Porting Guide with memory pool changes
Dec 5, 2018
754076d
Update features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCIDri…
pan- Dec 6, 2018
ddf3a13
Edit CordioHCIDriver.h
Dec 6, 2018
5d7d823
Edit PortingGuide.md
Dec 6, 2018
bca9f63
Turn off MPU on targets failing OOB
c1728p9 Dec 6, 2018
f0219cb
Mbed TLS: Fix ECC hardware double initialization
yanesca Dec 7, 2018
7e8187b
fix uninitialized handler pointer in ethernet driver
Dec 6, 2018
53ed9ba
Revert "Merge pull request #8922 from juhoeskeli/wise_1570_mpu_disable"
Dec 7, 2018
56ab748
Fix a few bugs in TDBStore and KV config
Dec 5, 2018
ef08465
BLE: Revert change in stack setup initialisation.
pan- Dec 6, 2018
5ffa065
BLE: Fix conversion of advertising type
pan- Dec 6, 2018
4bb0964
BLE: Set advertising random address when appropriate.
pan- Dec 6, 2018
8c262e7
fix return value
paul-szczepanek-arm Dec 6, 2018
e1e20f8
check return value of DmSyncStart
paul-szczepanek-arm Dec 6, 2018
deffc3f
fix swapped errors
paul-szczepanek-arm Dec 6, 2018
8a3b5f4
always set filter policy
paul-szczepanek-arm Dec 6, 2018
11ac1e0
copy periodic payload
paul-szczepanek-arm Dec 6, 2018
49717e4
BLE: Allow null value for periodic interval in advertising report event.
pan- Dec 7, 2018
991c723
BLE: Fix address type allowed to create a periodic sync.
pan- Dec 7, 2018
bb2870f
BLE: Fix recursion in ble::advertising_data_status_t raw constructor.
pan- Dec 7, 2018
d1af84a
BLE: Revert changes introduced by debugging.
pan- Dec 7, 2018
a59a2e9
BLE: Add an option to inject the random static address during the res…
pan- Dec 7, 2018
a7d43fc
BLE: Inject random static address during reset sequence.
pan- Dec 7, 2018
65f688e
BLE: Set the number of supported phy by the host to 3.
pan- Dec 7, 2018
744ef59
BLE: Set the number of the advertising sets supported by the host to 3.
pan- Dec 7, 2018
71ed27e
BLE: Fix the number of advertising sets supported
pan- Dec 7, 2018
1b18dc0
baseband clock rate increased to 1 000 000
paul-szczepanek-arm Dec 7, 2018
c9fb69c
added arm version of libs
paul-szczepanek-arm Dec 7, 2018
368a90b
iar libs for cordio
paul-szczepanek-arm Dec 7, 2018
345a3ed
Remove duplicate symbols in libcordio_stack.a
Dec 7, 2018
0c785ac
Remove use of GPIOs (LEDs and diag pins) from Cordio LL for Nordic
Dec 7, 2018
1dda094
ARMCC only likes armar
Dec 7, 2018
4a81acc
Replace ARMCC libs
Dec 8, 2018
c972982
working libs for GCC and IAR
paul-szczepanek-arm Dec 8, 2018
70d5884
working ARM lib
paul-szczepanek-arm Dec 10, 2018
d9ec798
fixed ARM compilation problem caused by noreturn
paul-szczepanek-arm Dec 10, 2018
52b0f21
remove noreturn error function to avoid compilation issues
paul-szczepanek-arm Dec 10, 2018
b66ebb7
FUTURE_SEQUANA SPI fixes: - fix to allow using only a subset of pins …
lrusinowicz Nov 27, 2018
784c80f
FUTURE_SEQUANA deep sleep fixes: - fixed feature rename (from DEVICE_…
lrusinowicz Nov 29, 2018
bb4cb77
Exclude MPU manager code if MPU disabled
kjbracey Dec 10, 2018
4d9f218
Save ROM by specifying initial MPU state
kjbracey Dec 10, 2018
243167e
Use MBED_ASSERT in MPU manager
kjbracey Dec 10, 2018
89d239e
Test MPU is enabled by init
kjbracey Dec 10, 2018
0332182
Add header to fix compile failures
c1728p9 Dec 10, 2018
ea96ee9
Fix header files used in 802.15.4_RF
Nov 26, 2018
0b38cb8
Fix header files used in esp8266
Nov 26, 2018
771b69e
Components if using RTOS modules should be enabled only when RTOS is …
Nov 26, 2018
ce08039
Add Serial + EventQueue dependency to ESP8266
Nov 30, 2018
04377fa
Fix a few SecureStore issues (following preliminary security review)
Dec 6, 2018
c10d276
Adds support for controlling HW reset of the modem from the driver
Dec 4, 2018
fc548ec
Fixes AT command timeout values from reset&connect
Dec 4, 2018
5799dae
Fixes connect, and network-status logic
Dec 4, 2018
7210b97
powers down the modem on disconnect
Dec 7, 2018
c22ac0c
Fixes namespace collision
Dec 10, 2018
2463596
Add a platform config to disable the MPU
c1728p9 Dec 10, 2018
81acc28
Rework MPU use option
kjbracey Dec 11, 2018
de70dae
Fix the fault exception issue in socket_recvfrom with the null pointe…
tz-arm Dec 6, 2018
7529535
Fix for the fault exception issue: https://github.com/ARMmbed/mbed-os…
tz-arm Dec 10, 2018
7dd7471
Formatted via astyle.
tz-arm Dec 11, 2018
165af44
Revert "Turn off MPU on targets failing OOB"
c1728p9 Dec 8, 2018
5636377
ESP8266 send returns WOULD_BLOCK error when busy
michalpasztamobica Dec 11, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,9 @@ matrix:
- echo 'Checking that there is no GPL licence text in code'
- ! git grep -q --ignore-case "gnu general public";
- ! git grep -q --ignore-case "gnu library general public";
- env:
- NAME=psa-autogen
script:
# Run SPM code generator and check that changes are not needed
- python tools/spm/generate_partition_code.py
- git diff --exit-code
336 changes: 336 additions & 0 deletions TESTS/mbed-crypto/sanity/main.cpp

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions TESTS/mbed_hal/mpu/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,9 @@ static void hard_fault_handler_test()

static void mpu_fault_test(const volatile uint16_t *mem_function)
{
mbed_mpu_init();

// Verify that the mpu causes faults when executing ram
// Verify that the mpu causes faults when executing ram after init
fault_count = 0;
mbed_mpu_enable_ram_xn(true);
mbed_mpu_init();
call_mem(mem_function);
TEST_ASSERT_EQUAL(1, fault_count);

Expand All @@ -86,7 +84,7 @@ static void mpu_fault_test(const volatile uint16_t *mem_function)
call_mem(mem_function);
TEST_ASSERT_EQUAL(0, fault_count);

// Verify that the mpu causes faults when executing ram
// Verify that the mpu can be turned back on
fault_count = 0;
mbed_mpu_enable_ram_xn(true);
call_mem(mem_function);
Expand Down
4 changes: 4 additions & 0 deletions TESTS/mbed_hal/spm/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
#error [NOT_SUPPORTED] this test is supported on GCC only
#endif

#if defined(TARGET_FUTURE_SEQUANA_PSA)
#error [NOT_SUPPORTED] Disable this Test until FUTURE_SEQUANA_PSA enables Memory protection
#endif

#include "utest/utest.h"
#include "unity/unity.h"
#include "greentea-client/test_env.h"
Expand Down
33 changes: 33 additions & 0 deletions TESTS/mbed_hal/trng/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,33 @@

using namespace utest::v1;

#if (defined(TARGET_PSA) && defined(COMPONENT_PSA_SRV_IPC) && defined(MBEDTLS_PSA_CRYPTO_C))
#include "entropy.h"
#include "entropy_poll.h"
#include "crypto.h"
#if !defined(MAX)
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif

/* Calculating the minimum allowed entropy size in bytes */
#define MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE \
MAX(MBEDTLS_ENTROPY_MIN_PLATFORM, MBEDTLS_ENTROPY_BLOCK_SIZE)

void inject_entropy_for_psa()
{
if (psa_crypto_init() == PSA_ERROR_INSUFFICIENT_ENTROPY) {
uint8_t seed[MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE] = {0};
/* inject some a seed for test*/
for (int i = 0; i < MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE; ++i) {
seed[i] = i;
}

/* don't really care if this succeed this is just to make crypto init pass*/
mbedtls_psa_inject_entropy(seed, MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE);
}
}
#endif // (defined(TARGET_PSA) && defined(COMPONENT_PSA_SRV_IPC) && defined(MBEDTLS_PSA_CRYPTO_C))

static int fill_buffer_trng(uint8_t *buffer, trng_t *trng_obj, size_t trng_len)
{
size_t temp_size = 0, output_length = 0;
Expand Down Expand Up @@ -241,7 +268,13 @@ Specification specification(greentea_test_setup, cases, greentea_test_teardown_h

int main()
{
#if (defined(TARGET_PSA) && defined(COMPONENT_PSA_SRV_IPC) && defined(MBEDTLS_PSA_CRYPTO_C))
inject_entropy_for_psa();
#endif
bool ret = !Harness::run(specification);

return ret;
}



2 changes: 2 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/mail/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ using namespace utest::v1;
#define THREAD_STACK_SIZE 512
#elif defined(__ARM_FM)
#define THREAD_STACK_SIZE 512
#elif defined(TARGET_FUTURE_SEQUANA_PSA)
#define THREAD_STACK_SIZE 512
#else
#define THREAD_STACK_SIZE 320 /* larger stack cause out of heap memory on some 16kB RAM boards in multi thread test*/
#endif
Expand Down
2 changes: 2 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/malloc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ volatile bool thread_should_continue = true;
#define THREAD_STACK_SIZE 512
#elif defined(__ARM_FM)
#define THREAD_STACK_SIZE 512
#elif defined(TARGET_FUTURE_SEQUANA_PSA)
#define THREAD_STACK_SIZE 512
#else
#define THREAD_STACK_SIZE 256
#endif
Expand Down
2 changes: 2 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/threads/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#define PARALLEL_THREAD_STACK_SIZE 512
#elif defined(__ARM_FM)
#define PARALLEL_THREAD_STACK_SIZE 512
#elif defined(TARGET_FUTURE_SEQUANA_PSA)
#define PARALLEL_THREAD_STACK_SIZE 512
#else
#define PARALLEL_THREAD_STACK_SIZE 384
#endif
Expand Down
31 changes: 31 additions & 0 deletions TESTS/mbedtls/selftest/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,32 @@ Case cases[] = {
#endif /* MBEDTLS_SELF_TEST */
};

#if (defined(MBEDTLS_ENTROPY_C) && defined(TARGET_PSA) && defined(COMPONENT_PSA_SRV_IPC) && defined(MBEDTLS_PSA_CRYPTO_C))
#include "crypto.h"
#if !defined(MAX)
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif

/* Calculating the minimum allowed entropy size in bytes */
#define MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE \
MAX(MBEDTLS_ENTROPY_MIN_PLATFORM, MBEDTLS_ENTROPY_BLOCK_SIZE)

void inject_entropy_for_psa()
{
if (psa_crypto_init() == PSA_ERROR_INSUFFICIENT_ENTROPY) {
uint8_t seed[MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE] = {0};
/* inject some a seed for test*/
for (int i = 0; i < MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE; ++i) {
seed[i] = i;
}

/* don't really care if this succeed this is just to make crypto init pass*/
mbedtls_psa_inject_entropy(seed, MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE);
}
}
#endif // (defined(MBEDTLS_ENTROPY_C) && defined(TARGET_PSA) && defined(COMPONENT_PSA_SRV_IPC) && defined(MBEDTLS_PSA_CRYPTO_C))


utest::v1::status_t test_setup(const size_t num_cases)
{
GREENTEA_SETUP(120, "default_auto");
Expand All @@ -101,6 +127,11 @@ int main()
return 1;
}
#endif

#if (defined(MBEDTLS_ENTROPY_C) && defined(TARGET_PSA) && defined(COMPONENT_PSA_SRV_IPC) && defined(MBEDTLS_PSA_CRYPTO_C))
inject_entropy_for_psa();
#endif

ret = (Harness::run(specification) ? 0 : 1);
#if defined(MBEDTLS_PLATFORM_C)
mbedtls_platform_teardown(NULL);
Expand Down
83 changes: 83 additions & 0 deletions TESTS/psa/crypto_init/COMPONENT_SPE/psa_setup.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/* Copyright (c) 2017-2018 ARM Limited
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/***********************************************************************************************************************
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* THIS FILE IS AN AUTO-GENERATED FILE - DO NOT MODIFY IT.
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* Template Version 1.0
* Generated by tools/spm/generate_partition_code.py Version 1.0
**********************************************************************************************************************/

#include "spm_panic.h"
#include "spm_internal.h"
#include "handles_manager.h"
#include "cmsis.h"
#include "psa_crypto_srv_partition.h"
#include "psa_its_partition.h"

extern const uint32_t crypto_srv_external_sids[4];

spm_partition_t g_partitions[2] = {
{
.partition_id = CRYPTO_SRV_ID,
.thread_id = 0,
.flags_rot_srv = CRYPTO_SRV_WAIT_ANY_SID_MSK,
.flags_interrupts = 0,
.rot_services = NULL,
.rot_services_count = CRYPTO_SRV_ROT_SRV_COUNT,
.extern_sids = crypto_srv_external_sids,
.extern_sids_count = CRYPTO_SRV_EXT_ROT_SRV_COUNT,
.irq_mapper = NULL,
},
{
.partition_id = ITS_ID,
.thread_id = 0,
.flags_rot_srv = ITS_WAIT_ANY_SID_MSK,
.flags_interrupts = 0,
.rot_services = NULL,
.rot_services_count = ITS_ROT_SRV_COUNT,
.extern_sids = NULL,
.extern_sids_count = ITS_EXT_ROT_SRV_COUNT,
.irq_mapper = NULL,
},
};

/* Check all the defined memory regions for overlapping. */

/* A list of all the memory regions. */
const mem_region_t *mem_regions = NULL;

const uint32_t mem_region_count = 0;

// forward declaration of partition initializers
void crypto_srv_init(spm_partition_t *partition);
void its_init(spm_partition_t *partition);

uint32_t init_partitions(spm_partition_t **partitions)
{
if (NULL == partitions) {
SPM_PANIC("partitions is NULL!\n");
}

crypto_srv_init(&(g_partitions[0]));
its_init(&(g_partitions[1]));

*partitions = g_partitions;
return 2;
}

Loading