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

ARC: boards: hsdk: disable XIP #30402

Merged

Conversation

evgeniy-paltsev
Copy link
Collaborator

XIP (eXecute In Place) is a method of executing programs directly from long term storage (i.e flash memory). It allows us to avoid copying text it into RAM, saving writable memory for dynamic data and not the static program code.

We don't have such non-volatile memory capable for executing in place on HSDK so we load Zephyr image to DDR memory with debugger each time.

Disable XIP option for HSDK as we don't need it.

XIP (eXecute In Place) is a method of executing programs directly
from long term storage (i.e flash memory). It allows us to
avoid copying text it into RAM, saving writable memory for dynamic
data and not the static program code.

We don't have such non-volatile memory capable for executing in
place on HSDK so we load Zephyr image to DDR memory with debugger
each time.

Disable XIP option for HSDK as we don't need it.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
@ruuddw
Copy link
Member

ruuddw commented Dec 3, 2020

Agree that the way code is loaded on HSDK doesn't need this, it was historically the approach (also in other ARC development boards) to mimic 'flash' on boards where we do not flash images but download and execute directly.

For testing it makes sense to stick to XIP to ensure the data copying from ROM to RAM is handled correctly. But, I believe there is still some work to do for MetaWare and XIP. On ARC without virtual addresses, is the 'ALIGN_WITH_INPUT' necessary? Alternative to disabling XIP here would be to fix the linker-tool-mwdt.h ? Or, would there be no alternative for ALIGN_WITH_INPUT?

@evgeniy-paltsev
Copy link
Collaborator Author

For testing it makes sense to stick to XIP to ensure the data copying from ROM to RAM is handled correctly.

I agree on the part that it's better to have a configuration with XIP to ensure that it's working. However I'd prefer to test it on some simulation platform (nsim or qemu) so we have more reproducible and stable environment.

PS: probably we can extend number of qemu configurations when the icount patches will be delivered. Here is an example that we have with x86

qemu_x86_64_defconfig
qemu_x86_64_nokpti_defconfig
qemu_x86_coverage_defconfig
qemu_x86_nokpti_defconfig
qemu_x86_nommu_defconfig
qemu_x86_nopae_defconfig
qemu_x86_tiny_defconfig
qemu_x86_xip_defconfig
         ^^^

@evgeniy-paltsev
Copy link
Collaborator Author

We want to have XIP tested on ARC simulation platform, here is enhancement issue for that: #30725

Copy link
Member

@ruuddw ruuddw left a comment

Choose a reason for hiding this comment

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

Thanks, with #30725 as a reminder for adding an XIP test target (and fixing MWDT support) I'm ok with this change.

@nashif nashif merged commit 8d9fa56 into zephyrproject-rtos:master Dec 15, 2020
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.

4 participants