aboutsummaryrefslogtreecommitdiff
path: root/include/apos/sizes.h
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2021-10-25 19:40:53 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2021-10-25 19:44:11 +0300
commit7f7b3d61baf46fe358d3f1bd1cb584e0daed3a81 (patch)
tree51ded3e49cb467915a6e2b0e570b5d9973515553 /include/apos/sizes.h
parent59a374b0eed4313d1a67e2cdb673a295e79a6494 (diff)
downloadkmi-7f7b3d61baf46fe358d3f1bd1cb584e0daed3a81.tar.gz
kmi-7f7b3d61baf46fe358d3f1bd1cb584e0daed3a81.zip
Some minor changes to virtual memory handling
+ Should start to think about how virtual memory should be handled efficiently, I'm sort of flailing around and not actually doing anything beneficial. The mapping system I've so far implemented _works_, but it's not good and I'm not happy with it. I might come back and fix/improve it, but I think I'll go ahead and do other things for a while, might give me a better overhead view of what the virtual memory system should do. + TODO: should probably document the memory layout I'm going with at the moment.
Diffstat (limited to 'include/apos/sizes.h')
-rw-r--r--include/apos/sizes.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/include/apos/sizes.h b/include/apos/sizes.h
index 58a68bc..392e122 100644
--- a/include/apos/sizes.h
+++ b/include/apos/sizes.h
@@ -1,6 +1,8 @@
#ifndef APOS_SIZES_H
#define APOS_SIZES_H
+#if defined(__ASSEMBLER__)
+
#define SZ_1 0x000000000001
#define SZ_2 0x000000000002
#define SZ_4 0x000000000004
@@ -56,4 +58,63 @@
#define SZ_256T 0x400000000000
#define SZ_512T 0x800000000000
+#else
+
+#define SZ_1 0x000000000001UL
+#define SZ_2 0x000000000002UL
+#define SZ_4 0x000000000004UL
+#define SZ_8 0x000000000008UL
+#define SZ_16 0x000000000010UL
+#define SZ_32 0x000000000020UL
+#define SZ_64 0x000000000040UL
+#define SZ_128 0x000000000080UL
+#define SZ_256 0x000000000100UL
+#define SZ_512 0x000000000200UL
+
+#define SZ_1K 0x000000000400UL
+#define SZ_2K 0x000000000800UL
+#define SZ_4K 0x000000001000UL
+#define SZ_8K 0x000000002000UL
+#define SZ_16K 0x000000004000UL
+#define SZ_32K 0x000000008000UL
+#define SZ_64K 0x000000010000UL
+#define SZ_128K 0x000000020000UL
+#define SZ_256K 0x000000040000UL
+#define SZ_512K 0x000000080000UL
+
+#define SZ_1M 0x000000100000UL
+#define SZ_2M 0x000000200000UL
+#define SZ_4M 0x000000400000UL
+#define SZ_8M 0x000000800000UL
+#define SZ_16M 0x000001000000UL
+#define SZ_32M 0x000002000000UL
+#define SZ_64M 0x000004000000UL
+#define SZ_128M 0x000008000000UL
+#define SZ_256M 0x000010000000UL
+#define SZ_512M 0x000020000000UL
+
+#define SZ_1G 0x000040000000UL
+#define SZ_2G 0x000080000000UL
+#define SZ_4G 0x000100000000UL
+#define SZ_8G 0x000200000000UL
+#define SZ_16G 0x000400000000UL
+#define SZ_32G 0x000800000000UL
+#define SZ_64G 0x000400000000UL
+#define SZ_128G 0x000800000000UL
+#define SZ_256G 0x001000000000UL
+#define SZ_512G 0x002000000000UL
+
+#define SZ_1T 0x004000000000UL
+#define SZ_2T 0x008000000000UL
+#define SZ_4T 0x010000000000UL
+#define SZ_8T 0x020000000000UL
+#define SZ_16T 0x040000000000UL
+#define SZ_32T 0x080000000000UL
+#define SZ_64T 0x100000000000UL
+#define SZ_128T 0x200000000000UL
+#define SZ_256T 0x400000000000UL
+#define SZ_512T 0x800000000000UL
+
+#endif
+
#endif /* APOS_SIZES_H */