Commit graph

246 commits

Author SHA1 Message Date
Toby Jaffey
a72737b228 Add uvm32_useBreak(uvmst, bool) function to enable ebreak handling.
This is used in host-gdbstub to enable the functionality.

This allows the stackoverflow test to continue working. Meter test modified to handle new evt type.
2026-04-16 10:51:08 +01:00
Hamid Rostami
faecd6bbef Add an example host to demonstrate gdbstub 2026-04-15 22:41:54 +01:00
Hamid Rostami
1f7132e1e8 Add new event type for ebreak, also report memory write error 2026-04-14 22:09:12 +01:00
Toby Jaffey
00f1a863f3
Merge pull request #9 from revilo196/patch-1
Some checks failed
CI / test (ubuntu-latest) (push) Has been cancelled
Rust VM application generates .eh_frame section
2026-01-09 14:03:24 +00:00
Oliver
903c909c36
common linker.ld fix .eh_frame
an .eh_frame section is generated by more complex rust applications. this will be put before .text section if not discarded.
2026-01-09 14:35:04 +01:00
Toby Jaffey
dc0e5b0bcf Update latest precompiled binaries
Some checks failed
CI / test (ubuntu-latest) (push) Has been cancelled
2025-12-18 12:24:25 +00:00
Toby Jaffey
21f7190427 Remove unused arg, inline step function 2025-12-18 12:19:34 +00:00
Toby Jaffey
d04811a3c5 Make load and store use a packed union for safe alignment, rather than memcpy.
Remove some pointless initialisation which is already done through memset
2025-12-18 12:01:50 +00:00
Toby Jaffey
17208a5112 Pull in latest zigtris with bug fix for garbage on starting screen
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
2025-12-17 20:32:10 +00:00
Toby Jaffey
67c7137868 Pointer fix 2025-12-17 20:24:13 +00:00
Toby Jaffey
d780c4e69d Add UVM32_SYSCALL_RAND to get a "true" random number from the host, as I want to play zigtris and not have it be the same every time. 2025-12-17 20:19:31 +00:00
Toby Jaffey
3d83844d5c Fix markdown blip
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
2025-12-17 11:07:57 +00:00
Toby Jaffey
0bbe373b56 Link to syscall.md
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
2025-12-17 07:46:08 +00:00
Toby Jaffey
6989c3e067 Link to big-endian fork
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
2025-12-16 22:36:08 +00:00
Toby Jaffey
8c68d48f80 Add some documentation on syscalls and argument handling 2025-12-16 22:04:50 +00:00
Toby Jaffey
4d3b393205 Add host-sdl info 2025-12-16 19:30:14 +00:00
Toby Jaffey
d0407c074f Update all of the Emacs mode style comments, so they register in github as C.
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
2025-12-16 17:06:49 +00:00
Toby Jaffey
ff3827f3a6
Merge pull request #5 from cnlohr/fix-language-misidentification
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
Fix language misidentification
2025-12-16 07:27:15 +00:00
cnlohr
3409fd1fb6 Fix language misidentification 2025-12-15 17:57:47 -08:00
Toby Jaffey
53b5eeb256 Add a simple statistical profiler
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
Enabled by -p, will sample program counter and store frequency. Using "-i 1" will make execution pause on every instruction and sample PC.

    host-sdl -p -i 1 foo.bin | grep times > log.txt
    cat log.txt  | sort -n -k4

Can match addresses with
riscv64-elf-objdump -S -d -f foo.bin
2025-12-15 14:10:49 +00:00
Toby Jaffey
6a6d7f1832 Only call checkKeys() when rendering, as it will pause VM 2025-12-15 14:07:00 +00:00
Toby Jaffey
09985655a2 Fix host-sdl/doom audio. Have app ask via syscall if audio can be rendered before sending, else any mismatch in rates will cause queue over/underflow in host-sdl. 2025-12-15 10:48:10 +00:00
Toby Jaffey
4e61e3bd4a Make self and mandel examples a bit smaller
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
2025-12-15 01:12:47 +00:00
Toby Jaffey
4741900562 Tick agnes before drawing each screen, but no faster. 2025-12-15 00:59:27 +00:00
Toby Jaffey
035608b04a Add agnes NES emulator (very slow).
Add -W <n> -H <n> width and height options to host-sdl
2025-12-15 00:37:12 +00:00
Toby Jaffey
2e90bfa812 Doom binary with audio
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
2025-12-14 23:34:06 +00:00
Toby Jaffey
39e7dddc5a Quick and dirty sound for DOOM. Samplerate seems off, but it's just a demo. 2025-12-14 23:32:34 +00:00
Toby Jaffey
e524ea4815 Fix sticky keys in doom. host-sdl only reported the last key pressed, now uses a circular buffer. 2025-12-14 22:39:24 +00:00
Toby Jaffey
49a94ca174 Add BLT test 2025-12-14 21:53:54 +00:00
Toby Jaffey
83276f98e4 Move shared.h 2025-12-14 21:41:01 +00:00
Toby Jaffey
93898a5baa Rename 2025-12-14 21:38:24 +00:00
Toby Jaffey
6a4118e420 Add AUIPC test 2025-12-14 21:38:05 +00:00
Toby Jaffey
f917ba38ff Tighten up internal vs external functions, which lets optimiser do a better job, self.bin about 10% smaller. 2025-12-14 19:51:36 +00:00
Toby Jaffey
07bab3cca6 Rebuild precompiled bins 2025-12-14 19:37:00 +00:00
Toby Jaffey
9bda566997 Move internal static garbage into vmst.
Potentially, this could have ended up being non-zero when used by concurrent threads.
2025-12-14 19:34:58 +00:00
Toby Jaffey
1e7343d385 Map extram to same fuzz buffer 2025-12-14 19:28:15 +00:00
Toby Jaffey
28ce517710 Remove label 2025-12-14 18:56:41 +00:00
Toby Jaffey
585a945b18 Report "true" code coverage by including mini-rv32ima.h 2025-12-14 18:46:34 +00:00
Toby Jaffey
7d064dd11d Fix indent 2025-12-14 18:36:18 +00:00
Toby Jaffey
e5fd17aff6 Fix issues with unaligned memory bus rd/wr. Improve fuzzing. 2025-12-14 18:35:00 +00:00
Toby Jaffey
5fb03b7d66 Remove RV32 breakpoints and interrupts, to save a tiny bit of code size.
Some checks are pending
CI / test (ubuntu-latest) (push) Waiting to run
2025-12-14 15:05:35 +00:00
Toby Jaffey
065d2c64aa TinyGL example 2025-12-14 14:45:10 +00:00
Toby Jaffey
7313047fd1 Simple fuzzer 2025-12-14 12:34:53 +00:00
Toby Jaffey
0736381925 Slim down mini-rv32imaa by removing zicsr and atomics - which are unused. 2025-12-14 11:49:28 +00:00
Toby Jaffey
861c75d80e Remove cycle counting and timers from mini-rv32ima 2025-12-14 11:19:23 +00:00
Toby Jaffey
a693fed59c Show coverage report for all uvm32 2025-12-14 11:15:59 +00:00
Toby Jaffey
5dc9acdf3d When a trap occurs in mini-rv32ima, always pass to the host rather than allowing running code to handle it. This would be important for a real OS, but the aim of uvm32 is embeddable logic - not full emulation.
As all traps are caught by host, begin testing mini-rv32ima internals by checking PC oob and PC alignment.
2025-12-14 11:00:45 +00:00
Toby Jaffey
be5dbbfa44 Latest doom binary (since crt0.S changes) 2025-12-14 11:00:26 +00:00
Toby Jaffey
8d67bf2fc3 Latest maze binary 2025-12-14 10:59:59 +00:00
Toby Jaffey
a635846e69 Remove -fpeel-loops, now that real issue has been fixed. 2025-12-14 09:50:14 +00:00