Skip to content

Commit

Permalink
Update EmbeddedControllers.md
Browse files Browse the repository at this point in the history
Updated text with a little more details for less experienced people.
  • Loading branch information
mackonsti authored and vit9696 committed Mar 27, 2021
1 parent 3b17b82 commit f30c901
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions Docs/EmbeddedControllers.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
## SMCSuperIO Embedded Controller mapping

One must inject the EC controller identifier into LPC device via DeviceProperties into `ec-device` field.
E.g. `PciRoot(0x0)/Pci(0x1F,0x0)` gets `ec-device` property with `Intel_EC_V1` string value.
For a quick test `ssioec` boot argument can also be used.
To use Embedded Controller sensors for any fan reading in macOS, one must inject the EC controller identifier into LPC device via `DeviceProperties` using the new `ec-device` key. First, one needs to determine the `LPC` device path, e.g. `PciRoot(0x0)/Pci(0x1F,0x0)`, (standardised on all Intel chipsets, gfxutil can do that on other hardware) and then add the `ec-device` property with the _corresponding_ string value of the device model from the list below, e.g. `Intel_EC_V1` as a string value. For a quick test, the `ssioec` boot argument can also be used.

An example device injection for the Intel NUC 8 series:
```
<key>PciRoot(0x0)/Pci(0x1f,0x0)</key>
<dict>
<key>ec-device</key>
<string>Intel_EC_V8</string>
<key>model</key>
<string>Intel Corporation Coffee Lake Series LPC Controller</string>
</dict>
```

_Note_: Currently only Intel NUC hardware is supported.

#### Debugger (`debug`)

This is a special type of EC driver available in DEBUG builds of SMCSuperIO. Instead of supporting particular hardware it lets one probe the registers of any embedded controller
and analyse its memory contents. This EC driver will provide FANs with values read from a particular memory region of the EC device memory. Each FAN represents one single byte.
This is a special type of EC driver available in DEBUG builds of SMCSuperIO. Instead of supporting particular hardware, it lets one probe the registers of any embedded controller and analyse its memory contents. This EC driver will provide FANs with values read from a particular memory region of the EC device memory. Each FAN represents one single byte:

- The memory region size (essentially the number of FANs) is controlled via `ssiowndsz` boot argument, default is 5.
- The memory region starting byte is controlled via `ssiownd` boot argument, default is 0.

Debugger firstly tries to use MMIO mode and then falls back to PMIO mode on failure.
PMIO mode supports up to 256 bytes of memory. MMIO mode supports up to 64 KBs of memory with the (usually 256 byte) EC region mapped somewhere in the area.

The PMIO mode supports up to 256 bytes of memory. MMIO mode supports up to 64 KBs of memory with the (usually 256 bytes) EC region mapped somewhere in the area.
The `debug` driver dumps first 8 KBs of EC memory to the log to help to locate the mapped EC window in the MMIO mode.

## Supported devices with respective EC Identifiers

### Intel EC V1 (`Intel_EC_V1`)

- `MKKBLY35` Firmware:<br/>
Expand Down Expand Up @@ -227,4 +240,4 @@ Intel® NUC 8 Mainstream-G Kit **NUC8i7INH**<br/>
Intel® NUC 8 Mainstream-G Mini PC **NUC8i5INH**<br/>
Intel® NUC 8 Mainstream-G Mini PC **NUC8i7INH**<br/>

List compiled by @MacKonsti proudly assisting @vit9696
(List compiled by @MacKonsti proudly assisting @vit9696)

0 comments on commit f30c901

Please sign in to comment.