mem: do not mask hhdm_start, add/subtract it
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
7f302e4797
commit
eef551049c
1 changed files with 2 additions and 2 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) & PHYSICAL_PAGE_MASK)
|
||||
#define TO_VIRT(addr) ((addr) + hhdm_start)
|
||||
#define TO_PHYS(addr) ((addr) - hhdm_start)
|
||||
|
||||
#define genrw(reg) \
|
||||
uint64_t reg##_read(); \
|
||||
|
|
|
|||
Loading…
Reference in a new issue