Skip to content

Commit

Permalink
fix: Linux EC dump guide (test)
Browse files Browse the repository at this point in the history
  • Loading branch information
glpnk committed Aug 23, 2024
1 parent 01588dd commit 5812524
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions docs/device_support_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ Or save it to file:

+ `cat /sys/devices/platform/msi-ec/debug/ec_dump > ec_dump.txt`

If you got the next error, then your module is not loaded in debug mode or doesn't have it:

> [!IMPORTANT]
> If you got the next error, then your module is not loaded in debug mode or doesn't have it:
>
> `cat: /sys/devices/platform/msi-ec/debug/ec_dump: No such file or directory`
## `EC-SYS` method
Expand All @@ -133,11 +134,6 @@ To start, You need to load a module called `ec_sys`:

* `sudo modprobe ec_sys`

[//]: # (If you need to write to a specific address (but you really shouldn’t) you can enable)
[//]: # (Read/Write mode for this module:)
[//]: # ()
[//]: # (* `sudo modprobe ec_sys write_support=1`)

After that you can extract the EC table and print it on the terminal in text form:

* `hexdump -C /sys/kernel/debug/ec/ec0/io`
Expand All @@ -146,10 +142,6 @@ Or save it to file:

+ `hexdump -C /sys/kernel/debug/ec/ec0/io > ec_dump.txt`

If you need dump in binary form:

* `cat /sys/kernel/debug/ec/ec0/io > ec_dump.bin`

## Reading the EC RAM mapped to system memory

Some devices have EC memory mapped to system memory address `0x0xFC000800`,
Expand All @@ -167,7 +159,3 @@ To read EC memory in text form run:
To save EC memory in text form run:

+ `sudo dd if=/dev/mem bs=1 skip=4227860480 count=256 | hexdump -C > ec_dump.txt`

To make binary dump run:

+ `sudo dd if=/dev/mem bs=1 skip=4227860480 count=256 > ec_dump.bin`

0 comments on commit 5812524

Please sign in to comment.