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

optimize 32-bit x86 system calls #25093

Open
andrewboie opened this issue May 7, 2020 · 1 comment
Open

optimize 32-bit x86 system calls #25093

andrewboie opened this issue May 7, 2020 · 1 comment
Assignees
Labels
area: Memory Protection area: X86 x86 Architecture (32-bit) Enhancement Changes/Updates/Additions to existing features

Comments

@andrewboie
Copy link
Contributor

andrewboie commented May 7, 2020

Is your enhancement proposal related to a problem? Please describe.
System calls on 32-bit x86 use the old-style int 0x80 mechanism to trap to supervisor mode (Ring 0). There are more efficient ways to do this.

Describe the solution you'd like
Use SYSENTER/SYSEXIT instead to perform syscalls. This has much less overhead but requires manual stack switching. Our 64-bit port already uses the very similar SYSCALL/SYSRET.
https://c9x.me/x86/html/file_module_x86_id_313.html
https://c9x.me/x86/html/file_module_x86_id_314.html
https://wiki.osdev.org/SYSENTER

Describe alternatives you've considered
None.

@andrewboie andrewboie added area: Memory Protection area: X86 x86 Architecture (32-bit) Enhancement Changes/Updates/Additions to existing features labels May 7, 2020
@andrewboie
Copy link
Contributor Author

Top two commits of this old branch is where I started working on this, but I set it aside. https://github.com/andrewboie/zephyr/tree/sysenterexit

@laurenmurphyx64 laurenmurphyx64 self-assigned this Oct 6, 2020
@dcpleung dcpleung self-assigned this Mar 10, 2021
@laurenmurphyx64 laurenmurphyx64 removed their assignment Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Memory Protection area: X86 x86 Architecture (32-bit) Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

3 participants