genode/repos/os/src/drivers/acpi
2015-05-26 09:39:52 +02:00
..
x86 Move repositories to 'repos/' subdirectory 2014-05-14 16:08:00 +02:00
acpi.cc acpi: provide pci policy to pci driver 2015-05-06 10:55:19 +02:00
acpi.h acpi: amend handling MMIO regions for ACPI tables 2015-02-27 11:40:59 +01:00
main.cc acpi: use local irq service for pci slave 2015-05-20 17:52:57 +02:00
memory.h acpi: amend handling MMIO regions for ACPI tables 2015-02-27 11:40:59 +01:00
README pci: add readme to pci_drv, adjust acpi_drv README 2015-05-26 09:39:52 +02:00

This directory contains an implementation of a simple ACPI parser

Behavior
--------

This server should be used when using a kernel (like Fiasco.OC, Nova,
base_hw x86_64) that takes advantage of x86's APIC. The server traverses the
ACPI tables and sets the interrupt line of devices within the PCI config space
to the GSIs found in the ACPI tables. The 'MADT' table is parsed by the server
as well, enabling clients to use the correct IRQ when 'Interrupt Override'
structures are found wihtin the table.

Usage
-----

Start the 'acpi_drv' in your Genode environment. Do not start the 'pci_drv'
since this will be used as a slave of the 'acpi_drv'. You still must load the
'pci_drv' in your boot loader.

Configuration snipped (please note that IRQ service requests of the 'timer' are
routed to the ACPI-driver):

!<start name="acpi_drv">
!  <resource name="RAM" quantum="2M" constrain_phys="yes"/>
!    <provides>
!      <service name="PCI"/>
!      <service name="IRQ" />
!    </provides>
!    <config>
!      <policy label="acpi_drv">
!        <pci class="ALL"/>
!      </policy>
!    </config>
!    <route>
!      <any-service> <parent/> <any-child /> </any-service>
!    </route>
!</start>
!
!<start name="timer">
!  <resource name="RAM" quantum="1M"/>
!  <provides><service name="Timer"/></provides>
!  <route>
!    <service name="IRQ"><child name="acpi_drv" /></service>
!    <any-service> <parent /> <any-child /></any-service>
!  </route>
!</start>

The 'config' node on the 'acpi_drv' requires an policy entry that permits the
'acpi_drv' to iterate over all pci devices in order to rewrite the
interrupt numbers according to the 'MADT' table. Furthermore the whole 'config'
node will be passed on to the 'pci_drv' which obtains from it the required
policy for each client. Additionally the constrain_phys attribute is a
feature of init, which applies to the pci_drv. Please read the 'pci_drv'
README for more details.