runtime/src/syscall/main.cpp
2024-11-10 05:26:16 -05:00

20 lines
532 B
C++

#include <cstdlib>
#include <cstring>
#include "main.h"
#include "../qemu/qemu.h"
// Main
SyscallImplementation *SyscallImplementation::instance = nullptr;
int SyscallImplementation::main(const int argc, char *argv[]) {
instance = this;
// Setup
trampoline.init(this);
// Run
return QEMU::run(argc, argv);
}
// Read From QEMU's Memory
void SyscallImplementation::memory_writer(const uint32_t guest_addr, const void *data, const uint32_t size) const {
memcpy(QEMU::guest_to_host(guest_addr), data, size);
}