Skip to content
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

Release candidate for mbed-os-5.12.0-rc2 #10067

Merged
merged 110 commits into from
Mar 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
e16d2d8
Reduce flash page size from 512 to 32 bytes in PSOC6 based boards
Mar 3, 2019
12390f6
tools: Add find_secure_image function
Feb 28, 2019
259e257
Add assertions and tests
Mar 4, 2019
7321545
Add missing license header
Mar 6, 2019
e8246bb
Compare non-secure image name without extension
Mar 6, 2019
f297f54
BLE - Avoid calling v2 API in GenericGap::reset_ if not required.
pan- Mar 1, 2019
9a9edd6
BLE - Call SecInit unconditionally as it is required by low HCI level…
pan- Mar 1, 2019
35c48c2
BLE - Register the Att call handler whenever the GATT_SERVER is avail…
pan- Mar 1, 2019
7f0b4d6
Doxygen add TF-M flags
alzix Mar 2, 2019
27f6e3b
align doxygen files
alzix Mar 2, 2019
0d7e548
Disable SPM tests with TF-M issues for TF-M targets
Mar 6, 2019
46e0dcc
TF-M: Increase TFM_SPM_MAX_ROT_SERV_NUM from 30 to 32
Mar 6, 2019
ee08d13
Attestation doxygen
Mar 6, 2019
a5019e6
Secure binaries release script
Mar 4, 2019
d3fd113
Add option to run on a single target
Mar 4, 2019
7cb3205
Fix crypto service get key info out params
Feb 28, 2019
a79d9d1
fix resource leaks
Mar 5, 2019
6556f94
Update PSoC 6 pre-build secure partition
Mar 5, 2019
0cc6d1a
indentation fix
Mar 5, 2019
bc8f532
Add README.md for tools/psa
Mar 6, 2019
abc90c3
Remove python from code block
Mar 6, 2019
abbb2ff
Fix typo
Mar 6, 2019
3e6723c
Edit README.md
Mar 7, 2019
d2bf036
Remove unused type which was conflicting wiith errno.h
Mar 7, 2019
678ac50
Updated to cb58d2c
Mar 3, 2019
9621a04
Delete unneeded .mk files after test import
Feb 28, 2019
a5e77c6
add imported PSA compliance tests to astyle ignore list
Feb 28, 2019
7a80553
changes to test infrastructure to adapt it to green-tea
Feb 28, 2019
4a474ce
add main functions to each compliance test
Mar 3, 2019
1333f31
Allow PS test03 with PS_ALLOW_ENTIRE_STORAGE_FILL flag
Mar 3, 2019
932c097
rework for mbed-os intf for ACK tests
Mar 4, 2019
339d481
Define psa_storage_info_t for backward compatibility
Mar 5, 2019
dc50ccb
Fix for resource leak in crypto compliance test 43
Mar 5, 2019
c178c13
update importer hashes for latest fixes
Mar 5, 2019
1d56ad4
use common flag to allow test 3 for PS and ITS
Mar 6, 2019
25be6fe
update importer hashes for latest changes
Mar 6, 2019
e494c3c
removed redundant code + added comment
Mar 7, 2019
3a12cf6
Remove _NS & _PSA from test_spec.json
orenc17 Mar 5, 2019
17312d4
TF-M config: Add max_ns_thread_count parameter
Mar 7, 2019
5efec7e
Fix tool
Mar 7, 2019
848c2da
synchronize latest fix to tests
Mar 7, 2019
4df870c
add comment explaining attestation keys for test use
Mar 7, 2019
0ec8125
remove sid.h as it is now supplied by PSA
Mar 7, 2019
65f632f
add mbed_lib.json to prevent inclusion in bare-metal builds
Mar 7, 2019
bb023fe
Test for sector information
theotherjimmy Mar 7, 2019
9873da1
Recompute sector information for STM32xxxxx
theotherjimmy Mar 7, 2019
ce341d2
Add dummy sector information for R7S72100
theotherjimmy Mar 7, 2019
b1d1299
Recompute sector information for Nuvoton
theotherjimmy Mar 7, 2019
78a0057
Added support for PSA target to WIFI_BT board
Feb 23, 2019
42f9c86
Fixed type of STDIO UART initialization variable.
Feb 28, 2019
69e8b73
PSOC6 deep-sleep changes
cy-vivekp Feb 28, 2019
6ea1721
adding flash iap component to cypress psoc6 m4
ShuopengDeng Mar 1, 2019
d29baa0
TARGET_PSOC6: Fix incorrect serial clock divider
Mar 1, 2019
cf4e436
Fixed issue with wrong floating point literal
cy-opm Mar 2, 2019
b2105b1
Rename PSoC 6 assembler files from .s to .S
cypress-neil Mar 7, 2019
7aa5208
Rebuild PSoC6 secure binaries
Mar 7, 2019
bbc2502
Squashed 'features/nanostack/sal-stack-nanostack/' changes from 76da6…
Mar 7, 2019
0cf73fc
NUCLEO_L073RZ: IAR linker script issue
sarahmarshy Feb 21, 2019
322ca83
Add build profile option
orenc17 Mar 7, 2019
4276779
Removed cymetadata section from FUTURE_SEQUANA targets
lrusinowicz Mar 8, 2019
2aa0e5f
MCUXpresso: Update usticker driver
mmahadevan108 Dec 13, 2018
981b625
MCUXpresso: Update the LPC GPIO drivers
mmahadevan108 Nov 27, 2018
270374b
MCUXpresso: Update LPC I2C, SPI, UART HAL drivers
mmahadevan108 Nov 27, 2018
7d2f50b
MCUXpresso: Update LPC HAL flash driver
mmahadevan108 Nov 28, 2018
b818c82
MCUXpresso: Update LPC TRNG driver
mmahadevan108 Jan 26, 2019
1dc9a67
MCUXpresso: In pin_function() use mask macro instead of a hard-coded …
mmahadevan108 Feb 11, 2019
9efcd95
MCUXpresso: Update SPI driver
mmahadevan108 Feb 11, 2019
69c4ca3
Add support for LPC55S69
mmahadevan108 Nov 20, 2018
b2eb045
MCUXpresso: Update the sleep implementation for LPC55S69 differences
mmahadevan108 Feb 28, 2019
192040c
LPC55S69: Remove FPU_PRESENT and DSP_PRESENT defines
mmahadevan108 Feb 28, 2019
80006c8
LPC55S69: Add a ctimer for usticker to be used in the secure domain
mmahadevan108 Jan 7, 2019
e2366c3
MCUXpresso: Update Analogin support
mmahadevan108 Jan 16, 2019
f1d90c9
LPC55S69: Fix the I2C SDK driver
mmahadevan108 Feb 19, 2019
560a450
LPC55S69: Update the KVStore config files
mmahadevan108 Feb 28, 2019
3928ea6
LPC55S69: Add post processing script
mmahadevan108 Feb 28, 2019
6b61c28
LPC55S69: Use find_secure_image in post-build and add prebuilt secure…
Mar 3, 2019
66c1af1
LPC55S69: Change post-build hook to create HEX
Mar 6, 2019
a4e5766
Updated LOOP_SCALER value for Cortex-M33
mmahadevan108 Mar 6, 2019
5e312ee
Increase the stack pointer check range
mmahadevan108 Mar 6, 2019
01f3a0c
Reduce the number of flash operation related veneer table entries
mmahadevan108 Mar 7, 2019
941b1c9
Updated the binaries
mmahadevan108 Mar 7, 2019
92e076e
Allow baremetal to build by removing PSA
kegilbert Mar 7, 2019
b984dbd
Generate BLE Random Static Address on U-blox Odin-W2 platform
Mar 8, 2019
960d52b
Reset ITS before the test start
orenc17 Mar 7, 2019
2c49ae1
Fix error codes for psa_attestation_inject_key
orenc17 Mar 7, 2019
8153724
add needed crypto macros to secure side
Mar 10, 2019
ef36893
Fix crypto compliance tests
Mar 10, 2019
422bf25
PSoC 6 Correct TRNG behaviour
Mar 10, 2019
a9ad0f9
Update docs for PSA tools
orenc17 Mar 8, 2019
799deb8
Add git commit option
orenc17 Mar 8, 2019
12d63be
Enhancements
orenc17 Mar 8, 2019
6453009
Rename psa_system_reset to mbed_psa_system_reset
alzix Mar 9, 2019
0ac2cd3
TF-M patch: Handle extended stack frame in tfm_svcall_psa_call
Mar 11, 2019
66afa69
Update tfm_importer.json
Mar 11, 2019
4972263
Minor changes fixing the script from getting stuck
Mar 11, 2019
3a4fd57
change the include to mbedtls/config.h
Mar 11, 2019
e4ae714
update crypto complience tests importer, fix include to mbedtls config
Mar 11, 2019
5d3059c
remove hidden tad
Mar 11, 2019
c7c0af8
Add spi_get_peripheral_name to MCUEpresso spi_api
Mar 11, 2019
fc73e45
Use Mbed OS coding style
Mar 11, 2019
cceb16c
Add new mbed-os-example-attestation example
adbridge Mar 11, 2019
bd3eeea
Remove unecessary _S and _NS target variants from new example
adbridge Mar 11, 2019
22e2a0d
Looks like only the LPC55S69_NS flavour of target is required.
adbridge Mar 11, 2019
0c87ded
Fix cut/paste error in the new example github link
adbridge Mar 11, 2019
561d9e8
qualify cordio pal includes
paul-szczepanek-arm Mar 11, 2019
91ea832
Bugfix: send the correct parameter to _get_target_info()
Mar 12, 2019
9210b34
"Update secure binaries for CY8CKIT_062_WIFI_BT_M0_PSA"
Mar 12, 2019
8c216f8
"Update secure binaries for FUTURE_SEQUANA_M0_PSA"
Mar 12, 2019
a04507a
"Update secure binaries for LPC55S69_S"
Mar 12, 2019
1668a9d
move init of test into greentea init function
Mar 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .astyleignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ components/802.15.4_RF
components/wifi
components/TARGET_PSA/TARGET_TFM
tools
components/TARGET_PSA/TESTS
components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/tfm_impl
components/TARGET_PSA/services/attestation/qcbor
components/TARGET_PSA/services/attestation/attestation.h
components/TARGET_PSA/services/attestation/attestation.h
2 changes: 1 addition & 1 deletion TESTS/mbedmicro-rtos-mbed/heap_and_stack/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ void test_isr_stack_in_range(void)
{
// MSP stack should be very near end (test using within 128 bytes)
uint32_t msp = __get_MSP();
bool result = inrange(msp, mbed_stack_isr_start + mbed_stack_isr_size - 128, 128);
bool result = inrange(msp, mbed_stack_isr_start + mbed_stack_isr_size - 0x400, 0x400);

TEST_ASSERT_TRUE_MESSAGE(result, "Interrupt stack in wrong location");
}
Expand Down
2 changes: 1 addition & 1 deletion TESTS/mbedmicro-rtos-mbed/mail/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ using namespace utest::v1;
#define THREAD_STACK_SIZE 512
#elif defined(__ARM_FM)
#define THREAD_STACK_SIZE 512
#elif defined(TARGET_FUTURE_SEQUANA_PSA)
#elif defined(TARGET_FUTURE_SEQUANA_PSA) || defined(TARGET_CY8CKIT_062_WIFI_BT_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*/
Expand Down
2 changes: 1 addition & 1 deletion TESTS/mbedmicro-rtos-mbed/malloc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ 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)
#elif defined(TARGET_FUTURE_SEQUANA_PSA) || defined(TARGET_CY8CKIT_062_WIFI_BT_PSA)
#define THREAD_STACK_SIZE 512
#else
#define THREAD_STACK_SIZE 256
Expand Down
2 changes: 1 addition & 1 deletion TESTS/mbedmicro-rtos-mbed/threads/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#define PARALLEL_THREAD_STACK_SIZE 512
#elif defined(__ARM_FM)
#define PARALLEL_THREAD_STACK_SIZE 512
#elif defined(TARGET_FUTURE_SEQUANA_PSA)
#elif defined(TARGET_FUTURE_SEQUANA_PSA) || defined(TARGET_CY8CKIT_062_WIFI_BT_PSA)
#define PARALLEL_THREAD_STACK_SIZE 512
#else
#define PARALLEL_THREAD_STACK_SIZE 384
Expand Down
27 changes: 16 additions & 11 deletions TESTS/psa/attestation/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "greentea-client/test_env.h"
#include "unity/unity.h"
#include "utest/utest.h"
#include "psa/lifecycle.h"
#include "psa_initial_attestation_api.h"
#include "psa_attest_inject_key.h"
#include <string.h>
Expand Down Expand Up @@ -128,17 +129,9 @@ utest::v1::status_t case_teardown_handler(const Case *const source, const size_t

utest::v1::status_t case_setup_handler(const Case *const source, const size_t index_of_case)
{
return greentea_case_setup_handler(source, index_of_case);
}

Case cases[] = {
Case("PSA attestation get token", check_initial_attestation_get_token, case_teardown_handler),
};

Specification specification(greentea_test_setup, cases);

int main()
{
psa_status_t status;
status = mbed_psa_reboot_and_request_new_security_state(PSA_LIFECYCLE_ASSEMBLY_AND_TEST);
TEST_ASSERT_EQUAL(PSA_SUCCESS, status);
#if (defined(COMPONENT_PSA_SRV_IPC) || defined(MBEDTLS_ENTROPY_NV_SEED))
uint8_t seed[MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE] = {0};
/* inject some seed for test*/
Expand All @@ -149,5 +142,17 @@ int main()
/* don't really care if this succeeds this is just to make crypto init pass*/
mbedtls_psa_inject_entropy(seed, MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE);
#endif
return greentea_case_setup_handler(source, index_of_case);
}


Case cases[] = {
Case("PSA attestation get token", case_setup_handler, check_initial_attestation_get_token, case_teardown_handler),
};

Specification specification(greentea_test_setup, cases);

int main()
{
return !Harness::run(specification);
}
4 changes: 2 additions & 2 deletions TESTS/psa/its_ps/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ utest::v1::status_t case_its_teardown_handler(const Case *const source, const si
{
psa_status_t status;
status = mbed_psa_reboot_and_request_new_security_state(PSA_LIFECYCLE_ASSEMBLY_AND_TEST);
TEST_ASSERT_EQUAL(PSA_LIFECYCLE_SUCCESS, status);
TEST_ASSERT_EQUAL(PSA_SUCCESS, status);
return greentea_case_teardown_handler(source, passed, failed, reason);
}

Expand All @@ -167,7 +167,7 @@ utest::v1::status_t case_its_setup_handler(const Case *const source, const size_
psa_status_t status;
if (stype == its) {
status = mbed_psa_reboot_and_request_new_security_state(PSA_LIFECYCLE_ASSEMBLY_AND_TEST);
TEST_ASSERT_EQUAL(PSA_LIFECYCLE_SUCCESS, status);
TEST_ASSERT_EQUAL(PSA_SUCCESS, status);
} else {
status = psa_ps_reset();
TEST_ASSERT_EQUAL(PSA_SUCCESS, status);
Expand Down
4 changes: 3 additions & 1 deletion TESTS/psa/spm_client/COMPONENT_NSPE/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,14 +460,16 @@ Case cases[] = {
Case("Testing client tx_buff_null", tx_buff_null),
Case("Testing client rx_tx_null", rx_tx_null),
Case("Testing client multiple_call from a single thread", multiple_call),
Case("Testing client exceed num of max channels allowed", exceed_num_of_max_channels),
Case("Testing client close on NULL handle", client_close_null_handle),
Case("Testing DROP_CONNECTION State", drop_connection),
Case("Testing client psa_framework_version() API", verify_psa_framework_version),
Case("Testing client psa_version() API on existing SID", psa_version_existing),
Case("Testing client psa_version() API on non-existing SID", psa_version_non_existing),
Case("Testing client psa_version() API to a service that is not NSPE callable", psa_version_secure_access_only),
Case("Testing client multiple calls on different channels to the same SID", multi_thread_diff_handles),
#if defined TARGET_MBED_SPM // TF-M issue: https://developer.trustedfirmware.org/T244
Case("Testing client exceed num of max channels allowed", exceed_num_of_max_channels),
#endif
};

utest::v1::status_t test_setup(const size_t number_of_cases)
Expand Down
2 changes: 2 additions & 0 deletions TESTS/psa/spm_server/COMPONENT_NSPE/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ Case cases[] = {
SPM_UTEST_CASE("Try to skip more bytes than left while reading", skip_more_than_left),
SPM_UTEST_CASE("Test rhandle implementation by calculating the factorial function", rhandle_factorial),
SPM_UTEST_CASE("Test a call flow between 2 secure partitions", cross_partition_call),
#if defined TARGET_MBED_SPM // TF-M issue: https://developer.trustedfirmware.org/T273
SPM_UTEST_CASE("Test a common DOORBELL scenario", doorbell_test),
#endif
};

//Declare your test specification with a custom setup handler
Expand Down
2 changes: 2 additions & 0 deletions TESTS/psa/spm_server/COMPONENT_SPE/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,8 @@ psa_test_server_side_func test_list[] = {
PSA_TEST_SERVER_NAME(skip_more_than_left),
PSA_TEST_SERVER_NAME(rhandle_factorial),
PSA_TEST_SERVER_NAME(cross_partition_call),
#if defined TARGET_MBED_SPM // TF-M issue: https://developer.trustedfirmware.org/T273
PSA_TEST_SERVER_NAME(doorbell_test),
#endif
NULL
};
1 change: 0 additions & 1 deletion components/TARGET_PSA/TARGET_MBED_SPM/psa_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ extern "C" {

typedef uint32_t psa_signal_t;
typedef int32_t psa_handle_t;
typedef psa_status_t error_t;

/* -------------------------------------- Structs ------------------------------------ */

Expand Down
9 changes: 8 additions & 1 deletion components/TARGET_PSA/TARGET_TFM/COMPONENT_SPE/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"name": "tfm-s",
"macros": ["MBED_FAULT_HANDLER_DISABLED", "BYPASS_NVSTORE_CHECK=1"]
"macros": ["MBED_FAULT_HANDLER_DISABLED", "BYPASS_NVSTORE_CHECK=1"],
"config": {
"max_ns_thread_count": {
"help": "maximum allowed number of non-secure threads",
"macro_name": "TFM_MAX_NS_THREAD_COUNT",
"value": 10
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ psa_handle_t tfm_svcall_psa_connect(uint32_t *args, int32_t ns_caller);
* handle, in_vec, in_len, out_vec, out_len.
* \param[in] ns_caller If 'non-zero', call from non-secure client.
* Or from secure client.
* \param[in] lr Link register to be stored
*
* \retval >=0 RoT Service-specific status value.
* \retval <0 RoT Service-specific error code.
Expand All @@ -73,7 +74,7 @@ psa_handle_t tfm_svcall_psa_connect(uint32_t *args, int32_t ns_caller);
* \arg The message is unrecognized by the RoT
* Service or incorrectly formatted.
*/
psa_status_t tfm_svcall_psa_call(uint32_t *args, int32_t ns_caller);
psa_status_t tfm_svcall_psa_call(uint32_t *args, int32_t ns_caller, uint32_t lr);

/**
* \brief SVC handler for \ref psa_close.
Expand All @@ -96,10 +97,11 @@ void tfm_svcall_psa_close(uint32_t *args, int32_t ns_caller);
*
* \param[in] svc_num SVC number
* \param[in] ctx Argument context
* \param[in] lr Link register to be stored
*
* \returns Return values from those who has,
* or PSA_SUCCESS.
*/
int32_t SVC_Handler_IPC(tfm_svc_number_t svc_num, uint32_t *ctx);
int32_t SVC_Handler_IPC(tfm_svc_number_t svc_num, uint32_t *ctx, uint32_t lr);

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ psa_handle_t tfm_svcall_psa_connect(uint32_t *args, int32_t ns_caller)
return PSA_NULL_HANDLE;
}

psa_status_t tfm_svcall_psa_call(uint32_t *args, int32_t ns_caller)
psa_status_t tfm_svcall_psa_call(uint32_t *args, int32_t ns_caller, uint32_t lr)
{
psa_handle_t handle;
psa_invec *inptr, invecs[PSA_MAX_IOVEC];
Expand All @@ -124,14 +124,17 @@ psa_status_t tfm_svcall_psa_call(uint32_t *args, int32_t ns_caller)
in_num = (size_t)args[2];
outptr = (psa_outvec *)args[3];
/*
* FixMe: 5th parameter is pushed at stack top before SVC; plus
* exception stacked contents, 5th parameter is now at 8th position
* in SVC handler. However, if thread mode applies FloatPoint, then
* FloatPoint context is pushed into stack and then 5th parameter
* will not be args[8].
* Will refine it later.
* 5th parameter is pushed at stack top before SVC; plus exception stacked contents,
* 5th parameter is now at 8th position in SVC handler.
* However, if thread mode applies FloatPoint, then FloatPoint context is pushed into
* stack and then 5th parameter will be args[26].
*/
out_num = (size_t)args[8];
if (lr & EXC_RETURN_FPU_FRAME_BASIC) {
out_num = (size_t)args[8];
}
else {
out_num = (size_t)args[26];
}
} else {
/*
* FixMe: From non-secure caller, vec and len are composed into a new
Expand Down Expand Up @@ -926,7 +929,7 @@ static void tfm_svcall_psa_eoi(uint32_t *args)
/* FixMe: re-enable interrupt */
}

int32_t SVC_Handler_IPC(tfm_svc_number_t svc_num, uint32_t *ctx)
int32_t SVC_Handler_IPC(tfm_svc_number_t svc_num, uint32_t *ctx, uint32_t lr)
{
switch (svc_num) {
case TFM_SVC_SCHEDULE:
Expand All @@ -939,7 +942,7 @@ int32_t SVC_Handler_IPC(tfm_svc_number_t svc_num, uint32_t *ctx)
case TFM_SVC_PSA_CONNECT:
return tfm_svcall_psa_connect(ctx, 0);
case TFM_SVC_PSA_CALL:
return tfm_svcall_psa_call(ctx, 0);
return tfm_svcall_psa_call(ctx, 0, lr);
case TFM_SVC_PSA_CLOSE:
tfm_svcall_psa_close(ctx, 0);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ uint32_t SVCHandler_main(uint32_t *svc_args, uint32_t lr)
case TFM_SVC_PSA_NOTIFY:
case TFM_SVC_PSA_CLEAR:
case TFM_SVC_PSA_EOI:
svc_args[0] = SVC_Handler_IPC(svc_number, svc_args);
svc_args[0] = SVC_Handler_IPC(svc_number, svc_args, lr);
break;
#endif
default:
Expand Down
2 changes: 1 addition & 1 deletion components/TARGET_PSA/TARGET_TFM/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"rot_pool_size": {
"help": "maximum number of RoT services allowed",
"macro_name": "TFM_SPM_MAX_ROT_SERV_NUM",
"value": 30
"value": 32
},
"message_pool_size": {
"help": "maximum number of active messages allowed",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# PSA Initial Attestation Testcase checklist

| Test | Return value | API | Test Algorithm | Test Cases |
|-----------|--------------------------------------|-------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| test_a001 | PSA_ATTEST_ERR_SUCCESS | psa_initial_attest_get_token()<br />psa_initial_attest_get_token_size() | 1. Provide correct inputs to API with described challenge sizes <br />2. Expect API to return this define as return value each time <br />3. Verify the token | 1. Challenge_size = 32 <br />2. Challenge_size = 48 <br />3. Challenge_size = 64 |
| | PSA_ATTEST_ERR_INVALID_INPUT | psa_initial_attest_get_token()<br />psa_initial_attest_get_token_size() | 1. Provide described challenge sizes to the API along with other valid parameters <br />2. Expect API to return this define as return value each time | 1. Challenge_size is zero <br />2. Invalid challenge size between 0 and 32 <br />3. Invalid challenge size between 32 and 64 <br />4. Challenge_size is greater than MAX_CHALLENGE_SIZE |
| | PSA_ATTEST_ERR_TOKEN_BUFFER_OVERFLOW | psa_initial_attest_get_token() | 1. Provide described taken size to the API along with other valid parameters <br />2. Expect API to return this define as return value each time | Pass the token_size which less than actual/required token size |
| | PSA_ATTEST_ERR_INIT_FAILED | psa_initial_attest_get_token()<br />psa_initial_attest_get_token_size() | Can't simulate. Test can't generate stimulus where attestation initialisation fails | |
| | PSA_ATTEST_ERR_CLAIM_UNAVAILABLE | psa_initial_attest_get_token() | Can't simulate. Test can't generate stimulus where claim can unavailable | |
| | PSA_ATTEST_ERR_GENERAL | psa_initial_attest_get_token()<br />psa_initial_attest_get_token_size() | Can't simulate. Test can't generate stimulus where unexpected error happened during API operation | |

## Note

1. In verifying the token, only the data type of claims and presence of the mandatory claims are checked and the values of the claims are not checked.
2. Checks related to token signature validation will be part of future release

# License
Arm PSA test suite is distributed under Apache v2.0 License.

--------------

*Copyright (c) 2019, Arm Limited and Contributors. All rights reserved.*
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "val_interfaces.h"
Copy link
Contributor

@0xc0170 0xc0170 Mar 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ARMmbed/mbed-os-psa this will need a license header for rc3

#include "pal_mbed_os_intf.h"

void test_entry_a001(val_api_t *val_api, psa_api_t *psa_api);

int main(void)
{
test_start(test_entry_a001, COMPLIANCE_TEST_ATTESTATION);
}
Loading