[haiku-commits] r34201 - haiku/trunk/src/add-ons/kernel/bus_managers/acpi

  • From: clemens.zeidler@xxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 23 Nov 2009 22:20:33 +0100 (CET)

Author: czeidler
Date: 2009-11-23 22:20:32 +0100 (Mon, 23 Nov 2009)
New Revision: 34201
Changeset: http://dev.haiku-os.org/changeset/34201/haiku

Modified:
   haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_busman.c
   haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_priv.h
   haiku/trunk/src/add-ons/kernel/bus_managers/acpi/oshaiku.c
Log:
- revert r34170 because it crash on some maschines
- fix warning
- add get_irq_routing_table to the acpi busmanager (don't forget to link the 
kernel after an update)



Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_busman.c
===================================================================
--- haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_busman.c      
2009-11-23 19:35:58 UTC (rev 34200)
+++ haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_busman.c      
2009-11-23 21:20:32 UTC (rev 34201)
@@ -22,6 +22,7 @@
 
 #include "acpi.h"
 #include "accommon.h"
+#include "acnamesp.h"
 #include "acpi_priv.h"
 
 //#define TRACE_ACPI_BUS
@@ -111,6 +112,12 @@
                                return ENOSYS;
                        }
 
+                       if (gDPC->new_dpc_queue(&gDPCHandle, "acpi_task",
+                               B_NORMAL_PRIORITY) != B_OK) {
+                               ERROR("failed to create os execution queue\n");
+                               return B_ERROR;
+                       }
+
                        AcpiGbl_EnableInterpreterSlack = true;
 //                     AcpiGbl_CreateOSIMethod = true;
 
@@ -506,7 +513,8 @@
 status_t
 ns_handle_to_pathname(acpi_handle targetHandle, acpi_data *buffer)
 {
-       status_t status = AcpiNsHandleToPathname(targetHandle, buffer);
+       status_t status = AcpiNsHandleToPathname(targetHandle,
+               (ACPI_BUFFER*)buffer);
        return status == AE_OK ? B_OK : B_ERROR;
 }
 
@@ -545,6 +553,19 @@
 }
 
 
+status_t
+get_irq_routing_table(acpi_handle busDeviceHandle, acpi_data *retBuffer)
+{
+       ACPI_STATUS status;
+
+       status = AcpiGetIrqRoutingTable(busDeviceHandle, 
(ACPI_BUFFER*)retBuffer);
+       if (status == AE_BUFFER_OVERFLOW)
+               dprintf("evaluate_method: the passed buffer is too small!\n");
+
+       return status == AE_OK ? B_OK : B_ERROR;
+}
+
+
 static status_t
 prepare_sleep_state(uint8 state, void (*wakeFunc)(void), size_t size)
 {
@@ -651,6 +672,7 @@
        ns_handle_to_pathname,
        evaluate_object,
        evaluate_method,
+       get_irq_routing_table,
        prepare_sleep_state,
        enter_sleep_state,
        reboot

Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_priv.h
===================================================================
--- haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_priv.h        
2009-11-23 19:35:58 UTC (rev 34200)
+++ haiku/trunk/src/add-ons/kernel/bus_managers/acpi/acpi_priv.h        
2009-11-23 21:20:32 UTC (rev 34201)
@@ -111,6 +111,12 @@
                                        acpi_object_type *returnValue, size_t 
bufferLength);
        status_t        (*evaluate_method)(acpi_handle handle, const char 
*method,
                                        acpi_objects *args, acpi_data 
*returnValue);
+
+       /* Resource info */
+
+       status_t        (*get_irq_routing_table)(acpi_handle busDeviceHandle,
+                                       acpi_data *retBuffer);
+
 } acpi_root_info;
 
 
@@ -170,6 +176,8 @@
 status_t evaluate_method(acpi_handle handle, const char *method,
        acpi_objects *args, acpi_data *returnValue);
 
+status_t get_irq_routing_table(acpi_handle busDeviceHandle,
+       acpi_data *retBuffer);
 __END_DECLS
 
 #endif /* __ACPI_PRIV_H__ */

Modified: haiku/trunk/src/add-ons/kernel/bus_managers/acpi/oshaiku.c
===================================================================
--- haiku/trunk/src/add-ons/kernel/bus_managers/acpi/oshaiku.c  2009-11-23 
19:35:58 UTC (rev 34200)
+++ haiku/trunk/src/add-ons/kernel/bus_managers/acpi/oshaiku.c  2009-11-23 
21:20:32 UTC (rev 34201)
@@ -774,11 +774,6 @@
                        break;
        }
 */
-       if (!gDPCHandle && gDPC->new_dpc_queue(&gDPCHandle, "acpi_task",
-               B_NORMAL_PRIORITY) != B_OK) {
-               DEBUG_FUNCTION_F("failed to create os execution queue\n");
-               return AE_ERROR;
-       }
 
        if (gDPC->queue_dpc(gDPCHandle, function, context) != B_OK) {
                DEBUG_FUNCTION_F("Serious failure in AcpiOsExecute! function: 
%p",


Other related posts:

  • » [haiku-commits] r34201 - haiku/trunk/src/add-ons/kernel/bus_managers/acpi - clemens . zeidler