๐Ÿ“ฆ cyrozap / jmb58x-re

๐Ÿ“„ README.md ยท 68 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68# JMB58x Reverse Engineering

The JMicron JMB582 and JMB585 are SATA 6Gb/s host controllers with PCIe Gen3
interfaces. The JMB582 has one PCIe Gen3 lane and two SATA ports, while the
JMB585 has two PCIe Gen3 lanes and five SATA ports.


## Quick start


### Software dependencies

* Python 3
* Documentation generator:
  * [lxml][lxml]
  * [Python-Markdown][python-markdown]
  * [PyYAML][pyyaml]


### Procedure

1. Install dependencies.
2. Dump the flash from your JMB58x card.
3. Parse and print the configuration flash with `./tools/parse.py ...`, where
   `...` is the name of the binary you got when you dumped your JMB58x card's
   flash.
4. Run `make doc` to generate XHTML documentation in
   [doc/generated](doc/generated).


### Obtaining a flash image

In addition to dumping the flash of a JMB58x device, a flash image and
proprietary flash tool for JMB58x devices can be downloaded from
[here][station-drivers].


## Reverse engineering notes

See [doc/Notes.md](doc/Notes.md) for my reverse engineering notes.

Machine-readable register documentation can be found in
[data/regs-jmb58x.yaml](data/regs-jmb58x.yaml). Run `make doc` in the root of
this repository to generate XHTML documentation in
[doc/generated](doc/generated), or view an online preview of the register
documentation [here][htmlpreview].


## License

Except where otherwise stated:

* All software in this repository (e.g., tools for parsing and generating flash
  images/configuration data, etc.) is made available under the
  [Zero-Clause BSD (0BSD) license][license].
* All copyrightable content that is not software (e.g., reverse engineering
  notes, this README file, etc.) is licensed under the
  [Creative Commons Attribution-ShareAlike 4.0 International License][cc-by-sa].


[lxml]: https://lxml.de/
[python-markdown]: https://python-markdown.github.io/
[pyyaml]: https://pyyaml.org/
[station-drivers]: https://www.station-drivers.com/index.php/en/component/remository/Drivers/Jmicron/JMB585-Sata-Controller/Jmicron-JMB585-Sata-Controller-Firmware-Version-255.00.00.20/lang,en-gb/
[htmlpreview]: https://htmlpreview.github.io/?https://github.com/cyrozap/jmb58x-re/blob/master/tools/doc-preview.html
[license]: LICENSE.txt
[cc-by-sa]: https://creativecommons.org/licenses/by-sa/4.0/