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/2580
-gerrit
commit 9c4c45a618bae64b8982098051dcc6b3bce69dac
Author: Kyösti Mälkki <kyosti.malkki(a)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(a)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)
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/2577
-gerrit
commit fbd42fc657d81ccc6b9a8734222fc007c6238c71
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Sun Mar 3 19:02:29 2013 +0200
Treat PnP devices as fixed IO
Usually these ISA/LPC devices are discussed using
fixed I/O addresses so change the log output.
Sometimes PnP registers are programmed for fixed I/O
resources too. We test for 0x60/0x64 as it is filtered
with pc80.lua:i8042 instead.
Change-Id: Ibec34fe656dea9efd22ab4530ef9efb99c9c665d
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
SerialICE/simba/pc80.lua | 1 +
SerialICE/simba/superio.lua | 14 ++++++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/SerialICE/simba/pc80.lua b/SerialICE/simba/pc80.lua
index 7ce439c..a9f4f0c 100644
--- a/SerialICE/simba/pc80.lua
+++ b/SerialICE/simba/pc80.lua
@@ -323,6 +323,7 @@ end
filter_i8042 = {
id = -1,
+ decode = F_FIXED,
name = "i8042",
pre = i8042_pre,
post = i8042_post,
diff --git a/SerialICE/simba/superio.lua b/SerialICE/simba/superio.lua
index 1248af5..7f6210c 100644
--- a/SerialICE/simba/superio.lua
+++ b/SerialICE/simba/superio.lua
@@ -62,8 +62,11 @@ function superio_try_enable_io(f, idx)
if not ldn.bar0.name then
ldn.bar0.name = superio_pnpdev(f)
end
- ldn.bar0.val = iobase
- generic_io_bar(ldn.bar0)
+ if iobase ~= 0x60 then
+ ldn.bar0.val = iobase
+ generic_io_bar(ldn.bar0)
+ ldn.bar0.f.decode = F_FIXED
+ end
end
if idx == 1 and ldn.set[0x62] and ldn.set[0x63] then
local iobase = bit32.bor(bit32.lshift(ldn.data[0x62], 8), ldn.data[0x63])
@@ -73,8 +76,11 @@ function superio_try_enable_io(f, idx)
if not ldn.bar1.name then
ldn.bar1.name = superio_pnpdev(f)
end
- ldn.bar1.val = iobase
- generic_io_bar(ldn.bar1)
+ if iobase ~= 0x64 then
+ ldn.bar1.val = iobase
+ generic_io_bar(ldn.bar1)
+ ldn.bar1.f.decode = F_FIXED
+ end
end
end
end