Skip to content

serial recovery: Add unaligned stack buffer writing #1533

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

Merged
merged 1 commit into from
Jan 3, 2023

Conversation

nordicjm
Copy link
Collaborator

Fixes a bug when writing to devices which have memory alignment requirements with data being using directly from a zcbor-response whereby the alignment of the buffer data does not meet the requirements of the flash driver.

Fixes #1532

@nordicjm
Copy link
Collaborator Author

@de-nordic @nvlsianpu

@de-nordic de-nordic requested review from d3zd3z and nvlsianpu December 1, 2022 11:31
@nordicjm nordicjm requested review from de-nordic and removed request for d3zd3z and nvlsianpu December 1, 2022 11:53
@de-nordic de-nordic requested review from nvlsianpu and d3zd3z December 1, 2022 11:55
nordicjm added a commit to nordicjm/sdk-mcuboot that referenced this pull request Dec 1, 2022
Fixes a bug when writing to devices which have memory alignment
requirements with data being using directly from a zcbor-response
whereby the alignment of the buffer data does not meet the
requirements of the flash driver.

Upstream PR: mcu-tools/mcuboot#1533

Signed-off-by: Jamie McCrae <[email protected]>
nordicjm added a commit to nrfconnect/sdk-mcuboot that referenced this pull request Dec 2, 2022
Fixes a bug when writing to devices which have memory alignment
requirements with data being using directly from a zcbor-response
whereby the alignment of the buffer data does not meet the
requirements of the flash driver.

Upstream PR: mcu-tools/mcuboot#1533

Signed-off-by: Jamie McCrae <[email protected]>
@nvlsianpu nvlsianpu changed the title zephyr: Add unaligned stack buffer writing serial recovery: Add unaligned stack buffer writing Dec 5, 2022
Fixes a bug when writing to devices which have memory alignment
requirements with data being using directly from a zcbor-response
whereby the alignment of the buffer data does not meet the
requirements of the flash driver.

Signed-off-by: Jamie McCrae <[email protected]>
Copy link
Collaborator

@nvlsianpu nvlsianpu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid that the patch doesn't take into account the rem_bytes and its procedure.

@nordicjm
Copy link
Collaborator Author

nordicjm commented Dec 5, 2022

I'm afraid that the patch doesn't take into account the rem_bytes and its procedure.

That part of the code is unchanged, rem_bytes is set before this code runs, so if it is set then it will run like usual after the main write loop

nordicjm added a commit to nordicjm/sdk-mcuboot that referenced this pull request Dec 6, 2022
Fixes a bug when writing to devices which have memory alignment
requirements with data being using directly from a zcbor-response
whereby the alignment of the buffer data does not meet the
requirements of the flash driver.

Upstream PR: mcu-tools/mcuboot#1533

Signed-off-by: Jamie McCrae <[email protected]>
(cherry picked from commit 11c5149)
@nordicjm
Copy link
Collaborator Author

nordicjm commented Dec 7, 2022

@nvlsianpu any comments?

@nvlsianpu nvlsianpu merged commit 9d3fd7f into mcu-tools:main Jan 3, 2023
mbolivar-nordic pushed a commit to mbolivar-nordic/sdk-mcuboot that referenced this pull request Feb 20, 2023
Fixes a bug when writing to devices which have memory alignment
requirements with data being using directly from a zcbor-response
whereby the alignment of the buffer data does not meet the
requirements of the flash driver.

Upstream PR: mcu-tools/mcuboot#1533

Signed-off-by: Jamie McCrae <[email protected]>
(cherry picked from commit 11c5149)
@nordicjm nordicjm deleted the serial_flash_fix branch December 12, 2023 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Serial recovery does not respect alignment requirements of flash driver
3 participants