Update QEMU

This commit is contained in:
TheBrokenRail 2025-02-14 23:21:19 -05:00
parent e11c3d5a03
commit f5a2b25e85
4 changed files with 6 additions and 10 deletions

View File

@ -20,8 +20,8 @@ add_executable(runtime
# QEMU
include(CheckSymbolExists)
check_symbol_exists("__x86_64__" "" USE_QEMU)
if(USE_QEMU)
check_symbol_exists("__ARM_ARCH" "" DONT_USE_QEMU)
if(NOT DONT_USE_QEMU)
add_subdirectory(qemu)
target_sources(runtime PRIVATE
src/syscall/main.cpp

View File

@ -1,7 +1,7 @@
# Reborn Runtime
This is a simple program allowing ARM32 code to easily call "native" code.
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 `trampoline` function inside `libtrampoline.so`.
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.
The runtime also automatically uses QEMU on x86_64 systems.
@ -10,10 +10,7 @@ The runtime also automatically uses QEMU on x86_64 systems.
- "Host" code is the native code located in `libtrampoline.so`. It is running "alongside" the runtime.
## Example
There is a simple C example [here](./example). It sends a given string to the host, which returns the string's length multiplied by two.
## Early Returning
`raw_trampoline` supports returning before the host code has finished executing. This can be enabled by passing `true` to `allow_early_return`. However, this is only supported in certain circumstances, can cause race-conditions, and prevents the guest code from receiving the host's return value.
There is a simple C example [here](./example).
## Syscall Vs. Pipe Trampolines
The runtime supports two methods of passing data between the guest and host.
@ -22,7 +19,6 @@ The runtime supports two methods of passing data between the guest and host.
- Only supported on x86_64.
- Pipes
- Data is passed through standard UNIX pipes.
- Supports early-returning.
- Can be forced using an environmental variable.
## Licensing

View File

@ -6,8 +6,8 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24.0)
endif()
# Archive
set(QEMU_ARCHIVE "qemu-9.2.0.tar.xz")
set(QEMU_HASH "f859f0bc65e1f533d040bbe8c92bcfecee5af2c921a6687c652fb44d089bd894")
set(QEMU_ARCHIVE "qemu-9.2.1.tar.xz")
set(QEMU_HASH "b7b0782ead63a5373fdfe08e084d3949a9395ec196180286b841f78a464d169c")
# Library
set(QEMU_LIBRARY "/lib/libqemu-arm.so")