summaryrefslogtreecommitdiff
path: root/util/ectool/ec.c
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-01-16 17:50:55 +0000
committerStefan Reinauer <stepan@openbios.org>2010-01-16 17:50:55 +0000
commit984e0f3a0c3a82339ef8afcf7f315f377e0c81fc (patch)
tree392db09746292a1171b9953810a106d7166394fc /util/ectool/ec.c
parent350ca4a94faa4f35b0b63045f9c7132c2801e1b8 (diff)
ectool: Support for dumping EC "index ram"
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5021 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/ectool/ec.c')
-rw-r--r--util/ectool/ec.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/util/ectool/ec.c b/util/ectool/ec.c
index 56e9a61905..351015d050 100644
--- a/util/ectool/ec.c
+++ b/util/ectool/ec.c
@@ -114,3 +114,13 @@ int ec_write(uint8_t addr, uint8_t data)
return send_ec_data(data);
}
+
+uint8_t ec_idx_read(uint16_t addr)
+{
+ uint16_t lpc_idx = 0x380;
+
+ outb(addr & 0xff, lpc_idx + 2);
+ outb(addr >> 8, lpc_idx + 1);
+
+ return inb(lpc_idx + 3);
+}