runtime/README.md

25 lines
1.1 KiB
Markdown
Raw Normal View History

2025-01-04 05:34:24 -05:00
# Reborn Runtime
This is a simple program allowing ARM32 code to easily call "native" code.
2024-06-08 05:28:22 -04:00
2025-02-14 23:21:19 -05:00
By running an ARM32 program inside this runtime, it gains the ability to call `raw_trampoline()`. This function copies its arguments and passes them to the "host" code.
2024-06-08 05:28:22 -04:00
2025-02-15 00:03:19 -05:00
The runtime also automatically uses QEMU on non-ARM systems.
2024-06-08 05:28:22 -04:00
2025-01-04 05:34:24 -05:00
## Terminology
2025-02-14 23:10:29 -05:00
- "Guest" code is the main ARM32 program. It is running inside the runtime.
- "Host" code is the native code located in `libtrampoline.so`. It is running "alongside" the runtime.
2024-06-08 05:28:22 -04:00
2025-01-04 05:34:24 -05:00
## Example
2025-02-14 23:21:19 -05:00
There is a simple C example [here](./example).
2024-06-08 05:28:22 -04:00
2025-02-14 23:10:29 -05:00
## Syscall Vs. Pipe Trampolines
2025-01-04 05:34:24 -05:00
The runtime supports two methods of passing data between the guest and host.
- System Call
- Data is passed through a custom system-call added to QEMU.
- Only supported on x86_64.
- Pipes
- Data is passed through standard UNIX pipes.
- Can be forced using an environmental variable.
2024-06-08 05:28:22 -04:00
2025-01-04 05:34:24 -05:00
## Licensing
2025-02-15 14:38:19 -05:00
The runtime itself is licensed with [GPLv2](./LICENSE) to comply with [QEMU's license](https://wiki.qemu.org/License). However, the `lib` directory is licensed with the [Unlicense](lib/LICENSE) as it does not directly link to the runtime.