| Zeile 1: | Zeile 1: | ||
{{Stub}} | {{Stub}} | ||
{{TODO| | {{TODO| | ||
| − | *Die Liste der Register vervollständigen (Spezifikation: Seite | + | *Die Liste der Register vervollständigen (Spezifikation: Seite 137ff) |
| − | * | + | *Isochronous Transfers (Spezifikation: Seite 39ff und 48ff) |
| − | |||
*Initialisierung des HCs | *Initialisierung des HCs | ||
}} | }} | ||
| + | |||
Das OHCI ist neben dem UHCI ein Interface für USB-1.x- und Firewire-Hostcontroller (HC). Zum Verständnis dieses Artikels ist die Kenntnis des [[USB]]-Protoklls Vorraussetzung. | Das OHCI ist neben dem UHCI ein Interface für USB-1.x- und Firewire-Hostcontroller (HC). Zum Verständnis dieses Artikels ist die Kenntnis des [[USB]]-Protoklls Vorraussetzung. | ||
== Kommunikation mit dem HC == | == Kommunikation mit dem HC == | ||
Die Kommunikation mit dem HC erfolgt über zwei Wege, zum einen über in den Arbeitsspeicher eingeblendete Register, zum anderen über einen gemeinsamen Speicherbereich im Arbeitsspeicher. Dieser Speicherbereich enthält zum einen die sogenannte Host Controller Communications Area (HCCA) und zum anderen verkettete Listen, die die Abfolge der zu erledigenden Transfers enthalten. | Die Kommunikation mit dem HC erfolgt über zwei Wege, zum einen über in den Arbeitsspeicher eingeblendete Register, zum anderen über einen gemeinsamen Speicherbereich im Arbeitsspeicher. Dieser Speicherbereich enthält zum einen die sogenannte Host Controller Communications Area (HCCA) und zum anderen verkettete Listen, die die Abfolge der zu erledigenden Transfers enthalten. | ||
| + | '''Hinweis:''' Bei allen Angaben von Speicheradressen sind die ''physikalischen'' Adressen zu übergeben! | ||
=== Register === | === Register === | ||
| Zeile 15: | Zeile 16: | ||
Die angesprochenen Register sind alle 32 Bit breit (Offset in Klammern) | Die angesprochenen Register sind alle 32 Bit breit (Offset in Klammern) | ||
| + | ==== Status-Register ==== | ||
*'''HcRevision''' (0x00) | *'''HcRevision''' (0x00) | ||
{| {{prettytable}} | {| {{prettytable}} | ||
| Zeile 49: | Zeile 51: | ||
*'''HcCommandStatus''' (0x08) | *'''HcCommandStatus''' (0x08) | ||
| + | {| {{prettytable}} | ||
| + | |- align="center" | ||
| + | ! Bit || style="padding:1px 5px;"|31 || style="padding:1px 5px;"|30 || style="padding:1px 5px;"|29 || style="padding:1px 5px;"|28 || style="padding:1px 5px;"|27 || style="padding:1px 5px;"|26 || style="padding:1px 5px;"|25 || style="padding:1px 5px;"|24 || style="padding:1px 5px;"|23 || style="padding:1px 5px;"|22 || style="padding:1px 5px;"|21 || style="padding:1px 5px;"|20 || style="padding:1px 5px;"|19 || style="padding:1px 5px;"|18 || style="padding:1px 5px;"|17 || style="padding:1px 5px;"|16 || style="padding:1px 5px;"|15 || style="padding:1px 5px;"|14 || style="padding:1px 5px;"|13 || style="padding:1px 5px;"|12 || style="padding:1px 5px;"|11 || style="padding:1px 5px;"|10 || style="padding:1px 5px;"|9 || style="padding:1px 5px;"|8 || style="padding:1px 5px;"|7 || style="padding:1px 5px;"|6 || style="padding:1px 5px;"|5 || style="padding:1px 5px;"|4 || style="padding:1px 5px;"|3 || style="padding:1px 5px;"|2 || style="padding:1px 5px;"|1 || style="padding:1px 5px;"|0 | ||
| + | |- align="center" | ||
| + | |Bedeutung || colspan="14" | ''reserviert'' || colspan="2" | SOC || colspan="12" | ''reserviert'' || OCR || BLF || CLF || HCR | ||
| + | |} | ||
| + | |||
| + | '''HCR''' (HostControllerReset): Beim Setzen dieses Bits führt der HC einen Reset durch. Nach Beendigung, die nicht länger als 10µs andauern darf, löscht der HC dieses Bit. | ||
| + | |||
| + | '''CLF''' (ControlListFilled): Immer wenn ein neuer TD in die Liste der Control-Transfers eingefügt wird, muss dieses Bit gesetzt werden. Andernfalls arbeitet der HC die Liste nicht weiter ab. | ||
| + | |||
| + | '''BLF''' (BulkListFilled): Immer wenn ein neuer TD in die Liste der Bulk-Transfers eingefügt wird, muss dieses Bit gesetzt werden. Andernfalls arbeitet der HC die Liste nicht weiter ab. | ||
| + | |||
| + | '''OCR''' (OwnershipChangeRequest): Aus Kompatibilitätsgründen wird der HC vom [[BIOS]] so initialisiert, dass er vom [[SMI]] gesteuert wird. Wenn das Betriebssystem nun die Steuerung des HC übernehmen will, dann setzt es dieses Bit. Wenn der HC die Kontrolle vom SMI auf das Betriebssystem übergeben hat, löscht er dieses Bit wieder. | ||
| + | |||
| + | '''SOC''' (SchedulingOverrunCount): Wird bei Fehlern inkrementiert. | ||
| + | |||
*'''HcInterruptStatus''' (0x0C) | *'''HcInterruptStatus''' (0x0C) | ||
| − | *'''HcInterruptEnable''' (0x10) | + | {| {{prettytable}} |
| − | + | |- align="center" | |
| + | ! Bit || style="padding:1px 5px;"|31 || style="padding:1px 5px;"|30 || style="padding:1px 5px;"|29 || style="padding:1px 5px;"|28 || style="padding:1px 5px;"|27 || style="padding:1px 5px;"|26 || style="padding:1px 5px;"|25 || style="padding:1px 5px;"|24 || style="padding:1px 5px;"|23 || style="padding:1px 5px;"|22 || style="padding:1px 5px;"|21 || style="padding:1px 5px;"|20 || style="padding:1px 5px;"|19 || style="padding:1px 5px;"|18 || style="padding:1px 5px;"|17 || style="padding:1px 5px;"|16 || style="padding:1px 5px;"|15 || style="padding:1px 5px;"|14 || style="padding:1px 5px;"|13 || style="padding:1px 5px;"|12 || style="padding:1px 5px;"|11 || style="padding:1px 5px;"|10 || style="padding:1px 5px;"|9 || style="padding:1px 5px;"|8 || style="padding:1px 5px;"|7 || style="padding:1px 5px;"|6 || style="padding:1px 5px;"|5 || style="padding:1px 5px;"|4 || style="padding:1px 5px;"|3 || style="padding:1px 5px;"|2 || style="padding:1px 5px;"|1 || style="padding:1px 5px;"|0 | ||
| + | |- align="center" | ||
| + | |Bedeutung || 0 || OC || colspan="23" | ''reserviert'' || RHSC || FNO || UE || RD || SF || WDH || SO | ||
| + | |} | ||
| + | |||
| + | '''SO''' (SchedulingOverrun): Wird gesetzt, wenn ein Fehler auftritt. | ||
| + | |||
| + | '''WDH''' (WritebackDoneHead): Ist dieses Bit gelöscht, dann übernimmt der HC den Wert von HcDoneHead in HccaDoneHead. | ||
| + | |||
| + | '''SF''' (StartofFrame): Wird vom HC beim Anfang eines neuen Frames gesetzt. | ||
| + | |||
| + | '''RD''' (ResumeDetected): Wird vom HC gesetzt, wenn ein Gerät den Zustand USBResume verlangt. | ||
| + | |||
| + | '''UE''' (UnrecoverableError): Wenn der HC dieses Bit setzt, dann ist ein nicht behebbarer Fehler aufgetreten, der nur noch durch einen Reset des HCs aufgelöst werden kann. | ||
| + | |||
| + | '''FNO''' (FrameNumberOverflow): Wenn Bit 15 von HcFmNumber seinen Wert ändert, wird dieses Bit vom HC gesetzt. | ||
| + | |||
| + | '''RHSC''' (RootHubStatusChange): Wird vom HC gesetzt, wenn HcRhStatus oder HcRhPortStatus[] seinen Wert ändert. | ||
| + | |||
| + | '''OC''' (OwnershipChange): Wird gesetzt, wenn ein OwnerchipChange durchgeführt wurde (->HcConnandStatus, OCR) | ||
| + | |||
| + | *'''HcInterruptEnable''' (0x10) und '''HcInterruptDisable''' (0x14) | ||
| + | Diese Register dienen dem Aktivieren bzw. Deaktiviern von Interrupts beim Ändern von Bits durch den HC in HcInterruptStauts. Das Schreiben einer 1 in eines der Register setzt das entsprechende Bit im Register und löscht es im anderen. Das Schreiben einer 0 ändert nichts. | ||
| + | |||
| + | {| {{prettytable}} | ||
| + | |- align="center" | ||
| + | ! Bit || style="padding:1px 5px;"|31 || style="padding:1px 5px;"|30 || style="padding:1px 5px;"|29 || style="padding:1px 5px;"|28 || style="padding:1px 5px;"|27 || style="padding:1px 5px;"|26 || style="padding:1px 5px;"|25 || style="padding:1px 5px;"|24 || style="padding:1px 5px;"|23 || style="padding:1px 5px;"|22 || style="padding:1px 5px;"|21 || style="padding:1px 5px;"|20 || style="padding:1px 5px;"|19 || style="padding:1px 5px;"|18 || style="padding:1px 5px;"|17 || style="padding:1px 5px;"|16 || style="padding:1px 5px;"|15 || style="padding:1px 5px;"|14 || style="padding:1px 5px;"|13 || style="padding:1px 5px;"|12 || style="padding:1px 5px;"|11 || style="padding:1px 5px;"|10 || style="padding:1px 5px;"|9 || style="padding:1px 5px;"|8 || style="padding:1px 5px;"|7 || style="padding:1px 5px;"|6 || style="padding:1px 5px;"|5 || style="padding:1px 5px;"|4 || style="padding:1px 5px;"|3 || style="padding:1px 5px;"|2 || style="padding:1px 5px;"|1 || style="padding:1px 5px;"|0 | ||
| + | |- align="center" | ||
| + | |Bedeutung || MIE/MID || OC || colspan="23" | ''reserviert || RHSC || FNO || UE || RD || SF || WDH || SO | ||
| + | |} | ||
| + | |||
| + | '''MIE/MID''' (MasterInterruptEnable/MasterInterruptDisable): Aktiviert/Deaktiviert alle Interrupts. | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ==== Zeiger-Register ==== | ||
*'''HcHCCA''' (0x18) | *'''HcHCCA''' (0x18) | ||
| + | Enthält die Adresse der HCCA, die an einer 256 Byte Grenze ausgerichtet sein muss. | ||
| + | |||
*'''HcPeriodCurrentED''' (0x1C) | *'''HcPeriodCurrentED''' (0x1C) | ||
| − | *'''HcControlHeadED''' (0x20) | + | Zeiger auf den aktuellen ED der periodischen Transfers |
| − | + | ||
| − | *'''HcBulkHeadED''' (0x28) | + | *'''HcControlHeadED''' (0x20) und '''HcControlCurrentED''' (0x24) |
| − | + | Zeiger auf den ersten bzw. aktuellen ED der Transfers in der Liste der Control-Transfers | |
| + | |||
| + | *'''HcBulkHeadED''' (0x28) und '''HcBulkCurrentED''' (0x2C) | ||
| + | Zeiger auf den ersten bzw. aktuellen ED der Transfers in der Liste der Bulk-Transfers | ||
| + | |||
*'''HcDoneHead''' (0x30) | *'''HcDoneHead''' (0x30) | ||
| + | Wenn der HC einen TD abgearbeitet hat, dann hängt er ihn an die Done-Liste an und schreibt dessen Adresse in der Liste in dieses Reigster. Wenn das WDH-Bit in HcInterruptStatus gelöscht ist, dann schreibt der HC diesen Wert in HccaDoneHead und setzt das WDH-Bit. Daher sollte das Betriebssystem diesen Wert nur aus HccaDoneHead lesen und dann das WDH-Bit löschen. | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ==== Frame Register ==== | ||
*'''HcFmInterval''' (0x34) | *'''HcFmInterval''' (0x34) | ||
| + | {| {{prettytable}} | ||
| + | |- align="center" | ||
| + | ! Bit || style="padding:1px 5px;"|31 || style="padding:1px 5px;"|30 || style="padding:1px 5px;"|29 || style="padding:1px 5px;"|28 || style="padding:1px 5px;"|27 || style="padding:1px 5px;"|26 || style="padding:1px 5px;"|25 || style="padding:1px 5px;"|24 || style="padding:1px 5px;"|23 || style="padding:1px 5px;"|22 || style="padding:1px 5px;"|21 || style="padding:1px 5px;"|20 || style="padding:1px 5px;"|19 || style="padding:1px 5px;"|18 || style="padding:1px 5px;"|17 || style="padding:1px 5px;"|16 || style="padding:1px 5px;"|15 || style="padding:1px 5px;"|14 || style="padding:1px 5px;"|13 || style="padding:1px 5px;"|12 || style="padding:1px 5px;"|11 || style="padding:1px 5px;"|10 || style="padding:1px 5px;"|9 || style="padding:1px 5px;"|8 || style="padding:1px 5px;"|7 || style="padding:1px 5px;"|6 || style="padding:1px 5px;"|5 || style="padding:1px 5px;"|4 || style="padding:1px 5px;"|3 || style="padding:1px 5px;"|2 || style="padding:1px 5px;"|1 || style="padding:1px 5px;"|0 | ||
| + | |- align="center" | ||
| + | |Bedeutung || FIT || colspan="16" | FSMPS || colspan="2" | ''reserviert'' || colspan="14" | FI | ||
| + | |} | ||
| + | |||
| + | '''FIT''' (FrameIntervalToggle): Muss gesetzt werden, wenn in FI ein neuer Wert geschrieben wird. | ||
| + | |||
| + | '''FSMPS''' (FSLargestDataPacket): Maximale Anzahl von Bits, die in einem Packet gesendet werden können. | ||
| + | |||
| + | '''FI''' (FrameInterval): Länge eines Frames in Bits (Standart ist 11,999). | ||
| + | |||
*'''HcFmRemaining''' (0x38) | *'''HcFmRemaining''' (0x38) | ||
| + | {| {{prettytable}} | ||
| + | |- align="center" | ||
| + | ! Bit || style="padding:1px 5px;"|31 || style="padding:1px 5px;"|30 || style="padding:1px 5px;"|29 || style="padding:1px 5px;"|28 || style="padding:1px 5px;"|27 || style="padding:1px 5px;"|26 || style="padding:1px 5px;"|25 || style="padding:1px 5px;"|24 || style="padding:1px 5px;"|23 || style="padding:1px 5px;"|22 || style="padding:1px 5px;"|21 || style="padding:1px 5px;"|20 || style="padding:1px 5px;"|19 || style="padding:1px 5px;"|18 || style="padding:1px 5px;"|17 || style="padding:1px 5px;"|16 || style="padding:1px 5px;"|15 || style="padding:1px 5px;"|14 || style="padding:1px 5px;"|13 || style="padding:1px 5px;"|12 || style="padding:1px 5px;"|11 || style="padding:1px 5px;"|10 || style="padding:1px 5px;"|9 || style="padding:1px 5px;"|8 || style="padding:1px 5px;"|7 || style="padding:1px 5px;"|6 || style="padding:1px 5px;"|5 || style="padding:1px 5px;"|4 || style="padding:1px 5px;"|3 || style="padding:1px 5px;"|2 || style="padding:1px 5px;"|1 || style="padding:1px 5px;"|0 | ||
| + | |- align="center" | ||
| + | |Bedeutung || FRT || colspan="17" | ''reserviert'' || colspan="14" | FR | ||
| + | |} | ||
| + | |||
| + | '''FR''' (FrameRemaining): Anzahl der Bits, die in diesem Frame noch übertragen werden. | ||
| + | |||
| + | '''FRT''' (FrameRemainingToggle): Dient dem HC zur Synchronisation zwischen FrameRemaining und FrameInterval. | ||
| + | |||
*'''HcFmNumber''' (0x3C) | *'''HcFmNumber''' (0x3C) | ||
| + | {| {{prettytable}} | ||
| + | |- align="center" | ||
| + | ! Bit || style="padding:1px 5px;"|31 || style="padding:1px 5px;"|30 || style="padding:1px 5px;"|29 || style="padding:1px 5px;"|28 || style="padding:1px 5px;"|27 || style="padding:1px 5px;"|26 || style="padding:1px 5px;"|25 || style="padding:1px 5px;"|24 || style="padding:1px 5px;"|23 || style="padding:1px 5px;"|22 || style="padding:1px 5px;"|21 || style="padding:1px 5px;"|20 || style="padding:1px 5px;"|19 || style="padding:1px 5px;"|18 || style="padding:1px 5px;"|17 || style="padding:1px 5px;"|16 || style="padding:1px 5px;"|15 || style="padding:1px 5px;"|14 || style="padding:1px 5px;"|13 || style="padding:1px 5px;"|12 || style="padding:1px 5px;"|11 || style="padding:1px 5px;"|10 || style="padding:1px 5px;"|9 || style="padding:1px 5px;"|8 || style="padding:1px 5px;"|7 || style="padding:1px 5px;"|6 || style="padding:1px 5px;"|5 || style="padding:1px 5px;"|4 || style="padding:1px 5px;"|3 || style="padding:1px 5px;"|2 || style="padding:1px 5px;"|1 || style="padding:1px 5px;"|0 | ||
| + | |- align="center" | ||
| + | |Bedeutung || colspan="16" | ''reserviert'' || colspan="16" | FN | ||
| + | |} | ||
| + | |||
| + | '''FN''' (FrameNumber): Wird bei jedem neuen Frame inkrementiert und in HccaFrameNumber geschrieben. Nach dem Wert 0xFFFF gibt es einen Wraparound zum Wert 0x00. | ||
| + | |||
*'''HcPeriodicStart''' (0x40) | *'''HcPeriodicStart''' (0x40) | ||
| + | {| {{prettytable}} | ||
| + | |- align="center" | ||
| + | ! Bit || style="padding:1px 5px;"|31 || style="padding:1px 5px;"|30 || style="padding:1px 5px;"|29 || style="padding:1px 5px;"|28 || style="padding:1px 5px;"|27 || style="padding:1px 5px;"|26 || style="padding:1px 5px;"|25 || style="padding:1px 5px;"|24 || style="padding:1px 5px;"|23 || style="padding:1px 5px;"|22 || style="padding:1px 5px;"|21 || style="padding:1px 5px;"|20 || style="padding:1px 5px;"|19 || style="padding:1px 5px;"|18 || style="padding:1px 5px;"|17 || style="padding:1px 5px;"|16 || style="padding:1px 5px;"|15 || style="padding:1px 5px;"|14 || style="padding:1px 5px;"|13 || style="padding:1px 5px;"|12 || style="padding:1px 5px;"|11 || style="padding:1px 5px;"|10 || style="padding:1px 5px;"|9 || style="padding:1px 5px;"|8 || style="padding:1px 5px;"|7 || style="padding:1px 5px;"|6 || style="padding:1px 5px;"|5 || style="padding:1px 5px;"|4 || style="padding:1px 5px;"|3 || style="padding:1px 5px;"|2 || style="padding:1px 5px;"|1 || style="padding:1px 5px;"|0 | ||
| + | |- align="center" | ||
| + | |Bedeutung || colspan="18" | ''reserviert'' || colspan="14" | PS | ||
| + | |} | ||
| + | |||
| + | '''PS''' (PeriodicStart): Anzahl der Bits, die in einem Frame übertragen werden müssen, bis der HC Periodische Transfers ausführt. | ||
| + | |||
*'''HcLSThreshold''' (0x44) | *'''HcLSThreshold''' (0x44) | ||
| + | {| {{prettytable}} | ||
| + | |- align="center" | ||
| + | ! Bit || style="padding:1px 5px;"|31 || style="padding:1px 5px;"|30 || style="padding:1px 5px;"|29 || style="padding:1px 5px;"|28 || style="padding:1px 5px;"|27 || style="padding:1px 5px;"|26 || style="padding:1px 5px;"|25 || style="padding:1px 5px;"|24 || style="padding:1px 5px;"|23 || style="padding:1px 5px;"|22 || style="padding:1px 5px;"|21 || style="padding:1px 5px;"|20 || style="padding:1px 5px;"|19 || style="padding:1px 5px;"|18 || style="padding:1px 5px;"|17 || style="padding:1px 5px;"|16 || style="padding:1px 5px;"|15 || style="padding:1px 5px;"|14 || style="padding:1px 5px;"|13 || style="padding:1px 5px;"|12 || style="padding:1px 5px;"|11 || style="padding:1px 5px;"|10 || style="padding:1px 5px;"|9 || style="padding:1px 5px;"|8 || style="padding:1px 5px;"|7 || style="padding:1px 5px;"|6 || style="padding:1px 5px;"|5 || style="padding:1px 5px;"|4 || style="padding:1px 5px;"|3 || style="padding:1px 5px;"|2 || style="padding:1px 5px;"|1 || style="padding:1px 5px;"|0 | ||
| + | |- align="center" | ||
| + | |Bedeutung || colspan="20" | ''reserviert'' || colspan="12" | LST | ||
| + | |} | ||
| + | |||
| + | '''LST''' (LSThreshold): Anzahl der Bits, die in einem Frame mindestens noch übertragen werden, damit der HC noch einen LowSpeed-Transfer durchführt. Dieser Wert darf nur gelesen werden! | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ==== Root-Hub-Register ==== | ||
*'''HcRhDescriptorA''' (0x48) | *'''HcRhDescriptorA''' (0x48) | ||
*'''HcRhDescriptorB''' (0x4C) | *'''HcRhDescriptorB''' (0x4C) | ||
| Zeile 80: | Zeile 200: | ||
| 0x82 || 2 || HccaPad1 || - || x || Der HC setzt dieses Feld auf Null, wenn er HccaFrameNumber ändert. | | 0x82 || 2 || HccaPad1 || - || x || Der HC setzt dieses Feld auf Null, wenn er HccaFrameNumber ändert. | ||
|- | |- | ||
| − | | 0x84 || 4 || HccaDoneHead || - || x || | + | | 0x84 || 4 || HccaDoneHead || - || x || Zeiger auf den ersten TD in der Done-Liste |
|- | |- | ||
| 0x88 || 116 || ''reserviert''|| x || x || | | 0x88 || 116 || ''reserviert''|| x || x || | ||
| Zeile 92: | Zeile 212: | ||
*Interrupt Transfer: Periodischer Transfer mit gernigen Datenmengen, die in regelmäßigen Abständen beim USB-Gerät abgefragt werden | *Interrupt Transfer: Periodischer Transfer mit gernigen Datenmengen, die in regelmäßigen Abständen beim USB-Gerät abgefragt werden | ||
*Isochronous Transfers: Periodischer Transfer zur (meist verlustbehafteten) Übertragung von großen Datenmengen | *Isochronous Transfers: Periodischer Transfer zur (meist verlustbehafteten) Übertragung von großen Datenmengen | ||
| + | |||
| + | === Einteilung der Frames === | ||
| + | Der HC teilt die einzelnen Frames in drei Abschnitte ein, in denen er die unterschiedlichen Transferlisten abarbeitet. Die Länge dieser Abschnitte wird über die Register HcPeriodicStart und das Feld ControlBulkServiceRatio (CBSR) in HcControl beeinflusst: | ||
| + | |||
| + | * Vorm ersten Abschnitt sendet der HC ein StartOfFrame-Signal (SOF). | ||
| + | * Im ersten Abschnitt werden die nicht periodischen Transfers abgearbeitet. Wieviele Bulk- und Control-Transfers dies sind, wird mit dem CBSR-Feld beeinflusst. | ||
| + | * Wenn mehr Bits gesendet wurden, als in HcPeriodicStart vorgegeben sind, dann beginnt Abschnitt 2, in dem die periodischen Transfers abgearbeitet werden. | ||
| + | * Im dritten Abschnitt werden die verbleibenden Bits im Frame wieder mit nicht-periodischen Transfers gefüllt. | ||
=== Organisation von Transfers === | === Organisation von Transfers === | ||
| + | |||
==== Organisation von nicht-periodischen Transfers ==== | ==== Organisation von nicht-periodischen Transfers ==== | ||
Die Organisation der Datentransfers erfolgt über zwei Datenstrukturen, die über einfach verkettete Listen miteinander verknüpft sind. Die Datenstrukturen sind zum einen der Endpoint Descriptor (ED) und zum anderen der Transfer Descriptor (TD). Die EDs beschreiben genau einen Endpunkt einer Funktion (d.h. eines USB-Geräts). Die TDs beschreiben einen Transfer, der einem Endpunkt zugeordnet wird. Die EDs sind in einfach verketteten Listen organisiert. Von diesen Listen gibt es zwei für die nicht-periodischen, d.h. Bulk und Control Transfers. Die Zeiger auf die Anfänge dieser Listen sind in den Registern HcBulkHeadED sowie HcControlHeadED gespeichert. Jeder ED enthält wiederum einen Zeiger auf den Kopf einer verketteten Liste von TDs, die für diesen Endpunkt ausgeführt werden sollen. | Die Organisation der Datentransfers erfolgt über zwei Datenstrukturen, die über einfach verkettete Listen miteinander verknüpft sind. Die Datenstrukturen sind zum einen der Endpoint Descriptor (ED) und zum anderen der Transfer Descriptor (TD). Die EDs beschreiben genau einen Endpunkt einer Funktion (d.h. eines USB-Geräts). Die TDs beschreiben einen Transfer, der einem Endpunkt zugeordnet wird. Die EDs sind in einfach verketteten Listen organisiert. Von diesen Listen gibt es zwei für die nicht-periodischen, d.h. Bulk und Control Transfers. Die Zeiger auf die Anfänge dieser Listen sind in den Registern HcBulkHeadED sowie HcControlHeadED gespeichert. Jeder ED enthält wiederum einen Zeiger auf den Kopf einer verketteten Liste von TDs, die für diesen Endpunkt ausgeführt werden sollen. | ||
| Zeile 105: | Zeile 234: | ||
==== Organisation von Interrupt Transfers ==== | ==== Organisation von Interrupt Transfers ==== | ||
| + | Die Organisation von Interrupt Transfers funktioniert über 32 Interrupt-Transfer-Listen, die verkettete Listen von Interrupt EDs sind. Die Zeiger auf diese Listen liegen in der HCCA an Offset 0x00. In jedem Frame wird eine Interrupt-Transfer-Liste abgearbeitet. Dafür verwendet der HC den Zeiger aus der HccaInterrruptTable, dessen Index den unteren 5 Bits aus HccaFrameNumber besteht. Ein ED kann in mehreren Interrupt-Transfer-Listen auftachen, wodurch er entsprechend öfter abgearbeitet wird. | ||
==== Organisation von Isochronous Transfers ==== | ==== Organisation von Isochronous Transfers ==== | ||