1 /* 2 * Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef STANDALONE_PS_SERVICE_CONTEXT_H 8 #define STANDALONE_PS_SERVICE_CONTEXT_H 9 10 #include <service/locator/standalone/standalone_service_context.h> 11 #include <service/secure_storage/frontend/secure_storage_provider/secure_storage_provider.h> 12 #include <service/secure_storage/backend/secure_flash_store/flash/block_store_adapter/sfs_flash_block_store_adapter.h> 13 #include <service/block_storage/block_store/block_store.h> 14 15 class ps_service_context : public standalone_service_context 16 { 17 public: 18 ps_service_context(const char *sn); 19 virtual ~ps_service_context(); 20 21 private: 22 23 void do_init(); 24 void do_deinit(); 25 26 static const size_t MAX_NUM_FILES = 10; 27 static const size_t MIN_FLASH_BLOCK_SIZE = 4096; 28 29 struct secure_storage_provider m_storage_provider; 30 struct sfs_flash_block_store_adapter m_sfs_flash_adapter; 31 struct block_store *m_block_store; 32 }; 33 34 #endif /* STANDALONE_PS_SERVICE_CONTEXT_H */ 35