ACPI: Remove quota checking

Remove RAM quota checking on IRQ session creation. Spelling fixes.
(Fix #151)
This commit is contained in:
Sebastian Sumpf 2012-03-16 13:56:34 +01:00 committed by Norman Feske
parent ed8eb91107
commit d460820cf6
3 changed files with 4 additions and 19 deletions

View File

@ -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):
!<start name="acpi">

View File

@ -66,9 +66,9 @@ struct Generic
uint8_t const *data() { return reinterpret_cast<uint8_t *>(this); }
/* MADT acpi structures */
Apic_struct *apic_struct() { return reinterpret_cast<Apic_struct *>(&creator_rev + 8); }
Apic_struct *apic_struct() { return reinterpret_cast<Apic_struct *>(&creator_rev + 3); }
Apic_struct *end() { return reinterpret_cast<Apic_struct *>(signature + size); }
};
} __attribute__((packed));
/**

View File

@ -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;
}
/**