-
Notifications
You must be signed in to change notification settings - Fork 3k
Mark PSA as an experimental API #13003
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
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4e47c38
tools: Fix grammar in feature error message
Patater cf17d7a
Change unrecognised features to a warning, rather than error
dgreen-arm 295ff53
psa: Pick up code from MBED_PSA_SRV
Patater 5d6ec71
crypto: Move PSA Crypto headers to MBED_PSA_SRV
Patater 8b5a2ff
psa: Fix style in psa_hrng.c
Patater b44a263
psa: Put Mbed PSA implementation into MBED_PSA_SRV
Patater 7aadee9
Add experimental feature folder
dgreen-arm aa7a02f
musca: Mark Musca targets as experimental
Patater 10e9946
Move FEATURE_PSA under FEATURE_EXPERIMENTAL_API
dgreen-arm ccdb76d
Move components/TARGET_PSA under FEATURE_EXPERIMENTAL_API
dgreen-arm 5fa5176
Move mbedtls/platform/TARGET_PSA to FEATURE_EXPERIMENTAL_API/TARGET_PSA
dgreen-arm 0e07dff
Move TARGET_MBED_PSA_SRV to FEATURE_EXPERIMENTAL_API
dgreen-arm fcf60ec
Move frameworks/TARGET_PSA to TARGET_EXPERIMENTAL_API
dgreen-arm a62b359
Fix astyle issues
dgreen-arm e5f8dd8
Move import to after TARGET_PSA define check
dgreen-arm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
features/FEATURE_EXPERIMENTAL_API/TARGET_PSA/pal/pal_internal_trusted_storage_intf.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/** @file | ||
* Copyright (c) 2018, Arm Limited or its affiliates. All rights reserved. | ||
* 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. | ||
**/ | ||
|
||
|
||
#include "pal_internal_trusted_storage_intf.h" | ||
|
||
/** | ||
@brief - This API will call the requested internal trusted storage function | ||
@param - type : function code | ||
valist : variable argument list | ||
@return - error status | ||
**/ | ||
uint32_t pal_its_function(int type, va_list valist) | ||
{ | ||
#if PSA_INTERNAL_TRUSTED_STORAGE_IMPLEMENTED | ||
uint32_t uid, data_length, offset; | ||
const void *p_write_data; | ||
void *p_read_data; | ||
psa_storage_create_flags_t its_create_flags; | ||
//psa_ps_create_flags_t ps_create_flags; | ||
struct psa_its_info_t *its_p_info; | ||
//struct psa_eps_info_t *ps_p_info; | ||
/* TODO: Actual size argument is currently not supported by the testing framework. | ||
* Changes need to be implemented in the actual tests. | ||
* Should be fixed by the next import of the tests. | ||
*/ | ||
size_t actual_size; | ||
|
||
switch (type) { | ||
case PAL_ITS_SET: | ||
uid = va_arg(valist, psa_storage_uid_t); | ||
data_length = va_arg(valist, uint32_t); | ||
p_write_data = va_arg(valist, const void *); | ||
its_create_flags = va_arg(valist, psa_storage_create_flags_t); | ||
return psa_its_set(uid, data_length, p_write_data, its_create_flags); | ||
case PAL_ITS_GET: | ||
uid = va_arg(valist, psa_storage_uid_t); | ||
offset = va_arg(valist, uint32_t); | ||
data_length = va_arg(valist, uint32_t); | ||
p_read_data = va_arg(valist, void *); | ||
/* TODO: Actual size argument is currently not supported by the testing framework. | ||
* Changes need to be implemented in the actual tests. | ||
* Should be fixed by the next import of the tests. | ||
*/ | ||
return psa_its_get(uid, offset, data_length, p_read_data, &actual_size); | ||
case PAL_ITS_GET_INFO: | ||
uid = va_arg(valist, psa_storage_uid_t); | ||
its_p_info = va_arg(valist, struct psa_its_info_t *); | ||
return psa_its_get_info(uid, (struct psa_storage_info_t *)its_p_info); | ||
case PAL_ITS_REMOVE: | ||
uid = va_arg(valist, psa_storage_uid_t); | ||
return psa_its_remove(uid); | ||
/* case PAL_PS_SET: */ | ||
/* uid = va_arg(valist, uint32_t); */ | ||
/* data_length = va_arg(valist, uint32_t); */ | ||
/* p_write_data = va_arg(valist, const void*); */ | ||
/* ps_create_flags = va_arg(valist, psa_ps_create_flags_t); */ | ||
/* return psa_ps_set(uid, data_length, p_write_data, ps_create_flags); */ | ||
/* case PAL_PS_GET: */ | ||
/* uid = va_arg(valist, uint32_t); */ | ||
/* offset = va_arg(valist, uint32_t); */ | ||
/* data_length = va_arg(valist, uint32_t); */ | ||
/* p_read_data = va_arg(valist, void*); */ | ||
/* return psa_ps_get(uid, offset, data_length, p_read_data); */ | ||
/* case PAL_PS_GET_INFO: */ | ||
/* uid = va_arg(valist, uint32_t); */ | ||
/* ps_p_info = va_arg(valist, struct psa_eps_info_t*); */ | ||
/* return psa_ps_get_info(uid, ps_p_info); */ | ||
/* case PAL_PS_REMOVE: */ | ||
/* uid = va_arg(valist, uint32_t); */ | ||
/* return psa_ps_remove(uid); */ | ||
default: | ||
return PAL_STATUS_UNSUPPORTED_FUNC; | ||
} | ||
#else | ||
return PAL_STATUS_ERROR; | ||
#endif | ||
} |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.