diff --git a/.zig-cache/h/03cc4894f2d19bea46744f9a1a77e86f.txt b/.zig-cache/h/03cc4894f2d19bea46744f9a1a77e86f.txt new file mode 100644 index 0000000..88c7817 --- /dev/null +++ b/.zig-cache/h/03cc4894f2d19bea46744f9a1a77e86f.txt @@ -0,0 +1,7 @@ +0 +343 9464202 1767078031258762242 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@ssystem@sexceptions.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/14b268251e0f2ddfeb3e85ba5b459be6.txt b/.zig-cache/h/14b268251e0f2ddfeb3e85ba5b459be6.txt new file mode 100644 index 0000000..469e409 --- /dev/null +++ b/.zig-cache/h/14b268251e0f2ddfeb3e85ba5b459be6.txt @@ -0,0 +1,7 @@ +0 +343 9464210 1767078031258762242 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@sstd@sassertions.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/1d83e551a3418dce39f4c8521260cff9.txt b/.zig-cache/h/1d83e551a3418dce39f4c8521260cff9.txt new file mode 100644 index 0000000..05ddd05 --- /dev/null +++ b/.zig-cache/h/1d83e551a3418dce39f4c8521260cff9.txt @@ -0,0 +1,7 @@ +0 +5078 9462400 1767077956162049724 c9a84c0833f545d1c2501a86a4e139d5 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@mfiber.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/20953d770a24fe43416ad700f6bb108e.txt b/.zig-cache/h/20953d770a24fe43416ad700f6bb108e.txt new file mode 100644 index 0000000..8076485 --- /dev/null +++ b/.zig-cache/h/20953d770a24fe43416ad700f6bb108e.txt @@ -0,0 +1,7 @@ +0 +343 9464219 1767078031259762226 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@sstd@sprivate@sbitops_utils.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/28ffcca3227839672ecdf07d342aa624.txt b/.zig-cache/h/28ffcca3227839672ecdf07d342aa624.txt new file mode 100644 index 0000000..44be8b3 --- /dev/null +++ b/.zig-cache/h/28ffcca3227839672ecdf07d342aa624.txt @@ -0,0 +1,7 @@ +0 +343 9464221 1767078031259762226 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@ssystem@srepr_v2.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/2cac3f912c3b3d36edfd12e58a60a5b9.txt b/.zig-cache/h/2cac3f912c3b3d36edfd12e58a60a5b9.txt new file mode 100644 index 0000000..54df413 --- /dev/null +++ b/.zig-cache/h/2cac3f912c3b3d36edfd12e58a60a5b9.txt @@ -0,0 +1,2 @@ +0 +1104 9461671 1767078085543858486 a0b42b3b0dd9bf113104ca6ca3c6f51d 0 /home/markus/zWork/_Git/Nexus/core/rumpk/hal/switch.S diff --git a/.zig-cache/h/31c6d0776b5b523af2f21bce16b73434.txt b/.zig-cache/h/31c6d0776b5b523af2f21bce16b73434.txt new file mode 100644 index 0000000..00715fd --- /dev/null +++ b/.zig-cache/h/31c6d0776b5b523af2f21bce16b73434.txt @@ -0,0 +1,7 @@ +0 +3010 9464225 1767078091252764644 d33830b1025db04959bdc2ff9bd43537 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@mfiber.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/3a65201aec9bb026c9d5bd0f32e0afb6.txt b/.zig-cache/h/3a65201aec9bb026c9d5bd0f32e0afb6.txt new file mode 100644 index 0000000..99b17ca --- /dev/null +++ b/.zig-cache/h/3a65201aec9bb026c9d5bd0f32e0afb6.txt @@ -0,0 +1,11 @@ +0 +16619 9464224 1767078031260762209 b65ba73958a2554cfcb1f80ef72d3f66 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@ssystem.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h +499 9459330 1767076360432003062 357ccd6329b0128cce0610c1443c600d 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/string.h +325 9459358 1767076627570935976 5ca902cf9f166c00c6ace9d9b616962b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdlib.h +658 9459756 1767076483913568693 9ddddf5ebae64e3e8f7b0a61ab971a48 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdio.h +458 9460053 1767076587058393045 a2b74728364fee3bf3eb7360aabd2d37 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/signal.h diff --git a/.zig-cache/h/42a82410c6e7cdd9b74bb29aa44181eb.txt b/.zig-cache/h/42a82410c6e7cdd9b74bb29aa44181eb.txt index 0bf31aa..fcbfde5 100644 --- a/.zig-cache/h/42a82410c6e7cdd9b74bb29aa44181eb.txt +++ b/.zig-cache/h/42a82410c6e7cdd9b74bb29aa44181eb.txt @@ -1,5 +1,5 @@ 0 -10486 9461201 1767076985098986152 3747702445e0bcda6de1816ec7a47cdd 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@mkernel.nim.c +15874 9462401 1767077749079880507 d133b7af4a91c5ff6970726948774437 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@mkernel.nim.c 19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h 639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h 268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h diff --git a/.zig-cache/h/639ae171cd1b2f02e8b0325a4aee9305.txt b/.zig-cache/h/639ae171cd1b2f02e8b0325a4aee9305.txt new file mode 100644 index 0000000..719c110 --- /dev/null +++ b/.zig-cache/h/639ae171cd1b2f02e8b0325a4aee9305.txt @@ -0,0 +1,7 @@ +0 +343 9464212 1767078031258762242 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@ssystem@scoro_detection.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/6f48234d6f2143ef0d1668331c15c1e2.txt b/.zig-cache/h/6f48234d6f2143ef0d1668331c15c1e2.txt new file mode 100644 index 0000000..6f605ee --- /dev/null +++ b/.zig-cache/h/6f48234d6f2143ef0d1668331c15c1e2.txt @@ -0,0 +1,7 @@ +0 +343 9464206 1767078031258762242 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@ssystem@sansi_c.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/75bd8f62f606979cbde1177bcde6d17c.txt b/.zig-cache/h/75bd8f62f606979cbde1177bcde6d17c.txt new file mode 100644 index 0000000..28eb6f4 --- /dev/null +++ b/.zig-cache/h/75bd8f62f606979cbde1177bcde6d17c.txt @@ -0,0 +1,7 @@ +0 +343 9464218 1767078031259762226 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@ssystem@sstacktraces.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/86b16aca30abb7b839e7fcbc42046b18.txt b/.zig-cache/h/86b16aca30abb7b839e7fcbc42046b18.txt new file mode 100644 index 0000000..1947fad --- /dev/null +++ b/.zig-cache/h/86b16aca30abb7b839e7fcbc42046b18.txt @@ -0,0 +1,7 @@ +0 +343 9464209 1767078031258762242 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@sstd@sprivate@smiscdollars.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/937799702fc2011040334aa39d8c17b1.txt b/.zig-cache/h/937799702fc2011040334aa39d8c17b1.txt new file mode 100644 index 0000000..1f67b6c --- /dev/null +++ b/.zig-cache/h/937799702fc2011040334aa39d8c17b1.txt @@ -0,0 +1,7 @@ +0 +343 9464222 1767078031259762226 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@sstd@swidestrs.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/9ef8f851dfdc84f20d60882348403a24.txt b/.zig-cache/h/9ef8f851dfdc84f20d60882348403a24.txt new file mode 100644 index 0000000..24bfb36 --- /dev/null +++ b/.zig-cache/h/9ef8f851dfdc84f20d60882348403a24.txt @@ -0,0 +1,7 @@ +0 +343 9464204 1767078031258762242 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@ssystem@sctypes.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/a51c4e03e9a1877d00c865592a8c8a74.txt b/.zig-cache/h/a51c4e03e9a1877d00c865592a8c8a74.txt new file mode 100644 index 0000000..c2cfb7e --- /dev/null +++ b/.zig-cache/h/a51c4e03e9a1877d00c865592a8c8a74.txt @@ -0,0 +1,7 @@ +0 +343 9464211 1767078031258762242 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@ssystem@siterators.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/a6641ac14466849410d963f7c456ce30.txt b/.zig-cache/h/a6641ac14466849410d963f7c456ce30.txt new file mode 100644 index 0000000..de143e7 --- /dev/null +++ b/.zig-cache/h/a6641ac14466849410d963f7c456ce30.txt @@ -0,0 +1,7 @@ +0 +343 9464220 1767078031259762226 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@ssystem@scountbits_impl.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/ae928fecc8d3953107e0f831cdd9484f.txt b/.zig-cache/h/ae928fecc8d3953107e0f831cdd9484f.txt new file mode 100644 index 0000000..809ae16 --- /dev/null +++ b/.zig-cache/h/ae928fecc8d3953107e0f831cdd9484f.txt @@ -0,0 +1,7 @@ +0 +343 9464223 1767078031260762209 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@sstd@ssyncio.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/b5f44f016c5bbe0feee1e83872547917.txt b/.zig-cache/h/b5f44f016c5bbe0feee1e83872547917.txt new file mode 100644 index 0000000..c1cf9a9 --- /dev/null +++ b/.zig-cache/h/b5f44f016c5bbe0feee1e83872547917.txt @@ -0,0 +1,7 @@ +0 +343 9464213 1767078031258762242 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@sstd@sprivate@sdragonbox.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/bac774de91508cd074fe2a5dca67608b.txt b/.zig-cache/h/bac774de91508cd074fe2a5dca67608b.txt new file mode 100644 index 0000000..473a25f --- /dev/null +++ b/.zig-cache/h/bac774de91508cd074fe2a5dca67608b.txt @@ -0,0 +1,7 @@ +0 +343 9464214 1767078031258762242 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@sstd@sprivate@sschubfach.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/c90e12f608d519c4ee3f8d4b4ba93118.txt b/.zig-cache/h/c90e12f608d519c4ee3f8d4b4ba93118.txt new file mode 100644 index 0000000..f38775e --- /dev/null +++ b/.zig-cache/h/c90e12f608d519c4ee3f8d4b4ba93118.txt @@ -0,0 +1,7 @@ +0 +343 9464217 1767078031259762226 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@ssystem@sdollars.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/dd86a9de435754ec80491bb70c2c63e3.txt b/.zig-cache/h/dd86a9de435754ec80491bb70c2c63e3.txt new file mode 100644 index 0000000..14910d0 --- /dev/null +++ b/.zig-cache/h/dd86a9de435754ec80491bb70c2c63e3.txt @@ -0,0 +1,7 @@ +0 +343 9464203 1767078031258762242 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@sstd@sprivate@ssince.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/e14387c94c8be923cedafef070708a16.txt b/.zig-cache/h/e14387c94c8be923cedafef070708a16.txt new file mode 100644 index 0000000..1827ea3 --- /dev/null +++ b/.zig-cache/h/e14387c94c8be923cedafef070708a16.txt @@ -0,0 +1,7 @@ +0 +343 9464216 1767078031259762226 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@sstd@sobjectdollar.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/e6d8f5b3ef1668bac94c469719c57365.txt b/.zig-cache/h/e6d8f5b3ef1668bac94c469719c57365.txt new file mode 100644 index 0000000..c101413 --- /dev/null +++ b/.zig-cache/h/e6d8f5b3ef1668bac94c469719c57365.txt @@ -0,0 +1,7 @@ +0 +343 9464207 1767078031258762242 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@ssystem@smemory.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/f385b25468511de3ae7285b5ccbf0f97.txt b/.zig-cache/h/f385b25468511de3ae7285b5ccbf0f97.txt new file mode 100644 index 0000000..93ef178 --- /dev/null +++ b/.zig-cache/h/f385b25468511de3ae7285b5ccbf0f97.txt @@ -0,0 +1,8 @@ +0 +15874 9464226 1767078031260762209 d133b7af4a91c5ff6970726948774437 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@mkernel.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h +499 9459330 1767076360432003062 357ccd6329b0128cce0610c1443c600d 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/string.h diff --git a/.zig-cache/h/f7d2ad689347d4165fe0a4d24894230d.txt b/.zig-cache/h/f7d2ad689347d4165fe0a4d24894230d.txt new file mode 100644 index 0000000..59dd5ac --- /dev/null +++ b/.zig-cache/h/f7d2ad689347d4165fe0a4d24894230d.txt @@ -0,0 +1,7 @@ +0 +343 9464208 1767078031258762242 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@sstd@sprivate@sdigitsutils.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/fadaf6fff367c13c32011411b6f1fd5d.txt b/.zig-cache/h/fadaf6fff367c13c32011411b6f1fd5d.txt new file mode 100644 index 0000000..90eb2cc --- /dev/null +++ b/.zig-cache/h/fadaf6fff367c13c32011411b6f1fd5d.txt @@ -0,0 +1,7 @@ +0 +343 9464205 1767078031258762242 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@sstd@ssysatomics.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/.zig-cache/h/fc812b8953e453fe97e4e37a6c8bd93b.txt b/.zig-cache/h/fc812b8953e453fe97e4e37a6c8bd93b.txt new file mode 100644 index 0000000..874b26b --- /dev/null +++ b/.zig-cache/h/fc812b8953e453fe97e4e37a6c8bd93b.txt @@ -0,0 +1,7 @@ +0 +343 9464215 1767078031259762226 c99e175f5398d2ed6a7964a9c4dbfc1c 0 /home/markus/zWork/_Git/Nexus/core/rumpk/build/nimcache/@m..@s..@s..@s..@s..@s..@s..@s..@susr@slib@snim@sstd@sformatfloat.nim.c +19164 69191110 1749873121000000000 fe5756ed84745fc96fd9dfb15050f599 0 /usr/lib/nim/nimbase.h +639 9459383 1767076381899751290 1b9448bcfa47e3161459266750e8ded4 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/limits.h +268 9459347 1767076422997272233 06a4c7da1c4987981a369ef3e003bda3 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stddef.h +155 9459777 1767076495338437553 9cc523d7a8a3a0bbc7c7af0fabeafc0b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdbool.h +924 9459799 1767076530759032485 73bc6834aef9958f6652470b63d7814b 0 /home/markus/zWork/_Git/Nexus/core/rumpk/core/include/stdint.h diff --git a/build.sh b/build.sh index 20aab81..527ed33 100755 --- a/build.sh +++ b/build.sh @@ -20,9 +20,9 @@ mkdir -p "$BUILD_DIR" mkdir -p "$BUILD_DIR/nimcache" # ========================================================= -# Step 1: Compile Zig L0 (HAL + Stubs) +# Step 1: Compile Zig L0 (HAL + Stubs + Context Switch) # ========================================================= -echo "[1/4] Compiling Zig L0 (HAL + libc stubs)..." +echo "[1/5] Compiling Zig L0 (HAL + libc stubs + context switch)..." # Compile main.zig zig build-obj \ @@ -38,13 +38,20 @@ zig build-obj \ -O ReleaseSmall \ -femit-bin="$BUILD_DIR/stubs.o" +# Compile switch.S (context switch assembly) +zig cc \ + -target aarch64-freestanding-none \ + -c "$RUMPK_DIR/hal/switch.S" \ + -o "$BUILD_DIR/switch.o" + echo " → $BUILD_DIR/hal.o" echo " → $BUILD_DIR/stubs.o" +echo " → $BUILD_DIR/switch.o" # ========================================================= -# Step 2: Compile Nim L1 (Kernel) +# Step 2: Compile Nim L1 (Kernel + Fibers) # ========================================================= -echo "[2/4] Compiling Nim L1 (Kernel)..." +echo "[2/5] Compiling Nim L1 (Kernel + Fibers)..." nim c \ --cpu:arm64 \ @@ -58,6 +65,10 @@ nim c \ --define:StandaloneHeapSize=65536 \ -d:release \ -d:danger \ + --checks:off \ + --assertions:off \ + --boundChecks:off \ + --overflowChecks:off \ --nimcache:"$BUILD_DIR/nimcache" \ --path:"$RUMPK_DIR/core" \ -c \ @@ -68,7 +79,7 @@ echo " → $BUILD_DIR/nimcache/*.c" # ========================================================= # Step 3: Compile Nim C files to objects # ========================================================= -echo "[3/4] Compiling Nim C files..." +echo "[3/5] Compiling Nim C files..." for cfile in "$BUILD_DIR/nimcache"/*.c; do ofile="${cfile%.c}.o" @@ -77,6 +88,7 @@ for cfile in "$BUILD_DIR/nimcache"/*.c; do -ffreestanding \ -fno-stack-protector \ -fno-builtin \ + -fno-sanitize=all \ -I"$RUMPK_DIR/core/include" \ -I/usr/lib/nim \ -I"$RUMPK_DIR/core" \ @@ -89,7 +101,7 @@ echo " → $BUILD_DIR/nimcache/*.o" # ========================================================= # Step 4: Link Everything (NO LIBC!) # ========================================================= -echo "[4/4] Linking (freestanding, no libc)..." +echo "[4/5] Linking (freestanding, no libc)..." # Collect all Nim object files NIM_OBJS=$(find "$BUILD_DIR/nimcache" -name "*.o" 2>/dev/null | tr '\n' ' ') @@ -105,6 +117,7 @@ zig cc \ -T "$RUMPK_DIR/boot/linker.ld" \ "$BUILD_DIR/hal.o" \ "$BUILD_DIR/stubs.o" \ + "$BUILD_DIR/switch.o" \ $NIM_OBJS \ -o "$BUILD_DIR/rumpk.elf" diff --git a/core/fiber.nim b/core/fiber.nim new file mode 100644 index 0000000..0dabc12 --- /dev/null +++ b/core/fiber.nim @@ -0,0 +1,83 @@ +# MARKUS MAIWALD (ARCHITECT) | VOXIS FORGE (AI) +# RUMPK CORE // FIBER +# The atom of execution. + +{.push stackTrace: off, lineTrace: off.} + +type + FiberState* = object + sp*: uint64 # The Stack Pointer (Must be first field!) + entry*: proc() {.cdecl.} # Entry point for this fiber + + Fiber* = ptr FiberObject + FiberObject* = object + id*: uint64 + name*: cstring + state*: FiberState + stack*: ptr UncheckedArray[uint8] + stack_size*: int + +# Import the Assembly Magic +proc cpu_switch_to(prev_sp_ptr: ptr uint64, next_sp: uint64) {.importc, cdecl.} + +# Import console for debugging +proc console_write(p: pointer, len: csize_t) {.importc, cdecl.} + +proc debug(s: string) = + if s.len > 0: + console_write(unsafeAddr s[0], csize_t(s.len)) + +# Context Frame Size: 6 pairs * 16 bytes = 96 bytes (16-byte aligned!) +const CONTEXT_SIZE = 96 + +# Stack Helper (Simple 4KB aligned stack) +const STACK_SIZE* = 4096 + +# We need a "Main" fiber to represent the boot thread +var main_fiber: FiberObject +var current_fiber*: Fiber = addr main_fiber + +# Trampoline that calls the fiber's entry point +proc fiber_trampoline() {.cdecl, exportc, noreturn.} = + let f = current_fiber + + if f.state.entry != nil: + f.state.entry() + + # If the fiber returns, halt + while true: + {.emit: "asm volatile(\"wfi\");".} + +proc init_fiber*(f: Fiber, entry: proc() {.cdecl.}, stack_base: pointer) = + f.state.entry = entry + + # Start at top of stack + var sp = cast[uint64](stack_base) + STACK_SIZE + + # 1. Align to 16 bytes (Strict requirement) + sp = sp and not 15'u64 + + # 2. Reserve space for the context frame (96 bytes) + sp = sp - CONTEXT_SIZE + + # 3. Setup the Context + var stack_ptr = cast[ptr UncheckedArray[uint64]](sp) + + # Zero out registers x19-x28 (indices 0-9) + for i in 0..<10: + stack_ptr[i] = 0 + + # Set x29 (FP) to 0 - Offset 80 / 8 = index 10 + stack_ptr[10] = 0 + + # Set x30 (LR) to trampoline - Offset 88 / 8 = index 11 + stack_ptr[11] = cast[uint64](fiber_trampoline) + + f.state.sp = sp + +proc switch*(next: Fiber) = + let prev = current_fiber + current_fiber = next + cpu_switch_to(addr prev.state.sp, next.state.sp) + +{.pop.} diff --git a/core/kernel.nim b/core/kernel.nim index c6ffeb8..34a7701 100644 --- a/core/kernel.nim +++ b/core/kernel.nim @@ -6,6 +6,8 @@ {.push stackTrace: off, lineTrace: off.} +import fiber + # ========================================================= # HAL Imports from Zig (Layer 0) # ========================================================= @@ -51,6 +53,34 @@ proc malloc(size: csize_t): pointer {.importc, cdecl.} proc free(p: pointer) {.importc, cdecl.} proc realloc(p: pointer, size: csize_t): pointer {.importc, cdecl.} +# ========================================================= +# Fiber Test: Ping Pong +# ========================================================= + +var fiber_a: FiberObject +var stack_a: array[4096, uint8] + +var fiber_b: FiberObject +var stack_b: array[4096, uint8] + +proc thread_a_entry() {.cdecl.} = + kprintln("[Fiber A] I am alive! Yielding to B...") + switch(addr fiber_b) + kprintln("[Fiber A] I am back! Yielding to B...") + switch(addr fiber_b) + kprintln("[Fiber A] Final return. Halting.") + while true: + {.emit: "asm volatile(\"wfi\");".} + +proc thread_b_entry() {.cdecl.} = + kprintln("[Fiber B] Hello from B! Yielding to A...") + switch(addr fiber_a) + kprintln("[Fiber B] Returned! Yielding to A...") + switch(addr fiber_a) + kprintln("[Fiber B] Final return. Halting.") + while true: + {.emit: "asm volatile(\"wfi\");".} + # ========================================================= # Kernel Main Entry # ========================================================= @@ -67,10 +97,21 @@ proc kmain() {.exportc, cdecl.} = kprintln("[Rumpk L1] The Rubicon is crossed.") kprintln("[Rumpk L1] Zig + Nim = Sovereign Metal.") kprintln("") - kprintln("[Rumpk L1] Entering idle loop...") + kprintln("[Rumpk L1] Initializing Fibers...") - # Idle loop - in real kernel, this would be the scheduler - while true: - {.emit: "asm volatile(\"wfi\");".} + # Initialize Fibers + fiber_a.name = "Fiber A" + fiber_b.name = "Fiber B" + + init_fiber(addr fiber_a, thread_a_entry, addr stack_a[0]) + init_fiber(addr fiber_b, thread_b_entry, addr stack_b[0]) + + # Jump into the matrix + kprintln("[Kernel] Switching to Fiber A...") + kprintln("") + switch(addr fiber_a) + + # We should never get here unless Fiber A switches back to Main + nimPanic("Main thread returned!") {.pop.} diff --git a/hal/switch.S b/hal/switch.S new file mode 100644 index 0000000..d64e649 --- /dev/null +++ b/hal/switch.S @@ -0,0 +1,47 @@ +/* MARKUS MAIWALD (ARCHITECT) | VOXIS FORGE (AI) + RUMPK HAL // CONTEXT SWITCH + + System V ABI (AArch64) requires we save: + - x19..x28 (Callee-saved general purpose) + - x29 (Frame Pointer) + - x30 (Link Register / Return Address) + + Frame Size: 6 pairs * 16 bytes = 96 bytes (16-byte aligned!) +*/ + +.global cpu_switch_to +.type cpu_switch_to, @function + +// void cpu_switch_to(uint64_t* prev_sp_ptr, uint64_t next_sp); +// x0 = pointer to storage for old stack pointer +// x1 = new stack pointer value + +cpu_switch_to: + // 1. Save Context (96 bytes = 16-byte aligned) + sub sp, sp, #96 + + stp x19, x20, [sp, #0] + stp x21, x22, [sp, #16] + stp x23, x24, [sp, #32] + stp x25, x26, [sp, #48] + stp x27, x28, [sp, #64] + stp x29, x30, [sp, #80] + + // 2. Save Old SP + mov x9, sp + str x9, [x0] + + // 3. Load New SP + mov sp, x1 + + // 4. Restore Context + ldp x19, x20, [sp, #0] + ldp x21, x22, [sp, #16] + ldp x23, x24, [sp, #32] + ldp x25, x26, [sp, #48] + ldp x27, x28, [sp, #64] + ldp x29, x30, [sp, #80] + + add sp, sp, #96 + + ret