Documented GVF_SAVE_VAR alongside other flags, and removed a query/doubt
[AROS.git] / arch / ppc-sam440 / kernel / virtualtophysical.c
blob48afeb42e076cd15314cccf38398c9d1f4087137
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/kernel.h>
7 #include <aros/libcall.h>
9 #include <kernel_base.h>
11 #include <proto/kernel.h>
13 /* See rom/kernel/virtualtophysical.c for documentation */
15 AROS_LH1I(void *, KrnVirtualToPhysical,
16 AROS_LHA(void *, virtual, A0),
17 struct KernelBase *, KernelBase, 20, Kernel)
19 AROS_LIBFUNC_INIT
21 uintptr_t virt = (uintptr_t)virtual;
22 uintptr_t phys = virt;
24 if (virt >= 0xff000000)
25 phys = virt - 0xff000000;
27 return (void*)phys;
29 AROS_LIBFUNC_EXIT