3 Copyright (C) 2021 John Tsiombikas <nuclear@member.fsf.org>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>.
24 #pragma pack (push, 1)
25 struct pci_config_data {
26 uint16_t vendor, device;
28 uint8_t rev, iface, subclass, class;
29 uint8_t cacheline_size;
30 uint8_t latency_timer;
33 uint32_t base_addr[6];
35 uint16_t subsys_vendor;
38 uint32_t reserved1, reserved2;
39 uint8_t intr_line, intr_pin;
40 uint8_t min_grant, max_latency;
46 struct pci_config_data cfg;
51 struct pci_device *find_pci_dev(uint16_t vendorid, uint16_t devid);