diff --git a/CMakeLists.txt b/CMakeLists.txt index 1eac7f7..19b4a09 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/README.md b/README.md index 998c8d6..4697e5b 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/qemu/CMakeLists.txt b/qemu/CMakeLists.txt index aebde23..3a9c529 100644 --- a/qemu/CMakeLists.txt +++ b/qemu/CMakeLists.txt @@ -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") diff --git a/qemu/qemu-9.2.0.tar.xz b/qemu/qemu-9.2.1.tar.xz similarity index 89% rename from qemu/qemu-9.2.0.tar.xz rename to qemu/qemu-9.2.1.tar.xz index 42f4e20..22397d0 100644 Binary files a/qemu/qemu-9.2.0.tar.xz and b/qemu/qemu-9.2.1.tar.xz differ