Commit Graph

59 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
Sebastien Bourdeauducq c4a9fa78ee Revert "Prefer DHCP to the built-in static IPs"
This reverts commit 596b9a265c.
2022-07-08 17:57:25 +08:00
Sebastien Bourdeauducq 9941ee3d2a Revert "Use an Ipv4AddrConfig enum instead of the USE_DHCP constant"
This reverts commit 1fe59d27dc.
2022-07-08 17:56:20 +08:00
Sebastien Bourdeauducq f1b2a7041a Revert "Centralise all uses of the IPv4 index in net_settings.rs"
This reverts commit 95378cf9c9.
2022-07-08 17:56:04 +08:00
Sebastien Bourdeauducq 93e82e2201 Revert "Use new ip_addr_storage module instead of net_settings"
This reverts commit 50dbda4f43.
2022-07-08 17:55:57 +08:00
mwojcik 4bdb4c8e11 config: error instead of empty value if key not found 2022-05-19 16:48:59 +08:00
Michael Birtwell 50dbda4f43 Use new ip_addr_storage module instead of net_settings
Necessary to avoid needing the alloc only trait impls in net_settings
when compiling the bootloader.
2022-04-24 10:10:43 +08:00
Michael Birtwell 95378cf9c9 Centralise all uses of the IPv4 index in net_settings.rs 2022-04-24 10:10:43 +08:00
Michael Birtwell 1fe59d27dc Use an Ipv4AddrConfig enum instead of the USE_DHCP constant 2022-04-24 10:10:43 +08:00
Michael Birtwell 596b9a265c Prefer DHCP to the built-in static IPs
Signed-off-by: Michael Birtwell <michael.birtwell@oxionics.com>
2022-04-24 10:10:42 +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
Spaqin a85b4d5f5e
I2C API for PCA9547 support (#1860) 2022-03-01 15:07:53 +08:00
David Nadlinger e45cb217be firmware: Explicitly use wrapping integer math in PRNGs
Patch by Hannah McLaughlin; apparently, the overflow actually
doesn't get checked/reported without `opt-level = 2` and
`lto = "thin"`.
2022-02-03 23:57:17 +00:00
occheung 03b803e764 firmware: adjust csr separation 2021-11-08 16:59:08 +08:00
occheung 0898e101e2 board_misoc: reuse riscv dir for comm & kernel 2021-11-08 16:59:08 +08:00
occheung a0bf11b465 riscv: impl pmp 2021-10-16 17:42:24 +08:00
occheung a573dcf3f9 board_misoc/build: use rv32 as target arg
The original rv64 argument was only to match the misoc counterpart.
2021-09-10 14:11:23 +08:00
occheung 9f6b3f6014 firmware: clarify target triple
The lack of compressed instruction support can be inferred from the target triple, literally.
2021-09-10 13:25:12 +08:00
occheung eecd825d23 firmware: suppress warning 2021-09-10 13:25:12 +08:00
occheung 61b0170a12 firmware: purge or1k 2021-09-10 13:25:12 +08:00
occheung 1293e0750e ld, makefiles: use ld.lld 2021-09-10 13:25:12 +08:00
occheung 46102ee737 board_misoc: build vectors.S with rv64 target in misoc
Signed-off-by: occheung <dc@m-labs.hk>
2021-09-10 13:20:31 +08:00
occheung b87ea79d51 rv32: rm irq & vexriscv-rust
Signed-off-by: occheung <dc@m-labs.hk>
2021-09-10 13:20:31 +08:00
occheung 9aee42f0f2 rv32/boot: remove hotswap
Signed-off-by: occheung <dc@m-labs.hk>
2021-09-10 13:20:31 +08:00
occheung 82b4052cd6 libboard_misoc: vexriscv integration
Signed-off-by: occheung <dc@m-labs.hk>
2021-09-10 13:20:31 +08:00
Star Chen 5111132ef0
ICAP: prevent sayma from using it (#1740) 2021-08-06 15:08:30 +08:00
Star Chen 6b88ea563d
talk to ICAP primitive to restart gateware (#1733) 2021-08-05 17:00:31 +08:00
Robert Jördens e31ee1f0b3 firmware/i2c: rewrite I2C implementation
* Never drive SDL or SDA high. They are specified to be open
  collector/drain and pulled up by resistive pullups. Driving
  high fails miserably in a multi-master topology (e.g. with
  a USB I2C interface). It would only ever be implemented to
  speed up the bus actively but that's tricky and completely
  unnecessary here.
* Make the handover states between the I2C protocol phases (start, stop,
  restart, write, read) well defined. Add comments stressing those
  pre/postconditions.
* Add checks for SDA arbitration failures and stuck SCL.
* Remove wrong, misleading or redundant comments.
2020-07-15 16:43:07 +08:00
Sebastien Bourdeauducq 8719bab726 Revert "i2c: duplicate TCA9548 control byte"
This reverts commit f265976df6.
2020-07-08 19:02:02 +08:00
Donald Sebastian Leung f265976df6 i2c: duplicate TCA9548 control byte 2020-07-03 16:45:05 +08:00
Sebastien Bourdeauducq 4e9a529e5a kasli: integrate WRPLL 2020-05-07 21:34:02 +08:00
Sebastien Bourdeauducq 35f1814235 kasli: implement virtual LEDs 2020-05-07 19:07:43 +08:00
Sebastien Bourdeauducq 4982fde898 firmware: I2C I/O expander support 2020-05-05 21:38:17 +08:00
Sebastien Bourdeauducq ef4e5bc69b firmware: Kasli I2C EEPROM cleanup 2020-05-05 21:29:29 +08:00
Sebastien Bourdeauducq 9bc43b2dbf kasli: support EEPROM on v2 2020-04-23 23:00:36 +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 449d2c4f08 libboard_misoc: fix !has_i2c 2019-11-27 21:04:28 +08:00
Sebastien Bourdeauducq b25a17fa37 netboot: support slave FPGA loading 2019-11-05 16:28:49 +08:00
Sebastien Bourdeauducq a78e493b72 firmware: load slave FPGA in bootloader 2019-10-31 12:42:40 +08:00
Sebastien Bourdeauducq 47a83c71f1 firmware: more readable network addresses message 2019-10-21 14:00:14 +08:00
Sebastien Bourdeauducq 818d6b2f5a bootloader: fix compilation problems 2019-10-21 13:28:17 +08:00
Sebastien Bourdeauducq 8f76a3218e firmware: move i2c to libboard_misoc, enable IPv6 in bootloader, share network settings 2019-10-21 12:58:52 +08:00
Sebastien Bourdeauducq 390f05f762 firmware: use smoltcp release 2019-01-23 16:15:05 +08:00
Sebastien Bourdeauducq 6e43c41103 firmware: support building without SDRAM 2019-01-05 23:41:30 +08:00
Sebastien Bourdeauducq 2c3510497b firmware: fix not(has_spiflash) build 2019-01-05 23:40:03 +08:00
Sebastien Bourdeauducq d3483c1d26 kasli: fix SDRAM read delay reset/wrap issue. Closes #1149 2018-11-15 19:40:35 +08:00
Florent Kermarrec 3318925f4e firmware/liboard_misoc/sdram: use similar loops on read_level_scan and read_level for consistent results 2018-10-16 09:40:39 +02:00
whitequark 0e7419450e firmware: update smoltcp.
This adds TCP window scaling support.
2018-08-20 00:26:40 +00:00