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_SUPPORT_FORMAT_TRANSITION 42 bool "Format transition" 43 default n 44 depends on PS_ENCRYPTION 45 help 46 Enables reading PS data written with the older code. 47 48config PS_ROLLBACK_PROTECTION 49 bool "Rollback protection" 50 default y 51 depends on !PLATFORM_NV_COUNTER_MODULE_DISABLED && PS_ENCRYPTION 52 help 53 Enable rollback protection in protected storage service. This flag takes 54 effect only if the target has non-volatile counters and PS_ENCRYPTION flag 55 is on. 56 57config PS_VALIDATE_METADATA_FROM_FLASH 58 bool "Validate filesystem metadata" 59 default y 60 imply ITS_VALIDATE_METADATA_FROM_FLASH 61 help 62 Enable the validation mechanism to check the metadata store in flash 63 every time the flash data is read from flash. This validation is required 64 if the flash is not hardware protected against malicious writes. In case 65 the flash is protected against malicious writes (i.e embedded flash, etc), 66 this validation can be disabled in order to reduce the validation 67 overhead. 68 69config PS_MAX_ASSET_SIZE 70 int "Maximum stored asset size" 71 default 2048 72 help 73 Defines the maximum asset size to be stored in the PS area. This size is 74 used to define the temporary buffers used by PS to read/write the asset 75 content from/to flash. The memory used by the temporary buffers is 76 allocated statically as PS does not use dynamic memory allocation. 77 78config PS_NUM_ASSETS 79 int "Maximum stored assets number" 80 default 10 81 help 82 Defines the maximum number of assets to be stored in the PS area. This 83 number is used to dimension statically the object table size in 84 RAM (fast access) and flash (persistent storage). The memory used by the 85 object table is allocated statically as PS does not use dynamic memory 86 allocation. 87 88config PS_STACK_SIZE 89 hex "Stack size" 90 default 0x700 91 help 92 Defines the stack size of the Protected Storage Secure Partition. This 93 value mainly depends on the build type(debug, release and minisizerel) and 94 compiler. 95 96endmenu 97