Commit Graph

378 Commits (4b3cddff2a66d5b13ad861e8782d1d630c2479c1)

Author SHA1 Message Date
Martin Kojtal 5539d65017
Merge pull request #12638 from tymoteuszblochmobica/testall
Enable storage tests to all targets
2020-04-03 09:00:18 +02:00
Tymoteusz Bloch 2ca832c673 Enable storage tests to all targets 2020-04-01 12:04:36 +02:00
Kyle Kearney ab8ac8871c Remove stray include of TDBStore.h 2020-03-24 12:27:21 -07:00
Kyle Kearney ae7c6203cc kv_config: Remove hard fail on too few pages
STORE_SECTORS is a hard requirement. If there are fewer than 2 pages
then the kvstore will not work, because the garbage collection process
relies on having at least two sectors to work with.
STORE_PAGES is a heuristic. It is a reasonable default to use if the
application does not specify the amount of flash to use for TDBStore.
But if an application knows that a smaller number of pages will suffice
for its specific needs, then that is valid and should be permitted.
2020-03-24 12:27:21 -07:00
Kyle Kearney 7f18a6ce49 Move flash bounds helpers from TDBStore to kv_config 2020-03-24 12:27:21 -07:00
Kyle Kearney 926423c109 Reuse TDBStore default size computation in devicekey test
Replace custom caluation that always assumed two sectors with the standard
calculation exposed on TDBStore.
2020-03-24 12:27:21 -07:00
Kyle Kearney 622a50ff6a KV_CONFIG: Change errors to use tr_error not tr_warning 2020-03-24 12:27:21 -07:00
Kyle Kearney e1b857078a Remove unnecessary reference-typed arguments
No callers make use of the modified argument values, so change
them to a more straightforward pass by value.
2020-03-24 12:27:21 -07:00
Kyle Kearney 3ef04db1a3 TDBStore: Increase min pages to 14
Increase minimum page count from 10 to 14 based on further experiments
with features-storage-tests-kvstore-static_tests.
2020-03-24 12:27:21 -07:00
Kyle Kearney 0002830c03 TDBStore: remove get_flash_bounds input constraint
Handle the case where the entirety of flash (size = 0) is required
for a flash memory starting at address 0, instead of erroring out.
2020-03-24 12:27:20 -07:00
Kyle Kearney 9d414316da TDBStore: Fix potential alignment issue in default addresses
When 10 pages is larger than 2 sectors, align the selected size
down to be an even multiple of the sector size, to ensure that
the allocated space divides cleanly in half for garbage collection.
2020-03-24 12:27:20 -07:00
Kyle Kearney 7cd4d11a8a Expand error checks in _calculate_blocksize_match_tdbstore
The minimum size required by tdbstore is either 2 sectors or 10 pages,
whichever is larger. Correspondingly, adjust the error checks in
_calculate_blocksize_match_tdbstore to match this requirement.
2020-03-24 12:27:20 -07:00
Kyle Kearney cda0af66eb Move TDB bounds computation for better reuse
Migrate into TDBStore so that DirectAccessDeviceKey can use it as well.
2020-03-24 12:27:20 -07:00
Kyle Kearney afa88b76d4 Refactor internal flash TDB bounds determination
Default the size to the larger of two sectors or 10 pages, so that the
  computation works better on devices with a low sector to page size ratio.
Reduce code duplication.
2020-03-24 12:27:20 -07:00
Martin Kojtal ef2c1c89e6
Merge pull request #12658 from VeijoPesonen/fix_tests-integration-fs
tests-integration;tests-filesystem: fix code causing compiler warnings and enable more tests
2020-03-23 12:31:13 +01:00
Veijo Pesonen 244c2fba5f tests-filesystem: enable all for QSPIF- OSPIF(future)-devices
littlefs is the preferred filesystem for general filesystem tests.
2020-03-19 19:26:16 +02:00
Marcin Tomczyk 6a21dfa080 [Storage] Use internal flash for KVStore always if default configuration. TDB_INTERNAL is always for first choose. 2020-03-18 06:05:52 -07:00
Anna Bridge e307695e82
Merge pull request #12599 from tymoteuszblochmobica/rotfix
Greentea kvstorage tests Cypress targets fix.
2020-03-10 12:08:48 +00:00
Tymoteusz Bloch 7b9170541a KV storage. Root of trust fix to pass Greentea tests for CY8CPROTO_062_4343W. 2020-03-09 13:53:28 +01:00
Jarno Lamsa b34dd0ce89 Remove _variant_bd_erase_unit_size
In some cases, it is possible that every erase unit in area 0
has the same size, but they are still different than in area 1.
Remove the flag for varying erase sizes and instead check from
flash, what is the erase size of the current unit.
2020-03-03 13:05:27 +02:00
Martin Kojtal fc5f3259de
Merge pull request #12458 from GaborAbonyi/add_musca_b1_platform
Add Musca B1 target
2020-02-27 13:53:58 +00:00
Martin Kojtal 67e950296d
Merge pull request #12385 from tymoteuszblochmobica/rot
DeviceKey Root of Trust generation refactored.
2020-02-26 16:59:24 +00:00
Veijo Pesonen b575df072f Removes RSPIF block device driver
The driver is not needed by the bootloader anymore.
2020-02-24 16:01:14 +02:00
Tamas Kaman 551c3c553c Add ARM_MUSCA_B1 as a new target platform
Musca-B1 is a Cortex-M33 based target with security extension enabled.

- ARM_MUSCA_B1 is the non-secure target running mbed-os.
- ARM_MUSCA_B1_S is the secure target running TF-M.
- TF-M sources were imported and patched in previous commits.
- TF-M secure bootloader (McuBoot) for MUSCA_B1 is submitted by a
  pre-built binary.
- A post-build hook concatenates The secure and non-secure binaries,
  signs it and then concatenates the bootloader with the signed binary.

Change-Id: I4b36290941b5f0bb7aa7c12dda2f38b5c1e39ae2
Signed-off-by: Tamas Kaman <tamas.kaman@arm.com>
Signed-off-by: Gabor Abonyi <gabor.abonyi@arm.com>
2020-02-21 14:34:39 +01:00
Marcin Tomczyk b5d0b7b6f1 IOTSTOR-1009 - TDBStore magic number if endian sensitive - remove incorrect comment 2020-02-21 00:57:50 -08:00
Seppo Takalo 94bb831753 Extend storage tests with de-init test case 2020-02-20 12:22:16 +02:00
Tymoteusz Bloch 0e7a53cdb1 DeviceKey Root of Trust generation refactored.
It's no longer automatically and silently created.
2020-02-18 16:32:20 +01:00
Michal Paszta a3ba7d964d FlashSimBlockDevice: initialize blanks buffer 2020-02-13 15:19:11 +02:00
Michal Paszta 10481f2f7e BlockDevice: multiple fixes to BlockDevice classes
Incorrect addresses only cause error return values instead of assertion.
ExhaustibleBlockDevice has working get/set_erase_cycle functions and an
array preventing programming without erase.
Fixed MBRBlockDevice partitioning function.
2020-02-10 09:53:49 +02:00
Pawel Zarembski 620442305f hani_iot: add spif storage config 2020-02-03 14:03:09 +01:00
Rajkumar Kanagaraj b2890822d9 Incorporated the review comment 2020-01-27 09:21:12 -08:00
Rajkumar Kanagaraj 46a1f01b6d Fix general filesystem greentea test
ARM microlib is not supported below features
- fflush(NULL) return `-1` instead `0`
- fread with size parameter "Zero".
- if file opened in append mode, file postion starts from the beginning.
2020-01-27 06:51:52 -08:00
Anna Bridge 80fe861f1d
Merge pull request #12035 from kjbracey-arm/callback_prep
Preparation for Callback changes
2020-01-21 11:50:43 +00:00
Kyle Kearney d8f47bdaa3 Improve reliability of KVStore general tests
In kvstore_init, prior to initializing the kvstore, erase the
underlying block storage device. This ensures that each test run
starts from a consistent state and avoids failures that can result
if a previous test run left the storage in an inconsistent state.
2020-01-13 11:32:12 -08:00
Evelyne Donnaes 8a4bba33bd Fixed baremetal build failures 2020-01-10 13:20:59 +00:00
Kevin Bracey d6a48b5124 Turn NULLs into nullptr
Avoids overload problems with Callback(nullptr) versus Callback(fnptr).
2020-01-09 14:52:54 +02:00
Martin Kojtal 974baaf199
Merge pull request #12143 from VeijoPesonen/blockdevices_testable
Blockdevice config changes to make it possible to run littlefs filesystem tests
2020-01-09 12:04:20 +01:00
ccli8 41d95ef2fb [M2351] Support TFM level 1 2020-01-06 15:55:00 +08:00
Veijo Pesonen 9763ad3b2d DataFlashBlockDevice: Makes default configuration to use mbed_lib.json settings
DataFlashBlockDevice parameters come from mbed_lib.json if not provided
explicitly.
2020-01-03 15:31:01 +02:00
Veijo Pesonen 67676dc123 SPIFReducedBlockDevice: Makes default configuration to use mbed_lib.json settings
SPIFReducedBlockDevice parameters come from mbed_lib.json if not provided
explicitly.

Introduced an app config file for running filesystem tests with RSPIF
block device
2020-01-03 15:30:13 +02:00
Veijo Pesonen 23f87877a1 SPIFBlockDevice: Makes default configuration to use mbed_lib.json settings
SPIFBlockDevice parameters come from mbed_lib.json if not provided
explicitly.

Introduced an app config file for running filesystem tests with SPIF
modules
2020-01-03 15:28:41 +02:00
Veijo Pesonen 3be2b8bf12 QSPIFBlockDevice: Makes default configuration to use mbed_lib.json settings
QSPIFBlockDevice parameters come from mbed_lib.json if not provided
explicitly.

Introduced an app config file for running filesystem tests with QSPIF
modules
2020-01-03 15:25:40 +02:00
Veijo Pesonen 803ae3444d SDBlockDevice: Makes default configuration to use mbed_lib.json settings
SDBlockDevice parameters come from mbed_lib.json if not provided
explicitly.

Introduced an app config file for running filesystem tests.
2020-01-03 15:25:40 +02:00
Anna Bridge 309183420b
Merge pull request #12111 from rajkan01/feature_feof_disable
Microlib: Disable feof function usage in general filesystem test
2019-12-17 16:36:54 +00:00
Przemyslaw Stekiel 25f354fe1f storage: fix static pin-map for ARMC5 2019-12-16 15:38:07 +01:00
Rajkumar Kanagaraj 95f56bac30 Microlib: Disable feof function usage in tests
feof function is not supported in Microlib library. so disabling all the feof function usage in the green tea test.
2019-12-16 04:34:20 -08:00
Martin Kojtal f2a1804d51
Merge pull request #12058 from mprse/static_pinmap_for_cloud_client
Add static pin-map support: SDBlockDevice, kvstore, system storage (reduce ROM used by Mbed Cloud Client example)
2019-12-10 14:19:18 +01:00
Przemyslaw Stekiel ee5953ad74 Add static pinmap support: SDBlockDevice, kvstore, system storage
This is done in order to enable static pin-map for Mbed Cloud Client Example. This should give extra ROM savings, ~1KB.
2019-12-10 12:26:23 +01:00
Seppo Takalo 1f99703806 Fix TDBStore sizes for tests
Tests must require at least 2 erase sectors per TDBStore,
so that the garbage collection may work.
2019-12-09 11:18:29 +02:00
Martin Kojtal 412a9317de
Merge pull request #12017 from VeijoPesonen/remove_nvstore
NVStore: already deprecated implementation removed
2019-12-05 09:10:30 +01:00