[haiku-commits] r41313 - haiku/trunk/src/system/kernel/arch/x86
- From: mmlr@xxxxxxxx
- To: haiku-commits@xxxxxxxxxxxxx
- Date: Wed, 4 May 2011 00:49:27 +0200 (CEST)
Author: mmlr
Date: 2011-05-04 00:49:27 +0200 (Wed, 04 May 2011)
New Revision: 41313
Changeset: https://dev.haiku-os.org/changeset/41313
Modified:
haiku/trunk/src/system/kernel/arch/x86/arch_int.cpp
haiku/trunk/src/system/kernel/arch/x86/irq_routing_table.cpp
haiku/trunk/src/system/kernel/arch/x86/irq_routing_table.h
Log:
Cleanup and a minor debug output change.
Modified: haiku/trunk/src/system/kernel/arch/x86/arch_int.cpp
===================================================================
--- haiku/trunk/src/system/kernel/arch/x86/arch_int.cpp 2011-05-03 22:47:17 UTC
(rev 41312)
+++ haiku/trunk/src/system/kernel/arch/x86/arch_int.cpp 2011-05-03 22:49:27 UTC
(rev 41313)
@@ -606,7 +606,7 @@
IRQRoutingTable table;
status = read_irq_routing_table(acpiModule, &table);
if (status != B_OK) {
- dprintf("reading IRQ routing table failed, no ioapic.\n");
+ dprintf("reading IRQ routing table failed, not configuring
ioapic.\n");
return;
}
@@ -668,6 +668,7 @@
break;
}
}
+
ioapic_configure_io_interrupt(num, config);
}
Modified: haiku/trunk/src/system/kernel/arch/x86/irq_routing_table.cpp
===================================================================
--- haiku/trunk/src/system/kernel/arch/x86/irq_routing_table.cpp
2011-05-03 22:47:17 UTC (rev 41312)
+++ haiku/trunk/src/system/kernel/arch/x86/irq_routing_table.cpp
2011-05-03 22:49:27 UTC (rev 41313)
@@ -33,7 +33,6 @@
polarity(B_HIGH_ACTIVE_POLARITY),
interrupt_mode(B_EDGE_TRIGGERED)
{
-
}
@@ -44,14 +43,14 @@
if (descriptor->irq >> i & 0x01)
dprintf("interrupt: %i\n", i);
}
-
+
const char* activeHighString = "active high";
const char* activeLowString = " active low";
const char* levelTriggeredString = "level triggered";
const char* edgeTriggeredString = " edge triggered";
dprintf("irq: %i, shareable: %i, polarity: %s, interrupt_mode: %s\n",
- descriptor->irq, descriptor->shareable,
+ descriptor->irq, descriptor->shareable,
descriptor->polarity == B_HIGH_ACTIVE_POLARITY ?
activeHighString
: activeLowString,
descriptor->interrupt_mode == B_LEVEL_TRIGGERED ?
levelTriggeredString
@@ -78,7 +77,7 @@
IRQRoutingTable* table)
{
acpi_data buffer;
- buffer.pointer = 0;
+ buffer.pointer = NULL;
buffer.length = ACPI_ALLOCATE_BUFFER;
status_t status = acpi->get_irq_routing_table(device, &buffer);
if (status != B_OK)
@@ -93,8 +92,9 @@
irqEntry.pin = acpiTable->pin;
irqEntry.source = source;
irqEntry.source_index = acpiTable->sourceIndex;
- table->PushBack(irqEntry);
+ table->PushBack(irqEntry);
}
+
acpiTable = (acpi_pci_routing_table*)((uint8*)acpiTable
+ acpiTable->length);
}
@@ -127,8 +127,8 @@
char name[255];
name[0] = 0;
void *counter = NULL;
- while (acpi->get_next_entry(ACPI_TYPE_DEVICE, rootPciName, name, 255,
- &counter) == B_OK) {
+ while (acpi->get_next_entry(ACPI_TYPE_DEVICE, rootPciName, name,
+ sizeof(name), &counter) == B_OK) {
acpi_handle brigde;
status = acpi->get_handle(NULL, name, &brigde);
if (status != B_OK)
@@ -136,7 +136,7 @@
status = read_device_irq_routing_table(acpi, brigde, table);
if (status == B_OK)
- TRACE("routing table found %s\n", name);
+ TRACE("routing table found %s\n", name);
}
return table->Count() > 0 ? B_OK : B_ERROR;
@@ -170,7 +170,7 @@
free(buffer.pointer);
return B_OK;
- }
+ }
resource = (acpi_resource*)((uint8*)resource +
resource->length);
}
free(buffer.pointer);
Modified: haiku/trunk/src/system/kernel/arch/x86/irq_routing_table.h
===================================================================
--- haiku/trunk/src/system/kernel/arch/x86/irq_routing_table.h 2011-05-03
22:47:17 UTC (rev 41312)
+++ haiku/trunk/src/system/kernel/arch/x86/irq_routing_table.h 2011-05-03
22:49:27 UTC (rev 41313)
@@ -14,14 +14,14 @@
struct irq_routing_entry {
int device_address;
- int8 pin;
+ int8 pin;
- acpi_handle source;
+ acpi_handle source;
int source_index;
// pci busmanager connection
- uchar pci_bus;
- uchar pci_device;
+ uchar pci_bus;
+ uchar pci_device;
};
@@ -55,7 +55,7 @@
struct acpi_resource {
uint32 type;
uint32 length;
-
+
uint8 descriptorLength;
uint8 triggering;
uint8 polarity;
Other related posts:
- » [haiku-commits] r41313 - haiku/trunk/src/system/kernel/arch/x86 - mmlr