|
| 1 | +## Naming convensions |
| 2 | + |
| 3 | +- HDAT |
| 4 | + |
| 5 | + `HDAT` or `Hostboot DATa` is the name used by `Hostboot`. |
| 6 | + |
| 7 | + Specification is mentioned by the source code, |
| 8 | + but accordign to the current knowledge it is not public. |
| 9 | + > "6.1.1 System Parameters" of the Hypervisor Interface Data |
| 10 | + > Specifications document (aka the "HDAT spec) |
| 11 | +
|
| 12 | +- SPIRA |
| 13 | + |
| 14 | + `SPIRA` means `SP Interface Root Array` and is the name used by Skiboot |
| 15 | + |
| 16 | +- SPIRA-S |
| 17 | + |
| 18 | + `SPIRA-S` most likely refers to `Service processor SPIRA` |
| 19 | + |
| 20 | + ```cpp |
| 21 | + /* The service processor SPIRA-S structure */ |
| 22 | + struct spiras *spiras; |
| 23 | + ``` |
| 24 | + |
| 25 | +- SPIRA-H |
| 26 | + |
| 27 | + `SPIRA-H` most likely refers to `Hypervisor SPIRA` |
| 28 | + ```cpp |
| 29 | + /* The Hypervisor SPIRA-H Structure */ |
| 30 | + __section(".spirah.data") struct spirah spirah = { |
| 31 | + ``` |
| 32 | + |
| 33 | + Hostboot uses this name sometimes to reference the HDAT |
| 34 | + > * @brief Write actual architected register detail to HDAT/SPIRAH |
| 35 | + |
| 36 | + |
| 37 | +## Dump from memory |
| 38 | + |
| 39 | +- SPIRA-H |
| 40 | + - address: 0x30010400 |
| 41 | + - size: 0x200 |
| 42 | + ``` |
| 43 | + ssh root@talos pdbg -p0 -c1 -t0 getmem 0x30010400 0x200 2>/dev/null > spira-h.bin |
| 44 | + ``` |
| 45 | +- SPIRA-S |
| 46 | + - address: 0x30010000 |
| 47 | + - size: 0x400 |
| 48 | + ``` |
| 49 | + ssh root@talos pdbg -p0 -c1 -t0 getmem 0x30010000 0x400 2>/dev/null > spira-s.bin |
| 50 | + ``` |
| 51 | +- SPIRA_HEAP image |
| 52 | +
|
| 53 | + - address: 0x31200000 |
| 54 | + - size: 0x00800000 |
| 55 | + ``` |
| 56 | + ssh root@talos pdbg -p0 -c1 -t0 getmem 0x31200000 0x800000 2>/dev/null > spira-heap.bin |
| 57 | + ``` |
| 58 | +
|
| 59 | +## Convert to device-tree |
| 60 | +
|
| 61 | +Skiboot includes a tool able to convert HDAT into device-tree. |
| 62 | +Source is located in the [hdata/test/hdata_to_dt.c](https://github.com/open-power/skiboot/blob/master/hdata/test/hdata_to_dt.c) file. |
| 63 | +
|
| 64 | +### Build the tool |
| 65 | +
|
| 66 | +To build the `hdata_to_dt`, execute following command in the root |
| 67 | +of the Skiboot repository. |
| 68 | +
|
| 69 | +``` |
| 70 | +make hdata/test/hdata_to_dt |
| 71 | +``` |
| 72 | +
|
| 73 | +This command should create `hdata_to_dt` binary which will be located in the |
| 74 | +`hdata/test/hdata_to_dt` file. |
| 75 | +
|
| 76 | +### Using the tool |
| 77 | +
|
| 78 | +The tool requires `SPIRA` and `Heap images` |
| 79 | +
|
| 80 | +> hdata_to_dt: Converts HDAT dumps to DTB. |
| 81 | +> |
| 82 | +> Usage: |
| 83 | +> hdata <opts> <spira-dump> <heap-dump> |
| 84 | +> hdata <opts> -s <spirah-dump> <spiras-dump> |
| 85 | +> Options: |
| 86 | +> -v Verbose |
| 87 | +> -q Quiet mode |
| 88 | +> -b Keep blobs in the output |
| 89 | +> |
| 90 | +> -8 Force PVR to POWER8 |
| 91 | +> -8E Force PVR to POWER8E |
| 92 | +> -9 Force PVR to POWER9 (nimbus) |
| 93 | +> -9P Force PVR to POWER9P (Axone) |
| 94 | +> -10 Force PVR to POWER10 |
| 95 | +> |
| 96 | +> When no PVR is specified -8 is assumed |
| 97 | +> Pipe to 'dtc -I dtb -O dts' for human readable output |
| 98 | +
|
| 99 | +``` |
| 100 | +hdata/test/hdata_to_dt -9 -s hdata/test/p8-840-spira.spirah hdata/test/op920.wsp.heap |
| 101 | +``` |
0 commit comments