Commit Graph

100 Commits

Author SHA1 Message Date
Florian Nücke
ada89fdddb Added VirtIO Input Device base class and keyboard device implementation. 2020-09-24 17:53:20 +02:00
Florian Nücke
78ec00379e Unified naming between UART and VirtIO console methods. 2020-09-24 16:56:06 +02:00
Florian Nücke
df49fcb580 Register provider for VirtIO devices. 2020-09-24 16:55:39 +02:00
Florian Nücke
dda84ba927 Added bare minimum VirtIO console device. 2020-09-24 16:54:32 +02:00
Florian Nücke
e80ea9120b Ring buffers can be smaller and made notification receiver optional to implement. 2020-09-24 15:20:57 +02:00
Florian Nücke
9a2244bf20 Base class for VirtIO devices, taking care of common plumbing. 2020-09-24 14:20:32 +02:00
Florian Nücke
916432f81b Make device cache in memory map thread safe. 2020-09-24 13:29:17 +02:00
Florian Nücke
1f43d7bc85 Add name for VirtIO devicetree provider. 2020-09-24 13:28:47 +02:00
Florian Nücke
caaad3e637 Give terminal an input buffer and make dirty flag atomic.
This allows to write "input" on its own, e.g. in response to certain escape sequences.
2020-09-24 13:27:16 +02:00
Florian Nücke
330eda9a8a Utility method for setting up interrupts. 2020-09-24 13:26:16 +02:00
Florian Nücke
eb22fef001 Added 64 bit width to sizes and handle it in memory implementations. 2020-09-24 13:26:03 +02:00
Florian Nücke
49b6a56ca3 Added pasting to test screen. Closes #1. 2020-09-21 01:15:25 +02:00
Florian Nücke
2822f18f0e Removed now unnecessary zero flushing. 2020-09-20 23:13:42 +02:00
Florian Nücke
bc04f7b20b More dead code. 2020-09-20 13:58:30 +02:00
Florian Nücke
23c480c748 Javadoc fix. 2020-09-20 13:58:17 +02:00
Florian Nücke
65e41b2490 Removed dead code. 2020-09-20 13:58:06 +02:00
Florian Nücke
1a5b1a47f4 First Minecraft thing for testing, opens UI with a terminal and starts a VM. 2020-09-19 22:52:27 +02:00
Florian Nücke
2f90f021b3 Made UART timeout to actually do something. 2020-09-19 18:34:03 +02:00
Florian Nücke
f0212ddb98 Fixed potential illegal read from UART queue after clear. 2020-09-19 18:33:33 +02:00
Florian Nücke
1f99a2eade Cleaned up ISA tests a little. 2020-09-19 14:59:42 +02:00
Florian Nücke
a877ad1370 Understood how tests communicate. All passing now! 2020-09-19 14:47:02 +02:00
Florian Nücke
44dff6b0c6 Made gradlew executable. 2020-09-19 12:00:07 +02:00
Florian Nücke
91daec02c4 Fixed input getting dropped if buffer is full. 2020-09-19 11:56:26 +02:00
Florian Nücke
47cd914e44 Remapping cpu field to "this" (first local) in generated methods. 2020-09-19 08:54:46 +02:00
Florian Nücke
6939ca93f6 Split up atomic operations more, inlining them in translator. 2020-09-19 08:52:15 +02:00
Florian Nücke
cdc736f733 OK 2020-09-19 00:55:23 +02:00
Florian Nücke
457933d9a4 Removed unused interface. 2020-09-19 00:49:51 +02:00
Florian Nücke
90d6c491df Removed unused and barely useful "assembler". 2020-09-19 00:49:15 +02:00
Florian Nücke
b626887bac Use shared util methods. 2020-09-19 00:47:15 +02:00
Florian Nücke
d98393ad8d Unified naming. 2020-09-19 00:44:50 +02:00
Florian Nücke
31479e4568 Inlined a few more big and common switches in translator.
Gives a small performance boost from ~2.7s to ~2.5s. I suspect this is because traces need to be re-generated every so often, allowing less time for the hotspot vm to optimize these calls.
2020-09-19 00:40:27 +02:00
Florian Nücke
69e637d5fd Fixed cycle count for benchmark.
Was high because of initial input testing was using it...
2020-09-19 00:29:22 +02:00
Florian Nücke
d16ac47d46 Fixed arg parser. 2020-09-19 00:28:21 +02:00
Florian Nücke
8e300f8987 More readable. 2020-09-19 00:22:00 +02:00
Florian Nücke
096606b6ff Minor rename. 2020-09-19 00:07:45 +02:00
Florian Nücke
a36ee2090f Added remaining riscv-tests, made it easier to select which ones to run.
All v mode stuff is pretty broken. Not really getting how tests want to communicate whether they passed or failed yet I think.
2020-09-19 00:07:32 +02:00
Florian Nücke
797f673a3e Fixed divu.
2^XLEN-1 != 2^31-1 when XLEN = 32, oops.
2020-09-18 14:55:09 +02:00
Florian Nücke
8344950443 Added basic and super hacky input.
Split up Main into a benchmark and a regular run, added gradle task (run) to start it outside the IDE.
2020-09-18 13:51:48 +02:00
Florian Nücke
5c478c1203 Added missing step 7 in address translation. One more passing test. 2020-09-18 10:34:53 +02:00
Florian Nücke
13d4d7ac1f Print cycles to failure for getting there with debugger faster.. 2020-09-18 10:34:32 +02:00
Florian Nücke
e2c6185e32 Clear MPRV on xret as per spec. 2020-09-18 09:31:11 +02:00
Florian Nücke
fba9fa6616 Added dummy debug registers (hardcoded to zero) to make sbreak test pass. 2020-09-18 09:30:50 +02:00
Florian Nücke
91016ccf2b Added first few tests generated from riscv-tests repository. 2020-09-18 00:55:27 +02:00
Florian Nücke
49c76e3206 Updated gradle wrapper scripts using latest gradle version. 2020-09-18 00:54:15 +02:00
Florian Nücke
fe16fbe31d Added overload taking File to ELF parser. 2020-09-18 00:10:13 +02:00
Florian Nücke
dbbbcbe880 Made CPU non-final and allow overriding raiseException for tests. 2020-09-18 00:09:59 +02:00
Florian Nücke
fc34c58f04 Allow passing start PC value in CPU reset. 2020-09-17 23:44:08 +02:00
Florian Nücke
5d6e4d8b90 Renames to be more in line with spec, fixed vectored interrupts. 2020-09-17 23:33:34 +02:00
Florian Nücke
79f7a9403e Don't write at all on bad mode instead of sneakily adjusting mode. 2020-09-17 23:29:49 +02:00
Florian Nücke
c1238469c3 Check TVM in sfence.vma. 2020-09-17 23:29:16 +02:00