Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFDP: Add support for multiple configurations and sector maps #14989

Merged
merged 12 commits into from
Sep 13, 2021
Merged
Prev Previous commit
Next Next commit
SFDP: unit tests: Fix Configuration ID in fake test data
The second byte of the sector map descriptor is the configuration ID.
On a device with non-configurable layout, the only available map
descriptor's configuration ID must be 0x00 as required by the
JESD216D standard. This value is important, because we will check
each descriptor's configuration ID when we support multiple
configurations.

Note: The test data is fake - when we modified real data of a
configurable device to become non-configurable for test purpose, we
forgot to change this field.
  • Loading branch information
LDong-Arm committed Sep 10, 2021
commit 0cb62c4944b7f4a42e9f5062bc8a1b1f27d8ded7
4 changes: 2 additions & 2 deletions storage/blockdevice/tests/UNITTESTS/SFDP/test_sfdp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static const mbed::bd_addr_t sector_map_start_addr = 0xD81000;
* three regions for test purpose.
*/
static const uint8_t sector_map_single_descriptor[] {
0xFF, 0x01, 0x02, 0xFF, // header, highest region = 0x02
0xFF, 0x00, 0x02, 0xFF, // header, highest region = 0x02
0xF1, 0x7F, 0x00, 0x00, // region 0
0xF4, 0x7F, 0x03, 0x00, // region 1
0xF4, 0xFF, 0xFB, 0x03 // region 2
Expand Down Expand Up @@ -255,7 +255,7 @@ TEST_F(TestSFDP, TestMoreRegionsThanSupported)
* twelve regions for test purpose.
*/
const uint8_t sector_map_single_descriptor_twelve_regions[] {
rwalton-arm marked this conversation as resolved.
Show resolved Hide resolved
0xFF, 0x01, 0x0B, 0xFF, // header, highest region = 0x0B
0xFF, 0x00, 0x0B, 0xFF, // header, highest region = 0x0B
0xF1, 0x7F, 0x00, 0x00, // region 0
0xF4, 0x7F, 0x03, 0x00, // region 1
0xF4, 0xFF, 0xFB, 0x03, // region 2
Expand Down