Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-gpu-driver/blob/main/tests/boot_dma.om # omega-gpu-driver aien-dev/omega-gpu-driver Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-gpu-driver / tests / boot_dma.om` 43 lines ยท 1055 bytes Raw Blame History 1 note HOST ONLY: explicit link-time DMA oracle plus real checked anonymous mapping. No device fd. 2 global ascheck uchar `16777216` 3 fn asbytes to void 4 n = get arused 0 5 r = mapread get mmwh 0 0 ascheck 0 n 6 drcheck eq r long n 7 for p ulong div n 4096 8 for i ulong 4096 9 o = add mul p 4096 i 10 v = get ascheck o 11 drcheck eq v get arbuf o 12 end 13 end 14 end 15 fn main to int 16 atsetup 0 17 drcheck eq arboot 1 128 0 18 drcheck eq mmwalloc get arbase 0 get arused 0 MMOK 19 g = get mmwgen 0 20 drcheck eq mmwpublish g MMESTATE 21 drcheck eq arstage add g 1 MMEGEN 22 put arbase 0 add get arbase 0 4096 23 drcheck eq arstage g MMEINVAL 24 put arbase 0 sub get arbase 0 4096 25 drcheck eq arstage g MMOK 26 asbytes 27 drcheck eq mmwdmap g 17 MMOK 28 drcheck eq arstage g MMOK 29 asbytes 30 drcheck eq mmwpublish g MMOK 31 drcheck eq arstage g MMESTATE 32 drcheck eq arlose g MMESTATE 33 drcheck eq bpoll 0 34 drcheck eq bpoll -11 35 drcheck eq arlose add g 1 MMEGEN 36 drcheck eq arlose g MMOK 37 drcheck eq get mmwst 0 MMWQUAR 38 drcheck eq mmwclose g MMEBUSY 39 drcheck ne get mmwh 0 0 40 drcheck eq get drunmaps 0 0 41 drcheck eq get drdrops 0 0 42 ret 0 43 end