aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2021-12-21 12:23:00 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2021-12-21 12:36:00 +0200
commit41c405fdb18b139bbde475063230e14a59304ef6 (patch)
tree7ec7b02cb29df577be6f15f826c0781973483093 /include
parent61291639524e4aebf93a3315661e7180ac1b9c1e (diff)
downloadkmi-41c405fdb18b139bbde475063230e14a59304ef6.tar.gz
kmi-41c405fdb18b139bbde475063230e14a59304ef6.zip
Modified vmem internals to use pages
Diffstat (limited to 'include')
-rw-r--r--include/apos/tcb.h1
-rw-r--r--include/apos/vmem.h11
2 files changed, 5 insertions, 7 deletions
diff --git a/include/apos/tcb.h b/include/apos/tcb.h
index 9cef386..f987b43 100644
--- a/include/apos/tcb.h
+++ b/include/apos/tcb.h
@@ -23,6 +23,7 @@ struct tcb {
id_t tid;
vm_t stack;
+ vm_t heap;
vm_t bin;
struct vm_branch_t *b_r;
diff --git a/include/apos/vmem.h b/include/apos/vmem.h
index 2f6b10c..6918ba4 100644
--- a/include/apos/vmem.h
+++ b/include/apos/vmem.h
@@ -28,15 +28,12 @@ struct sp_mem {
#define __va(x) (((char *)(x)) + VM_DMAP - RAM_BASE)
#define __pa(x) (((char *)(x)) + RAM_BASE - VM_DMAP)
+#define __page(x) ((x) / BASE_PAGE_SIZE)
+#define __addr(x) ((x) * BASE_PAGE_SIZE)
/* general overview of the different functions:
- * (un)map_vmem: map one known page of physical memory to one known page of
- * virtual memory
- *
- * (un)map_vregion: map known physical region to unknown virtual region within
- * start and end
- *
- * (un)map_vsize: map unknown physical region to unknown virtual region
+ * internally they all work with pages, but they are called and return usable
+ * addresses, though within page bounds of course.
*/
/* defined by arch */