sparcians / atlas

RISC-V Functional Model
Apache License 2.0
1 stars 3 forks source link

Add Support for System Call Emulation #14

Open kathlenemagnus-mips opened 1 week ago

kathlenemagnus-mips commented 1 week ago

System call emulation is when a functional model handles the execution of system calls made by the ecall instruction. When system call emulation is not enabled, system calls are handled like exceptions and the workload is expected to include a software implementation of the requested system call.

Atlas should support both modes of handling system calls. A system call emulator class should be created that handles common system calls like exit, read, write, getcwd, etc.

Currently, the ecall instruction handler supports emulation of the exit command. See atlas/core/inst_handlers/rv64/i/ecall.cpp at main · sparcians/atlas