interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / seed / omc / sites / found-xarray-3.om

53 lines · 1258 bytes Raw Blame History
1target x86linux
2note sites: found by a one-token change of a tracked program (41 to 120 lines); reaches the omc error site in xarray (code 7)
3note dev.om: an OM-2 function unit (no fn main) using every function-mode clock and device word:
4note monons realns sleepns, devctl devcall uvmctl, mapnew mapaddr mapset mapget mapwrite mapread mapdrop,
5note with cpufence between the payload and the doorbell. The mapping words find their table through
6note runtime-table entry 31 (seed/host/MAPPING.md, function mode); the exact code is pinned by sha256.
7om2
8fn clk to long
9a = monons
10s = sleepns long 1000
11b = monons
12r = realns
13if lt s 0
14ret s
15end
16if lt r 0
17ret r
18end
19ret sub b a
20end
21fn dev fd int to long
22b = new uchar 48 false
23r = devctl fd uint 21531 b 0 4
24if lt r 0
25ret r
26end
27r = devctl fd uint 3224389163 b 0 48
28hd = new uchar 32 0
29pa = new uchar 16 0
30k = devcall fd uint 3223340587 hd 0 32 pa 0 16
31u = uvmctl fd uint 75 b 0 8
32ret add add r k u
33end
34fn ring v ulong to long
35h = mapnew neg int 1 0 4096 3 34
36if lt h 0
37ret h
38end
39p = new uchar 16 7
40a = mapaddr h
41w = mapwrite h 16 p 0 16
42cpufence
43d = mapset h 8 8 v
44d = mapset h 0 4 1
45x = long mapget h 8 8
46q = new uchar 16 0
47n = mapread h 16 q 0 16
48z = mapdrop h
49if eq a 0
50ret -1
51end
52ret add x long get q 15
53end