update READMEs
This commit is contained in:
parent
9d88808b4f
commit
22e13886c0
26
README.md
26
README.md
@ -12,13 +12,9 @@ To save on PCB cost, the board is smaller than a 'true' SBus board; the hardware
|
||||
|
||||
## Current status
|
||||
|
||||
2021-03-21: The adapter board seems to work fine in two different SS20. Currently the embedded PROM code exposes three devices in the FPGA:
|
||||
2021-07-18: The old VHDL gateware has been replaced by a new Migen-based gateware, see below for details.
|
||||
|
||||
* "RDOL,cryptoengine": exposes a (way too large) polynomial multiplier to implement GCM mode and a AES block. Currently used to implement DMA-based acceleration of AES-256-CBC through /dev/crypto. Unfortunately OpenSSL doesn't support AES-256-GCM in the cryptodev engine, and disagree with NetBSD's /dev/crypto on how to implement AES-256-CTR. And the default SSH cannot use cryptodev, it closes all file descriptors after cryptodev has opened /dev/crypto... still WiP.
|
||||
|
||||
* "RDOL,trng": exposes a 5 MHz counter (didn't realize the SS20 already had a good counter) and a so-far-not-true TRNG (implemented by a PRNG). The 'true' random generators I've found make Vivado screams very loudly when synthesizing... anyway both works fine in NetBSD 9.0 as a timecounter and an entropy source (which a PRNG really isn't, I know). still WiP.
|
||||
|
||||
* "RDOL,sdcard": trying to expose the micro-sd card slot as a storage device, at first using SPI mode. So far reading seems to work, and NetBSD can see a Sun disklabel on the micro-sd card if it has been partitioned that way. Mounting a FAT filesystem read-only now works (with very little testing as of yet). Writing not working yet. Very much WiP.
|
||||
Short version: the board enables a 256 MiB SDRAM disk (for fast swapping) and a USH OHCI host controller (for USB peripherals).
|
||||
|
||||
## The hardware
|
||||
|
||||
@ -28,9 +24,21 @@ The custom board is a SBus-compliant (I hope...) board, designed to receive a [Z
|
||||
|
||||
The PCB was designed with Kicad 5.0
|
||||
|
||||
## The gateware
|
||||
## The gateware (Migen)
|
||||
|
||||
Directory 'sbus-to-ztex-gateware'
|
||||
The gateware was rewritten from scrach in the Migen language, choosen because that's what [Litex](https://github.com/enjoy-digital/litex/) uses.
|
||||
It implements a simple CPU-less Litex SoC built around a Wishbone bus, with a bridge between the SBus and the Wishbone.
|
||||
|
||||
A ROM, a SDRAM controller (litedram to the on-board DDR3) and an USB OHCI (host controller, using the Litex wrapper around the [SpinalHDL](https://github.com/SpinalHDL/SpinalHDL) implementation) are connected to that bus.
|
||||
Master access to the SBus by the host are routed to the Wishbone to access the various CSRs / control registers of the devices.
|
||||
|
||||
The USB OHCI DMA is bridged from the Wishbone to the SBus by having the physical addresses of the Wishbone (that match the virtual addresses from NetBSD DVMA allocations) to the bridge. Reads are buffered by block of 16 bytes; currently writes are unbuffered (and somwhat slow, as they need a full SBus master cycle for every transaction of 32 bits or less). The standard NetBSD OHCI driver is used, with just a small custom SBus-OHCI driver mirroring the PCI-OHCI one.
|
||||
|
||||
The SDRAM has its own custom DMA controller, using native Litedram DMA to the memory, and some FIFO to/from the SBus. A custom NetBSD driver exposes it as a drive on which you can swap. It might also be usable as a 'fast', volatile disk, but I haven't tried that yet.
|
||||
|
||||
## The gateware (VHDL, obsolete)
|
||||
|
||||
Directory 'sbus-to-ztex-gateware', this is obsolete and replaced by the Migen gateware above.
|
||||
|
||||
The function embedded in the FPGA currently includes the PROM, lighting Led to display a 32-bits value, and a GHASH MAC (128 polynomial accumulator, used for the AES-GCM encryption scheme). The device is a fairly basic scale, but should be able to read from the PROM and read/write from the GCM space with any kind of SBus burst (1, 2, 4, 8 or 16 words).
|
||||
|
||||
@ -40,5 +48,5 @@ The gateware is currently synthesized with Vivado 2020.1
|
||||
|
||||
Directory 'NetBSD'
|
||||
|
||||
Some basic drivers for NetBSD 9.0/sparc to enable the deviced as described above.
|
||||
Some basic drivers for NetBSD 9.0/sparc to enable the devices as described above.
|
||||
|
||||
|
||||
9
sbus-to-ztex-gateware/README.md
Normal file
9
sbus-to-ztex-gateware/README.md
Normal file
@ -0,0 +1,9 @@
|
||||
## Current status
|
||||
|
||||
2021-03-21: The adapter board seems to work fine in two different SS20. Currently the embedded PROM code exposes three devices in the FPGA:
|
||||
|
||||
* "RDOL,cryptoengine": exposes a (way too large) polynomial multiplier to implement GCM mode and a AES block. Currently used to implement DMA-based acceleration of AES-256-CBC through /dev/crypto. Unfortunately OpenSSL doesn't support AES-256-GCM in the cryptodev engine, and disagree with NetBSD's /dev/crypto on how to implement AES-256-CTR. And the default SSH cannot use cryptodev, it closes all file descriptors after cryptodev has opened /dev/crypto... still WiP.
|
||||
|
||||
* "RDOL,trng": exposes a 5 MHz counter (didn't realize the SS20 already had a good counter) and a so-far-not-true TRNG (implemented by a PRNG). The 'true' random generators I've found make Vivado screams very loudly when synthesizing... anyway both works fine in NetBSD 9.0 as a timecounter and an entropy source (which a PRNG really isn't, I know). still WiP.
|
||||
|
||||
* "RDOL,sdcard": trying to expose the micro-sd card slot as a storage device, at first using SPI mode. So far reading seems to work, and NetBSD can see a Sun disklabel on the micro-sd card if it has been partitioned that way. Mounting a FAT filesystem read-only now works (with very little testing as of yet). Writing not working yet. Very much WiP.
|
||||
Loading…
x
Reference in New Issue
Block a user