blob: b3404a70f7cd0564d4a81a1b935ba6c9ef156cbe [file] [log] [blame]
Jason M. Bills7ef5a552020-04-06 14:58:44 -07001/*
2// Copyright (c) 2019 Intel Corporation
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15*/
16#pragma once
17#ifdef __cplusplus
18extern "C" {
19#endif
Jason M. Bills7ef5a552020-04-06 14:58:44 -070020#include <inttypes.h>
21#include <stdbool.h>
22
23// PECI Client Address List
24#define MIN_CLIENT_ADDR 0x30
25#define MAX_CLIENT_ADDR 0x37
26#define MAX_CPUS (MAX_CLIENT_ADDR - MIN_CLIENT_ADDR + 1)
27
Jason M. Billsa2ceec22020-05-05 13:16:00 -070028// PECI completion codes from peci-ioctl.h
29#define PECI_DEV_CC_SUCCESS 0x40
30#define PECI_DEV_CC_FATAL_MCA_DETECTED 0x94
31
Jason M. Bills7ef5a552020-04-06 14:58:44 -070032typedef enum
33{
34 skx = 0x00050650,
35 icx = 0x000606A0,
Jonathan Doman6a00e9a2021-11-03 13:55:45 -070036 icxd = 0x000606C0,
37 spr = 0x000806F0,
Jonathan Doman50959a22023-03-10 11:38:01 -080038 emr = 0x000C06F0,
39 gnr = 0x000A06D0,
40 srf = 0x000A06F0,
Jason M. Bills7ef5a552020-04-06 14:58:44 -070041} CPUModel;
42
43// PECI Status Codes
44typedef enum
45{
46 PECI_CC_SUCCESS = 0,
47 PECI_CC_INVALID_REQ,
48 PECI_CC_HW_ERR,
49 PECI_CC_DRIVER_ERR,
50 PECI_CC_CPU_NOT_PRESENT,
51 PECI_CC_MEM_ERR,
52 PECI_CC_TIMEOUT,
53} EPECIStatus;
54
55// PECI Timeout Options
56typedef enum
57{
58 PECI_WAIT_FOREVER = -1,
59 PECI_NO_WAIT = 0,
60} EPECITimeout;
61
62#define PECI_TIMEOUT_RESOLUTION_MS 10 // 10 ms
63#define PECI_TIMEOUT_MS 100 // 100 ms
64
65// VCU Index and Sequence Paramaters
66#define VCU_SET_PARAM 0x0001
67#define VCU_READ 0x0002
68#define VCU_OPEN_SEQ 0x0003
69#define VCU_CLOSE_SEQ 0x0004
70#define VCU_ABORT_SEQ 0x0005
71#define VCU_VERSION 0x0009
72
73typedef enum
74{
75 VCU_READ_LOCAL_CSR_SEQ = 0x2,
76 VCU_READ_LOCAL_MMIO_SEQ = 0x6,
77 VCU_EN_SECURE_DATA_SEQ = 0x14,
78 VCU_CORE_MCA_SEQ = 0x10000,
79 VCU_UNCORE_MCA_SEQ = 0x10000,
80 VCU_IOT_BRKPT_SEQ = 0x10010,
81 VCU_MBP_CONFIG_SEQ = 0x10026,
82 VCU_PWR_MGT_SEQ = 0x1002a,
83 VCU_CRASHDUMP_SEQ = 0x10038,
84 VCU_ARRAY_DUMP_SEQ = 0x20000,
85 VCU_SCAN_DUMP_SEQ = 0x20008,
86 VCU_TOR_DUMP_SEQ = 0x30002,
87 VCU_SQ_DUMP_SEQ = 0x30004,
88 VCU_UNCORE_CRASHDUMP_SEQ = 0x30006,
89} EPECISequence;
90
91#define MBX_INDEX_VCU 128 // VCU Index
92
93typedef enum
94{
95 MMIO_DWORD_OFFSET = 0x05,
96 MMIO_QWORD_OFFSET = 0x06,
97} EEndPtMmioAddrType;
98
99// Find the specified PCI bus number value
100EPECIStatus FindBusNumber(uint8_t u8Bus, uint8_t u8Cpu, uint8_t* pu8BusValue);
101
102// Gets the temperature from the target
103// Expressed in signed fixed point value of 1/64 degrees celsius
104EPECIStatus peci_GetTemp(uint8_t target, int16_t* temperature);
105
106// Provides read access to the package configuration space within the processor
107EPECIStatus peci_RdPkgConfig(uint8_t target, uint8_t u8Index, uint16_t u16Value,
108 uint8_t u8ReadLen, uint8_t* pPkgConfig,
109 uint8_t* cc);
110
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800111// Provides read access to the package configuration space within the processor
112// in the specified domain
113EPECIStatus peci_RdPkgConfig_dom(uint8_t target, uint8_t domainId,
114 uint8_t u8Index, uint16_t u16Value,
115 uint8_t u8ReadLen, uint8_t* pPkgConfig,
116 uint8_t* cc);
117
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700118// Allows sequential RdPkgConfig with the provided peci file descriptor
119EPECIStatus peci_RdPkgConfig_seq(uint8_t target, uint8_t u8Index,
120 uint16_t u16Value, uint8_t u8ReadLen,
121 uint8_t* pPkgConfig, int peci_fd, uint8_t* cc);
122
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800123// Allows sequential RdPkgConfig with the provided peci file descriptor in the
124// specified domain
125EPECIStatus peci_RdPkgConfig_seq_dom(uint8_t target, uint8_t domainId,
126 uint8_t u8Index, uint16_t u16Value,
127 uint8_t u8ReadLen, uint8_t* pPkgConfig,
128 int peci_fd, uint8_t* cc);
129
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700130// Provides write access to the package configuration space within the processor
131EPECIStatus peci_WrPkgConfig(uint8_t target, uint8_t u8Index, uint16_t u16Param,
132 uint32_t u32Value, uint8_t u8WriteLen,
133 uint8_t* cc);
134
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800135// Provides write access to the package configuration space within the processor
136// in the specified domain
137EPECIStatus peci_WrPkgConfig_dom(uint8_t target, uint8_t domainId,
138 uint8_t u8Index, uint16_t u16Param,
139 uint32_t u32Value, uint8_t u8WriteLen,
140 uint8_t* cc);
141
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700142// Allows sequential WrPkgConfig with the provided peci file descriptor
143EPECIStatus peci_WrPkgConfig_seq(uint8_t target, uint8_t u8Index,
144 uint16_t u16Param, uint32_t u32Value,
145 uint8_t u8WriteLen, int peci_fd, uint8_t* cc);
146
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800147// Allows sequential WrPkgConfig with the provided peci file descriptor in the
148// specified domain
149EPECIStatus peci_WrPkgConfig_seq_dom(uint8_t target, uint8_t domainId,
150 uint8_t u8Index, uint16_t u16Param,
151 uint32_t u32Value, uint8_t u8WriteLen,
152 int peci_fd, uint8_t* cc);
153
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700154// Provides read access to Model Specific Registers
155EPECIStatus peci_RdIAMSR(uint8_t target, uint8_t threadID, uint16_t MSRAddress,
156 uint64_t* u64MsrVal, uint8_t* cc);
157
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800158// Provides read access to Model Specific Registers in the specified domain
159EPECIStatus peci_RdIAMSR_dom(uint8_t target, uint8_t domainId, uint8_t threadID,
160 uint16_t MSRAddress, uint64_t* u64MsrVal,
161 uint8_t* cc);
162
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700163// Provides read access to PCI Configuration space
164EPECIStatus peci_RdPCIConfig(uint8_t target, uint8_t u8Bus, uint8_t u8Device,
165 uint8_t u8Fcn, uint16_t u16Reg, uint8_t* pPCIReg,
166 uint8_t* cc);
167
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800168// Provides read access to PCI Configuration space in the specified domain
169EPECIStatus peci_RdPCIConfig_dom(uint8_t target, uint8_t domainId,
170 uint8_t u8Bus, uint8_t u8Device, uint8_t u8Fcn,
171 uint16_t u16Reg, uint8_t* pPCIReg,
172 uint8_t* cc);
173
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700174// Allows sequential RdPCIConfig with the provided peci file descriptor
175EPECIStatus peci_RdPCIConfig_seq(uint8_t target, uint8_t u8Bus,
176 uint8_t u8Device, uint8_t u8Fcn,
177 uint16_t u16Reg, uint8_t* pPCIData,
178 int peci_fd, uint8_t* cc);
179
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800180// Allows sequential RdPCIConfig with the provided peci file descriptor in the
181// specified domain
182EPECIStatus peci_RdPCIConfig_seq_dom(uint8_t target, uint8_t domainId,
183 uint8_t u8Bus, uint8_t u8Device,
184 uint8_t u8Fcn, uint16_t u16Reg,
185 uint8_t* pPCIData, int peci_fd,
186 uint8_t* cc);
187
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700188// Provides read access to the local PCI Configuration space
189EPECIStatus peci_RdPCIConfigLocal(uint8_t target, uint8_t u8Bus,
190 uint8_t u8Device, uint8_t u8Fcn,
191 uint16_t u16Reg, uint8_t u8ReadLen,
192 uint8_t* pPCIReg, uint8_t* cc);
193
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800194// Provides read access to the local PCI Configuration space in the specified
195// domain
196EPECIStatus peci_RdPCIConfigLocal_dom(uint8_t target, uint8_t domainId,
197 uint8_t u8Bus, uint8_t u8Device,
198 uint8_t u8Fcn, uint16_t u16Reg,
199 uint8_t u8ReadLen, uint8_t* pPCIReg,
200 uint8_t* cc);
201
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700202// Allows sequential RdPCIConfigLocal with the provided peci file descriptor
203EPECIStatus peci_RdPCIConfigLocal_seq(uint8_t target, uint8_t u8Bus,
204 uint8_t u8Device, uint8_t u8Fcn,
205 uint16_t u16Reg, uint8_t u8ReadLen,
206 uint8_t* pPCIReg, int peci_fd,
207 uint8_t* cc);
208
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800209// Allows sequential RdPCIConfigLocal with the provided peci file descriptor in
210// the specified domain
211EPECIStatus peci_RdPCIConfigLocal_seq_dom(uint8_t target, uint8_t domainId,
212 uint8_t u8Bus, uint8_t u8Device,
213 uint8_t u8Fcn, uint16_t u16Reg,
214 uint8_t u8ReadLen, uint8_t* pPCIReg,
215 int peci_fd, uint8_t* cc);
216
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700217// Provides write access to the local PCI Configuration space
218EPECIStatus peci_WrPCIConfigLocal(uint8_t target, uint8_t u8Bus,
219 uint8_t u8Device, uint8_t u8Fcn,
220 uint16_t u16Reg, uint8_t DataLen,
221 uint32_t DataVal, uint8_t* cc);
222
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800223// Provides write access to the local PCI Configuration space in the specified
224// domain
225EPECIStatus peci_WrPCIConfigLocal_dom(uint8_t target, uint8_t domainId,
226 uint8_t u8Bus, uint8_t u8Device,
227 uint8_t u8Fcn, uint16_t u16Reg,
228 uint8_t DataLen, uint32_t DataVal,
229 uint8_t* cc);
230
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700231// Provides read access to PCI configuration space
232EPECIStatus peci_RdEndPointConfigPci(uint8_t target, uint8_t u8Seg,
233 uint8_t u8Bus, uint8_t u8Device,
234 uint8_t u8Fcn, uint16_t u16Reg,
235 uint8_t u8ReadLen, uint8_t* pPCIData,
236 uint8_t* cc);
237
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800238// Provides read access to PCI configuration space in the specified domain
239EPECIStatus peci_RdEndPointConfigPci_dom(uint8_t target, uint8_t domainId,
240 uint8_t u8Seg, uint8_t u8Bus,
241 uint8_t u8Device, uint8_t u8Fcn,
242 uint16_t u16Reg, uint8_t u8ReadLen,
243 uint8_t* pPCIData, uint8_t* cc);
244
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700245// Allows sequential RdEndPointConfig to PCI Configuration space
246EPECIStatus peci_RdEndPointConfigPci_seq(uint8_t target, uint8_t u8Seg,
247 uint8_t u8Bus, uint8_t u8Device,
248 uint8_t u8Fcn, uint16_t u16Reg,
249 uint8_t u8ReadLen, uint8_t* pPCIData,
250 int peci_fd, uint8_t* cc);
251
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800252// Allows sequential RdEndPointConfig to PCI Configuration space in the
253// specified domain
254EPECIStatus peci_RdEndPointConfigPci_seq_dom(uint8_t target, uint8_t domainId,
255 uint8_t u8Seg, uint8_t u8Bus,
256 uint8_t u8Device, uint8_t u8Fcn,
257 uint16_t u16Reg, uint8_t u8ReadLen,
258 uint8_t* pPCIData, int peci_fd,
259 uint8_t* cc);
260
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700261// Provides read access to the local PCI configuration space
262EPECIStatus peci_RdEndPointConfigPciLocal(uint8_t target, uint8_t u8Seg,
263 uint8_t u8Bus, uint8_t u8Device,
264 uint8_t u8Fcn, uint16_t u16Reg,
265 uint8_t u8ReadLen, uint8_t* pPCIData,
266 uint8_t* cc);
267
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800268// Provides read access to the local PCI configuration space in the specified
269// domain
270EPECIStatus peci_RdEndPointConfigPciLocal_dom(uint8_t target, uint8_t domainId,
271 uint8_t u8Seg, uint8_t u8Bus,
272 uint8_t u8Device, uint8_t u8Fcn,
273 uint16_t u16Reg,
274 uint8_t u8ReadLen,
275 uint8_t* pPCIData, uint8_t* cc);
276
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700277// Allows sequential RdEndPointConfig to the local PCI Configuration space
278EPECIStatus peci_RdEndPointConfigPciLocal_seq(uint8_t target, uint8_t u8Seg,
279 uint8_t u8Bus, uint8_t u8Device,
280 uint8_t u8Fcn, uint16_t u16Reg,
281 uint8_t u8ReadLen,
282 uint8_t* pPCIData, int peci_fd,
283 uint8_t* cc);
284
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800285// Allows sequential RdEndPointConfig to the local PCI Configuration space in
286// the specified domain
287EPECIStatus peci_RdEndPointConfigPciLocal_seq_dom(
288 uint8_t target, uint8_t domainId, uint8_t u8Seg, uint8_t u8Bus,
289 uint8_t u8Device, uint8_t u8Fcn, uint16_t u16Reg, uint8_t u8ReadLen,
290 uint8_t* pPCIData, int peci_fd, uint8_t* cc);
291
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700292// Provides read access to PCI MMIO space
293EPECIStatus peci_RdEndPointConfigMmio(uint8_t target, uint8_t u8Seg,
294 uint8_t u8Bus, uint8_t u8Device,
295 uint8_t u8Fcn, uint8_t u8Bar,
296 uint8_t u8AddrType, uint64_t u64Offset,
297 uint8_t u8ReadLen, uint8_t* pMmioData,
298 uint8_t* cc);
299
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800300// Provides read access to PCI MMIO space in the specified domain
301EPECIStatus peci_RdEndPointConfigMmio_dom(uint8_t target, uint8_t domainId,
302 uint8_t u8Seg, uint8_t u8Bus,
303 uint8_t u8Device, uint8_t u8Fcn,
304 uint8_t u8Bar, uint8_t u8AddrType,
305 uint64_t u64Offset, uint8_t u8ReadLen,
306 uint8_t* pMmioData, uint8_t* cc);
307
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700308// Allows sequential RdEndPointConfig to PCI MMIO space
309EPECIStatus peci_RdEndPointConfigMmio_seq(
310 uint8_t target, uint8_t u8Seg, uint8_t u8Bus, uint8_t u8Device,
311 uint8_t u8Fcn, uint8_t u8Bar, uint8_t u8AddrType, uint64_t u64Offset,
312 uint8_t u8ReadLen, uint8_t* pMmioData, int peci_fd, uint8_t* cc);
313
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800314// Allows sequential RdEndPointConfig to PCI MMIO space in the specified domain
315EPECIStatus peci_RdEndPointConfigMmio_seq_dom(
316 uint8_t target, uint8_t domainId, uint8_t u8Seg, uint8_t u8Bus,
317 uint8_t u8Device, uint8_t u8Fcn, uint8_t u8Bar, uint8_t u8AddrType,
318 uint64_t u64Offset, uint8_t u8ReadLen, uint8_t* pMmioData, int peci_fd,
319 uint8_t* cc);
320
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700321// Provides write access to the EP local PCI Configuration space
322EPECIStatus peci_WrEndPointPCIConfigLocal(uint8_t target, uint8_t u8Seg,
323 uint8_t u8Bus, uint8_t u8Device,
324 uint8_t u8Fcn, uint16_t u16Reg,
325 uint8_t DataLen, uint32_t DataVal,
326 uint8_t* cc);
327
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800328// Provides write access to the EP local PCI Configuration space in the
329// specified domain
330EPECIStatus peci_WrEndPointPCIConfigLocal_dom(uint8_t target, uint8_t domainId,
331 uint8_t u8Seg, uint8_t u8Bus,
332 uint8_t u8Device, uint8_t u8Fcn,
333 uint16_t u16Reg, uint8_t DataLen,
334 uint32_t DataVal, uint8_t* cc);
335
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700336// Provides write access to the EP PCI Configuration space
337EPECIStatus peci_WrEndPointPCIConfig(uint8_t target, uint8_t u8Seg,
338 uint8_t u8Bus, uint8_t u8Device,
339 uint8_t u8Fcn, uint16_t u16Reg,
340 uint8_t DataLen, uint32_t DataVal,
341 uint8_t* cc);
342
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800343// Provides write access to the EP PCI Configuration space in the specified
344// domain
345EPECIStatus peci_WrEndPointPCIConfig_dom(uint8_t target, uint8_t domainId,
346 uint8_t u8Seg, uint8_t u8Bus,
347 uint8_t u8Device, uint8_t u8Fcn,
348 uint16_t u16Reg, uint8_t DataLen,
349 uint32_t DataVal, uint8_t* cc);
350
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700351// Allows sequential write access to the EP PCI Configuration space
352EPECIStatus peci_WrEndPointConfig_seq(uint8_t target, uint8_t u8MsgType,
353 uint8_t u8Seg, uint8_t u8Bus,
354 uint8_t u8Device, uint8_t u8Fcn,
355 uint16_t u16Reg, uint8_t DataLen,
356 uint32_t DataVal, int peci_fd,
357 uint8_t* cc);
358
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800359// Allows sequential write access to the EP PCI Configuration space in the
360// specified domain
361EPECIStatus peci_WrEndPointConfig_seq_dom(uint8_t target, uint8_t domainId,
362 uint8_t u8MsgType, uint8_t u8Seg,
363 uint8_t u8Bus, uint8_t u8Device,
364 uint8_t u8Fcn, uint16_t u16Reg,
365 uint8_t DataLen, uint32_t DataVal,
366 int peci_fd, uint8_t* cc);
367
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700368// Provides write access to the EP PCI MMIO space
369EPECIStatus peci_WrEndPointConfigMmio(uint8_t target, uint8_t u8Seg,
370 uint8_t u8Bus, uint8_t u8Device,
371 uint8_t u8Fcn, uint8_t u8Bar,
372 uint8_t u8AddrType, uint64_t u64Offset,
373 uint8_t u8DataLen, uint64_t u64DataVal,
374 uint8_t* cc);
375
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800376// Provides write access to the EP PCI MMIO space in the specified domain
377EPECIStatus peci_WrEndPointConfigMmio_dom(uint8_t target, uint8_t domainId,
378 uint8_t u8Seg, uint8_t u8Bus,
379 uint8_t u8Device, uint8_t u8Fcn,
380 uint8_t u8Bar, uint8_t u8AddrType,
381 uint64_t u64Offset, uint8_t u8DataLen,
382 uint64_t u64DataVal, uint8_t* cc);
383
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700384// Allows sequential write access to the EP PCI MMIO space
385EPECIStatus peci_WrEndPointConfigMmio_seq(
386 uint8_t target, uint8_t u8Seg, uint8_t u8Bus, uint8_t u8Device,
387 uint8_t u8Fcn, uint8_t u8Bar, uint8_t u8AddrType, uint64_t u64Offset,
388 uint8_t u8DataLen, uint64_t u64DataVal, int peci_fd, uint8_t* cc);
389
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800390// Allows sequential write access to the EP PCI MMIO space in the specified
391// domain
392EPECIStatus peci_WrEndPointConfigMmio_seq_dom(
393 uint8_t target, uint8_t domainId, uint8_t u8Seg, uint8_t u8Bus,
394 uint8_t u8Device, uint8_t u8Fcn, uint8_t u8Bar, uint8_t u8AddrType,
395 uint64_t u64Offset, uint8_t u8DataLen, uint64_t u64DataVal, int peci_fd,
396 uint8_t* cc);
397
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700398// Provides access to the Crashdump Discovery API
399EPECIStatus peci_CrashDump_Discovery(uint8_t target, uint8_t subopcode,
400 uint8_t param0, uint16_t param1,
401 uint8_t param2, uint8_t u8ReadLen,
402 uint8_t* pData, uint8_t* cc);
403
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800404// Provides access to the Crashdump Discovery API in the specified domain
405EPECIStatus peci_CrashDump_Discovery_dom(uint8_t target, uint8_t domainId,
406 uint8_t subopcode, uint8_t param0,
407 uint16_t param1, uint8_t param2,
408 uint8_t u8ReadLen, uint8_t* pData,
409 uint8_t* cc);
410
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700411// Provides access to the Crashdump GetFrame API
412EPECIStatus peci_CrashDump_GetFrame(uint8_t target, uint16_t param0,
413 uint16_t param1, uint16_t param2,
414 uint8_t u8ReadLen, uint8_t* pData,
415 uint8_t* cc);
416
Jason M. Bills8bb8f372022-03-01 16:04:44 -0800417// Provides access to the Crashdump GetFrame API in the specified domain
418EPECIStatus peci_CrashDump_GetFrame_dom(uint8_t target, uint8_t domainId,
419 uint16_t param0, uint16_t param1,
420 uint16_t param2, uint8_t u8ReadLen,
421 uint8_t* pData, uint8_t* cc);
422
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700423// Provides raw PECI command access
424EPECIStatus peci_raw(uint8_t target, uint8_t u8ReadLen, const uint8_t* pRawCmd,
425 const uint32_t cmdSize, uint8_t* pRawResp,
426 uint32_t respSize);
427
428EPECIStatus peci_Lock(int* peci_fd, int timeout_ms);
429void peci_Unlock(int peci_fd);
430EPECIStatus peci_Ping(uint8_t target);
431EPECIStatus peci_Ping_seq(uint8_t target, int peci_fd);
432EPECIStatus peci_GetCPUID(const uint8_t clientAddr, CPUModel* cpuModel,
433 uint8_t* stepping, uint8_t* cc);
Anna Platash03d7dae2021-02-05 13:52:05 +0100434void peci_SetDevName(char* peci_dev);
Jason M. Bills7ef5a552020-04-06 14:58:44 -0700435
436#ifdef __cplusplus
437}
438#endif