coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pci_devs.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef _BROADWELL_PCI_DEVS_H_
4 #define _BROADWELL_PCI_DEVS_H_
5 
6 #define _PCH_DEVFN(slot, func) PCI_DEVFN(PCH_DEV_SLOT_ ## slot, func)
7 
8 #if defined(__SIMPLE_DEVICE__)
9 #define _PCH_DEV(slot, func) PCI_DEV(0, PCH_DEV_SLOT_ ## slot, func)
10 #else
11 #include <device/device.h>
12 #include <device/pci_def.h>
13 #define _PCH_DEV(slot, func) pcidev_path_on_root_debug(_PCH_DEVFN(slot, func), __func__)
14 #endif
15 
16 /* System Agent Devices */
17 
18 #define SA_DEV_SLOT_ROOT 0x00
19 #define SA_DEVFN_ROOT PCI_DEVFN(SA_DEV_SLOT_ROOT, 0)
20 #define HOST_BRIDGE PCI_DEV(0, SA_DEV_SLOT_ROOT, 0)
21 
22 #define SA_DEV_SLOT_IGD 0x02
23 #define SA_DEVFN_IGD PCI_DEVFN(SA_DEV_SLOT_IGD, 0)
24 #define SA_DEV_IGD PCI_DEV(0, SA_DEV_SLOT_IGD, 0)
25 
26 #define SA_DEV_SLOT_MINIHD 0x03
27 #define SA_DEVFN_MINIHD PCI_DEVFN(SA_DEV_SLOT_MINIHD, 0)
28 #define SA_DEV_MINIHD PCI_DEV(0, SA_DEV_SLOT_MINIHD, 0)
29 
30 /* PCH Devices */
31 
32 #define PCH_DEV_SLOT_ADSP 0x13
33 #define PCH_DEVFN_ADSP _PCH_DEVFN(ADSP, 0)
34 
35 #define PCH_DEV_SLOT_XHCI 0x14
36 #define PCH_DEVFN_XHCI _PCH_DEVFN(XHCI, 0)
37 #define PCH_DEV_XHCI _PCH_DEV(XHCI, 0)
38 
39 #define PCH_DEV_SLOT_SIO 0x15
40 #define PCH_DEV_UART0 _PCH_DEV(SIO, 5)
41 #define PCH_DEV_UART1 _PCH_DEV(SIO, 6)
42 #define PCH_DEVFN_SDMA _PCH_DEVFN(SIO, 0)
43 #define PCH_DEVFN_I2C0 _PCH_DEVFN(SIO, 1)
44 #define PCH_DEVFN_I2C1 _PCH_DEVFN(SIO, 2)
45 #define PCH_DEVFN_SPI0 _PCH_DEVFN(SIO, 3)
46 #define PCH_DEVFN_SPI1 _PCH_DEVFN(SIO, 4)
47 #define PCH_DEVFN_UART0 _PCH_DEVFN(SIO, 5)
48 #define PCH_DEVFN_UART1 _PCH_DEVFN(SIO, 6)
49 
50 #define PCH_DEV_SLOT_ME 0x16
51 #define PCH_DEVFN_ME _PCH_DEVFN(ME, 0)
52 #define PCH_DEVFN_ME_2 _PCH_DEVFN(ME, 1)
53 #define PCH_DEVFN_ME_IDER _PCH_DEVFN(ME, 2)
54 #define PCH_DEVFN_ME_KT _PCH_DEVFN(ME, 3)
55 #define PCH_DEV_ME _PCH_DEV(ME, 0)
56 
57 #define PCH_DEV_SLOT_SDIO 0x17
58 #define PCH_DEVFN_SDIO _PCH_DEVFN(SDIO, 0)
59 
60 #define PCH_DEV_SLOT_GBE 0x19
61 #define PCH_DEVFN_GBE _PCH_DEVFN(GBE, 0)
62 
63 #define PCH_DEV_SLOT_HDA 0x1b
64 #define PCH_DEVFN_HDA _PCH_DEVFN(HDA, 0)
65 
66 #define PCH_DEV_SLOT_PCIE 0x1c
67 
68 #define PCH_DEV_SLOT_EHCI 0x1d
69 #define PCH_DEVFN_EHCI _PCH_DEVFN(EHCI, 0)
70 
71 #define PCH_DEV_SLOT_LPC 0x1f
72 #define PCH_DEVFN_LPC _PCH_DEVFN(LPC, 0)
73 #define PCH_DEVFN_IDE _PCH_DEVFN(LPC, 1)
74 #define PCH_DEVFN_SATA _PCH_DEVFN(LPC, 2)
75 #define PCH_DEVFN_SMBUS _PCH_DEVFN(LPC, 3)
76 #define PCH_DEVFN_SATA2 _PCH_DEVFN(LPC, 5)
77 #define PCH_DEVFN_THERMAL _PCH_DEVFN(LPC, 6)
78 #define PCH_DEV_LPC _PCH_DEV(LPC, 0)
79 
80 #define PCH_IOAPIC_PCI_BUS 250
81 #define PCH_IOAPIC_PCI_SLOT 31
82 #define PCH_HPET_PCI_BUS 250
83 #define PCH_HPET_PCI_SLOT 15
84 
85 #endif