Commit Graph

129 Commits (37ab6ecce2994e11b31c636ee39b76a2545dad8d)

Author SHA1 Message Date
offirko 7ae8e94fbf general_block_device test fixed to always erase prior to first program 2019-01-25 14:29:59 +00:00
Christopher Haster 7059d44c57 Extended mount to check all metadata-pairs
The most common issue with using littlefs in mbed-os is when users
change from littlefs->FAT->littlefs (or with MBR or similar). When this
corrupts the superblock, littlefs tries to fall back to the backup
superblock. However, at this point in the time the old superblock may be
very out-of-date and pointing to an incorrect filesystem.

There's no complete solution to a malicious modification of the
filesystem (short of checking all metadata+data, a very expensive
operation), but we can at least expand our validation to all of the
metadata for the filesystem. This at least catches the common issues
with changing between different filesystems.
2019-01-25 14:29:59 +00:00
offirko 57e1b46df4 DirectAccess DeviceKey added support for default storage type 2019-01-25 14:29:59 +00:00
offirko b1106ff859 Review updates 2019-01-25 14:29:59 +00:00
offirko 64eff0a17b Minor Doxygen fixes for BufferedBlockDevice and iBeacon 2019-01-25 14:29:59 +00:00
Alexander Zilberkant 608c79a207 Remove TARGET prefix from the TARGET_BYPASS_NVSTORE_CHECK and leave it as BYPASS_NVSTORE_CHECK 2019-01-25 14:29:59 +00:00
Yossi Levy f0d828ce13 Moving DirectAccessDevicekey.h and DirectAccessDevicekey.cpp to direct_access_devicekey sub folder For TFM support 2019-01-25 14:29:59 +00:00
Yossi Levy 8eb1c01d51 Moving KVStore to include sub folder For TFM support 2019-01-25 14:29:59 +00:00
Yossi Levy f306233d1e Removing the dependency of TDBStore in SystemStorage.h and NVStore co-existence checkup if compile for target TFM 2019-01-25 14:29:59 +00:00
David Saada 9fb04a957b Remove unnecessary error prints in FileSystemStore 2019-01-25 14:29:59 +00:00
Cruz Monrreal a2220f39a9 Merge pull request #9384 from davidsaada/david_mbr_erase_start
MBRBlockDevice: When partitioning, clear the rest of first erase unit
2019-01-15 22:49:56 -06:00
Yossi Levy 70c0745d2d removing output parameter from avoid_conflict_nvstore_tdbstore function. 2019-01-14 13:40:41 +00:00
Yossi Levy e5888feab4 Create runtime error if TDBStore and NVStore are created in internal flash 2019-01-14 13:40:10 +00:00
Alexander Zilberkant e7b5918d6b Set "TDB_INTERNAL" default storage for Pelion
NUCLEO_F411RE
NUCLEO_F429ZI
UBLOX_EVK_ODIN_W2
2019-01-14 13:06:14 +00:00
David Saada e57c9f35a8 Fix the general block device to support better low memory boards
In addition, fix prints and warnings.
2019-01-14 13:06:14 +00:00
Guy Wild 8b9172432b Update BlockDevice.h 2019-01-14 13:06:14 +00:00
Mel Weed f32df9df98 minor editorial tweaks
partition's->partition
2019-01-14 13:06:14 +00:00
Yossi Levy 47b3ee298e Doxygen changes to ProfilingBlockDevice and SlicingBlockDevice. 2019-01-14 13:06:14 +00:00
Yossi Levy e5e795e574 Some Doxygen fixes in MBRBlockDevice and BlockDevice 2019-01-14 13:06:14 +00:00
David Saada 5b281d7301 Remove kvstore's mbed_lib.json file (not relevant any more)
In addition, use the NOT_SUPPORTED directive to skip the tests.
2019-01-14 13:06:14 +00:00
Amir Cohen 7bb8345b65 Kvstore tests api change to run on K64F only
Change KVStore API tests to run only on K64F, these tests check the KVStore functionality without actually testing the board's storage,
Thus they should produce the same results for each device they run on.
K64F was selected for no special technical reason but only because of it being available and convenient to use.
2019-01-14 13:06:14 +00:00
Yossi Levy 16a4e34d2c The direct_access_devicekey test should not run if there is no component flashiap block device in the target 2019-01-14 13:06:14 +00:00
offirko a1788e929d Added utility function to help locate expected internal flash tdbstore position. (Supporting FILESYSTEM and TDB_EXTERNAL configuration only) 2019-01-14 13:06:14 +00:00
offirko 879d234b72 Updated test to consider tdb_internal non default configuration as well 2019-01-14 13:06:14 +00:00
offirko 7136c78bff Adding low code size tool for direct access to Devicekey. This enables application with code size restrictions to access devicekey directly based on address in internal flash without kvconfig overhead 2019-01-14 13:06:14 +00:00
David Saada d85fda724e TDBStore: Perform garbage collection on failed writes
Partial writes may turn storage unusable. GC clears this scenario.
2019-01-14 13:06:14 +00:00
David Saada 69d57c8e8d TDBStore: fix bug in sector blank check for variant sized sectors 2019-01-14 13:06:14 +00:00
Yossi Levy 98f6364e87 Adding return MBED_ERROR_UNSUPPORTED in _storage_config_default if no component is defined. 2019-01-14 13:06:14 +00:00
Yossi Levy 40263b3c5c fixing FAT mount failure in kvstore FILESYSTEM 2019-01-14 13:06:14 +00:00
Yossi Levy b7004eb2a3 Remove ROM overlaps checkup for kvstore FLASHIAP blockdevice if non default values are use remove of rbp_number_of_entries from the kvstore configuration. Adding default option for storage_type allowing the system to choose TDB_INTERNAl, TDB_EXTERNAL or FILESYSTEM base on the blockdevice component set in the target board. Adding remarks to kv_config.cpp and break simplify the _get_blockdevice_FLASHIAP function 2019-01-14 13:06:14 +00:00
Yossi Levy db1dadee74 Documnent changes and adding const to get_type method 2019-01-14 13:06:14 +00:00
Yossi Levy 65f9e7c9a8 astyle fix 2019-01-14 13:06:14 +00:00
Yossi Levy 5a83c77b88 astyle fix 2019-01-14 13:06:14 +00:00
Yossi Levy 8f2b5efe0d Add get_type method to block devices. 2019-01-14 13:06:14 +00:00
Yossi Levy db22ce9b6c Remove ROM overlaps checkup for kvstore FLASHIAP blockdevice if non default values are use 2019-01-14 13:06:14 +00:00
David Saada c0226febbc Fix LTO build failures due to duplicate local types 2018-12-27 22:26:04 -06:00
Alastair D'Silva 5b29b7e6b5 Don't use define checks on DEVICE_FOO macros (mbed code)
The DEVICE_FOO macros are always defined (either 0 or 1).

This patch replaces any instances of a define check on a DEVICE_FOO
macro with value test instead.

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2018-12-27 22:26:04 -06:00
David Saada 67ba976b30 Fix FLASHIAP_ROM_END macro for GCC_ARM & IAR toolchains
- Consider data section in GCC_ARM toolchain
- Consider init_array section in IAR toolchain
- Rename macro to FLASHIAP_APP_ROM_END_ADDR for clarity sake
2018-12-27 22:26:03 -06:00
David Saada d6f22193ff Adjust FAT FS tests to low memory boards
This is achieved by checking whether the board can allocate a certain memory
chunk (threshold) and skipping the test if it can't.
This should prevent these boards from failing in CI.
2018-12-27 22:26:02 -06:00
Amir Cohen 1033ddf35b Fix max_keys reset limitation
Persist the max_keys value through a soft-reset, also prohibit max_keys set under predefined default value (16)
2018-12-27 22:26:00 -06:00
Amir Cohen b261162c9b Remove dead code 2018-12-27 22:26:00 -06:00
Amir Cohen 79103d25fd Improve tests by reducing kvstore reset occurrences 2018-12-27 22:26:00 -06:00
Amanda Butler 81296b34d0 Edit TDBStore.h
Edit file for punctuation and consistent tense.
2018-12-27 22:25:57 -06:00
Amanda Butler 053212b540 Edit SecureStore.h
Edit file for consistent tense.
2018-12-27 22:25:57 -06:00
Amanda Butler cafce1018a Add word to KVMap.h
Add missing article for clarity and capitalization.
2018-12-27 22:25:57 -06:00
Amanda Butler bbea6ed27a Edit FileSystemStore.h
Make minor edits, mostly for consistent tense across documents.
2018-12-27 22:25:57 -06:00
Yossi Levy 31eff13967 Fixing Doxygen descriptions 2018-12-27 22:25:57 -06:00
Yossi Levy 9325ed9a6c Setting K64F to use KVStore FileSystem configuration 2018-12-27 22:25:56 -06:00
jeromecoutant b950a8f7ac Remove NVSTORE enabled from NUCLEO_F410RB 2018-12-27 22:25:55 -06:00
David Saada 04377fa88e Fix a few SecureStore issues (following preliminary security review)
- Remove require integrity flag (authentication) - always authenticate
- Use RBP KV to store CMAC also in write once case
- Allow removing a key if reading it failed on RBP authentication error
- Disable SecureStore if user disables MBED TLS AES CTR or CMAC
2018-12-11 16:14:50 -06:00