File: igt_pci.h

package info (click to toggle)
intel-gpu-tools 2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 62,024 kB
  • sloc: xml: 769,439; ansic: 348,692; python: 8,307; yacc: 2,781; perl: 1,196; sh: 1,178; lex: 487; asm: 227; makefile: 27; lisp: 11
file content (28 lines) | stat: -rw-r--r-- 518 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// SPDX-License-Identifier: MIT
/*
 * Copyright © 2022 Intel Corporation
 */

#ifndef __IGT_PCI_H__
#define __IGT_PCI_H__

#include <stdint.h>
#include <endian.h>

/* forward declaration */
struct pci_device;

#define PCI_TYPE0_1_HEADER_SIZE 0x40
#define PCI_CAPS_START 0x34
#define PCI_CFG_SPACE_SIZE 0x100

enum pci_cap_id {
	PCI_EXPRESS_CAP_ID = 0x10
};

#define PCI_SLOT_CAP_OFFSET 0x14
#define  PCI_SLOT_PWR_CTRL_PRESENT (1 << 1)

int find_pci_cap_offset(struct pci_device *dev, enum pci_cap_id cap_id);

#endif