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

Make the platform dynamic #566

Closed
naure opened this issue Nov 6, 2024 · 3 comments · Fixed by #608
Closed

Make the platform dynamic #566

naure opened this issue Nov 6, 2024 · 3 comments · Fixed by #608
Assignees
Labels
enhancement New feature or request toolchain

Comments

@naure
Copy link
Collaborator

naure commented Nov 6, 2024

Currently, platform details (e.g. special memory addresses) are constants, and guest programs must target it.

It’s possible to upgrade these constants to parameters chosen by guest programs. These parameters can be given in ELF files and/or CLI arguments.

To do it, replace all usages of the CENO_PLATFORM constant into a platform: Platform argument, like for example VMState.platform does. It might be harder than it sounds; did not try yet.

Refs: platform.rs, linker script, etc.

Related: #215, #378, #476.

@naure naure added enhancement New feature or request toolchain labels Nov 6, 2024
@naure naure assigned mcalancea and naure and unassigned naure Nov 13, 2024
@naure
Copy link
Collaborator Author

naure commented Nov 18, 2024

A number of these dependencies to Platform are being removed in #368.

A notable exception is StaticMemTable::len() and PubIOTable::len() which are currently hard-coded.

@naure naure linked a pull request Nov 21, 2024 that will close this issue
@naure
Copy link
Collaborator Author

naure commented Nov 21, 2024

@mcalancea This issue is solved right?

@mcalancea
Copy link
Collaborator

Yep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request toolchain
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants