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

Fix functionality for FlashIAPBD & SlicingBD #10108

Merged
merged 2 commits into from Mar 19, 2019

Conversation

Projects
None yet
7 participants
@theamirocohen
Copy link
Contributor

commented Mar 14, 2019

Description

Due to discovery of inconsistent sector sizes in devices storage the is_valid_erase function was adjusted,
For FlashIAPBD the 'code size' was included to the calculation, preventing faulty "virtual" addresses calculation.
For SlicingBD the same error was fixed and in all 3 validation functions that sent addresses for validation and program/read/erase different addresses.

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@ARMmbed/mbed-os-storage
@geky

Fix functionality for FlashIAPBD & SlicingBD
Due to discovery of inconsistent sector sizes in devices storage the is_valid_erase function was adjusted,
For FlashIAPBD the 'code size' was included to the calculation, preventing faulty "virtual" addresses calculation.
For SlicingBD the same error was fixed and in all 3 validation functions that sent addresses for validation and program/read/erase
different addresses.

@ciarmcom ciarmcom requested review from geky and ARMmbed/mbed-os-maintainers Mar 14, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Mar 14, 2019

@theamirocohen, thank you for your changes.
@geky @ARMmbed/mbed-os-storage @ARMmbed/mbed-os-maintainers please review.

@davidsaada
Copy link
Contributor

left a comment

LGTM.

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 15, 2019

This is a fix adding new functionality, marked for 5.13rc1

@theamirocohen

This comment has been minimized.

Copy link
Contributor Author

commented Mar 17, 2019

This is a fix adding new functionality, marked for 5.13rc1

Hi @0xc0170, this pull request doesn't add new functionality, it just implement class functions.
We'll be happy if it will be merged to 5.12.1

@davidsaada

This comment has been minimized.

Copy link
Contributor

commented Mar 17, 2019

@0xc0170, this is definitely a bug fix. The FlashIAP and Slicing block devices currently use wrong logic to decide whether the input parameters for erase/read/write APIs are valid or not. This PR fixes that logic.

@0xc0170 0xc0170 requested a review from dannybenor Mar 18, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Mar 18, 2019

Thanks for the details!

@dannybenor Please approve and confirm the intention having this in the patch release.

@0xc0170
Copy link
Member

left a comment

Waiting for @dannybenor approval

@dannybenor
Copy link

left a comment

Should go to a patch of 5.12

@@ -256,4 +256,13 @@ const char *FlashIAPBlockDevice::get_type() const
return "FLASHIAP";
}

bool FlashIAPBlockDevice::is_valid_erase(bd_addr_t addr, bd_size_t size) const
{
bd_addr_t base_addr = addr + (_base - _flash.get_flash_start());

This comment has been minimized.

Copy link
@dannybenor

dannybenor Mar 18, 2019

Please add a comment saying what is base_addr and that it is related to the full flash, not only the addresses inside the blockdevice

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 18, 2019

CI started.

Would like to see this come into RC3 is possible (@ARMmbed/mbed-os-maintainers)

@cmonr cmonr added needs: CI and removed needs: review labels Mar 18, 2019

@cmonr

cmonr approved these changes Mar 18, 2019

@mbed-ci

This comment has been minimized.

Copy link

commented Mar 19, 2019

Test run: SUCCESS

Summary: 13 of 13 test jobs passed
Build number : 1
Build artifacts

@cmonr cmonr requested a review from 0xc0170 Mar 19, 2019

@cmonr cmonr removed the needs: CI label Mar 19, 2019

@0xc0170 0xc0170 merged commit 54602f5 into ARMmbed:master Mar 19, 2019

28 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARMC5 Success
Details
jenkins-ci/build-ARMC6 Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR8 Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARMC5 Success
Details
jenkins-ci/mbed2-build-ARMC6 Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR8 Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 9865 cycles (-464 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B (+0.00%)
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.