summaryrefslogtreecommitdiff
path: root/src/mainboard/amd/serengeti_leopard/mptable.c
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@openbios.org>2005-12-04 21:52:58 +0000
committerStefan Reinauer <stepan@openbios.org>2005-12-04 21:52:58 +0000
commitbbdd8f4a9f206ca40dea2b15d9458ac048de6c64 (patch)
treeb384ee864e61387679ce31c484090d641d225e30 /src/mainboard/amd/serengeti_leopard/mptable.c
parente38a19372009f39a8814cdee05faf0251640489c (diff)
1203_hcdn.diff:
store every HT device unit id base and pass those info to acpi https://openbios.org/roundup/linuxbios/issue46 Note: This version drops the two scripts a and c and creates the dsdt on the fly from Config.lb using makerule git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2134 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/amd/serengeti_leopard/mptable.c')
-rw-r--r--src/mainboard/amd/serengeti_leopard/mptable.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mainboard/amd/serengeti_leopard/mptable.c b/src/mainboard/amd/serengeti_leopard/mptable.c
index cb8c3d7e98..e210d8b683 100644
--- a/src/mainboard/amd/serengeti_leopard/mptable.c
+++ b/src/mainboard/amd/serengeti_leopard/mptable.c
@@ -19,13 +19,16 @@ extern unsigned apicid_8111;
extern unsigned apicid_8132_1;
extern unsigned apicid_8132_2;
+extern unsigned sbdn;
+extern unsigned hcdn[];
+
extern void get_bus_conf(void);
void *smp_write_config_table(void *v)
{
static const char sig[4] = "PCMP";
static const char oem[8] = "AMD ";
- static const char productid[12] = "SERENGETI_LE";
+ static const char productid[12] = "SERENGETI ";
struct mp_config_table *mc;
unsigned char bus_num;
@@ -63,14 +66,14 @@ void *smp_write_config_table(void *v)
{
device_t dev;
struct resource *res;
- dev = dev_find_slot(bus_8132_0, PCI_DEVFN(0x1 + HT_CHAIN_UNITID_BASE - 1, 1));
+ dev = dev_find_slot(bus_8132_0, PCI_DEVFN((hcdn[0]&0xff), 1));
if (dev) {
res = find_resource(dev, PCI_BASE_ADDRESS_0);
if (res) {
smp_write_ioapic(mc, apicid_8132_1, 0x11, res->base);
}
}
- dev = dev_find_slot(bus_8132_0, PCI_DEVFN(0x2 + HT_CHAIN_UNITID_BASE - 1, 1));
+ dev = dev_find_slot(bus_8132_0, PCI_DEVFN((hcdn[0]&0xff)+1, 1));
if (dev) {
res = find_resource(dev, PCI_BASE_ADDRESS_0);
if (res) {
@@ -95,11 +98,8 @@ void *smp_write_config_table(void *v)
smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, bus_isa, 0xe, apicid_8111, 0xe);
smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH, bus_isa, 0xf, apicid_8111, 0xf);
//??? What
-#if HT_CHAIN_END_UNITID_BASE < HT_CHAIN_UNITID_BASE
- smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_LEVEL|MP_IRQ_POLARITY_LOW, bus_8111_0, ((2+HT_CHAIN_END_UNITID_BASE-1)<<2)|3, apicid_8111, 0x13);
-#else
- smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_LEVEL|MP_IRQ_POLARITY_LOW, bus_8111_0, ((4+HT_CHAIN_UNITID_BASE-1)<<2)|3, apicid_8111, 0x13);
-#endif
+ smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_LEVEL|MP_IRQ_POLARITY_LOW, bus_8111_0, ((sbdn+1)<<2)|3, apicid_8111, 0x13);
+
// Onboard AMD USB
smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_LEVEL|MP_IRQ_POLARITY_LOW, bus_8111_1, (0<<2)|3, apicid_8111, 0x13);