이 부분과 관련된 PCIe device 의 identify contoller data structur 에서 다음 항목들을 살펴 보면 ,
Byte 0263 : Number of Power States Support (NPSS) 0x05
-> PS0 ,PS1, PS2, PS3, PS4 and PS5 , totally 6 power states are supported
Byte 0265 : Autonomous Power State Trans Attribs (APSTA) 0x01
-> 해당 device 는 APST를 지원합니다.
Power State Descriptors:
Byte 2048..2079 : Power State 0 Descriptor (PSD0) 0x0000000000000000008201F400400BB8000000000000000000000000000001F4
Bit 0000..0015 : Maximum Power (MP) 500
Bit 0024 : Max Power Scale (MXPS) 0b
Bit 0025 : Non-Operational State (NOPS) 0b -> Controller to process IO in PS0
Bit 0032..0063 : Entry Latency (ENLAT) 0
Bit 0064..0095 : Exit Latency (EXLAT) 0
Bit 0096..0100 : Relative Read Throughput (RRT) 0
Bit 0104..0108 : Relative Read Latency (RRL) 0
Bit 0112..0116 : Relative Write Throughput (RWT) 0
Bit 0120..0124 : Relative Write Latency (RWL) 0
Bit 0128..0143 : Idle Power (IDLP) 3000
Bit 0150..0151 : Idle Power Scale (IPS) 10b
Bit 0160..0175 : Active Power (ACTP) 500
Bit 0176..0178 : Active Power Workload (APW) 131072
Bit 0182..0183 : Active Power Scale (APS) 01b
Byte 2080..2111 : Power State 1 Descriptor (PSD1) 0x00000000000000000082012C00400BB80000000000000000000000000000014A
Bit 0000..0015 : Maximum Power (MP) 330
Bit 0024 : Max Power Scale (MXPS) 0b
Bit 0025 : Non-Operational State (NOPS) 0b -> Controller to process IO in PS1
Bit 0032..0063 : Entry Latency (ENLAT) 0
Bit 0064..0095 : Exit Latency (EXLAT) 0
Bit 0096..0100 : Relative Read Throughput (RRT) 0
Bit 0104..0108 : Relative Read Latency (RRL) 0
Bit 0112..0116 : Relative Write Throughput (RWT) 0
Bit 0120..0124 : Relative Write Latency (RWL) 0
Bit 0128..0143 : Idle Power (IDLP) 3000
Bit 0150..0151 : Idle Power Scale (IPS) 10b
Bit 0160..0175 : Active Power (ACTP) 300
Bit 0176..0178 : Active Power Workload (APW) 131072
Bit 0182..0183 : Active Power Scale (APS) 01b
Byte 2112..2143 : Power State 2 Descriptor (PSD2) 0x0000000000000000008200C800400BB8000000000000000000000000000000DC
Bit 0000..0015 : Maximum Power (MP) 220
Bit 0024 : Max Power Scale (MXPS) 0b
Bit 0025 : Non-Operational State (NOPS) 0b -> Controller to process IO in PS2
Bit 0032..0063 : Entry Latency (ENLAT) 0
Bit 0064..0095 : Exit Latency (EXLAT) 0
Bit 0096..0100 : Relative Read Throughput (RRT) 0
Bit 0104..0108 : Relative Read Latency (RRL) 0
Bit 0112..0116 : Relative Write Throughput (RWT) 0
Bit 0120..0124 : Relative Write Latency (RWL) 0
Bit 0128..0143 : Idle Power (IDLP) 3000
Bit 0150..0151 : Idle Power Scale (IPS) 10b
Bit 0160..0175 : Active Power (ACTP) 200
Bit 0176..0178 : Active Power Workload (APW) 131072
Bit 0182..0183 : Active Power Scale (APS) 01b
Byte 2144..2175 : Power State 3 Descriptor (PSD3) 0x0000000000000000000000000040009603030303000009C4000005DC03000096
Bit 0000..0015 : Maximum Power (MP) 150
Bit 0024 : Max Power Scale (MXPS) 1b
Bit 0025 : Non-Operational State (NOPS) 1b -> Controller NOT to process IO in PS3
Bit 0032..0063 : Entry Latency (ENLAT) 1500 -> 최대 Entry Latency in ms to PS3
Bit 0064..0095 : Exit Latency (EXLAT) 2500 -> 최대 Exit Latency in ms from PS3
Bit 0096..0100 : Relative Read Throughput (RRT) 3
Bit 0104..0108 : Relative Read Latency (RRL) 768
Bit 0112..0116 : Relative Write Throughput (RWT) 196608
Bit 0120..0124 : Relative Write Latency (RWL) 50331648
Bit 0128..0143 : Idle Power (IDLP) 150
Bit 0150..0151 : Idle Power Scale (IPS) 10b
Bit 0160..0175 : Active Power (ACTP) 0
Bit 0176..0178 : Active Power Workload (APW) 0
Bit 0182..0183 : Active Power Scale (APS) 00b
Byte 2176..2207 : Power State 4 Descriptor (PSD4) 0x0000000000000000000000000040003204040404000017700000271003000032
Bit 0000..0015 : Maximum Power (MP) 50
Bit 0024 : Max Power Scale (MXPS) 1b
Bit 0025 : Non-Operational State (NOPS) 1b -> Controller NOT to process IO in PS3
Bit 0032..0063 : Entry Latency (ENLAT) 10000 -> 최대 Entry Latency in ms to PS4
Bit 0064..0095 : Exit Latency (EXLAT) 6000 -> 최대 Exit Latency in ms from PS4
Bit 0096..0100 : Relative Read Throughput (RRT) 4
Bit 0104..0108 : Relative Read Latency (RRL) 1024
Bit 0112..0116 : Relative Write Throughput (RWT) 262144
Bit 0120..0124 : Relative Write Latency (RWL) 67108864
Bit 0128..0143 : Idle Power (IDLP) 50
Bit 0150..0151 : Idle Power Scale (IPS) 10b
Bit 0160..0175 : Active Power (ACTP) 0
Bit 0176..0178 : Active Power Workload (APW) 0
Bit 0182..0183 : Active Power Scale (APS) 00b
Devce가 APST를 진행할 수 있도록 설정한다.
Set Feature command (FID :0x0C) 를 사용하여, APSTE를 Enable 상태로 전환한다.
- Set Feture command (OP code : 0x09)
- Feature Identify : 0x0C
- CDW11 :
- APSTE : 이 비트는 autonomous power state 이 활성화되는지 여부를 지정합니다. 이 비트가 '1'로 설정되면 autonomous power state 활성화됩니다. 이 비트가 '0'으로 지워지면 autonomous power state 비활성화됩니다. 이 비트는 기본적으로 '0'으로 지워져 있습니다.
- Command를 보낼때 data buffer 를 통해서, APST Data Structure Entry 도 함께 보내야한다.
APST data structure 의 각 항목은 Figure 328에서 정의되어 있습니다. 각 항목은 64비트 크기입니다. 허용 가능한 32개 power state 각각에 대한 항목이 있습니다. (즉 최대 8 bytes X 32 = 256 bytes) 지원되지 않는 power state 애 해당하는 Entry 에 대해서는 64비트 모두 0으로 지워야 합니다. 항목은 PS 0부터 시작하여 순차적으로 증가합니다(즉, 전원 상태 0은 바이트 7:0에서 설명되고, 전원 상태 1은 바이트 15:8에서 설명되는 식입니다). 이 데이터 구조는 256바이트 크기이며 물리적으로 연속되어야 합니다.
Idle Time Prior to Transition (ITPT): 필드 이름이 알려주는 것처럼, 현재의 Power State 에서 the Idel Transition Power State(ITPS) 상태로 변경이 발생하기 전에 기다려야 하는 유휴 시간을 나타냅니다. 단위는 ms 입니다.이 값이 0이면 해당 power state에 대한 APST feture 가 비활성화 됩니다.
Idle Transition Power State (ITPS): 현재의 어떠한 Power State 에서 위 ITPT 만큼의 시간이 지난다음 결국 APST를 통해서 도달하게 되는 power state 를 의미합니다. ITPT필드가 0이 아닌 값으로 설정 되었을 경우, 여기 명시된 power state가 non-operational state료 설정되어 있어야 합니다.(위 device 에서는 PS3, PS4). 이 필드는 현재 전원 상태보다 높은 보고된 유휴 전력을 갖는 전원 상태를 지정해서는 안 됩니다. 만일 ITPT 필드가 0으로 지워진 경우, 이 필드도 0으로 지워 져야 합니다.
위 설명으로 볼때, 위 Device 에 맞는 Data structure 는 아마도 다음과 같아야 할 듯 합니다.
Power State | ITPT | ITPS | non-operational state | APST |
0 | 0 | 0 | X | |
1 | 0 | 0 | X | |
2 | 0 | 0 | X | |
3 | 1500 | 3 | O | |
4 | 10000 | 4 | O |
Get Features 명령을 issue 하면 (FID :0x0C)
1. completion queue entry Dword 0 을 통해 Figure 327에 지정된 속성들이 반환 됩니다.
2. 또한 데이터 버퍼에는 Figure 328에서 정의된 항목 형태로 Autonomous Power State Transition data structure 반환됩니다.
8.15.2 Autonomous Power State Transitions
컨트롤러는 Figure 275의 Identify Controller 데이터 구조에 나와 있는 대로 자율적인 전원 상태 전환을 지원할 수 있습니다. 자율적인 전원 상태 전환은 호스트가 특정 조건에서 소프트웨어 개입 없이 컨트롤러를 자동으로 전원 상태 간 이동하도록 설정할 수 있는 메커니즘을 제공합니다.
아이들 전원 상태로 전환하기 위한 진입 조건은 컨트롤러가 지정된 전환 시간 이전에 지정된 시간 동안 지속적으로 아이들 상태였을 때입니다. 컨트롤러는 어떤 I/O 제출 큐에도 미처리된 명령이 없을 때 아이들 상태입니다. 컨트롤러가 제안된 비운영 전원 상태의 광고 전원을 초과시킬 수 있는 작업(예: 장치 자가 테스트 작업)이 진행 중이라면, 컨트롤러는 해당 상태로 자율적으로 전환해서는 안 됩니다.
전환할 전원 상태는 non-operational power state 여야 합니다(비운영 전원 상태는 다른 비운영 전원 상태로 자율적으로 전환될 수 있습니다). 만약 운영 전원 상태가 지정된 경우, 컨트롤러는 "명령에 유효하지 않은 필드" 상태 코드와 함께 해당 명령을 중단해야 합니다. 자세한 내용은 섹션 8.15.1을 참조하십시오.
'NVMe' 카테고리의 다른 글
Power management (1) | 2023.11.24 |
---|---|
Features and Log pages (0) | 2022.03.24 |
Persistent Event Log Page (0) | 2022.03.22 |