Skip to content

Commit

Permalink
m1n1.fw.agx: Misc initdata/etc fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Asahi Lina <[email protected]>
  • Loading branch information
asahilina committed Jan 20, 2023
1 parent 3d28ac4 commit 58f477a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
12 changes: 6 additions & 6 deletions proxyclient/m1n1/agx/initdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ def iomap(phys, size, range_size, rw):
gpu_fast_die0_sensor_mask64_alt = 0x12,
gpu_fast_die0_sensor_present = 0x01,
shared1_tab = [
-1, 0x7282, 0x50ea, 0x370a, 0x25be, 0x1c1f, 0x16fb
] + ([-1] * 10),
0x7282, 0x50ea, 0x370a, 0x25be, 0x1c1f, 0x16fb
] + ([-1] * 9) + [0xffff],
shared1_a4 = 0xffff,
shared2_tab = [0x800, 0x1555, -1, -1, -1, -1, -1, -1, 0, 0],
shared2_unk_508 = 0xc0007,
shared2_unk_508 = 0xc00007,
unk_3cf4 = [1000.0, 0, 0, 0, 0, 0, 0, 0],
unk_3d14 = [45.0, 0, 0, 0, 0, 0, 0, 0],
unk_118ec = None,
Expand Down Expand Up @@ -136,7 +136,7 @@ def iomap(phys, size, range_size, rw):
gpu_fast_die0_sensor_mask64 = 0x80808080,
gpu_fast_die0_sensor_mask64_alt = 0x90909090,
gpu_fast_die0_sensor_present = 0x0f,
shared1_tab = [0] + ([0xffff] * 16),
shared1_tab = [0xffff] * 16,
shared1_a4 = 0xffff,
shared2_tab = [-1, -1, -1, -1, 0x2aa, 0xaaa, -1, -1, 0, 0],
shared2_unk_508 = 0xcc00001,
Expand Down Expand Up @@ -177,7 +177,7 @@ def iomap(phys, size, range_size, rw):
gpu_fast_die0_sensor_mask64 = 0x8080808080808080,
gpu_fast_die0_sensor_mask64_alt = 0x9090909090909090,
gpu_fast_die0_sensor_present = 0xff,
shared1_tab = [0] + ([0xffff] * 16),
shared1_tab = [0xffff] * 16,
shared1_a4 = 0xffff,
shared2_tab = [-1, -1, -1, -1, 0x2aa, 0xaaa, -1, -1, 0, 0],
shared2_unk_508 = 0xcc00001,
Expand Down Expand Up @@ -220,7 +220,7 @@ def iomap(phys, size, range_size, rw):
gpu_fast_die0_sensor_mask64 = 0x6800,
gpu_fast_die0_sensor_mask64_alt = 0x6800,
gpu_fast_die0_sensor_present = 0x02,
shared1_tab = [0] + ([0xffff] * 16),
shared1_tab = [0xffff] * 16,
shared1_a4 = 0,
shared2_tab = [-1, -1, -1, -1, -1, -1, -1, -1, 0xaa5aa, 0],
shared2_unk_508 = 0xc00000,
Expand Down
2 changes: 1 addition & 1 deletion proxyclient/m1n1/fw/agx/cmdqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class EventControl(ConstructClass):
"in_list" / Int32ul,
Ver("G >= G14", "unk_98_g14_0" / HexDump(Bytes(0x14))),
"list_head" / LinkedListHead,
Ver("G >= G14", "unk_a8_g14_0" / Padding(4)),
Ver("G >= G14", "unk_a8_g14_0" / ZPadding(4)),
Ver("V >= V13_0B4", "unk_buf" / EventControlUnkBuf),
)

Expand Down
6 changes: 5 additions & 1 deletion proxyclient/m1n1/fw/agx/initdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self):

class AGXHWDataShared1(ConstructClass):
subcon = Struct(
"table" / Array(17, Int32sl),
"table" / Array(16, Int32sl),
"unk_44" / HexDump(Bytes(0x60)),
"unk_a4" / Int32ul,
"unk_a8" / Int32ul,
Expand Down Expand Up @@ -635,6 +635,7 @@ class AGXHWDataA(ConstructClass):
Ver("V < V13_0B4", "unk_1638" / Array(2, Int32ul)),
"unk_1640" / HexDump(Bytes(0x2000)),
"unk_3640" / Int32ul,
"unk_3644" / Int32ul,
"hws1" / AGXHWDataShared1,
Ver("V >= V13_0B4", "unk_pad1" / HexDump(Bytes(0x20))),
"hws2" / AGXHWDataShared2,
Expand Down Expand Up @@ -951,6 +952,7 @@ def __init__(self, sgx, chip_info):
self.unk_1638 = [0, 1]
self.unk_1640 = bytes(0x2000)
self.unk_3640 = 0
self.unk_3644 = 0xffffffff
self.hws1 = AGXHWDataShared1(chip_info)
self.unk_pad1 = bytes(0x20)
self.hws2 = AGXHWDataShared2(chip_info)
Expand Down Expand Up @@ -1692,6 +1694,7 @@ class InitData_RegionC(ConstructClass):
Ver("V >= V13_0B4", "unk_89f4_0" / HexDump(Bytes(0x8))),
Ver("V >= V13_0B4", "unk_89f4_8" / Int32ul),
Ver("V >= V13_0B4", "unk_89f4_c" / HexDump(Bytes(0x50))),
"unk_89f4" / Int32ul,
"hws1" / AGXHWDataShared1,
"hws2" / AGXHWDataShared2,
"hws3" / AGXHWDataShared3,
Expand Down Expand Up @@ -1814,6 +1817,7 @@ def __init__(self, sgx, chip_info):
self.unk_89f4_0 = bytes(8)
self.unk_89f4_8 = 1
self.unk_89f4_c = bytes(0x50)
self.unk_89f4 = 0
self.hws1 = AGXHWDataShared1(chip_info)
self.hws2 = AGXHWDataShared2(chip_info)
self.hws3 = AGXHWDataShared3(chip_info)
Expand Down
2 changes: 1 addition & 1 deletion proxyclient/m1n1/fw/agx/microsequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ class StartTACmdStruct2(ConstructClass):
"unk_f8" / Int64ul,
"unk_100" / Array(3, Hex(Int64ul)),
"unk_118" / Int32ul,
Ver("G >= G14", Padding(8 * 9)),
Ver("G >= G14", ZPadding(8 * 9)),
)

class StartTACmdStruct3(ConstructClass):
Expand Down

0 comments on commit 58f477a

Please sign in to comment.