Commit Graph

83 Commits

Author SHA1 Message Date
Sebastien Bourdeauducq 2e05a1bd0d Revert "Upgrade smoltcp 0.6.0 -> 0.8.0"
This reverts commit c60de48a30.
2022-07-08 17:58:13 +08:00
Sebastien Bourdeauducq d622fb8db7 Revert "DHCP support for core device firmware"
This reverts commit 6ffb1f83ee.
2022-07-08 17:58:00 +08:00
Michael Birtwell 6ffb1f83ee DHCP support for core device firmware
DHCP is enabled by setting the `ip` config entry to "use_dhcp". Reusing this
config field rather than creating a new one means that there is no ambiguity
over which config field takes precedence.

Adds a thread to configure the interface based on DHCP events
Adds a `Dhcpv4Socket` as a wrapper around smoltcp's version
Formalises the storage of the IP addresses so that we can update one in
another module.

There's also a workaround for the first DHCP discover packet frequently
going missing.

Signed-off-by: Michael Birtwell <michael.birtwell@oxionics.com>
2022-04-24 10:10:14 +08:00
Michael Birtwell c60de48a30 Upgrade smoltcp 0.6.0 -> 0.8.0
Main changes:
Deal with interfaces now being generic over mediums, update interface name
and initialisation.
Interfaces now own their sockets. So we store a reference to the Interface
instead of the SocketSet in Scheduler and IO.
Sockets are no longer reference counted. We never called the function to
increase the socket's reference count, so now we just remove it where it
was previously released. This will result in the socket being dropped at
a different time, but I think that should be fine.

Tested firmware upload to the bootloader and spamming artiq_coremgmt log
calls to download the log from the firmware.

Signed-off-by: Michael Birtwell <michael.birtwell@oxionics.com>
2022-04-24 10:09:27 +08:00
occheung 46326716fd runtime: bump libfringe, impl ecall abi
See libfringe PR: M-Labs/libfringe#1
2021-10-16 17:42:24 +08:00
occheung c113cd6bf5 libfringe: bump 2021-09-10 13:25:12 +08:00
occheung f56152e72f rust: fix dependencies 2021-09-10 13:25:12 +08:00
occheung c800b6c8d3 runtime: update rust alloc, managed 2021-09-10 13:25:09 +08:00
occheung e99061b013 runtime: add riscv 2021-09-10 13:23:22 +08:00
Sebastien Bourdeauducq bfcbffcd8d update smoltcp
This disables the 'log' features which does not compile, and may break net_trace. To be investigated later.
2020-01-21 13:58:23 +08:00
Sebastien Bourdeauducq 6d5dcb4211 runtime: enable IPv6. Closes #349 2019-10-19 17:20:33 +08:00
Sebastien Bourdeauducq 390f05f762 firmware: use smoltcp release 2019-01-23 16:15:05 +08:00
whitequark 0e7419450e firmware: update smoltcp.
This adds TCP window scaling support.
2018-08-20 00:26:40 +00:00
whitequark 2648b1b7a1 firmware: migrate to Rust 1.28.0.
This also updates / is a prerequisite for updating smoltcp.

Rationale for changes made:
  * compiler_builtins is now shipped in the rust prefix.
  * rustc's libpanic_unwind no longer works for us because it
    has a hard dependency on Box (and it's a horrible hack);
    fortunately, we only ever needed a personality function
    from it.
  * panic and oom handlers are now set in a completely different
    way.
  * allocators are quite different (and finally stable).
  * NLL caused internal compiler errors in runtime, so code using
    NLL was rewritten to not rely on it and it was turned off.
2018-08-12 19:17:45 +00:00
Sebastien Bourdeauducq b27fa8964b add variant in identifier string
Also add without-sawg suffixes on Sayma.

Closes #1060
Closes #1059
2018-07-15 17:21:17 +08:00
whitequark 9347f6e00c firmware: use a dedicated error type in the scheduler.
After this commit, error handling does not normally allocate
(session::Error::{Load,Unexpected} still allocate, but those two
are very rare).

Good riddance to libstd_artiq.
2018-05-15 14:19:44 +00:00
whitequark 479cb9a857 firmware: use dedicated error types for every protocol and thread.
Good riddance to io::Error::Unrecognized.
2018-05-15 13:27:23 +00:00
whitequark 5ead27f2e1 firmware: eliminate uses of std_artiq::io::{Read,Write} from runtime. 2018-05-14 19:11:57 +00:00
whitequark ae50196186 firmware: rename libproto to libproto_artiq.
libproto_artiq only has ARTIQ-specific protocols.
2018-05-14 18:09:44 +00:00
whitequark 02b8426f60 firmware: rename libboard to libboard_misoc.
By analogy with libbuild_misoc. Hopefully one day it actually gets
moved to misoc...
2018-05-14 18:09:44 +00:00
whitequark 1ff42683d9 firmware: merge libamp into libboard_artiq.
All gateware interfaces live in libboard_artiq, but libamp predates
libboard_artiq.
2018-05-14 17:33:25 +00:00
whitequark 764386c9e3 firmware: split libdrtioaux into libproto and libboard_artiq modules.
All other protocol code lives in libproto, and all other gateware
interfaces live in libboard_artiq.
2018-05-14 17:26:59 +00:00
whitequark 6a10d54432 firmware: migrate rpc_proto to new libio.
This closes an old and horrible issue in that some code in ksupport
may implicitly try to allocate and we'll never know until it crashes
at runtime inside liballoc_stub.

This also removes liballoc_stub.
This also removes ReadExt and WriteExt from libproto.
Hooray!
2018-05-14 17:26:59 +00:00
whitequark 976bb5e935 firmware: migrate analyzer_proto to new libio. 2018-05-14 12:51:59 +00:00
whitequark d543c9aa63 firmware: backtrace_artiq → unwind_backtrace.
This crate isn't ARTIQ-specific.
2018-05-14 07:33:00 +00:00
whitequark b1d349cc1b firmware: implement a sampling profiler.
Does not yet support constructing call graphs.
2018-05-05 00:44:40 +00:00
whitequark 807eb1155b Update smoltcp.
Fixes #902.
2018-01-30 03:29:08 +00:00
whitequark 3a3f44af53 firmware: update smoltcp. 2018-01-08 21:41:53 +00:00
whitequark b7f38b123b frimware: update to log 0.4. 2018-01-01 11:45:55 +00:00
whitequark b8f3d28bc0 firmware: update compiler_builtins dependency and move it to libboard.
This is so that we only specify it once.
2017-12-31 09:16:11 +00:00
whitequark 33e0393e4a firmware: move mod ethmac to libboard. 2017-12-28 14:40:15 +00:00
whitequark b9754e7108 firmware: deduplicate libbuild_misoc and libbuild_artiq. 2017-12-28 13:18:51 +00:00
whitequark fcc438524c firmware: use main.rs as the root source for non-library crates. NFC. 2017-12-28 08:20:23 +00:00
whitequark ca419aa3c2 firmware: split out libboard_artiq from libboard. 2017-12-28 07:07:00 +00:00
whitequark 7687a34285 firmware: remove dependency on compiler-rt. 2017-12-28 04:08:29 +00:00
whitequark 8b4a006855 runtime: update smoltcp. 2017-12-26 14:33:56 +00:00
whitequark 230f2e5e18 runtime: print (address-only) backtraces on core device panics. 2017-12-25 18:32:41 +00:00
whitequark 701308474f runtime: update smoltcp. 2017-12-19 15:51:03 +00:00
whitequark 9e8bb1d51c runtime: update smoltcp. 2017-12-08 07:36:56 +00:00
whitequark 26fdd42f8f runtime: update smoltcp. 2017-11-22 08:09:06 +00:00
whitequark ae2d7abbed runtime: update smoltcp. 2017-10-30 08:26:54 +00:00
whitequark 978c0d98aa runtime: update smoltcp. 2017-10-30 07:22:47 +00:00
whitequark 6bdeddd201 runtime: remove UDP-related code. 2017-10-25 02:55:01 +00:00
whitequark cdba330845 Update smoltcp.
Fixes #840.
2017-10-25 02:31:27 +00:00
whitequark c00b3fe8cd firmware: update smoltcp. 2017-09-24 22:57:27 +00:00
whitequark 7799413a41 firmware: update Rust from 1.18.0 to 1.20.0. 2017-09-24 22:51:44 +00:00
whitequark c1829f3eda runtime: update smoltcp. 2017-09-22 19:05:18 +00:00
whitequark 74b7010d67 runtime: allow safely pulling logs even on TRACE log level.
Before this commit, this resulted in a packet flood, because
sending a TRACE log message to the host caused more TRACE log
messages to be emitted.
2017-08-31 14:13:51 +00:00
whitequark 737c1044a4 firmware: update smoltcp. 2017-08-31 00:45:56 +00:00
whitequark 39ecbc0d68 firmware: update smoltcp. 2017-08-30 14:35:45 +00:00