[Voyageurs] Send AddressDevice Command to move port to 'Addressed' State.
This commit is contained in:
parent
dd2687a59a
commit
8e78950ac7
10 changed files with 236 additions and 33 deletions
|
|
@ -20,6 +20,15 @@ TrbRing::TrbRing() {
|
|||
trb_list_[trb_list_.size() - 1] = CreateLinkTrb(phys_address_);
|
||||
}
|
||||
|
||||
XhciTrb TrbRing::GetTrbFromPhysical(uint64_t address) {
|
||||
uint64_t offset = address - phys_address_;
|
||||
if (offset >= 0x1000) {
|
||||
crash("Invalid offset in GetTrbFromPhysical", glcr::INVALID_ARGUMENT);
|
||||
}
|
||||
offset /= sizeof(XhciTrb);
|
||||
return trb_list_[offset];
|
||||
}
|
||||
|
||||
void TrbRingWriter::EnqueueTrb(const XhciTrb& trb) {
|
||||
uint64_t ptr = enqueue_ptr_++;
|
||||
if (enqueue_ptr_ == trb_list_.size()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue