Skip to content
This repository was archived by the owner on Apr 16, 2021. It is now read-only.

Restore Low Power BLE functionalty #35

Merged
merged 3 commits into from
Jan 17, 2020
Merged
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -249,10 +249,14 @@ extern "C" {
// PCKTCTRL2
#define PCKT_FIXVARLEN_FIELD 0x01
#define PCKT_VARIABLE_LEN (1 << 0)
#define PCKT_FCS_TYPE_FIELD 0x20
#define PCKT_FCS_TYPE_4_OCTET (0 << 5)
#define PCKT_FCS_TYPE_2_OCTET (1 << 5)

// PCKTCTRL1
#define PCKT_CRCMODE_FIELD 0xE0
#define PCKT_CRCMODE_0X1021 (3 << 5)
#define PCKT_CRCMODE_0x04C11DB7 (5 << 5)
#define PCKT_TXSOURCE_FIELD 0x0C
#define PCKT_TXSOURCE_NORMAL (0 << 2)
#define PCKT_WHITENING_FIELD 0x10
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
/*
* Copyright (c) 2018-2019, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/

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

#ifndef __TFM_SPM_SIGNAL_DEFS_H__
#define __TFM_SPM_SIGNAL_DEFS_H__

/*************************** Service Partitions *******************************/
/* -----------------------------------------------------------------------------
* ATTEST_SRV Signals
* -------------------------------------------------------------------------- */
#define PSA_ATTEST_GET_TOKEN_POS (4UL)
#define PSA_ATTEST_GET_TOKEN (1UL << PSA_ATTEST_GET_TOKEN_POS)
#define PSA_ATTEST_GET_TOKEN_SIZE_POS (5UL)
#define PSA_ATTEST_GET_TOKEN_SIZE (1UL << PSA_ATTEST_GET_TOKEN_SIZE_POS)
#define PSA_ATTEST_INJECT_KEY_POS (6UL)
#define PSA_ATTEST_INJECT_KEY (1UL << PSA_ATTEST_INJECT_KEY_POS)

/* -----------------------------------------------------------------------------
* CRYPTO_SRV Signals
* -------------------------------------------------------------------------- */
#define PSA_CRYPTO_INIT_POS (4UL)
#define PSA_CRYPTO_INIT (1UL << PSA_CRYPTO_INIT_POS)
#define PSA_MAC_POS (5UL)
#define PSA_MAC (1UL << PSA_MAC_POS)
#define PSA_HASH_POS (6UL)
#define PSA_HASH (1UL << PSA_HASH_POS)
#define PSA_ASYMMETRIC_POS (7UL)
#define PSA_ASYMMETRIC (1UL << PSA_ASYMMETRIC_POS)
#define PSA_SYMMETRIC_POS (8UL)
#define PSA_SYMMETRIC (1UL << PSA_SYMMETRIC_POS)
#define PSA_AEAD_POS (9UL)
#define PSA_AEAD (1UL << PSA_AEAD_POS)
#define PSA_KEY_MNG_POS (10UL)
#define PSA_KEY_MNG (1UL << PSA_KEY_MNG_POS)
#define PSA_RNG_POS (11UL)
#define PSA_RNG (1UL << PSA_RNG_POS)
#define PSA_CRYPTO_FREE_POS (12UL)
#define PSA_CRYPTO_FREE (1UL << PSA_CRYPTO_FREE_POS)
#define PSA_KEY_DERIVATION_POS (13UL)
#define PSA_KEY_DERIVATION (1UL << PSA_KEY_DERIVATION_POS)
#define PSA_ENTROPY_INJECT_POS (14UL)
#define PSA_ENTROPY_INJECT (1UL << PSA_ENTROPY_INJECT_POS)

/* -----------------------------------------------------------------------------
* PLATFORM Signals
* -------------------------------------------------------------------------- */
#define PSA_PLATFORM_LC_GET_MSK_POS (4UL)
#define PSA_PLATFORM_LC_GET_MSK (1UL << PSA_PLATFORM_LC_GET_MSK_POS)
#define PSA_PLATFORM_LC_SET_MSK_POS (5UL)
#define PSA_PLATFORM_LC_SET_MSK (1UL << PSA_PLATFORM_LC_SET_MSK_POS)
#define PSA_PLATFORM_SYSTEM_RESET_MSK_POS (6UL)
#define PSA_PLATFORM_SYSTEM_RESET_MSK (1UL << PSA_PLATFORM_SYSTEM_RESET_MSK_POS)

/* -----------------------------------------------------------------------------
* ITS Signals
* -------------------------------------------------------------------------- */
#define PSA_ITS_GET_MSK_POS (4UL)
#define PSA_ITS_GET_MSK (1UL << PSA_ITS_GET_MSK_POS)
#define PSA_ITS_SET_MSK_POS (5UL)
#define PSA_ITS_SET_MSK (1UL << PSA_ITS_SET_MSK_POS)
#define PSA_ITS_INFO_MSK_POS (6UL)
#define PSA_ITS_INFO_MSK (1UL << PSA_ITS_INFO_MSK_POS)
#define PSA_ITS_REMOVE_MSK_POS (7UL)
#define PSA_ITS_REMOVE_MSK (1UL << PSA_ITS_REMOVE_MSK_POS)
#define PSA_ITS_RESET_MSK_POS (8UL)
#define PSA_ITS_RESET_MSK (1UL << PSA_ITS_RESET_MSK_POS)

/*************************** Test Partitions **********************************/
#ifdef USE_PSA_TEST_PARTITIONS

#ifdef USE_CRYPTO_ACL_TEST
/* -----------------------------------------------------------------------------
* CRYPTO_ACL_TEST Signals
* -------------------------------------------------------------------------- */
#define CRYPTO_GENERATE_KEY_MSK_POS (4UL)
#define CRYPTO_GENERATE_KEY_MSK (1UL << CRYPTO_GENERATE_KEY_MSK_POS)
#define CRYPTO_OPEN_KEY_MSK_POS (5UL)
#define CRYPTO_OPEN_KEY_MSK (1UL << CRYPTO_OPEN_KEY_MSK_POS)
#define CRYPTO_CLOSE_KEY_MSK_POS (6UL)
#define CRYPTO_CLOSE_KEY_MSK (1UL << CRYPTO_CLOSE_KEY_MSK_POS)
#define CRYPTO_DESTROY_KEY_MSK_POS (7UL)
#define CRYPTO_DESTROY_KEY_MSK (1UL << CRYPTO_DESTROY_KEY_MSK_POS)
#define CRYPTO_GET_KEY_ATTRIBUTES_MSK_POS (8UL)
#define CRYPTO_GET_KEY_ATTRIBUTES_MSK (1UL << CRYPTO_GET_KEY_ATTRIBUTES_MSK_POS)
#define CRYPTO_IMPORT_KEY_MSK_POS (9UL)
#define CRYPTO_IMPORT_KEY_MSK (1UL << CRYPTO_IMPORT_KEY_MSK_POS)
#endif // USE_CRYPTO_ACL_TEST

#ifdef USE_CLIENT_TESTS_PART1
/* -----------------------------------------------------------------------------
* CLIENT_TESTS_PART1 Signals
* -------------------------------------------------------------------------- */
#define PART1_ROT_SRV1_MSK_POS (4UL)
#define PART1_ROT_SRV1_MSK (1UL << PART1_ROT_SRV1_MSK_POS)
#define DROP_CONN_MSK_POS (5UL)
#define DROP_CONN_MSK (1UL << DROP_CONN_MSK_POS)
#define SECURE_CLIENTS_ONLY_MSK_POS (6UL)
#define SECURE_CLIENTS_ONLY_MSK (1UL << SECURE_CLIENTS_ONLY_MSK_POS)
#endif // USE_CLIENT_TESTS_PART1

#ifdef USE_SERVER_TESTS_PART1
/* -----------------------------------------------------------------------------
* SERVER_TESTS_PART1 Signals
* -------------------------------------------------------------------------- */
#define CONTROL_MSK_POS (4UL)
#define CONTROL_MSK (1UL << CONTROL_MSK_POS)
#define TEST_MSK_POS (5UL)
#define TEST_MSK (1UL << TEST_MSK_POS)
#endif // USE_SERVER_TESTS_PART1

#ifdef USE_SERVER_TESTS_PART2
/* -----------------------------------------------------------------------------
* SERVER_TESTS_PART2 Signals
* -------------------------------------------------------------------------- */
#define ROT_SRV_REVERSE_MSK_POS (4UL)
#define ROT_SRV_REVERSE_MSK (1UL << ROT_SRV_REVERSE_MSK_POS)
#define ROT_SRV_DB_TST_MSK_POS (5UL)
#define ROT_SRV_DB_TST_MSK (1UL << ROT_SRV_DB_TST_MSK_POS)
#endif // USE_SERVER_TESTS_PART2

#ifdef USE_SMOKE_TESTS_PART1
/* -----------------------------------------------------------------------------
* SMOKE_TESTS_PART1 Signals
* -------------------------------------------------------------------------- */
#define ROT_SRV1_MSK_POS (4UL)
#define ROT_SRV1_MSK (1UL << ROT_SRV1_MSK_POS)
#endif // USE_SMOKE_TESTS_PART1

#endif // USE_PSA_TEST_PARTITIONS

#endif // __TFM_SPM_SIGNAL_DEFS_H__
110 changes: 110 additions & 0 deletions cores/arduino/mbed/components/TARGET_PSA/services/inc/autogen_sid.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
/* Copyright (c) 2019 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/psa/generate_partition_code.py Version 1.1
******************************************************************************/

/****************** Service Partitions ****************************************/

/* -----------------------------------------------------------------------------
* ATTEST_SRV Service IDs
* -------------------------------------------------------------------------- */

#define PSA_ATTEST_GET_TOKEN_ID 0x00000F10
#define PSA_ATTEST_GET_TOKEN_SIZE_ID 0x00000F11
#define PSA_ATTEST_INJECT_KEY_ID 0x00000F12

/* -----------------------------------------------------------------------------
* CRYPTO_SRV Service IDs
* -------------------------------------------------------------------------- */

#define PSA_CRYPTO_INIT_ID 0x00000F00
#define PSA_MAC_ID 0x00000F01
#define PSA_HASH_ID 0x00000F02
#define PSA_ASYMMETRIC_ID 0x00000F03
#define PSA_SYMMETRIC_ID 0x00000F04
#define PSA_AEAD_ID 0x00000F05
#define PSA_KEY_MNG_ID 0x00000F06
#define PSA_RNG_ID 0x00000F07
#define PSA_CRYPTO_FREE_ID 0x00000F08
#define PSA_KEY_DERIVATION_ID 0x00000F09
#define PSA_ENTROPY_ID 0x00000F0A

/* -----------------------------------------------------------------------------
* PLATFORM Service IDs
* -------------------------------------------------------------------------- */

#define PSA_PLATFORM_LC_GET 0x00011000
#define PSA_PLATFORM_LC_SET 0x00011001
#define PSA_PLATFORM_SYSTEM_RESET 0x00011002

/* -----------------------------------------------------------------------------
* ITS Service IDs
* -------------------------------------------------------------------------- */

#define PSA_ITS_GET 0x00011A00
#define PSA_ITS_SET 0x00011A01
#define PSA_ITS_INFO 0x00011A02
#define PSA_ITS_REMOVE 0x00011A03
#define PSA_ITS_RESET 0x00011A04

/****************** Test Partitions *******************************************/

/* -----------------------------------------------------------------------------
* CRYPTO_ACL_TEST Service IDs
* -------------------------------------------------------------------------- */

#define CRYPTO_GENERATE_KEY 0x00000201
#define CRYPTO_OPEN_KEY 0x00000202
#define CRYPTO_CLOSE_KEY 0x00000203
#define CRYPTO_DESTROY_KEY 0x00000205
#define CRYPTO_GET_KEY_ATTRIBUTES 0x00000206
#define CRYPTO_IMPORT_KEY 0x00000208

/* -----------------------------------------------------------------------------
* CLIENT_TESTS_PART1 Service IDs
* -------------------------------------------------------------------------- */

#define CLIENT_TESTS_PART1_ROT_SRV1 0x00001A05
#define CLIENT_TESTS_PART1_DROP_CONN 0x00001A06
#define CLIENT_TESTS_PART1_SECURE_CLIENTS_ONLY 0x00001A07

/* -----------------------------------------------------------------------------
* SERVER_TESTS_PART1 Service IDs
* -------------------------------------------------------------------------- */

#define SERVER_TESTS_PART1_CONTROL 0x00001A01
#define SERVER_TESTS_PART1_TEST 0x00001A02

/* -----------------------------------------------------------------------------
* SERVER_TESTS_PART2 Service IDs
* -------------------------------------------------------------------------- */

#define SERVER_TESTS_PART2_ROT_SRV_REVERSE 0x00001A03
#define SERVER_TESTS_PART2_ROT_SRV_DB_TST 0x00001A04

/* -----------------------------------------------------------------------------
* SMOKE_TESTS_PART1 Service IDs
* -------------------------------------------------------------------------- */

#define SMOKE_TESTS_PART1_ROT_SRV1 0x00001A00

Loading