Skip to content

Commit 0b89692

Browse files
travis3630degjorva
authored andcommitted
Revert "[nrf noup] secure_fw: platform: Add system off service"
This reverts commit 5880bf3. Signed-off-by: Travis Lam <travis.lam@nordicsemi.no>
1 parent 245ee51 commit 0b89692

5 files changed

Lines changed: 0 additions & 66 deletions

File tree

interface/include/tfm_platform_api.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ extern "C" {
2727
#define TFM_PLATFORM_API_ID_NV_INCREMENT (1011)
2828
#define TFM_PLATFORM_API_ID_SYSTEM_RESET (1012)
2929
#define TFM_PLATFORM_API_ID_IOCTL (1013)
30-
#define TFM_PLATFORM_API_ID_SYSTEM_OFF (1014)
3130

3231
/*!
3332
* \enum tfm_platform_err_t
@@ -54,14 +53,6 @@ typedef int32_t tfm_platform_ioctl_req_t;
5453
*/
5554
enum tfm_platform_err_t tfm_platform_system_reset(void);
5655

57-
/*!
58-
* \brief System off function to move the system to the lowest power state
59-
*
60-
* \return On success the processor will go to system off, in case of error it returns
61-
* values as specified by the \ref tfm_platform_err_t
62-
*/
63-
enum tfm_platform_err_t tfm_platform_system_off(void);
64-
6556
/*!
6657
* \brief Performs a platform-specific service
6758
*

interface/src/tfm_platform_api.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,6 @@ enum tfm_platform_err_t tfm_platform_system_reset(void)
2626

2727
}
2828

29-
enum tfm_platform_err_t tfm_platform_system_off(void)
30-
{
31-
psa_status_t status = PSA_ERROR_CONNECTION_REFUSED;
32-
33-
status = psa_call(TFM_PLATFORM_SERVICE_HANDLE,
34-
TFM_PLATFORM_API_ID_SYSTEM_OFF,
35-
NULL, 0, NULL, 0);
36-
37-
if (status < PSA_SUCCESS) {
38-
return TFM_PLATFORM_ERR_SYSTEM_ERROR;
39-
} else {
40-
return (enum tfm_platform_err_t)status;
41-
}
42-
}
43-
4429
enum tfm_platform_err_t
4530
tfm_platform_ioctl(tfm_platform_ioctl_req_t request,
4631
psa_invec *input, psa_outvec *output)

platform/ext/target/nordic_nrf/common/core/CMakeLists.txt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -165,18 +165,6 @@ if(TFM_SPM_LOG_RAW_ENABLED OR SECURE_UART1)
165165
)
166166
endif()
167167

168-
if(TFM_NRF_SYSTEM_OFF_SERVICE)
169-
target_sources(platform_s
170-
PRIVATE
171-
${HAL_NORDIC_PATH}/nrfx/helpers/nrfx_ram_ctrl.c
172-
)
173-
174-
target_compile_definitions(platform_s
175-
PUBLIC
176-
TFM_NRF_SYSTEM_OFF_SERVICE
177-
)
178-
endif()
179-
180168
target_compile_options(platform_s
181169
PUBLIC
182170
${COMPILER_CMSE_FLAG}

platform/include/tfm_platform_system.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@ extern "C" {
2828
TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_PLATFORM", "PSA-ROT")
2929
void tfm_platform_hal_system_reset(void);
3030

31-
/**
32-
* \brief Set system power state to off.
33-
*
34-
* \details Requests the system to enter a low-power state.
35-
*/
36-
TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_PLATFORM", "PSA-ROT")
37-
enum tfm_platform_err_t tfm_platform_hal_system_off(void);
38-
3931
/*!
4032
* \brief Performs a platform-specific service
4133
*

secure_fw/partitions/platform/platform_sp.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,6 @@ enum tfm_platform_err_t platform_sp_system_reset(void)
3939
return TFM_PLATFORM_ERR_SUCCESS;
4040
}
4141

42-
#if TFM_NRF_SYSTEM_OFF_SERVICE
43-
enum tfm_platform_err_t platform_sp_system_off(void)
44-
{
45-
/* FIXME: The system off functionality is only supported in isolation
46-
* level 1.
47-
*/
48-
49-
return tfm_platform_hal_system_off();
50-
}
51-
52-
static psa_status_t platform_sp_system_off_psa_api(const psa_msg_t *msg)
53-
{
54-
(void)msg; /* unused parameter */
55-
56-
return platform_sp_system_off();
57-
}
58-
#endif /* TFM_NRF_SYSTEM_OFF_SERVICE */
59-
6042
static psa_status_t platform_sp_system_reset_psa_api(const psa_msg_t *msg)
6143
{
6244
(void)msg; /* unused parameter */
@@ -243,10 +225,6 @@ psa_status_t tfm_platform_service_sfn(const psa_msg_t *msg)
243225
#endif /* PLATFORM_NV_COUNTER_MODULE_DISABLED */
244226
case TFM_PLATFORM_API_ID_SYSTEM_RESET:
245227
return platform_sp_system_reset_psa_api(msg);
246-
#if TFM_NRF_SYSTEM_OFF_SERVICE
247-
case TFM_PLATFORM_API_ID_SYSTEM_OFF:
248-
return platform_sp_system_off_psa_api(msg);
249-
#endif /* TFM_NRF_SYSTEM_OFF_SERVICE */
250228
case TFM_PLATFORM_API_ID_IOCTL:
251229
return platform_sp_ioctl_psa_api(msg);
252230
default:

0 commit comments

Comments
 (0)