mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
core: don't use frame 0 for managing_system pd
When a PD owns the right to ask for a RAM dataspace's `dma_addr` it is concurrently constrained to use allocations of a specific physical RAM area. This commit further limits this area by removing RAM page frame zero. Otherwise the return value of `dma_addr` for such a dataspace would be erroneously interpreted as a fault, because zero is currently the error return value of `dma_addr`. Fix genodelabs/genode#4428
This commit is contained in:
parent
429d078de7
commit
494f881f27
@ -47,7 +47,11 @@ class Genode::Pd_root : public Genode::Root_component<Genode::Pd_session_compone
|
||||
if (_managing_system(args) == Pd_session_component::Managing_system::DENIED)
|
||||
return Ram_dataspace_factory::any_phys_range();
|
||||
|
||||
addr_t const start = 0;
|
||||
/*
|
||||
* Leave out first page because currently return value zero
|
||||
* for dma_addr is recognized as a fault
|
||||
*/
|
||||
addr_t const start = 0x1000;
|
||||
addr_t const end = (sizeof(long) == 4) /* 32bit arch ? */
|
||||
? 0xbfffffffUL : 0xffffffffUL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user