[haiku-development] Re: ACPI and IRQ descriptors

  • From: "Clemens Zeidler" <clemens.zeidler@xxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 05 Jul 2010 16:41:11 +1200

Hi Fredrik,

Am 29.06.2010, 20:24 Uhr, schrieb Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx>:

Sorry it should be AcpiGetCurrentResources.

http://www.acpica.org/download/acpica-reference.pdf
See 6.3.2 and 8.9.1-3 and
http://haiku.it.su.se:8180/source/xref/src/add-ons/kernel/bus_managers/acpi/resources/rsxface.c#273

We need to expose these functions in the ACPI module so it is a bit of work.


Yesterday I tried to expose these function and find out that almost everything defined in acrestyp.h *) is needed. This brings me to the following idea: At the moment we copy a lot of ACPI definitions in our ACPI.h header and convert them to the haiku coding style. What do you think about to keep the original headers instead and include them in our ACPI.h? This has the advantage that we don't need to do the nasty work to rewrite everything from these headers and if something in ACPI changed we automatically get this changes. At the moment I talk about acrestyp.h *) and actypes.h **) which contains just typedefs and defines.

So coding style (for example ***)) vs maintainability? I prefer the second in this case.

Regards,
        Clemens


*)
http://haiku.it.su.se:8180/source/xref/src/add-ons/kernel/bus_managers/acpi/include/acrestyp.h

**)
http://haiku.it.su.se:8180/source/xref/src/add-ons/kernel/bus_managers/acpi/include/actypes.h

***)
typedef struct acpi_object_list
{
    UINT32                          Count;
    ACPI_OBJECT                     *Pointer;

} ACPI_OBJECT_LIST;

Other related posts: