Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1648
-gerrit
commit 562525ed1cfe0bab64520605d057fc4448a39d68 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Sun Oct 28 11:54:51 2012 +0200
Add APIC memory spaces
To be precise, the base addresses of APICs are actually configurable in either PCI config space or an MSR. For now, this decodes at the commonly used and fixed base address for both IOAPIC and LAPIC.
For LAPIC, Startup-IPI is replaced with INIT IPI to prevent AP CPUs from attempting to execute code from Flash.
Change-Id: Icdbb8cd460bba440b466860f7e92f8a83cdb9d00 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- SerialICE/simba/mmio.lua | 40 ++++++++++++++++++++++++++++++++++++++++ SerialICE/simba/serialice.lua | 3 +++ 2 files changed, 43 insertions(+)
diff --git a/SerialICE/simba/mmio.lua b/SerialICE/simba/mmio.lua new file mode 100644 index 0000000..695315f --- /dev/null +++ b/SerialICE/simba/mmio.lua @@ -0,0 +1,40 @@ + +-- ********************************************************** +-- +-- Vendor independent X86 memory mapped IO + +-- Local APIC +-- We should avoid that someone wakes up cores +-- on the target system that go wild. +function mem_lapic(f, action) + if bit32.band(action.addr, f.size-1) == 0x300 then + -- replace Start-Up IPI with Init IPI + if action.write and bit32.band(action.data, 0xf0f00) == 0xc0600 then + return fake_action(f, action, 0xc0500) + end + end + return handle_action(f, action) +end + +filter_lapic = { + id = -1, + name = "LAPIC", + pre = mem_lapic, + post = mem_base_post, + hide = true, + base = 0xfee00000, + size = 0x00010000, +} + +-- IOAPIC +filter_ioapic = { + id = -1, + name = "IOAPIC", + pre = mem_target_only, + post = mem_base_post, + hide = true, + base = 0xfec00000, + size = 0x00010000, +} + + diff --git a/SerialICE/simba/serialice.lua b/SerialICE/simba/serialice.lua index 3700589..08625d6 100644 --- a/SerialICE/simba/serialice.lua +++ b/SerialICE/simba/serialice.lua @@ -64,6 +64,7 @@ dofile("cpu.lua") dofile("pci_cfg.lua") dofile("pc80.lua") dofile("superio.lua") +dofile("mmio.lua")
function do_minimal_setup() enable_hook(io_hooks, filter_io_fallback) @@ -76,6 +77,8 @@ 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) enable_hook_pc80() enable_hook_superio(0x2e, DEFAULT_SUPERIO_LDN_REGISTER)