summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2015-08-16 00:00:16 +1000
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-08-18 21:41:08 +0000
commit596238507bffaf42692e0c01252379d1828fb9e3 (patch)
tree5ab8a6c5e847e66cf773a8baa3950e3c7f1ef903
parent69b7c4142c75bc26a9b8d098209388080ae43cc5 (diff)
Fixed bug with formatting long integers, now zero paddedmasterg41-20160520
instead of space padded. Change-Id: Iacb192532ea422ce8adeb89f0c141e7a9e8117ae Signed-off-by: Damien Zammit <damien@zamaudio.com> Reviewed-on: http://review.coreboot.org/11241 Tested-by: build bot (Jenkins) Reviewed-by: Idwer Vollering <vidwer@gmail.com>
-rw-r--r--SerialICE/simba/hooks.lua2
-rw-r--r--SerialICE/simba/output.lua4
2 files changed, 4 insertions, 2 deletions
diff --git a/SerialICE/simba/hooks.lua b/SerialICE/simba/hooks.lua
index b69c77a..49d937c 100644
--- a/SerialICE/simba/hooks.lua
+++ b/SerialICE/simba/hooks.lua
@@ -235,6 +235,8 @@ function pre_action(action, dir_wr, addr, size, data)
action.data = (0xffff & data)
elseif size == 4 then
action.data = (0xffffffff & data)
+ elseif size == 8 then
+ action.data = (0xffffffffffffffff & data)
end
end
end
diff --git a/SerialICE/simba/output.lua b/SerialICE/simba/output.lua
index 889dcc1..05b73b7 100644
--- a/SerialICE/simba/output.lua
+++ b/SerialICE/simba/output.lua
@@ -112,8 +112,8 @@ function size_data(size, data)
if size == 1 then return string.format("%02x", data)
elseif size == 2 then return string.format("%04x", data)
elseif size == 4 then return string.format("%08x", data)
- elseif size == 8 then return string.format("%16x", data)
- else return string.format("Error: size=%x", size)
+ elseif size == 8 then return string.format("%016x", data)
+ else return string.format("Error: size=%d", size)
end
end