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/rpc_ref.c # 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 / rpc_ref.c` 32 lines ยท 1414 bytes Raw Blame History 1 /* Test-only oracle. Never linked into the Omega driver. Builds against pinned aienux C. */ 2 #include "gb10_gsp_boot.h" 3 #include 4 #include 5 #include 6 static unsigned char cmd[GSP_MQ_QUEUE_SIZE], stat[GSP_MQ_QUEUE_SIZE]; 7 static void put(unsigned char *p, unsigned v) { for(unsigned i=0;i<4;i++)p[i]=(unsigned char)(v>>(8*i)); } 8 static void init(unsigned char *p) { 9 put(p+4,GSP_MQ_QUEUE_SIZE);put(p+8,GSP_MQ_MSG_SIZE);put(p+12,GSP_MQ_MSG_COUNT); 10 put(p+20,1);put(p+24,32);put(p+28,4096); 11 } 12 static void emit(void) { if(fwrite(cmd,1,sizeof cmd,stdout)!=sizeof cmd)exit(2); } 13 int main(void) { 14 gsp_mq q={cmd,stat,0,0,0}; const char *why=0; unsigned seq; 15 init(cmd); init(stat); 16 unsigned char payload[8192];for(unsigned i=0;i