aboutsummaryrefslogtreecommitdiff
path: root/include/apos/mem.h
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2021-10-19 15:56:26 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2021-10-19 15:56:26 +0300
commit59a374b0eed4313d1a67e2cdb673a295e79a6494 (patch)
treea83157ac108c315f93536d4a3d8150b729bdcb1a /include/apos/mem.h
parent7237d673904d8568a2f9c290a0247c9d1a07c5d2 (diff)
downloadkmi-59a374b0eed4313d1a67e2cdb673a295e79a6494.tar.gz
kmi-59a374b0eed4313d1a67e2cdb673a295e79a6494.zip
Initial virtual memory mapping functions
Diffstat (limited to 'include/apos/mem.h')
-rw-r--r--include/apos/mem.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/include/apos/mem.h b/include/apos/mem.h
index 630fcd9..7c5a2dc 100644
--- a/include/apos/mem.h
+++ b/include/apos/mem.h
@@ -4,12 +4,6 @@
#include <apos/utils.h>
#include <pages.h>
-enum mm_mode_t {
- Sv48,
- Sv39,
- Sv32,
-};
-
#define MM_OINFO_WIDTH (sizeof(mm_info_t) * 8)
#define pnum_to_index(pnum, order) (((pnum) >> __o_offset(order)) & (__o_width(order) - 1))
@@ -29,6 +23,7 @@ enum mm_mode_t {
#define __o_offset(order) (__mm_shifts[order])
#define __o_width(order) (__mm_widths[order])
+#define __o_size(order) (__mm_sizes[order])
#define __o_elems(order) (__mm_widths[order] / MM_OINFO_WIDTH)
#define __o_container(idx) ((idx) / MM_OINFO_WIDTH)