the following patch was just integrated into master:
commit 6eeeaa3385da679de6c674ce7fd6d6b336ea9d27
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Wed Mar 6 20:19:27 2013 +0200
Refactor matching filters to actions
Each hooks list has some criteria when an action matches a filter.
For memory and IO, the action address must be within the range
of an enabled filter.
For CPUID and MSR, the filter must be enabled, and the filter
internally checks the index parameters.
Change-Id: I6f035a0a39d1f94dc77e1b1dc16459b071ca871a
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/2598
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Build-Tested: build bot (Jenkins) at Sat Mar 9 01:22:11 2013, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer(a)coreboot.org> at Fri Mar 15 17:09:47 2013, giving +2
See http://review.coreboot.org/2598 for details.
-gerrit
the following patch was just integrated into master:
commit dd084922a0bba0da22a9fca1bfd09e86a755dd82
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Wed Mar 6 20:02:24 2013 +0200
Add runtime parameters file
Move parameters that control the verbosity of the replayer script
in a separate file. Also set default of log_everything = false,
as this is generally how one wants replay to behave.
Change-Id: Iccf2b50874849228c51d99fa33dc3e86d9d584cb
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/2599
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Build-Tested: build bot (Jenkins) at Wed Mar 13 10:07:39 2013, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer(a)coreboot.org> at Fri Mar 15 17:09:25 2013, giving +2
See http://review.coreboot.org/2599 for details.
-gerrit
the following patch was just integrated into master:
commit 1c634352e733fe2af23318d24ba9fa32bd7b254e
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Tue Mar 12 10:09:13 2013 +0200
Fix RAM filters
These filters had not been tested and had some typos in the
names and missing .hide variables.
Once enable_ram() is called, also register physical RAM on Qemu
side from 1 MiB to 8 MiB.
Change-Id: I4c398f006d684dfe71080a69664fa5c062e8a743
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/2702
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Build-Tested: build bot (Jenkins) at Wed Mar 13 10:13:25 2013, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer(a)coreboot.org> at Fri Mar 15 17:04:23 2013, giving +2
See http://review.coreboot.org/2702 for details.
-gerrit
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2702
-gerrit
commit adb3f655e72259ae43dd883d604391bf6289b331
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Tue Mar 12 10:09:13 2013 +0200
Fix RAM filters
These filters had not been tested and had some typos in the
names and missing .hide variables.
Once enable_ram() is called, also register physical RAM on Qemu
side from 1 MiB to 8 MiB.
Change-Id: I4c398f006d684dfe71080a69664fa5c062e8a743
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
SerialICE/simba/memory.lua | 58 +++++++++++++++++++++++++++----------------
SerialICE/simba/serialice.lua | 3 +++
2 files changed, 40 insertions(+), 21 deletions(-)
diff --git a/SerialICE/simba/memory.lua b/SerialICE/simba/memory.lua
index b05f09c..bb09aef 100644
--- a/SerialICE/simba/memory.lua
+++ b/SerialICE/simba/memory.lua
@@ -53,7 +53,7 @@ function new_car_region(start, size)
f.size = size
f.pre = car_qemu_only
f.post = car_post
- f.hide = true
+ f.hide = hide_car
enable_hook(mem_hooks, f)
SerialICE_register_physical(start, size)
end
@@ -101,12 +101,15 @@ function mem_smi_vga(f, action)
return true
end
+function mem_ram_post(f, action)
+ return true
+end
filter_ram_low = {
- name = "MEM",
- pre = mem_ram_low,
- post = mem_post,
- hide = true,
+ name = "RAM",
+ pre = mem_qemu_only,
+ post = mem_ram_post,
+ hide = hide_ram_low,
base = 0x0,
size = 0xa0000
}
@@ -114,17 +117,17 @@ filter_ram_low = {
filter_smi_vga = {
name = "SMI_VGA",
pre = mem_smi_vga,
- post = mem_post,
- hide = true,
+ post = mem_ram_post,
+ hide = hide_smi_vga,
base = 0x000a0000,
size = 0x00010000,
}
filter_ram_low_2 = {
- name = "MEM",
- pre = mem_ram_low,
- post = mem_post,
- hide = true,
+ name = "RAM",
+ pre = mem_qemu_only,
+ post = mem_ram_post,
+ hide = hide_ram_low,
base = 0xc0000,
size = 0x20000
}
@@ -132,18 +135,30 @@ filter_ram_low_2 = {
-- 3.25GB RAM. This is handled by SerialICE.
-- FIXME: use TOLM here
--- We refrain from backing up this memory in Qemu because Qemu would
+tolm = 0xd0000000
+top_of_qemu_ram = 0x800000
+
+-- We refrain from backing up most of memory in Qemu because Qemu would
-- need lots of ram on the host and firmware usually does not intensively
-- use high memory anyways.
-filter_ram_high = {
- name = "MEM",
- pre = mem_target_only,
- post = mem_post,
- hide = true,
+
+filter_ram_high_qemu = {
+ name = "RAM",
+ pre = mem_qemu_only,
+ post = mem_ram_post,
+ hide = hide_ram_high,
base = 0x100000,
- size = 0xd0000000 - 0x100000
+ size = top_of_qemu_ram - 0x100000,
}
+filter_ram_high = {
+ name = "RAM",
+ pre = mem_target_only,
+ post = mem_ram_post,
+ hide = hide_ram_high,
+ base = top_of_qemu_ram,
+ size = tolm - top_of_qemu_ram
+}
function ram_enabled()
return ram_is_initialized
@@ -153,6 +168,7 @@ function enable_ram()
enable_hook(mem_hooks, filter_ram_low)
enable_hook(mem_hooks, filter_smi_vga)
enable_hook(mem_hooks, filter_ram_low_2)
+ enable_hook(mem_hooks, filter_ram_high_qemu)
enable_hook(mem_hooks, filter_ram_high)
-- Register low RAM 0x00000000 - 0x000dffff
@@ -160,9 +176,9 @@ function enable_ram()
-- SMI/VGA memory should go to the target...
SerialICE_register_physical(0x000c0000, 0x20000)
--printf("Low RAM accesses are now directed to Qemu.\n")
+
+ -- Register high RAM
+ SerialICE_register_physical(0x100000, top_of_qemu_ram - 0x100000)
ram_is_initialized = true
end
-
-
-
diff --git a/SerialICE/simba/serialice.lua b/SerialICE/simba/serialice.lua
index 434556f..2427ed5 100644
--- a/SerialICE/simba/serialice.lua
+++ b/SerialICE/simba/serialice.lua
@@ -27,6 +27,9 @@ io.write("SerialICE: Starting LUA script\n")
-- Set to "false" to show undecoded access for the specified class
hide_rom_access = true
+hide_ram_low = true
+hide_ram_high = true
+hide_smi_vga = true
hide_pci_io_cfg = true
hide_pci_mm_cfg = true
hide_nvram_io = true
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2599
-gerrit
commit b676c485e43c27a5f81cd7a1eb2e5a2bb8cc5076
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Wed Mar 6 20:02:24 2013 +0200
Add runtime parameters file
Move parameters that control the verbosity of the replayer script
in a separate file. Also set default of log_everything = false,
as this is generally how one wants replay to behave.
Change-Id: Iccf2b50874849228c51d99fa33dc3e86d9d584cb
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
SerialICE/simba/memory.lua | 10 ----------
SerialICE/simba/serialice.lua | 33 +--------------------------------
SerialICE/simba/user_env.lua | 36 ++++++++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+), 42 deletions(-)
diff --git a/SerialICE/simba/memory.lua b/SerialICE/simba/memory.lua
index bb09aef..c375166 100644
--- a/SerialICE/simba/memory.lua
+++ b/SerialICE/simba/memory.lua
@@ -132,16 +132,6 @@ filter_ram_low_2 = {
size = 0x20000
}
--- 3.25GB RAM. This is handled by SerialICE.
--- FIXME: use TOLM here
-
-tolm = 0xd0000000
-top_of_qemu_ram = 0x800000
-
--- We refrain from backing up most of memory in Qemu because Qemu would
--- need lots of ram on the host and firmware usually does not intensively
--- use high memory anyways.
-
filter_ram_high_qemu = {
name = "RAM",
pre = mem_qemu_only,
diff --git a/SerialICE/simba/serialice.lua b/SerialICE/simba/serialice.lua
index 2427ed5..4905da1 100644
--- a/SerialICE/simba/serialice.lua
+++ b/SerialICE/simba/serialice.lua
@@ -24,42 +24,11 @@
io.write("SerialICE: Starting LUA script\n")
-
--- Set to "false" to show undecoded access for the specified class
-hide_rom_access = true
-hide_ram_low = true
-hide_ram_high = true
-hide_smi_vga = true
-hide_pci_io_cfg = true
-hide_pci_mm_cfg = true
-hide_nvram_io = true
-hide_i8042_io = false
-hide_i8237_io = true
-hide_i8254_io = true
-hide_i8259_io = true
-hide_superio_cfg = true
-hide_smbus_io = true
-hide_mainboard_io = true
-
--- Set to "true" to log every memory and IO access
-log_everything = true
-
-
--- Use lua table for NVram
--- RTC registers 0x0-0xd go to HW
-cache_nvram = false
-
--- SMSC 0x07, Winbond 0x06 ?
-DEFAULT_SUPERIO_LDN_REGISTER = 0x07
-
-rom_size = 4 * 1024 * 1024
-rom_base = 0x100000000 - rom_size
-
-
-- --------------------------------------------------------------------
-- This initialization is executed right after target communication
-- has been established
+dofile("user_env.lua")
dofile("interface.lua")
dofile("output.lua")
dofile("hooks.lua")
diff --git a/SerialICE/simba/user_env.lua b/SerialICE/simba/user_env.lua
new file mode 100644
index 0000000..ff9f64d
--- /dev/null
+++ b/SerialICE/simba/user_env.lua
@@ -0,0 +1,36 @@
+-- Set to "true" to show all memory and IO access in output
+log_everything = false
+
+-- Set to "false" to show undecoded access for the specified class
+hide_rom_access = true
+hide_ram_low = true
+hide_ram_high = true
+hide_smi_vga = true
+hide_car = true
+hide_pci_io_cfg = true
+hide_pci_mm_cfg = true
+hide_nvram_io = true
+hide_i8042_io = false
+hide_i8237_io = true
+hide_i8254_io = true
+hide_i8259_io = true
+hide_superio_cfg = true
+hide_smbus_io = true
+hide_mainboard_io = true
+
+-- Use lua table for NVram
+-- RTC registers 0x0-0xd go to HW
+cache_nvram = false
+
+-- SMSC 0x07, Winbond 0x06 ?
+DEFAULT_SUPERIO_LDN_REGISTER = 0x07
+
+-- FIXME: Use bios file image size here.
+rom_size = 4 * 1024 * 1024
+rom_base = 0x100000000 - rom_size
+
+-- We refrain from backing up most of memory in Qemu because Qemu would
+-- need lots of ram on the host and firmware usually does not intensively
+-- use high memory anyways.
+top_of_qemu_ram = 0x800000
+tolm = 0xd0000000
the following patch was just integrated into master:
commit ee934c5c446da7c8e4400307906182d4a4b68172
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Tue Mar 5 09:40:28 2013 +0200
Only log Raw action lines from Qemu session
The only lines a qemu session with SerialICE needs to write in the
output are those produced with the core filters and marked with the
flag Raw "R...". Everything else can be replayed from these.
This is a principal change: the output of Qemu session is now completely
raw and one must pass the logfile thru replayer to have simplified view.
Change-Id: I6e4eebde41ca46072c545c02eabac848113bb5ee
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/2597
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Build-Tested: build bot (Jenkins) at Wed Mar 6 21:16:58 2013, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer(a)coreboot.org> at Sat Mar 9 00:38:19 2013, giving +2
See http://review.coreboot.org/2597 for details.
-gerrit