Commit Graph

27 Commits (c834e4f5033b48137cd2f79f5339553c79fc278b)

Author SHA1 Message Date
mwojcik c834e4f503 enable network and mgmt during Rust panic, make RTIO PLL lock failure a panic
Closes #198 #200

Making it a soft panic makes it more involved with a bit of code duplication - setting up mgmt requires setting up the interface and sockets. Maybe can be done a bit cleaner.

```
[spaqin@hera:~/m-labs/artiq-zynq]$ artiq_sinara_tester
****** Sinara system tester ******
[...]
ConnectionRefusedError: [Errno 111] Connection refused

[spaqin@hera:~/m-labs/artiq-zynq]$ artiq_coremgmt -D 192.168.1.56 log
[     0.000067s]  INFO(runtime): NAR3/Zynq7000 starting...
[     0.005238s]  INFO(runtime): detected gateware: GenericMaster
[     0.016152s]  INFO(libboard_zynq::i2c): PCA9548 detected
[     0.023004s]  WARN(runtime): config initialization failed: SD error: Card initialization error: No card inserted, check if the card is inserted properly.
[     0.036730s]  WARN(runtime::rtio_clocking): error reading configuration. Falling back to default.
[     0.213000s] ERROR(runtime::rtio_clocking): RTIO PLL failed to lock
[     0.224443s]  INFO(libboard_zynq::i2c): PCA9548 detected
[     0.256197s]  INFO(runtime::comms): network addresses: MAC=e8-eb-1b-13-49-8b IPv4=192.168.1.56 IPv6-LL=fe80::eaeb:1bff:fe13:498b IPv6: no configured address
[     0.270183s] ERROR(runtime::comms): There has been an error configuring the device: RTIO PLL failed to lock. Only mgmt interface will be available.
[     4.000095s]  INFO(libboard_zynq::eth): eth: got Link { speed: S1000, duplex: Full }
[    33.148521s]  INFO(runtime::mgmt): received connection
```

Reviewed-on: #199
Co-authored-by: mwojcik <mw@m-labs.hk>
Co-committed-by: mwojcik <mw@m-labs.hk>
2022-10-21 17:56:34 +08:00
occheung e3ed41ff32 fix index table reference type 2022-06-01 18:35:50 +08:00
mwojcik a92561b9d3 implement rtio_get_destination_status (#177)
Co-authored-by: mwojcik <mw@m-labs.hk>
Co-committed-by: mwojcik <mw@m-labs.hk>
2022-03-25 18:20:05 +08:00
pca006132 6f5ba46e89 runtime/eh_artiq: support exception allocation
The backtrace is now nested, and should be used together with the stack
pointer array to construct the full backtrace for each exception.
We now allocate exception objects in a stack, but their names are still
not allocated. This is fine for exceptions raised in the driver or artiq
code, but we will have to implement allocation for names of exceptions
raised in RPC calls. The compiler should also emit code to store the
exception names once they catch it, to prepare for later reraising.
2022-01-23 21:31:22 +08:00
stevefan1999 84becfe2c0 report async errors upon kernel termination
Port of 4a6bea479a

Co-authored-by: Steve Fan <sf@m-labs.hk>
Reviewed-on: #156
Co-authored-by: stevefan1999 <sf@m-labs.hk>
Co-committed-by: stevefan1999 <sf@m-labs.hk>
2021-12-06 17:38:55 +08:00
pca006132 9e8b554c6d runtime/kernel/core1: use correct ABI 2021-01-18 16:43:30 +08:00
Sebastien Bourdeauducq 57ae8619f8 remove unnecessary no_mangle
no_mangle does nothing on extern items as per https://github.com/rust-lang/rust/issues/78989#issuecomment-726163973

Closes #115
2020-11-16 14:51:30 +08:00
pca006132 ae07c05db4 runtime: optimize for speed and fix deadlock
The previous method of taking the channel could cause deadlock, we now
use semaphore to signal if the channel is available instead of busy
polling the mutex.
2020-09-02 10:15:52 +08:00
pca006132 321a8e1522 runtime/kernel/core1: reset rtio after interrupted 2020-08-25 14:51:39 +08:00
pca006132 0fb278f7cb runtime/kernel/core1: allows getting backtrace when kernel is not loaded 2020-08-25 14:51:39 +08:00
pca006132 fa187fb37a runtime/kernel: use mutable static for shared channel
Mutex would prevent restart if we failed while waiting for RPC.
2020-08-25 14:51:39 +08:00
Astro 760f46a115 update dependencies 2020-08-17 19:17:42 +02:00
pca006132 e7752a3d6d runtime/kernel: fixes core0 memory leak.
Fixes #85
2020-08-06 09:39:49 +08:00
pca006132 4b6c5d5679 runtime/kernel: store DMA and cache buffer on core0.
Closes #77.
2020-08-05 15:33:40 +08:00
pca006132 fa00ab211d Updated zc706 dependency and fixed compiler errors. 2020-08-04 10:15:57 +08:00
Astro b388b529ad dyld: remove KERNEL_EXIDX_START/END globals, move dl_unwind_find_exidx() into runtime::kernel::core1
Gitea issue #16
2020-07-27 19:56:06 +02:00
Sebastien Bourdeauducq 7f983a453d implement core device cache 2020-07-25 17:04:40 +08:00
Sebastien Bourdeauducq 630dcc274e fix compilation warning with new rustc 2020-07-25 12:15:50 +08:00
Sebastien Bourdeauducq e64f59723c dma: use const initializer for manager 2020-07-25 12:12:56 +08:00
pca006132 0ce45b145e kernel: proper type for static shared variables.
* Changed the KERNEL_CHANNEL_* to Mutex<T> with proper type, remove the
  need for unsafe.
* Exposed a const pointer to KernelImage, with UnsafeCell holding
  the library field for unbind with interior mutability.
2020-07-24 12:24:01 +08:00
pca006132 0310421085 RTIO DMA: Compiled but not working.
* Cache flush should be done before playback instead when getting the
  handler.
* `csr::rtio_dma::enable_read()` would loop forever, probably bug in the
  gateware.
2020-07-23 17:04:15 +08:00
pca006132 a9f725dd33 kernel: added error message after uncaught exception 2020-07-16 17:11:35 +08:00
pca006132 8e3574080c core1: added cache flush and barriers. 2020-07-14 10:53:35 +08:00
pca006132 7aec419ed6 kernel: added core1 instruction cache flush 2020-07-10 17:21:55 +08:00
Sebastien Bourdeauducq 407e18a6a0 fix typos 2020-07-10 16:36:45 +08:00
Astro 2c1773b91b kernel: refactor main_core1 into KernelImage 2020-07-08 23:49:43 +02:00
Astro b3d4590eec kernel: split into {api,control,core1,rpc} 2020-07-08 23:49:32 +02:00