Skip to content

Commit

Permalink
Add Navi 24 constants
Browse files Browse the repository at this point in the history
  • Loading branch information
ExtremeXT committed Oct 2, 2023
1 parent 81ff039 commit b8e3eba
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
36 changes: 36 additions & 0 deletions NootRX/AMDCommon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,39 @@ static const CAILIPGoldenRegister goldenSettingsNavi22[] = {
GOLDEN_REGISTER(mmLDS_CONFIG, 0x00000020, 0x00000020),
GOLDEN_REGISTER_TERMINATOR,
};

static const CAILIPGoldenRegister goldenSettingsNavi24[] = {
GOLDEN_REGISTER(mmCGTT_SPI_CS_CLK_CTRL, 0x78000000, 0x78000100),
GOLDEN_REGISTER(mmCGTT_SPI_RA0_CLK_CTRL, 0xb0000ff0, 0x30000100),
GOLDEN_REGISTER(mmCGTT_SPI_RA1_CLK_CTRL, 0xff000000, 0x7e000100),
GOLDEN_REGISTER(mmCPF_GCR_CNTL, 0x0007ffff, 0x0000c000),
GOLDEN_REGISTER(mmDB_DEBUG3, 0xffffffff, 0x00000280),
GOLDEN_REGISTER(mmDB_DEBUG4, 0xffffffff, 0x00800000),
GOLDEN_REGISTER(mmGCR_GENERAL_CNTL_Sienna_Cichlid, 0x1ff1ffff, 0x00000500),
GOLDEN_REGISTER(mmGL2A_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),
GOLDEN_REGISTER(mmGL2C_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),
GOLDEN_REGISTER(mmGL2C_CM_CTRL1, 0xff8fff0f, 0x580f1008),
GOLDEN_REGISTER(mmGL2C_CTRL3, 0xf7ffffff, 0x00f80988),
GOLDEN_REGISTER(mmLDS_CONFIG, 0x000001ff, 0x00000020),
GOLDEN_REGISTER(mmPA_CL_ENHANCE, 0xf17fffff, 0x01200007),
GOLDEN_REGISTER(mmSQ_CONFIG, 0xe07df47f, 0x00180070),
GOLDEN_REGISTER(mmSQ_PERFCOUNTER0_SELECT, 0xf0f001ff, 0x00000000),
GOLDEN_REGISTER(mmSQ_PERFCOUNTER1_SELECT, 0xf0f001ff, 0x00000000),
GOLDEN_REGISTER(mmSQ_PERFCOUNTER10_SELECT, 0xf0f001ff, 0x00000000),
GOLDEN_REGISTER(mmSQ_PERFCOUNTER11_SELECT, 0xf0f001ff, 0x00000000),
GOLDEN_REGISTER(mmSQ_PERFCOUNTER12_SELECT, 0xf0f001ff, 0x00000000),
GOLDEN_REGISTER(mmSQ_PERFCOUNTER13_SELECT, 0xf0f001ff, 0x00000000),
GOLDEN_REGISTER(mmSQ_PERFCOUNTER14_SELECT, 0xf0f001ff, 0x00000000),
GOLDEN_REGISTER(mmSQ_PERFCOUNTER15_SELECT, 0xf0f001ff, 0x00000000),
GOLDEN_REGISTER(mmSQ_PERFCOUNTER2_SELECT, 0xf0f001ff, 0x00000000),
GOLDEN_REGISTER(mmSQ_PERFCOUNTER3_SELECT, 0xf0f001ff, 0x00000000),
GOLDEN_REGISTER(mmSQ_PERFCOUNTER4_SELECT, 0xf0f001ff, 0x00000000),
GOLDEN_REGISTER(mmSQ_PERFCOUNTER5_SELECT, 0xf0f001ff, 0x00000000),
GOLDEN_REGISTER(mmSQ_PERFCOUNTER6_SELECT, 0xf0f001ff, 0x00000000),
GOLDEN_REGISTER(mmSQ_PERFCOUNTER7_SELECT, 0xf0f001ff, 0x00000000),
GOLDEN_REGISTER(mmSQ_PERFCOUNTER8_SELECT, 0xf0f001ff, 0x00000000),
GOLDEN_REGISTER(mmSQ_PERFCOUNTER9_SELECT, 0xf0f001ff, 0x00000000),
GOLDEN_REGISTER(mmTA_CNTL_AUX, 0xfff7ffff, 0x01030000),
GOLDEN_REGISTER(mmUTCL1_CTRL, 0xffbfffff, 0x00a00000),
GOLDEN_REGISTER_TERMINATOR,
};
14 changes: 14 additions & 0 deletions NootRX/NootRX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,20 @@ void NootRXMain::processPatcher(KernelPatcher &patcher) {
this->chipType = ChipType::Navi23;
this->enumRevision = 0x3C;
break;
case 0x7420:
[[fallthrough]];
case 0x7421:
[[fallthrough]];
case 0x7422:
[[fallthrough]];
case 0x7423:
[[fallthrough]];
case 0x7424:
[[fallthrough]];
case 0x743F:
this->chipType = ChipType::Navi24;
this->enumRevision = 0x46;
break;
default:
PANIC("NootRX", "Unknown device ID");
}
Expand Down
5 changes: 3 additions & 2 deletions NootRX/NootRX.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ class NootRXMain {
}

static const char *getGCPrefix() {
// TODO: Add Navi 24
return "gc_10_3_2_";
PANIC_COND(callback->chipType == ChipType::Unknown, "NootRX", "Unknown chip type");
static const char *gcPrefixes[] = {"gc_10_3_0_", "gc_10_3_2_", "gc_10_3_4_", "gc_10_3_5_"};
return gcPrefixes[static_cast<int>(callback->chipType)];
}

ChipType chipType {ChipType::Unknown};
Expand Down

0 comments on commit b8e3eba

Please sign in to comment.