Files
nvdriver/tests/oracles/gpfifo.c
nvidia-driver-rs 4526e6a816 Baseline: validated 30/30 tree with passing Level 7 hardware regression
- Updated tools/post_reboot.sh to check kernel oops taint bit and stuck driver tasks instead of <86400s uptime
- Level 7 hardware regression passed on 0000:b3:00.0 (module 37e6fa430835eee2b426019db3ad70eeb7a9e9070c09c84bd9b973cf56cbe529, 107 inventory words, 0 static mismatches, CUDA baseline verified before and after)
- Updated .gitignore to exclude build archives (*.a, *.rlib), __pycache__, and raw trace dumps
2026-11-23 23:48:38 +00:00

16 lines
1.2 KiB
C

#include <stdio.h>
#include <stdint.h>
#include "nvtypes.h"
#include "nvmisc.h"
#include "cla16f.h"
#include "clc46f.h"
#include "clc86f.h"
static uint64_t original(int mode,uint64_t address,uint32_t bytes,int wait){
uint32_t lo=(uint32_t)address,hi=(uint32_t)(address>>32),word;
if(mode==0){word=DRF_NUM(A16F,_GP_ENTRY1,_GET_HI,hi)|DRF_NUM(A16F,_GP_ENTRY1,_LENGTH,bytes>>2)|DRF_DEF(A16F,_GP_ENTRY1,_PRIV,_KERNEL)|DRF_NUM(A16F,_GP_ENTRY1,_SYNC,wait);lo=DRF_NUM(A16F,_GP_ENTRY0,_GET,lo>>2);}
else if(mode==1){word=DRF_NUM(C46F,_GP_ENTRY1,_GET_HI,hi)|DRF_NUM(C46F,_GP_ENTRY1,_LENGTH,bytes>>2)|DRF_NUM(C46F,_GP_ENTRY1,_SYNC,wait);lo=DRF_NUM(C46F,_GP_ENTRY0,_GET,lo>>2);}
else {word=DRF_NUM(C86F,_GP_ENTRY1,_GET_HI,hi)|DRF_NUM(C86F,_GP_ENTRY1,_LENGTH,bytes>>2)|DRF_NUM(C86F,_GP_ENTRY1,_SYNC,wait);lo=DRF_NUM(C86F,_GP_ENTRY0,_GET,lo>>2);}
return lo|((uint64_t)word<<32);
}
int main(void){uint64_t a[]={0,4,0x1234567800ULL,0x100000000ULL,0xffff000000ULL};uint32_t lengths[]={4,8,4096,65536};for(int m=0;m<3;m++)for(int i=0;i<5;i++)for(int j=0;j<4;j++)for(int w=0;w<2;w++){uint64_t address=a[i]+(m==2?(1ULL<<44):0);printf("(%d,0x%llx,%u,%s,0x%llx),\n",m,(unsigned long long)address,lengths[j],w?"true":"false",(unsigned long long)original(m,address,lengths[j],w));}return 0;}