最近工作需要在 UEFI Shell 下Check EC Ram 的设定,发现手上只有 Windows 下的读取工具(RW Everything)。于是研究了一下如何在Shell 读取 EC Ram。
根据【参考1】读取的流程如下:
Port 66 Commands
There are also some EC commands that use ports 0x66 and
0x62. Some of these are standard ACPI commands as defined in the external ACPI
spec, others are custom.
The port 66 protocol is essentially the standard ACPI EC
interface protocol.
1. Wait for port66.IBF = 0
2. Write command byte to port 66.
3. For each outgoing data or address byte:
3a. Wait for port66.IBF = 0
3b. Write data or address byte to port 62.
4. For each incoming data byte:
4a. Wait for port66.OBF = 1
4b. Read data byte from port 62.
5. If the command requires no data or address bytes, you can
determine when the command was accepted/executed by waiting for port66.IBF=0.