[SerialICE] New patch to review for serialice: a182ef2 EPIA-M850: Add hook for PCI MMIO accesses

Alexandru Gagniuc (mr.nuke.me@gmail.com) gerrit at coreboot.org
Mon Jul 22 09:30:39 CEST 2013


Alexandru Gagniuc (mr.nuke.me at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3795

-gerrit

commit a182ef21985547a8865cc28b1661b207443c15c1
Author: Alexandru Gagniuc <mr.nuke.me at gmail.com>
Date:   Mon Jul 22 02:27:53 2013 -0500

    EPIA-M850: Add hook for PCI MMIO accesses
    
    Add a hook that enables decoding of PCI MMIO base on the VIA VX900.
    
    Change-Id: I5a66366fc4dbaf4e2f60f58febad90f7bb7cd2ff
    Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
---
 SerialICE/simba/chipset/via_bars.lua         | 22 ++++++++++++++++++++++
 SerialICE/simba/mainboard/via_epia_m_850.lua |  2 ++
 2 files changed, 24 insertions(+)

diff --git a/SerialICE/simba/chipset/via_bars.lua b/SerialICE/simba/chipset/via_bars.lua
index 7868535..f9916d7 100644
--- a/SerialICE/simba/chipset/via_bars.lua
+++ b/SerialICE/simba/chipset/via_bars.lua
@@ -28,3 +28,25 @@ function northbridge_vx900()
 	pci_cfg16_hook(dev_sb, 0xbd, "SB_PCI", sb_pcie_bar)
 	pci_cfg32_hook(dev_nb, 0x0, "NB_PCI", nb_pcie_bar)
 end
+
+dev_nb_traf_ctl = {
+	pci_dev = pci_bdf(0,0,5,0),
+	name = "trf",
+	bar = {},
+}
+
+function vx900_pcie_bar(f, action)
+	local baseaddr = bit32.lshift(action.data, 28)
+	local size = 256*1024*1024
+
+	-- enable is 0:00.0 [054] .31
+	if baseaddr then
+		pcie_mm_enable(f.dev, f.reg, baseaddr, size)
+	else
+		pcie_mm_disable(f.dev, f.reg, baseaddr, size)
+	end
+end
+
+function northbridge_vx900_traf()
+	pci_cfg8_hook(dev_nb_traf_ctl, 0x61, "PCI", vx900_pcie_bar)
+end
diff --git a/SerialICE/simba/mainboard/via_epia_m_850.lua b/SerialICE/simba/mainboard/via_epia_m_850.lua
index 44f0fde..c18d870 100644
--- a/SerialICE/simba/mainboard/via_epia_m_850.lua
+++ b/SerialICE/simba/mainboard/via_epia_m_850.lua
@@ -141,6 +141,7 @@ end
 -- ****************
 
 function do_mainboard_setup()
+	print("Muhuhuhahahahaaa")
 	enable_hook(io_hooks, filter_pci_io_cfg)
 	enable_hook(mem_hooks, filter_lapic)
 	enable_hook(mem_hooks, filter_ioapic)
@@ -156,6 +157,7 @@ function do_mainboard_setup()
 	enable_hook_superio(0x4e, 0x07)
 
 	northbridge_vx900()
+	northbridge_vx900_traf()
 	pci_cfg16_hook(dev_power, 0x88, "PM", pm_io_bar)
 	pci_cfg16_hook(dev_power, 0xd0, "SMBus", smbus_bar_hook)
 



More information about the SerialICE mailing list