Skip to content

Commit

Permalink
Upstream device IDs and models with Windows
Browse files Browse the repository at this point in the history
And don't attach to GPU USB controllers anymore...
  • Loading branch information
ExtremeXT committed Oct 6, 2023
1 parent ddf3b0a commit 1ead1f2
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 14 deletions.
6 changes: 3 additions & 3 deletions NootRX/Firmware/Drivers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>IOMatchCategory</key>
<string>AMDRadeonX6000HWServices</string>
<key>IOPCIMatch</key>
<string>0x73A21002 0x73A31002 0x73A41002 0x73A51002 0x73AB1002 0x73AF1002 0x73BF1002 0x73C31002 0x73C41002 0x73DF1002 0x73E01002 0x73E11002 0x73E31002 0x73EF1002 0x73FF1002</string>
<string>0x73A21002 0x73A31002 0x73A51002 0x73AB1002 0x73AF1002 0x73BF1002 0x73DF1002 0x73E01002 0x73E11002 0x73E31002 0x73EF1002 0x73FF1002 0x74211002 0x74221002 0x74231002 0x743F1002</string>
<key>IOPCITunnelCompatible</key>
<true/>
<key>IOProbeScore</key>
Expand Down Expand Up @@ -97,7 +97,7 @@
<key>IOMatchCategory</key>
<string>IOAccelerator</string>
<key>IOPCIMatch</key>
<string>0x73A21002 0x73A31002 0x73A41002 0x73A51002 0x73AB1002 0x73AF1002 0x73BF1002 </string>
<string>0x73A21002 0x73A31002 0x73A51002 0x73AB1002 0x73AF1002 0x73BF1002</string>
<key>IOPCITunnelCompatible</key>
<true/>
<key>IOPropertyMatch</key>
Expand Down Expand Up @@ -204,7 +204,7 @@
<key>IOMatchCategory</key>
<string>IOAccelerator</string>
<key>IOPCIMatch</key>
<string>0x73C31002 0x73C41002 0x73DF1002 0x73E01002 0x73E11002 0x73E31002 0x73EF1002 0x73FF1002</string>
<string>0x73DF1002 0x73E01002 0x73E11002 0x73E31002 0x73EF1002 0x73FF1002 0x74211002 0x74221002 0x74231002 0x743F1002</string>
<key>IOPCITunnelCompatible</key>
<true/>
<key>IOPropertyMatch</key>
Expand Down
10 changes: 5 additions & 5 deletions NootRX/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
<key>IOMatchCategory</key>
<string>IOFramebuffer</string>
<key>IOPCIMatch</key>
<string>0x73A21002 0x73A31002 0x73A41002 0x73A51002 0x73AB1002 0x73AF1002 0x73BF1002 0x73C31002 0x73C41002 0x73DF1002 0x73E01002 0x73E11002 0x73E31002 0x73EF1002 0x73FF1002</string>
<string>0x73A21002 0x73A31002 0x73A51002 0x73AB1002 0x73AF1002 0x73BF1002 0x73DF1002 0x73E01002 0x73E11002 0x73E31002 0x73EF1002 0x73FF1002 0x74211002 0x74221002 0x74231002 0x743F1002</string>
<key>IOPCITunnelCompatible</key>
<true/>
<key>IOProbeScore</key>
<integer>60000</integer>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
</dict>
<key>AMDRadeonNavi21Controller</key>
<key>AMDRadeonControllerNavi21</key>
<dict>
<key>ATY,Belknap</key>
<dict>
Expand Down Expand Up @@ -129,7 +129,7 @@
<key>IOMatchCategory</key>
<string>ATIFramebuffer</string>
<key>IOPCIMatch</key>
<string>0x73A21002 0x73A31002 0x73A41002 0x73A51002 0x73AB1002 0x73AF1002 0x73BF1002</string>
<string>0x73A21002 0x73A31002 0x73A51002 0x73AB1002 0x73AF1002 0x73BF1002</string>
<key>IOPCITunnelCompatible</key>
<true/>
<key>IOPCIUseDeviceMapper</key>
Expand Down Expand Up @@ -186,7 +186,7 @@
<integer>4</integer>
</dict>
</dict>
<key>AMDRadeonNavi23Controller</key>
<key>AMDRadeonControllerNavi23</key>
<dict>
<key>ATY,Henbury</key>
<dict>
Expand Down Expand Up @@ -237,7 +237,7 @@
<key>IOMatchCategory</key>
<string>ATIFramebuffer</string>
<key>IOPCIMatch</key>
<string>0x73C31002 0x73C41002 0x73DF1002 0x73E01002 0x73E31002 0x73EF1002 0x73FF1002</string>
<string>0x73DF1002 0x73E01002 0x73E11002 0x73E31002 0x73EF1002 0x73FF1002 0x74211002 0x74221002 0x74231002 0x743F1002</string>
<key>IOPCITunnelCompatible</key>
<true/>
<key>IOPCIUseDeviceMapper</key>
Expand Down
65 changes: 64 additions & 1 deletion NootRX/Model.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,24 @@ struct DevicePair {
size_t modelNum;
};

static constexpr Model dev73A2[] = {
{0x00, "AMD Radeon Pro W6900X"},
};

static constexpr Model dev73A3[] = {
{0x00, "AMD Radeon Pro W6800"},
};

static constexpr Model dev73A5[] = {
{0xC0, "AMD Radeon RX 6950 XT"},
};

static constexpr Model dev73AB[] = {
{0x00, "AMD Radeon Pro W6800X"},
};

static constexpr Model dev73AF[] = {
{0xC0, "AMD Radeon RX 6900 XTXH"},
{0xC0, "AMD Radeon RX 6900 XT"},
};

static constexpr Model dev73BF[] = {
Expand All @@ -40,6 +52,18 @@ static constexpr Model dev73DF[] = {
{0xFF, "AMD Radeon RX 6700"},
};

static constexpr Model dev73E0[] = {
{0x00, "AMD Radeon Pro W6600X"},
};

static constexpr Model dev73E1[] = {
{0x00, "AMD Radeon Pro W6600M"},
};

static constexpr Model dev73E3[] = {
{0x00, "AMD Radeon Pro W6600"},
};

static constexpr Model dev73EF[] = {
{0xC0, "AMD Radeon RX 6800S"},
{0xC1, "AMD Radeon RX 6650 XT"},
Expand All @@ -48,12 +72,51 @@ static constexpr Model dev73EF[] = {
{0xC4, "AMD Radeon RX 6650M XT"},
};

static constexpr Model dev73FF[] = {
{0xC1, "AMD Radeon RX 6600 XT"},
{0xC3, "AMD Radeon RX 6600M"},
{0xC7, "AMD Radeon RX 6600"},
{0xCB, "AMD Radeon RX 6600S"},
};

static constexpr Model dev7421[] = {
{0x00, "AMD Radeon Pro W6500M"},
}

static constexpr Model dev7422[] = {
{0x00, "AMD Radeon Pro W6400"},
}

static constexpr Model dev7423[] = {
{0x01, "AMD Radeon Pro W6300"},
}

static constexpr Model dev743F[] = {
{0xC1, "AMD Radeon RX 6500 XT"},
{0xC3, "AMD Radeon RX 6500M"},
{0xC7, "AMD Radeon RX 6400"},
{0xC8, "AMD Radeon RX 6550M"},
{0xCE, "AMD Radeon RX 6450M"},
{0xCF, "AMD Radeon RX 6300M"},
}

static constexpr DevicePair devices[] = {
{0x73A2, dev73A2, arrsize(dev73A2)},
{0x73A3, dev73A3, arrsize(dev73A3)},
{0x73A5, dev73A5, arrsize(dev73A5)},
{0x73AB, dev73AB, arrsize(dev73AB)},
{0x73AF, dev73AF, arrsize(dev73AF)},
{0x73BF, dev73BF, arrsize(dev73BF)},
{0x73DF, dev73DF, arrsize(dev73DF)},
{0x73E0, dev73E0, arrsize(dev73E0)},
{0x73E1, dev73E1, arrsize(dev73E1)},
{0x73E3, dev73E3, arrsize(dev73E3)},
{0x73EF, dev73EF, arrsize(dev73EF)},
{0x73FF, dev73FF, arrsize(dev73FF)},
{0x7421, dev7421, arrsize(dev7421)},
{0x7422, dev7422, arrsize(dev7422)},
{0x7423, dev7423, arrsize(dev7423)},
{0x743F, dev743F, arrsize(dev743F)},
};

inline const char *getBranding(UInt16 dev, UInt16 rev) {
Expand Down
14 changes: 9 additions & 5 deletions NootRX/NootRX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ void NootRXMain::processPatcher(KernelPatcher &patcher) {
}

switch (this->deviceId) {
case 0x73A2 ... 0x73A5:
case 0x73A2 ... 0x73A3:
[[fallthrough]];
case 0x73A5:
[[fallthrough]];
case 0x73AB:
[[fallthrough]];
Expand All @@ -92,23 +94,25 @@ void NootRXMain::processPatcher(KernelPatcher &patcher) {
this->chipType = ChipType::Navi21;
this->enumRevision = 0x28;
break;
case 0x73C3 ... 0x73C4:
[[fallthrough]];
case 0x73DF:
PANIC_COND(getKernelVersion() < KernelVersion::Monterey, "NootRX",
"Unsupported macOS version; Navi 22 requires macOS Monterey or newer");
this->chipType = ChipType::Navi22;
this->enumRevision = 0x32;
break;
case 0x73E0 ... 0x73E4:
case 0x73E0 ... 0x73E1:
[[fallthrough]];
case 0x73E3:
[[fallthrough]];
case 0x73EF:
[[fallthrough]]
case 0x73FF:
PANIC_COND(getKernelVersion() < KernelVersion::Monterey, "NootRX",
"Unsupported macOS version; Navi 23 requires macOS Monterey or newer");
this->chipType = ChipType::Navi23;
this->enumRevision = 0x3C;
break;
case 0x7420 ... 0x7424:
case 0x7421 ... 0x7423:
[[fallthrough]];
case 0x743F:
PANIC_COND(getKernelVersion() < KernelVersion::Monterey, "NootRX",
Expand Down

0 comments on commit 1ead1f2

Please sign in to comment.