summaryrefslogtreecommitdiff
path: root/src/devices/hypertransport.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/devices/hypertransport.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/devices/hypertransport.c')
-rw-r--r--src/devices/hypertransport.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/devices/hypertransport.c b/src/devices/hypertransport.c
index fd347083df..10d4420fee 100644
--- a/src/devices/hypertransport.c
+++ b/src/devices/hypertransport.c
@@ -336,7 +336,7 @@ static void ht_collapse_early_enumeration(struct bus *bus, unsigned offset_uniti
}
unsigned int hypertransport_scan_chain(struct bus *bus,
- unsigned min_devfn, unsigned max_devfn, unsigned int max, unsigned offset_unitid)
+ unsigned min_devfn, unsigned max_devfn, unsigned int max, unsigned *ht_unitid_base, unsigned offset_unitid)
{
//even HT_CHAIN_UNITID_BASE == 0, we still can go through this function, because of end_of_chain check, also We need it to optimize link
unsigned next_unitid, last_unitid;
@@ -344,13 +344,13 @@ unsigned int hypertransport_scan_chain(struct bus *bus,
unsigned min_unitid = (offset_unitid) ? HT_CHAIN_UNITID_BASE:1;
struct ht_link prev;
device_t last_func = 0;
+ int ht_dev_num = 0;
#if HT_CHAIN_END_UNITID_BASE < HT_CHAIN_UNITID_BASE
//let't record the device of last ht device, So we can set the Unitid to HT_CHAIN_END_UNITID_BASE
unsigned real_last_unitid;
uint8_t real_last_pos;
device_t real_last_dev;
- int ht_dev_num = 0;
#endif
/* Restore the hypertransport chain to it's unitialized state */
@@ -454,12 +454,13 @@ unsigned int hypertransport_scan_chain(struct bus *bus,
}
/* Update the Unitid of the next device */
+ ht_unitid_base[ht_dev_num] = next_unitid;
+ ht_dev_num++;
#if HT_CHAIN_END_UNITID_BASE < HT_CHAIN_UNITID_BASE
if(offset_unitid) {
real_last_unitid = next_unitid;
real_last_pos = pos;
real_last_dev = dev;
- ht_dev_num++;
}
#endif
next_unitid += count;
@@ -503,7 +504,9 @@ unsigned int hypertransport_scan_chain(struct bus *bus,
func->path.u.pci.devfn -= ((real_last_unitid - HT_CHAIN_END_UNITID_BASE) << 3);
last_func = func;
}
-
+
+ ht_unitid_base[ht_dev_num-1] = HT_CHAIN_END_UNITID_BASE; // update last one
+
next_unitid = real_last_unitid;
}
#endif