Skip to content

Commit 2fe50f3

Browse files
committed
[Intel][BDW][HSW] Query the IMC Power Down Mode
1 parent 597c0bb commit 2fe50f3

File tree

4 files changed

+42
-3
lines changed

4 files changed

+42
-3
lines changed

corefreq-api.h

+1
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ typedef struct
520520
/* 4C0Ch */ HSW_DDR_RANK_TIMING_B Rank_B; /* 32 bits */
521521
/* 4C14h */ HSW_DDR_RANK_TIMING Rank; /* 32 bits */
522522
/* 4E98h */ HSW_TC_REFRESH_TIMING Refresh; /*32 bits */
523+
/* 4CB0h */ HSW_PM_POWER_DOWN PDWN; /* 32 bits */
523524
} HSW;
524525
struct {
525526
/* 4000h */ SKL_IMC_CR_TC_PRE Timing; /* 32 bits */

corefreqd.c

+15-3
Original file line numberDiff line numberDiff line change
@@ -3834,9 +3834,6 @@ void HSW_IMC(RO(SHM_STRUCT) *RO(Shm), RO(PROC) *RO(Proc))
38343834
38353835
TIMING(mc, cha).tFAW = \
38363836
RO(Proc)->Uncore.MC[mc].Channel[cha].HSW._.tFAW;
3837-
3838-
TIMING(mc, cha).B2B = \
3839-
RO(Proc)->Uncore.MC[mc].Channel[cha].HSW._.B2B;
38403837
*/
38413838
TIMING(mc, cha).tRP = \
38423839
RO(Proc)->Uncore.MC[mc].Channel[cha].HSW.REG4C00.tRP;
@@ -3906,6 +3903,21 @@ void HSW_IMC(RO(SHM_STRUCT) *RO(Shm), RO(PROC) *RO(Proc))
39063903
TIMING(mc, cha).CMD_Rate = 0;
39073904
break;
39083905
}
3906+
/*
3907+
TIMING(mc, cha).B2B = \
3908+
RO(Proc)->Uncore.MC[mc].Channel[cha].HSW._.B2B;
3909+
3910+
TIMING(mc, cha).tXS = \
3911+
RO(Proc)->Uncore.MC[mc].Channel[cha].HSW._.tXS;
3912+
*/
3913+
TIMING(mc, cha).PDM_EN = \
3914+
0 != RO(Proc)->Uncore.MC[mc].Channel[cha].HSW.PDWN.PDWN_Mode;
3915+
3916+
TIMING(mc, cha).PDM_MODE = \
3917+
RO(Proc)->Uncore.MC[mc].Channel[cha].HSW.PDWN.PDWN_Mode;
3918+
3919+
TIMING(mc, cha).PDM_AGGR = \
3920+
RO(Proc)->Uncore.MC[mc].Channel[cha].HSW.PDWN.PDWN_Mode;
39093921

39103922
for (slot = 0; slot < RO(Shm)->Uncore.MC[mc].SlotCount; slot++)
39113923
{

corefreqk.c

+3
Original file line numberDiff line numberDiff line change
@@ -4489,6 +4489,9 @@ void Query_HSW_IMC(void __iomem *mchmap, unsigned short mc)
44894489

44904490
PUBLIC(RO(Proc))->Uncore.MC[mc].Channel[cha].HSW.Refresh.value = \
44914491
readl(mchmap + 0x4e98);
4492+
4493+
PUBLIC(RO(Proc))->Uncore.MC[mc].Channel[cha].HSW.PDWN.value = \
4494+
readl(mchmap + 0x4cb0);
44924495
}
44934496
/* Is Dual DIMM Per Channel Disable ? */
44944497
PUBLIC(RO(Proc))->Uncore.MC[mc].SlotCount = \

intelmsr.h

+23
Original file line numberDiff line numberDiff line change
@@ -3331,6 +3331,29 @@ typedef union
33313331
};
33323332
} HSW_DDR_RANK_TIMING;
33333333

3334+
typedef union
3335+
{ /* Device: 0 - Function: 0 - Offset Channel0: 4CB0h */
3336+
unsigned int value;
3337+
struct {
3338+
unsigned int
3339+
PDWN_Idle_Ctr : 12-0, /* Power-down entrance in DCLK */
3340+
PDWN_Mode : 16-12, /* 1:APD,2:PPD,6:DLL-OFF,3-5,7-15:RSV*/
3341+
ReservedBits : 32-16;
3342+
};
3343+
} HSW_PM_POWER_DOWN;
3344+
3345+
typedef union
3346+
{ /* Device: 0 - Function: 0 - Offset Channel0: 4E94h */
3347+
unsigned int value;
3348+
struct {
3349+
unsigned int
3350+
OREF_RI : 8-0, /* Rank idle perriod in DCLK */
3351+
Ref_HP_WM : 12-8, /* 8: Refresh priority to high */
3352+
Ref_Panic_WM : 16-12, /* 9: Refresh priority to panic */
3353+
ReservedBits : 32-16;
3354+
};
3355+
} HSW_TC_REFRESH_PARAM;
3356+
33343357
typedef union
33353358
{ /* Device: 0 - Function: 0 - Offset Channel0: 4E98h */
33363359
unsigned int value;

0 commit comments

Comments
 (0)