mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-22 06:57:51 +00:00
acpi: reserve 2MB for ACPI and rest is for PCI_DRV
This commit is contained in:
parent
6d25c735d2
commit
7e7fa81c8f
@ -237,7 +237,17 @@ int main(int argc, char **argv)
|
||||
{
|
||||
using namespace Genode;
|
||||
|
||||
enum { STACK_SIZE = 2*4096 };
|
||||
enum { STACK_SIZE = 2*4096, ACPI_MEMORY_SIZE = 2 * 1024 * 1024 };
|
||||
|
||||
/* reserve portion for acpi and give rest to pci_drv */
|
||||
Genode::addr_t avail_size = Genode::env()->ram_session()->avail();
|
||||
if (avail_size < ACPI_MEMORY_SIZE) {
|
||||
PERR("not enough memory");
|
||||
return 1;
|
||||
}
|
||||
avail_size -= ACPI_MEMORY_SIZE;
|
||||
PINF("available memory for ACPI %d kiB, for PCI_DRV %lu kiB",
|
||||
ACPI_MEMORY_SIZE / 1024, avail_size / 1024);
|
||||
|
||||
static Cap_connection cap;
|
||||
static Rpc_entrypoint ep(&cap, STACK_SIZE, "acpi_ep");
|
||||
@ -256,7 +266,7 @@ int main(int argc, char **argv)
|
||||
pci_policy.configure(buf);
|
||||
|
||||
/* use 'pci_drv' as slave service */
|
||||
static Genode::Slave pci_slave(pci_ep, pci_policy, 1024 * 1024);
|
||||
static Genode::Slave pci_slave(pci_ep, pci_policy, avail_size);
|
||||
|
||||
/* wait until pci drv is online and then make the acpi work */
|
||||
pci_policy.wait_for_pci_drv();
|
||||
|
Loading…
Reference in New Issue
Block a user