Commit Graph

42 Commits

Author SHA1 Message Date
whitequark 3ba82cf19c firmware: clean up makefiles. 2018-01-03 08:20:45 +00:00
whitequark 99bb1b0b70 runtime: print (address-only) backtraces on core device panics. 2017-12-27 10:37:44 +08:00
whitequark b72178756e firmware: fix compatibility with newer rustc. NFC. 2017-12-27 10:35:52 +08:00
Sebastien Bourdeauducq 8ebca38323 runtime: fix rtio::log 2017-11-03 09:25:56 +08:00
Sebastien Bourdeauducq 0c47f83634 clean up rtio_log 2017-11-03 01:13:07 +08:00
whitequark 7799413a41 firmware: update Rust from 1.18.0 to 1.20.0. 2017-09-24 22:51:44 +00:00
Sebastien Bourdeauducq 928cffb09b firmware: export floor() in ksupport. Closes #828 2017-09-10 12:07:06 +08:00
Sebastien Bourdeauducq 264d5fde83 runtime: fix Rust types in RTIO
Previous code assumed all RTIO registers were u32, but this was changed
by misoc c5edcd08.
2017-09-06 19:21:39 +08:00
Sebastien Bourdeauducq 9045b4cc19 drtio: initial firmware support for multi-link 2017-07-18 00:40:21 +08:00
Sebastien Bourdeauducq c86029bca2 i2c: expose restart as syscall, add structure for I2C-over-DRTIO 2017-06-19 23:44:51 +08:00
Sebastien Bourdeauducq 5d63489080 i2c,spi: add busno error detection 2017-06-19 14:27:30 +08:00
Sebastien Bourdeauducq 8399f8893d add kernel access to non-realtime SPI buses (#740) 2017-06-18 12:45:07 +08:00
Robert Jördens 2a76034fbc cri: add note about clearing of o_data 2017-06-16 19:06:00 +02:00
whitequark d0e92067c3 ksupport: fix UB. 2017-06-09 06:18:20 +00:00
Sebastien Bourdeauducq fe05aede78 firmware: DmaPlayback → DMARetrieve 2017-04-19 11:11:42 +08:00
Sebastien Bourdeauducq e8f7f8ef9c DMA: speed up playback
Time reduced from 1.53µs to 1.37µs.
2017-04-19 10:59:12 +08:00
whitequark 41c4de4556 DMA: add API for a much faster replay using handles. 2017-04-18 08:20:12 +00:00
whitequark 0531dc45c3 DMA: erase trace before re-recording it.
Or we could needlessly OOM replacing a large trace.
2017-04-15 07:48:02 +00:00
whitequark 9dfe9c1248 DMA: improve recording performance.
This commit moves DMA serialization code to the kernel CPU
(to cope with the existence of rtio_output_wide) and batches
the resulting sequences. This results in less data being transferred
between kernel and comms CPUs (24 octets with one pointer before,
18 octets with no pointers now, for the common case of rtio_output),
but most importantly reduces cache flushes, which now happen
once per 64k octets.

On average, it now takes about 15us to record a single RTIO event
in a DMA trace.

Fixes #712.
2017-04-15 07:29:52 +00:00
whitequark 14ae1cc100 runtime: advance now on DMA replay.
Fixes #700.
2017-04-05 18:34:36 +00:00
whitequark 391660e545 gateware: simplify the CRI arbiter to use a plain mux. 2017-04-05 15:09:19 +00:00
Sebastien Bourdeauducq b74d6fb9ba make collision and busy asynchronous errors, and simplify CPU/gateware handshake for output errors and reads 2017-03-27 16:32:23 +08:00
whitequark 80c75ed505 firmware: fix for unwinder update. 2017-03-14 08:50:32 +00:00
whitequark 924ae73000 firmware: fix DMA trace alignment and flush caches. 2017-03-04 09:40:22 +00:00
whitequark 30ac42de3f ksupport: fix an exception safety issue.
Raising from inside a recv! will never send an acknowledgement.
2017-03-04 09:40:22 +00:00
Sebastien Bourdeauducq 1e6a33b586 rtio: handle input timeout in gateware
The information passed by the runtime will be used by the DRTIO core
to poll the remote side appropriately.
2017-03-03 17:37:47 +08:00
Sebastien Bourdeauducq 0b4922e0f4 dma: request RTIO control 2017-03-01 18:59:45 +08:00
whitequark a4ece19614 Implement DMA playback. 2017-02-28 21:28:40 +00:00
whitequark 88bf7d2233 firmware: specialize protocol read/write functions.
Before this commit, proto::io::{read,write}_* functions were taking
a &mut {Read,Write}. This means a lot of virtual dispatch.
After this commit, all these functions are specialized for
the specific IO trait.

This could be achieved with just changing the signature from
  fn read_x(reader: &mut Read)
to
  fn read_x<R: Read>(reader: &mut R)
but the functions were also grouped into ReadExt and WriteExt
traits as a refactoring.

Initially, it was expected that the generic traits from
the byteorder crate could be used, but they require endianness
to be specified on every call and thus aren't very ergonomic.
They also lack the equivalent to our read_string and read_bytes.

Thus, it seems fine to just define a slightly different extension
trait.

This also optimized the test_rpc_timing test: 1.7ms→1.2ms.
2017-02-26 18:24:37 +00:00
whitequark 5d3b00cf12 Implement recording of DMA traces on the core device. 2017-02-26 02:50:20 +00:00
whitequark a07bd918f0 firmware: use Rust naming conventions for enum variants. 2017-02-25 22:34:11 +00:00
whitequark 2a81819eb0 firmware: restructure to avoid #[path = "..."] mod ...;
Such code is fragile, introduces mess in dependencies, and
inflates compile times.
2017-02-25 17:54:14 +00:00
whitequark d04e611232 firmware, compiler: rename rpc functions to be more consistent. 2017-02-25 14:12:58 +00:00
whitequark 04ad267055 firmware: rewrite the dynamic linker in Rust. 2017-02-24 18:57:29 +00:00
Robert Jördens bc3fc26e34 coredevice: expose PCU 2017-02-18 14:09:12 +01:00
whitequark 25c9b8827a firmware: mark __artiq_{re,}raise as #[unwind].
This is required for correctness.
2017-02-05 09:04:22 +00:00
whitequark c39394b4d5 firmware: port the exception handling routines to Rust. 2017-02-04 08:21:07 +00:00
whitequark b9cbedceb1 firmware: migrate last vestiges of the old runtime build system. 2017-02-03 12:59:35 +00:00
whitequark cde2054926 firmware: do not link to C code in runtime and satman. 2017-02-03 12:12:41 +00:00
whitequark fd8b11532f compiler, firmware: use Pascal strings everywhere.
This removes a large amount of very ugly code, and also simplifies
the compiler and runtime.
2017-02-03 11:53:27 +00:00
whitequark c2cf60e7f6 firmware: use the cslice crate to get rid of unsafe code in ksupport. 2017-02-02 00:51:58 +00:00
whitequark bc22d1c009 firmware: libksupport → ksupport.
The idea is that support libraries are called lib*, and the final
products that linked into an executable are not.
2017-01-31 22:24:37 +00:00