Each ARM SOCs (System On Chip) family have different address space division into device and regular memory. So hard-coded ranges forbids passing device IO range directly to guest VM.
Also shared Xen pages (console and xenstore shared rings) reside in this hard-coded device range, so can't be mapped without mangling ranges. Provided all the above, there seem to be not much value in keeping this check -- particularly after mattr introduction and OS extention for Xen support. Signed-off-by: Sergiy Kibrik <[email protected]> --- arch/aarch64/arch-mmu.hh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/arch/aarch64/arch-mmu.hh b/arch/aarch64/arch-mmu.hh index 6ed6e5d..c407832 100644 --- a/arch/aarch64/arch-mmu.hh +++ b/arch/aarch64/arch-mmu.hh @@ -18,9 +18,6 @@ namespace mmu { constexpr int max_phys_addr_size = 48; -// device_range_* are used only for debug purpose -constexpr int device_range_start = 0x3000000; -constexpr int device_range_stop = 0x40000000; extern u64 mem_addr; /* set by the dtb_setup constructor */ enum class mattr { @@ -144,11 +141,6 @@ inline void pt_element_common<N>::set_pfn(u64 pfn, bool large) { set_addr(pfn << page_size_shift, large); } -static inline bool dbg_mem_is_dev(phys addr) -{ - return addr >= mmu::device_range_start && addr < mmu::device_range_stop; -} - template<int N> pt_element<N> make_pte(phys addr, bool leaf, unsigned perm = perm_rwx, mattr mem_attr = mattr_default) @@ -172,11 +164,9 @@ pt_element<N> make_pte(phys addr, bool leaf, unsigned perm = perm_rwx, switch (mem_attr) { default: case mattr::normal: - assert(!dbg_mem_is_dev(addr)); pte.set_attridx(4); break; case mattr::dev: - assert(dbg_mem_is_dev(addr)); pte.set_attridx(0); break; } -- 2.7.4 -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
