1#------------------------------------------------------------------------------- 2# Copyright (c) 2022-2023, Arm Limited. All rights reserved. 3# 4# SPDX-License-Identifier: BSD-3-Clause 5# 6#------------------------------------------------------------------------------- 7 8menu "PS component options" 9 10config PS_CREATE_FLASH_LAYOUT 11 bool "Create flash FS" 12 default y 13 help 14 Indicates that it is required to create a PS flash layout. If this flag is 15 set, PS service will generate an empty and valid PS flash layout to store 16 assets. It will erase all data located in the assigned PS memory area 17 before generating the PS layout. This flag is required to be set if the 18 PS memory area is located in a non-persistent memory. This flag can be 19 set if the PS memory area is located in a persistent memory without a 20 valid PS flash layout in it. That is the case when it is the first time in 21 the device life that the PS service is executed. 22 23config PS_RAM_FS 24 bool "Emulated RAM FS" 25 default n 26 help 27 Enables the use of RAM instead of the persistent storage device to store 28 the FS in the Protected Storage service. This flag is OFF by default. 29 The PS regression tests write/erase storage multiple time, so enabling 30 this flag can increase the life of flash memory when testing. 31 32 If this flag is enabled, PS_RAM_FS_SIZE must also be provided. This 33 specifies the size of the block of RAM to be used to simulate the flash. 34 35 Note: If this flag is disabled when running the regression tests, then it 36 is recommended that the persistent storage area is erased before running 37 the tests to ensure that all tests can run to completion. The type of 38 persistent storage area is platform specific (eFlash, MRAM, etc.) and it 39 is described in corresponding flash_layout.h 40 41config PS_ROLLBACK_PROTECTION 42 bool "Rollback protection" 43 default y 44 depends on !PLATFORM_NV_COUNTER_MODULE_DISABLED && PS_ENCRYPTION 45 help 46 Enable rollback protection in protected storage service. This flag takes 47 effect only if the target has non-volatile counters and PS_ENCRYPTION flag 48 is on. 49 50config PS_VALIDATE_METADATA_FROM_FLASH 51 bool "Validate filesystem metadata" 52 default y 53 imply ITS_VALIDATE_METADATA_FROM_FLASH 54 help 55 Enable the validation mechanism to check the metadata store in flash 56 every time the flash data is read from flash. This validation is required 57 if the flash is not hardware protected against malicious writes. In case 58 the flash is protected against malicious writes (i.e embedded flash, etc), 59 this validation can be disabled in order to reduce the validation 60 overhead. 61 62config PS_MAX_ASSET_SIZE 63 int "Maximum stored asset size" 64 default 2048 65 help 66 Defines the maximum asset size to be stored in the PS area. This size is 67 used to define the temporary buffers used by PS to read/write the asset 68 content from/to flash. The memory used by the temporary buffers is 69 allocated statically as PS does not use dynamic memory allocation. 70 71config PS_NUM_ASSETS 72 int "Maximum stored assets number" 73 default 10 74 help 75 Defines the maximum number of assets to be stored in the PS area. This 76 number is used to dimension statically the object table size in 77 RAM (fast access) and flash (persistent storage). The memory used by the 78 object table is allocated statically as PS does not use dynamic memory 79 allocation. 80 81config PS_STACK_SIZE 82 hex "Stack size" 83 default 0x700 84 help 85 Defines the stack size of the Protected Storage Secure Partition. This 86 value mainly depends on the build type(debug, release and minisizerel) and 87 compiler. 88 89endmenu 90