[SerialICE] Patch set updated for serialice: 25cea14 Do not add RAM filters on default_setup()
Kyösti Mälkki (kyosti.malkki@gmail.com)
gerrit at coreboot.org
Wed Mar 6 20:21:31 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/2580
-gerrit
commit 25cea143bd7c0ea477f115e51dfa319dde02d40d
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date: Mon Mar 4 10:17:37 2013 +0200
Do not add RAM filters on default_setup()
To forward JEDEC init cycles to dram memory banks, using the
memory fallback -filter, we must not enable RAM filters
already at start-up.
A mainboard-specific hook shall call enable_ram() only after
raminit and possible quick memtest have completed.
Change-Id: I9b3c0283fd4dd15b4d12e96e02e70d8ccc77f835
Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
SerialICE/simba/memory.lua | 49 ++++++++++++-------------------------------
SerialICE/simba/serialice.lua | 1 -
2 files changed, 13 insertions(+), 37 deletions(-)
diff --git a/SerialICE/simba/memory.lua b/SerialICE/simba/memory.lua
index 4e60bad..b05f09c 100644
--- a/SerialICE/simba/memory.lua
+++ b/SerialICE/simba/memory.lua
@@ -13,12 +13,7 @@ function mem_qemu_rom_pre(f, action)
end
function mem_rom_post(f, action)
- if not action.write then
- return true
- end
- -- Writes to ROM space fall-thru to the fallback filter,
- -- so they get logged there.
- return false
+ return true
end
filter_rom_low = {
@@ -81,21 +76,15 @@ end
ram_is_initialized = false
--- This is handled by SerialICE but *NOT* exclusively.
--- Writes end up in Qemu memory, too
-function mem_ram_low(f, action)
- if ram_is_initialized then
- -- RAM init is done. Send all RAM accesses
- -- to Qemu. Using the target as storage would
- -- only slow execution down.
- action.to_hw = false
- action.to_qemu = true
- else
- -- RAM init has not been marked done yet.
- -- so send reads to the target only.
- action.to_hw = true
- action.to_qemu = action.write
- end
+function mem_qemu_only(f, action)
+ action.to_hw = false
+ action.to_qemu = true
+ return true
+end
+
+function mem_target_only(f, action)
+ action.to_hw = true
+ action.to_qemu = false
return true
end
@@ -113,14 +102,10 @@ function mem_smi_vga(f, action)
end
-function mem_post_pre_ram_only(f, action)
- return ram_is_initialized
-end
-
filter_ram_low = {
name = "MEM",
pre = mem_ram_low,
- post = mem_post_pre_ram_only,
+ post = mem_post,
hide = true,
base = 0x0,
size = 0xa0000
@@ -138,19 +123,12 @@ filter_smi_vga = {
filter_ram_low_2 = {
name = "MEM",
pre = mem_ram_low,
- post = mem_post_pre_ram_only,
+ post = mem_post,
hide = true,
base = 0xc0000,
size = 0x20000
}
-
-function mem_target_only(f, action)
- action.to_hw = true
- action.to_qemu = false
- return true
-end
-
-- 3.25GB RAM. This is handled by SerialICE.
-- FIXME: use TOLM here
@@ -160,7 +138,7 @@ end
filter_ram_high = {
name = "MEM",
pre = mem_target_only,
- post = mem_post_pre_ram_only,
+ post = mem_post,
hide = true,
base = 0x100000,
size = 0xd0000000 - 0x100000
@@ -172,7 +150,6 @@ function ram_enabled()
end
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)
diff --git a/SerialICE/simba/serialice.lua b/SerialICE/simba/serialice.lua
index 82a2b03..7cabf67 100644
--- a/SerialICE/simba/serialice.lua
+++ b/SerialICE/simba/serialice.lua
@@ -78,7 +78,6 @@ function do_minimal_setup()
end
function do_default_setup()
- enable_ram()
enable_hook(mem_hooks, filter_lapic)
enable_hook(mem_hooks, filter_ioapic)
enable_hook(io_hooks, filter_pci_io_cfg)
More information about the SerialICE
mailing list