arm64: Direct access to Mckernel memory from Linux.
Change-Id: I1a096aa5232c56382ae19d8c4e4f41d4e3e9f660
This commit is contained in:
committed by
Dominique Martinet
parent
20d5900c35
commit
aa3c5e91db
@@ -55,13 +55,14 @@ uintptr_t virt_to_phys(uintptr_t va)
|
||||
{
|
||||
extern uintptr_t kernel_base;
|
||||
|
||||
if (va >= MAP_ST) {
|
||||
return (va - MAP_ST);
|
||||
}
|
||||
|
||||
if (va >= MAP_KERNEL) {
|
||||
return (va - MAP_KERNEL + kernel_base);
|
||||
}
|
||||
|
||||
if (va >= MAP_ST) {
|
||||
return (va - MAP_ST);
|
||||
}
|
||||
return NOPHYS;
|
||||
} /* virt_to_phys() */
|
||||
#endif /* POSTK_DEBUG_ARCH_DEP_34 */
|
||||
|
||||
Reference in New Issue
Block a user