aboutsummaryrefslogtreecommitdiff
path: root/include/apos
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2021-12-20 14:53:44 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2021-12-20 14:53:44 +0200
commit6f8e5772d17d277842be3f6162ddd665a17e5be9 (patch)
tree45f5a2b9df6b6c2f3c369cf5b7e5b46c9acbccdd /include/apos
parent6b2465318b2dc922de282deea96c1621f7f41039 (diff)
downloadkmi-6f8e5772d17d277842be3f6162ddd665a17e5be9.tar.gz
kmi-6f8e5772d17d277842be3f6162ddd665a17e5be9.zip
More sensible init
+ Who knew some reservations were a good thing? (at least relativelyy speaking)
Diffstat (limited to 'include/apos')
-rw-r--r--include/apos/attrs.h1
-rw-r--r--include/apos/vmem.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/include/apos/attrs.h b/include/apos/attrs.h
index 469b7bd..64ec27d 100644
--- a/include/apos/attrs.h
+++ b/include/apos/attrs.h
@@ -8,5 +8,6 @@
#define __weak __attribute__((weak))
#define __main __section(".kernel.start") __noinline
+#define __init __section(".init.start") __noinline
#endif /* APOS_COMPILER_ATTRIBUTES_H */
diff --git a/include/apos/vmem.h b/include/apos/vmem.h
index daa9d10..38432ee 100644
--- a/include/apos/vmem.h
+++ b/include/apos/vmem.h
@@ -26,7 +26,8 @@ struct sp_mem {
#define mem_container(ptr)\
container_of(ptr, struct sp_mem, sp_n)
-
+#define __va(x) (((char *)(x)) + VM_DMAP - RAM_BASE)
+#define __pa(x) (((char *)(x)) + RAM_BASE - VM_DMAP)
/* general overview of the different functions:
* (un)map_vmem: map one known page of physical memory to one known page of