Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3803
-gerrit
commit c754960f6e32ff195d98e5a2e6f03841f93d1634
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Mon Jul 22 16:32:09 2013 -0500
Move VX900 filters from epia_m_850.lua to via_bars.lua
As the comment said, "MOVE THIS TO CHIPSET FILE". Now we can remove that
comment and be happy that VX900 filtering is done properly.
Change-Id: I47294211be073aad205c6727b2649ec0b38ba2c4
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
SerialICE/simba/chipset/via_bars.lua | 44 ++++++++++++++++++++++++++++
SerialICE/simba/mainboard/via_epia_m_850.lua | 39 +-----------------------
2 files changed, 45 insertions(+), 38 deletions(-)
diff --git a/SerialICE/simba/chipset/via_bars.lua b/SerialICE/simba/chipset/via_bars.lua
index 8bbff35..5610230 100644
--- a/SerialICE/simba/chipset/via_bars.lua
+++ b/SerialICE/simba/chipset/via_bars.lua
@@ -1,3 +1,32 @@
+-- SerialICE
+--
+-- Copyright (c) 2012 Kyösti Mälkki <kyosti.malkki(a)gmail.com>
+-- Copyright (c) 2013 Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
+--
+-- Permission is hereby granted, free of charge, to any person obtaining a copy
+-- of this software and associated documentation files (the "Software"), to deal
+-- in the Software without restriction, including without limitation the rights
+-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+-- copies of the Software, and to permit persons to whom the Software is
+-- furnished to do so, subject to the following conditions:
+--
+-- The above copyright notice and this permission notice shall be included in
+-- all copies or substantial portions of the Software.
+--
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+-- THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+-- THE SOFTWARE.
+--
+
+
+-- **********************************************************
+--
+
+load_filter("intel_smbus")
dev_nb_traf_ctl = {
pci_dev = pci_bdf(0,0,5,0),
@@ -22,6 +51,7 @@ dev_sb = {
name = "sb",
bar = {},
mmio = { f = nil },
+ acpi = { f = nil },
}
function sb_mmio_bar(f, action)
@@ -33,7 +63,21 @@ function sb_mmio_bar(f, action)
generic_mmio_bar(f.dev.mmio)
end
+function pm_io_bar(f, action)
+ f.dev.acpi.name = "ACPI"
+ f.dev.acpi.val = bit32.band(action.data, 0xff80)
+ f.dev.acpi.size = 0x80
+ generic_io_bar(f.dev.acpi)
+end
+
+function smbus_bar_hook(f, action)
+ local base = bit32.band(action.data, 0xfff0)
+ intel_smbus_setup(base, 0x10)
+end
+
function enable_hooks_vx900()
pci_cfg8_hook(dev_nb_traf_ctl, 0x61, "PCI", vx900_pcie_bar)
pci_cfg32_hook(dev_sb, 0xbc, "SB_MMIO", sb_mmio_bar)
+ pci_cfg16_hook(dev_sb, 0x88, "PM", pm_io_bar)
+ pci_cfg16_hook(dev_sb, 0xd0, "SMBus", smbus_bar_hook)
end
diff --git a/SerialICE/simba/mainboard/via_epia_m_850.lua b/SerialICE/simba/mainboard/via_epia_m_850.lua
index fb908b2..4f5dc14 100644
--- a/SerialICE/simba/mainboard/via_epia_m_850.lua
+++ b/SerialICE/simba/mainboard/via_epia_m_850.lua
@@ -1,6 +1,7 @@
-- SerialICE
--
-- Copyright (c) 2012 Kyösti Mälkki <kyosti.malkki(a)gmail.com>
+-- Copyright (c) 2013 Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
@@ -104,43 +105,8 @@ filter_mainboard = {
size = 0x10000
}
-
-
--- MOVE THIS TO CHIPSET FILE
-
-load_filter("intel_smbus")
load_filter("via_bars")
-function smbus_bar_hook(f, action)
- local base = bit32.band(action.data, 0xfff0)
- intel_smbus_setup(base, 0x10)
-end
-
-dev_sb_lpc = {
- pci_dev = pci_bdf(0x0,0x1f,0x3,0x0),
- name = "Smbus",
- bar = {},
-}
-
-dev_power = {
- pci_dev = pci_bdf(0x0,0x11,0x0,0x0),
- name = "SYS",
- bar = {},
- acpi = { f = nil },
- tco = { f = nil },
-}
-
-function pm_io_bar(f, action)
- f.dev.acpi.name = "ACPI"
- f.dev.acpi.val = bit32.band(action.data, 0xff80)
- f.dev.acpi.size = 0x80
- generic_io_bar(f.dev.acpi)
-end
-
-
-
--- ****************
-
function do_mainboard_setup()
enable_hook(io_hooks, filter_pci_io_cfg)
enable_hook(mem_hooks, filter_lapic)
@@ -155,10 +121,7 @@ function do_mainboard_setup()
enable_hook_pc80()
enable_hook_superio(0x4e, 0x07)
-
enable_hooks_vx900()
- pci_cfg16_hook(dev_power, 0x88, "PM", pm_io_bar)
- pci_cfg16_hook(dev_power, 0xd0, "SMBus", smbus_bar_hook)
-- Apply mainboard hooks last, so they are the first ones to check
enable_hook(io_hooks, filter_mainboard)
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3802
-gerrit
commit f1cb32804d76a8e16ac0c5d52a60e0c804f1eb04
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Mon Jul 22 16:16:06 2013 -0500
VX900: Rename northbridge_vx900 to enable_hooks_vx900
The VX900 is not just a northbridge, and the function enables hooks for
both the north and south modules of the chipset, so rename it for better
readability.
Change-Id: If851652830f178668dd3fa9ea85b8d72790b40ed
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
SerialICE/simba/chipset/via_bars.lua | 2 +-
SerialICE/simba/mainboard/via_epia_m_850.lua | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/SerialICE/simba/chipset/via_bars.lua b/SerialICE/simba/chipset/via_bars.lua
index bafc53b..8bbff35 100644
--- a/SerialICE/simba/chipset/via_bars.lua
+++ b/SerialICE/simba/chipset/via_bars.lua
@@ -33,7 +33,7 @@ function sb_mmio_bar(f, action)
generic_mmio_bar(f.dev.mmio)
end
-function northbridge_vx900()
+function enable_hooks_vx900()
pci_cfg8_hook(dev_nb_traf_ctl, 0x61, "PCI", vx900_pcie_bar)
pci_cfg32_hook(dev_sb, 0xbc, "SB_MMIO", sb_mmio_bar)
end
diff --git a/SerialICE/simba/mainboard/via_epia_m_850.lua b/SerialICE/simba/mainboard/via_epia_m_850.lua
index 6737399..fb908b2 100644
--- a/SerialICE/simba/mainboard/via_epia_m_850.lua
+++ b/SerialICE/simba/mainboard/via_epia_m_850.lua
@@ -156,7 +156,7 @@ function do_mainboard_setup()
enable_hook_pc80()
enable_hook_superio(0x4e, 0x07)
- northbridge_vx900()
+ enable_hooks_vx900()
pci_cfg16_hook(dev_power, 0x88, "PM", pm_io_bar)
pci_cfg16_hook(dev_power, 0xd0, "SMBus", smbus_bar_hook)
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3798
-gerrit
commit 47c3f201fc4c23c4f5720bdae8cdb1a47fc0a6ed
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Mon Jul 22 14:41:57 2013 -0500
EPIA-M850: Fix decoding of SMBus IO BAR to prevent 'nil' error
The filter seems to have been using an obsolete form, thus causing a 'nil'
error when SerialICE tried to run it. Fix this error.
Change-Id: Ib650e9bd1661574a1f7987803cfc131c12035a5d
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
SerialICE/simba/mainboard/via_epia_m_850.lua | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/SerialICE/simba/mainboard/via_epia_m_850.lua b/SerialICE/simba/mainboard/via_epia_m_850.lua
index 8f10ba3..aa5ebb3 100644
--- a/SerialICE/simba/mainboard/via_epia_m_850.lua
+++ b/SerialICE/simba/mainboard/via_epia_m_850.lua
@@ -111,8 +111,9 @@ filter_mainboard = {
load_filter("intel_smbus")
load_filter("via_bars")
-function smbus_bar_hook(dev, reg, base)
- intel_smbus_setup(base, 0x20)
+function smbus_bar_hook(f, action)
+ local base = bit32.band(action.data, 0xfff0)
+ intel_smbus_setup(base, 0x10)
end
dev_sb_lpc = {
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3797
-gerrit
commit 9baee690a83a5e6220cea9fb855bb632bcf3c9a6
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Mon Jul 22 14:06:12 2013 -0500
EPIA-M850: Fix decoding of ACPI IO BAR to prevent 'nil' error
When SerialICE got to the ACPI IO filter, it complained about a 'nil' value
and died. Make this filter work again.
Change-Id: Id8ff78e2f94d3f4d55d00824a8eb2e5ccecd23f4
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
SerialICE/simba/mainboard/via_epia_m_850.lua | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/SerialICE/simba/mainboard/via_epia_m_850.lua b/SerialICE/simba/mainboard/via_epia_m_850.lua
index f791e54..8f10ba3 100644
--- a/SerialICE/simba/mainboard/via_epia_m_850.lua
+++ b/SerialICE/simba/mainboard/via_epia_m_850.lua
@@ -129,11 +129,11 @@ dev_power = {
tco = { f = nil },
}
-function pm_io_bar(dev, reg, base)
- dev.acpi.name = "ACPI"
- dev.acpi.base = base
- dev.acpi.size = 0x60
- generic_io_bar(dev.acpi)
+function pm_io_bar(f, action)
+ f.dev.acpi.name = "ACPI"
+ f.dev.acpi.val = bit32.band(action.data, 0xff80)
+ f.dev.acpi.size = 0x80
+ generic_io_bar(f.dev.acpi)
end
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3797
-gerrit
commit ab3052fa00e89b359b0c80fee49a0ba71f70b297
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Mon Jul 22 14:06:12 2013 -0500
NOTFORMERGE: EPIA-M850: Fix decoding of ACPI IO BAR
When SerialICE got to the ACPI IO filter, it complained about a 'nil' value
and died. Make this filter work again.
Change-Id: Id8ff78e2f94d3f4d55d00824a8eb2e5ccecd23f4
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
SerialICE/simba/mainboard/via_epia_m_850.lua | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/SerialICE/simba/mainboard/via_epia_m_850.lua b/SerialICE/simba/mainboard/via_epia_m_850.lua
index f791e54..7d1743c 100644
--- a/SerialICE/simba/mainboard/via_epia_m_850.lua
+++ b/SerialICE/simba/mainboard/via_epia_m_850.lua
@@ -129,11 +129,11 @@ dev_power = {
tco = { f = nil },
}
-function pm_io_bar(dev, reg, base)
- dev.acpi.name = "ACPI"
- dev.acpi.base = base
- dev.acpi.size = 0x60
- generic_io_bar(dev.acpi)
+function pm_io_bar(f, action)
+ f.dev.acpi.name = "ACPI"
+ f.dev.acpi.base = bit32.band(action.data, 0xff80)
+ f.dev.acpi.size = 0x60
+ generic_io_bar(f.dev.acpi)
end