arch/x86: Changed system call ABI#9
Open
Ioan-Cristian wants to merge 1 commit into
Open
Conversation
Ioan-Cristian
force-pushed
the
x86-abi
branch
5 times, most recently
from
June 25, 2025 14:21
7f89523 to
89432bf
Compare
Instead of pushing and popping arguments on the stack, arguments are passed in registers as on Linux x86 and Tock RISC-V. This new ABI simplifies the implementation of virtual memory. Signed-off-by: Ioan-Cristian CÎRSTEA <ioan.cirstea@oxidos.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Overview
This pull request changes the system call ABI on x86. Instead of passing arguments and return values on the stack, they are passed in registers. The following registers are used for argument/return values:
ebx,ecx,edx,edi.This change is needed to simplify the implementation of the MMU on the x86 architecture, where the virtual address space of a process doesn't match the virtual address space of the kernel. In that case, writing/reading from stack led to page faults due to missing pages.
The new system call ABI mimics the Linux kernel's ABI and Tock's RISC-V ABI.
Testing Strategy
This pull request was tested by running two
libtock-rsapplications on QEMU.TODO or Help Wanted
No help needed.
Documentation Updated
Formatting
make prepush.