mem: add ALIGN_UP

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-06 20:07:11 +02:00
commit bfdc13af24

View file

@ -10,6 +10,8 @@
#define TO_VIRT(addr) ((addr) + hhdm_start)
#define TO_PHYS(addr) ((addr) - hhdm_start)
#define ALIGN_UP(x, a) (((x) + (a) - 1) & ~((__typeof__(x))(a) - 1))
#define genrw(reg) \
uint64_t reg##_read(); \
void reg##_write(uint64_t reg);