From d460820cf6808364dafd38291e74374419dfb21a Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Fri, 16 Mar 2012 13:56:34 +0100 Subject: [PATCH] ACPI: Remove quota checking Remove RAM quota checking on IRQ session creation. Spelling fixes. (Fix #151) --- os/src/drivers/acpi/README | 2 +- os/src/drivers/acpi/acpi.cc | 4 ++-- os/src/drivers/acpi/main.cc | 17 +---------------- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/os/src/drivers/acpi/README b/os/src/drivers/acpi/README index 42d149f90..b58f6ce1b 100644 --- a/os/src/drivers/acpi/README +++ b/os/src/drivers/acpi/README @@ -17,7 +17,7 @@ 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 not that IRQ service requests of the 'timer' are +Configuration snipped (please note that IRQ service requests of the 'timer' are routed to the ACPI-driver): ! diff --git a/os/src/drivers/acpi/acpi.cc b/os/src/drivers/acpi/acpi.cc index 7427cc7d8..6f4970ee9 100644 --- a/os/src/drivers/acpi/acpi.cc +++ b/os/src/drivers/acpi/acpi.cc @@ -66,9 +66,9 @@ struct Generic uint8_t const *data() { return reinterpret_cast(this); } /* MADT acpi structures */ - Apic_struct *apic_struct() { return reinterpret_cast(&creator_rev + 8); } + Apic_struct *apic_struct() { return reinterpret_cast(&creator_rev + 3); } Apic_struct *end() { return reinterpret_cast(signature + size); } -}; +} __attribute__((packed)); /** diff --git a/os/src/drivers/acpi/main.cc b/os/src/drivers/acpi/main.cc index e99a40c81..61f63e8f9 100644 --- a/os/src/drivers/acpi/main.cc +++ b/os/src/drivers/acpi/main.cc @@ -54,27 +54,12 @@ namespace Irq { /* check for 'MADT' overrides */ irq_number = Acpi::override(irq_number); - /* qouta handling */ - size_t ram_quota = Arg_string::find_arg(args.string(), "ram_quota").long_value(0); - size_t old_quota = 0, new_quota = 0; - Session_capability cap; - /* allocate IRQ at parent*/ try { - old_quota = env()->ram_session()->quota(); Irq_connection irq(irq_number); - new_quota = env()->ram_session()->quota(); irq.on_destruction(Irq_connection::KEEP_OPEN); - cap = irq.cap(); + return irq.cap(); } catch (...) { throw Root::Unavailable(); } - - /* check used quota against quota provided */ - if (old_quota > new_quota && (old_quota - new_quota) > ram_quota) { - close(cap); - throw Root::Quota_exceeded(); - } - - return cap; } /**