mirror of
https://github.com/QuixiAI/nvdriver.git
synced 2026-12-06 06:28:39 +00:00
- 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
16 lines
1.2 KiB
C
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;}
|