8000 feat: improve context with more api by elebirds · Pull Request #4 · arceos-org/axcpu · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: improve context with more api #4

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

elebirds
Copy link
Contributor
@elebirds elebirds commented Jun 12, 2025

This PR is a reviewed feature from downstream oscamp/arceos.

For further information, please refer to: oscomp/arceos#29 oscomp/arceos#35

Description

This pull request introduces significant updates across multiple architectures to improve context management, particularly around thread-local storage (TLS) and syscall argument handling. The changes include adding getter and setter methods for syscall arguments, instruction pointers, stack pointers, and TLS areas, as well as refactoring context-switching logic to better support kernel-space TLS.

Additional Notes

This is a step towards gradually merging downstream oscamp/arceos into the main branch.

Co-authored-by: Asakura Mizu <asakuramizu111@gmail.com>
Co-authored-by: mivik <mivikq@gmail.com>
@elebirds
Copy link
Contributor Author

this pr should be considered with a upcoming PR from oscomp/arceos#35

@elebirds elebirds marked this pull request as draft June 12, 2025 11:04
@elebirds elebirds force-pushed the feat/context-improve branch 2 times, most recently from b05a663 to 83e8dd7 Compare June 21, 2025 10:22
@elebirds elebirds force-pushed the feat/context-improve branch from 83e8dd7 to 30200be Compare June 21, 2025 10:24
@elebirds elebirds marked this pull request as ready for review June 21, 2025 10:32
Comment on lines +37 to +38
mrs x1, tpidrro_el0
msr tpidr_el0, x1
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
mrs x1, tpidrro_el0
msr tpidr_el0, x1
mrs x1, tpidr_el0
msr tpidrro_el0, x1

< 8000 p class="ml-1 mb-2 mt-2" data-show-on-error hidden> Sorry, something went wrong.

@@ -0,0 +1,25 @@
use crate::asm::{read_thread_pointer, write_thread_pointer};
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can put these code into uspace.rs.

@AsakuraMizu
Copy link
Contributor

Any updates on this? Or I'll split this into two separate PRs later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0