Skip to content

Conversation

@CuriousTommy
Copy link
Collaborator

No description provided.

* `__NR_getpgrp` & `__NR_epoll_create` don't exist on ARM64. However, `epoll_create1(0)` & `getpgid(0)` can be used as a substitute.
* While `__NR_getpgrp` & `__NR_epoll_create` exist on x86, I want to try and keep the code consistent between ARM64 and x86.
Unlike i386/x86_64, ARM64 doesn't contain a `stat64` struct. On top of that, ARM64's `stat` is actually the same as `stat64`. As a result, some of the stat code will need to be converted to handle this scenario.

For more details, I recommend looking at the `[xnu]/bsd/sys/stat.h` file.
Unless Linux has a way for us to update the TPIDRRO_EL0, we will have to use TPIDR_EL0 instead...
The syscall number is suppose to be set at x8, not x7.
* If not already done, add code to save and restore `fp` & `lr`.
* Update code that wasn't changed to call `__darling_handle_svc`
* Rework changes made to the macros.
Based off of how we handle the carry flag for x86.
Also throw error if `linux_stat` is missing for arch.
If you look at <bits/fcntl-linux.h>, you'll notice that some constants will only be defined if they have not already been defined. This is important for some architextures (such as ARM64, which have custom implementations for some of the constants)
Forgot to fix this code as well when fixing the TPIDR_EL0 issue
@CuriousTommy CuriousTommy force-pushed the feature/arm-support branch from a48bb97 to 91d7d50 Compare June 15, 2024 18:26
@CuriousTommy CuriousTommy force-pushed the feature/arm-support branch from ad51599 to 989284d Compare June 21, 2024 02:39
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