-
Notifications
You must be signed in to change notification settings - Fork 8k
soc: ironside: add min and max values for update #96972
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
base: main
Are you sure you want to change the base?
soc: ironside: add min and max values for update #96972
Conversation
config UPDATE_BLOB_ADDRESS | ||
hex "Address of the update blob" | ||
default 0xe100000 | ||
default 0x0e100000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we use a kconfig range for documentation's sake and to detect misconfig earlier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about the same, but was a bit reluctant as this is just the sample. But I'm open to it if anyone thinks that we should do it that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(NB: Not feasible to have a range if we take these values from the MDK though...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the defines to the header file and added a build assert to the sample.
soc/nordic/ironside/Kconfig
Outdated
help | ||
Maximum value of address passed to the update service. | ||
The biggest update (USLOT) occupies 160kB, so this address is set so that a 160kB | ||
update would still be within the limit of MRAM11 (0x0e200000). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming we don't already, could we have this 160kB number in a header file somewhere, so that we could calculate MRAM11_START + MRAM11_SIZE - USLOT_MAX_SIZE ?
If we are not confident this 160kB number will be platform portable we could also #error-out when a new platform leaves it undefined. Something that is not as easy to do in Kconfig.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this suggestion to the header file.
soc/nordic/ironside/update.c
Outdated
int err; | ||
struct ironside_call_buf *const buf = ironside_call_alloc(); | ||
|
||
if ((uintptr_t)update < CONFIG_NRF_IRONSIDE_UPDATE_SERVICE_MIN_ADDRESS || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the MDK defines the start address of MRAM11?
Then porting to new platforms would be easier I would think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The limit is not tied to MRAM11, so we cannot use MDK for this as it might differ across platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its not tied to MRAM11.
soc/nordic/ironside/Kconfig
Outdated
|
||
config NRF_IRONSIDE_UPDATE_SERVICE_MAX_ADDRESS | ||
hex | ||
default 0x0e1d8000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it give any value to make these depend on the update service kconfig?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to the header file.
cfaaa99
to
625de6b
Compare
The update will fail if the address is outside of this range. This failure might trigger a bad state where the device is non-trivial to recover. Signed-off-by: Håkon Amundsen <[email protected]>
625de6b
to
f4ab165
Compare
|
The update will fail if the address is outside of this range. This failure might trigger a bad state where the device is non-trivial to recover.