mem: change TO_PHYS and TO_VIRT
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
8d2cb24237
commit
569f24aea1
3 changed files with 6 additions and 7 deletions
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
#define ALIGN(_a) __attribute__((aligned(_a)))
|
||||
#define PHYSICAL_PAGE_MASK (~(hhdm_start))
|
||||
#define TO_VIRT(addr) ((addr) + hhdm_start)
|
||||
#define TO_PHYS(addr) ((addr) - hhdm_start)
|
||||
#define TO_VIRT(addr) ((void *)((paddr_t)(addr) + hhdm_start))
|
||||
#define TO_PHYS(addr) ((paddr_t)(addr) - hhdm_start)
|
||||
|
||||
#define ALIGN_UP(x, a) (((x) + (a) - 1) & ~((__typeof__(x))(a) - 1))
|
||||
|
||||
|
|
@ -36,5 +36,4 @@ void *align(void *p, size_t align);
|
|||
extern vaddr_t hhdm_start;
|
||||
extern vaddr_t hhdm_end;
|
||||
|
||||
|
||||
#endif /* _MEM_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue