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 # QEMU
include(CheckSymbolExists) include(CheckSymbolExists)
check_symbol_exists("__x86_64__" "" USE_QEMU) check_symbol_exists("__ARM_ARCH" "" DONT_USE_QEMU)
if(USE_QEMU) if(NOT DONT_USE_QEMU)
add_subdirectory(qemu) add_subdirectory(qemu)
target_sources(runtime PRIVATE target_sources(runtime PRIVATE
src/syscall/main.cpp src/syscall/main.cpp

View File

@ -1,7 +1,7 @@
# Reborn Runtime # Reborn Runtime
This is a simple program allowing ARM32 code to easily call "native" code. 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. 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. - "Host" code is the native code located in `libtrampoline.so`. It is running "alongside" the runtime.
## Example ## 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. There is a simple C example [here](./example).
## 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.
## Syscall Vs. Pipe Trampolines ## Syscall Vs. Pipe Trampolines
The runtime supports two methods of passing data between the guest and host. 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. - Only supported on x86_64.
- Pipes - Pipes
- Data is passed through standard UNIX pipes. - Data is passed through standard UNIX pipes.
- Supports early-returning.
- Can be forced using an environmental variable. - Can be forced using an environmental variable.
## Licensing ## Licensing

View File

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