mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:27:35 +00:00
Everywhere: Hook up remaining debug macros to Debug.h.
This commit is contained in:
parent
da69de1f1b
commit
eea72b9b5c
63 changed files with 458 additions and 287 deletions
|
@ -25,6 +25,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <Kernel/Devices/USB/UHCIController.h>
|
||||
#include <Kernel/Process.h>
|
||||
#include <Kernel/StdLib.h>
|
||||
|
@ -194,7 +195,7 @@ void UHCIController::create_structures()
|
|||
transfer_descriptor->set_isochronous();
|
||||
transfer_descriptor->link_queue_head(m_interrupt_transfer_queue->paddr());
|
||||
|
||||
#ifdef UHCI_VERBOSE_DEBUG
|
||||
#if UHCI_VERBOSE_DEBUG
|
||||
transfer_descriptor->print();
|
||||
#endif
|
||||
}
|
||||
|
@ -212,13 +213,13 @@ void UHCIController::create_structures()
|
|||
// access the raw descriptor (that we later send to the controller)
|
||||
m_free_td_pool.at(i) = new (placement_addr) Kernel::USB::TransferDescriptor(paddr);
|
||||
|
||||
#ifdef UHCI_VERBOSE_DEBUG
|
||||
#if UHCI_VERBOSE_DEBUG
|
||||
auto transfer_descriptor = m_free_td_pool.at(i);
|
||||
transfer_descriptor->print();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef UHCI_DEBUG
|
||||
#if UHCI_DEBUG
|
||||
klog() << "UHCI: Pool information:";
|
||||
klog() << "\tqh_pool: " << PhysicalAddress(m_qh_pool->physical_page(0)->paddr()) << ", length: " << m_qh_pool->range().size();
|
||||
klog() << "\ttd_pool: " << PhysicalAddress(m_td_pool->physical_page(0)->paddr()) << ", length: " << m_td_pool->range().size();
|
||||
|
@ -290,7 +291,7 @@ QueueHead* UHCIController::allocate_queue_head() const
|
|||
for (QueueHead* queue_head : m_free_qh_pool) {
|
||||
if (!queue_head->in_use()) {
|
||||
queue_head->set_in_use(true);
|
||||
#ifdef UHCI_DEBUG
|
||||
#if UHCI_DEBUG
|
||||
klog() << "UHCI: Allocated a new Queue Head! Located @ " << VirtualAddress(queue_head) << "(" << PhysicalAddress(queue_head->paddr()) << ")";
|
||||
#endif
|
||||
return queue_head;
|
||||
|
@ -306,7 +307,7 @@ TransferDescriptor* UHCIController::allocate_transfer_descriptor() const
|
|||
for (TransferDescriptor* transfer_descriptor : m_free_td_pool) {
|
||||
if (!transfer_descriptor->in_use()) {
|
||||
transfer_descriptor->set_in_use(true);
|
||||
#ifdef UHCI_DEBUG
|
||||
#if UHCI_DEBUG
|
||||
klog() << "UHCI: Allocated a new Transfer Descriptor! Located @ " << VirtualAddress(transfer_descriptor) << "(" << PhysicalAddress(transfer_descriptor->paddr()) << ")";
|
||||
#endif
|
||||
return transfer_descriptor;
|
||||
|
@ -460,7 +461,7 @@ void UHCIController::handle_irq(const RegisterState&)
|
|||
if (!read_usbsts())
|
||||
return;
|
||||
|
||||
#ifdef UHCI_DEBUG
|
||||
#if UHCI_DEBUG
|
||||
klog() << "UHCI: Interrupt happened!";
|
||||
klog() << "Value of USBSTS: " << read_usbsts();
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue