@@ -6,7 +6,7 @@ use crate::f32;
6
6
7
7
use super :: * ;
8
8
9
- const fn iomaps ( mcc_count : usize ) -> [ Option < IOMapping > ; 24 ] {
9
+ const fn iomaps ( chip_id : u32 , mcc_count : usize ) -> [ Option < IOMapping > ; 24 ] {
10
10
[
11
11
Some ( IOMapping :: new ( 0x404d00000 , 0x144000 , 0x144000 , true ) ) , // Fender
12
12
Some ( IOMapping :: new ( 0x20e100000 , 0x4000 , 0x4000 , false ) ) , // AICTimer
@@ -15,18 +15,21 @@ const fn iomaps(mcc_count: usize) -> [Option<IOMapping>; 24] {
15
15
None , // UVD
16
16
None , // unused
17
17
None , // DisplayUnderrunWA
18
- Some ( IOMapping :: new ( 0x28e478000 , 0x4000 , 0x4000 , false ) ) , // AnalogTempSensorControllerRegs
19
- None , // PMPDoorbell
20
- Some ( IOMapping :: new ( 0x404e08000 , 0x8000 , 0x8000 , true ) ) , // MetrologySensorRegs
21
- None , // GMGIFAFRegs
18
+ Some ( match chip_id {
19
+ 0x6020 => IOMapping :: new ( 0x28e460000 , 0x4000 , 0x4000 , false ) ,
20
+ _ => IOMapping :: new ( 0x28e478000 , 0x8000 , 0x4000 , false ) ,
21
+ } ) , // AnalogTempSensorControllerRegs
22
+ None , // PMPDoorbell
23
+ Some ( IOMapping :: new ( 0x404e08000 , 0x8000 , 0x8000 , true ) ) , // MetrologySensorRegs
24
+ None , // GMGIFAFRegs
22
25
Some ( IOMapping :: new (
23
26
0x200000000 ,
24
27
mcc_count * 0xd8000 ,
25
28
0xd8000 ,
26
29
true ,
27
30
) ) , // MCache registers
28
- Some ( IOMapping :: new ( 0x28e118000 , 0x4000 , 0x4000 , false ) ) , // AICBankedRegisters
29
- None , // PMGRScratch
31
+ Some ( IOMapping :: new ( 0x28e118000 , 0x4000 , 0x4000 , false ) ) , // AICBankedRegisters
32
+ None , // PMGRScratch
30
33
None , // NIA Special agent idle register die 0
31
34
None , // NIA Special agent idle register die 1
32
35
None , // CRE registers
@@ -79,6 +82,7 @@ pub(crate) const HWCONFIG_T6022: super::HwConfig = HwConfig {
79
82
unk_e24 : 125 ,
80
83
} ,
81
84
db : HwConfigB {
85
+ unk_454 : 1 ,
82
86
unk_4e0 : 4 ,
83
87
unk_534 : 0 ,
84
88
unk_ab8 : 0 , // Unused
@@ -136,7 +140,7 @@ pub(crate) const HWCONFIG_T6022: super::HwConfig = HwConfig {
136
140
fast_sensor_mask : [ 0x40005000c000d00 , 0x40005000c000d00 ] ,
137
141
fast_sensor_mask_alt : [ 0x140015001d001d00 , 0x140015001d001d00 ] ,
138
142
fast_die0_sensor_present : 0 , // Unused
139
- io_mappings : & iomaps ( 16 ) ,
143
+ io_mappings : & iomaps ( 0x6022 , 16 ) ,
140
144
sram_base : Some ( 0x404d60000 ) ,
141
145
sram_size : Some ( 0x20000 ) ,
142
146
} ;
@@ -150,7 +154,7 @@ pub(crate) const HWCONFIG_T6021: super::HwConfig = HwConfig {
150
154
max_num_clusters : 4 ,
151
155
fast_sensor_mask : [ 0x40005000c000d00 , 0 ] ,
152
156
fast_sensor_mask_alt : [ 0x140015001d001d00 , 0 ] ,
153
- io_mappings : & iomaps ( 8 ) ,
157
+ io_mappings : & iomaps ( 0x6021 , 8 ) ,
154
158
..HWCONFIG_T6022
155
159
} ;
156
160
@@ -159,9 +163,14 @@ pub(crate) const HWCONFIG_T6020: super::HwConfig = HwConfig {
159
163
gpu_variant : GpuVariant :: S ,
160
164
gpu_core : GpuCore :: G14S ,
161
165
166
+ db : HwConfigB {
167
+ unk_454 : 0 ,
168
+ ..HWCONFIG_T6021 . db
169
+ } ,
170
+
162
171
max_num_clusters : 2 ,
163
172
fast_sensor_mask : [ 0xc000d00 , 0 ] ,
164
173
fast_sensor_mask_alt : [ 0x1d001d00 , 0 ] ,
165
- io_mappings : & iomaps ( 4 ) ,
174
+ io_mappings : & iomaps ( 0x6020 , 4 ) ,
166
175
..HWCONFIG_T6021
167
176
} ;
0 commit comments