mirror of
https://github.com/QuixiAI/nvdriver.git
synced 2026-12-06 06:28:39 +00:00
* rmapi/vm: fix clippy int_plus_one and EDU guest FB geometry register fixture * tests/vm: use exact V100-SXM2-32GB FbGeometry register values in EDU fixture --------- Co-authored-by: Eric Hartford <eric@quixi.ai>
This commit is contained in:
@ -378,7 +378,7 @@ pub fn read_prom_vbios_p0_clocks(mut rd32: impl FnMut(u64) -> u32) -> Option<Vbi
|
||||
let mut p0_gpc_max = 0u32;
|
||||
let mut p0_mclk_mhz = 0u32;
|
||||
if let Some(pptr) = adjust_prom_ptr(perf_table_raw, image0_end, expansion_delta) {
|
||||
if pptr + 1 <= PROM_BYTES && prom_u8(&mut rd32, pptr) == 0x40 {
|
||||
if pptr < PROM_BYTES && prom_u8(&mut rd32, pptr) == 0x40 {
|
||||
// Maxwell P-state 4.0 uses a different layout; keep arch defaults instead of
|
||||
// partially overlaying VPSTATE without P-state 5.0 validation.
|
||||
return None;
|
||||
|
||||
@ -366,6 +366,15 @@ static int rmapi_read32(void *cookie,u64 offset,u32 *value)
|
||||
if(offset==0x9a050c){*value=0x111;return 0;}
|
||||
if(offset>=0xa10000&&offset<=0xa38000&&!((offset-0xa10000)&0x7fff)){*value=0;return 0;}
|
||||
if(offset==0x20400){*value=30<<8;return 0;}
|
||||
/* GV100 FB/L2 geometry registers (FbGeometry::REGISTERS) matching V100-SXM2-32GB
|
||||
* (8 FBPs, 16 HBM2 FBPAs -> 4096-bit bus, 16 LTCs * 4 slices * 96 KiB = 6 MiB L2). */
|
||||
if(offset==0x22438){*value=8;return 0;}
|
||||
if(offset==0x2243c||offset==0x12006c){*value=16;return 0;}
|
||||
if(offset==0x21d38||offset==0x21c14||offset==0x21c00){*value=0;return 0;}
|
||||
if(offset==0x17e480){*value=4U<<28;return 0;}
|
||||
if(offset==0x14058c||offset==0x17e58c){*value=(4U<<16)|96U;return 0;}
|
||||
if(offset==0x9a0590){*value=7;return 0;}
|
||||
if(offset==0x10f590){*value=0xbadf0000U;return 0;}
|
||||
return -ERANGE;
|
||||
}
|
||||
/* System memory of the RM API (rmapi_node.c) DMA-mapped for the listed GPU: an allocation of more than one page is
|
||||
|
||||
Reference in New Issue
Block a user