Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic support for Strix Point #310

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ static int request_table_ver_and_size(ryzen_access ry)
case FAM_REMBRANDT:
case FAM_PHOENIX:
case FAM_HAWKPOINT:
case FAM_STRIXPOINT:
get_table_ver_msg = 0x6;
break;
default:
Expand Down Expand Up @@ -208,8 +209,12 @@ static int request_table_addr(ryzen_access ry)
case FAM_REMBRANDT:
case FAM_PHOENIX:
case FAM_HAWKPOINT:
case FAM_STRIXPOINT:
get_table_addr_msg = 0x66;
break;

// get_table_addr_msg = 0x65;
//break;
default:
printf("request_table_addr is not supported on this family\n");
return ADJ_ERR_FAM_UNSUPPORTED;
Expand All @@ -222,6 +227,7 @@ static int request_table_addr(ryzen_access ry)
case FAM_REMBRANDT:
case FAM_PHOENIX:
case FAM_HAWKPOINT:
case FAM_STRIXPOINT:
ry->table_addr = (uint64_t) args.arg1 << 32 | args.arg0;
break;
default:
Expand Down Expand Up @@ -257,6 +263,7 @@ static int request_transfer_table(ryzen_access ry)
case FAM_REMBRANDT:
case FAM_PHOENIX:
case FAM_HAWKPOINT:
case FAM_STRIXPOINT:
transfer_table_msg = 0x65;
break;
default:
Expand Down
2 changes: 2 additions & 0 deletions lib/cpuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ static enum ryzen_family cpuid_load_family()
model = ((regs[0] >> 4) & 0xf) | ((regs[0] >> 12) & 0xf0);

switch (family) {

case 0x17: /* Zen, Zen+, Zen2 */
switch (model) {
case 17:
Expand Down Expand Up @@ -92,6 +93,7 @@ static enum ryzen_family cpuid_load_family()
case 0x1A: /* Zen5, Zen6 */
switch (model) {
case 32:
case 36:
return FAM_STRIXPOINT;
default:
printf("Fam%xh: unsupported model %d\n", family, model);
Expand Down
15 changes: 11 additions & 4 deletions lib/nb_smu_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,18 @@ smu_t get_smu(nb_t nb, int smu_type) {
smu->msg = MP1_C2PMSG_MESSAGE_ADDR_2;
smu->rep = MP1_C2PMSG_RESPONSE_ADDR_2;
smu->arg_base = MP1_C2PMSG_ARG_BASE_2;
} else {
smu->msg = MP1_C2PMSG_MESSAGE_ADDR_1;
smu->rep = MP1_C2PMSG_RESPONSE_ADDR_1;
smu->arg_base = MP1_C2PMSG_ARG_BASE_1;
break;
}
if (family == FAM_STRIXPOINT) {
smu->msg = MP1_C2PMSG_MESSAGE_ADDR_3;
smu->rep = MP1_C2PMSG_RESPONSE_ADDR_3;
smu->arg_base = MP1_C2PMSG_ARG_BASE_3;
break;
}
smu->msg = MP1_C2PMSG_MESSAGE_ADDR_1;
smu->rep = MP1_C2PMSG_RESPONSE_ADDR_1;
smu->arg_base = MP1_C2PMSG_ARG_BASE_1;

break;
case TYPE_PSMU:
smu->msg = PSMU_C2PMSG_MESSAGE_ADDR;
Expand Down
5 changes: 5 additions & 0 deletions lib/nb_smu_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ enum SMU_TYPE{
#define MP1_C2PMSG_RESPONSE_ADDR_2 0x3B10578
#define MP1_C2PMSG_ARG_BASE_2 0x3B10998

#define MP1_C2PMSG_MESSAGE_ADDR_3 0x3b10a20
#define MP1_C2PMSG_RESPONSE_ADDR_3 0x3b10a80
#define MP1_C2PMSG_ARG_BASE_3 0x3b10a88

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excessive new lines


#define PSMU_C2PMSG_MESSAGE_ADDR 0x3B10a20
#define PSMU_C2PMSG_RESPONSE_ADDR 0x3B10a80
#define PSMU_C2PMSG_ARG_BASE 0x3B10a88
Expand Down