[SerialICE] New patch to review for serialice: 90b3c55 Fix replay of old logfiles

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Mon Feb 25 02:12:07 CET 2013


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2503

-gerrit

commit 90b3c55c24950702738419ecff7a8569e05e4ef4
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Mon Feb 25 03:05:13 2013 +0200

    Fix replay of old logfiles
    
    Old serialice logfiles had removed I/O accesses of PCI configuration
    register accesses. Replayer script needs to inject those lines back in.
    
    This was broken, as pci_bdf() no longer converts to the format
    required for I/O 0xcf8 register.
    
    Change-Id: I9ba2b76a8353895ac431eaaa355e0d8ec8381e02
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 SerialICE/simba/replay.lua | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/SerialICE/simba/replay.lua b/SerialICE/simba/replay.lua
index fcfabf3..f3ba17f 100644
--- a/SerialICE/simba/replay.lua
+++ b/SerialICE/simba/replay.lua
@@ -11,6 +11,10 @@ SerialICE_mainboard = "undetected"
 regs = { eax, ebc, ecx, edx, cs=0, eip=0, ds, es, ss, gs, fs, }
 ids = { parent, this, }
 
+function pci_bdf_noext(bus, dev, func, reg)
+	return bus*65536 + dev*2048 + func*256 + reg
+end
+
 function replay_io(dir_wr, addr, size, data)
 	pre_action(io_action, dir_wr, addr, size, data)
 	walk_pre_hooks(io_hooks, io_action)
@@ -102,7 +106,7 @@ function parse_pci(line)
 	local ndata = tonumber(data,16)
 	local nsize = string.len(data)/2
 
-	replay_io(true, 0xcf8, 4, pci_bdf(tonumber(bus,16), tonumber(dev,16), tonumber(fn,16), nreg))
+	replay_io(true, 0xcf8, 4, pci_bdf_noext(tonumber(bus,16), tonumber(dev,16), tonumber(fn,16), nreg))
 	if string.find("<=", dir) then
 		replay_io(true, 0xcfc + noff, nsize, ndata)
 	else



More information about the SerialICE mailing list