OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
GenericIch.h
Go to the documentation of this file.
1
15#ifndef GENERIC_ICH_H
16#define GENERIC_ICH_H
17
18// GenericIchDefs Generic ICH Definitions.
19//
20// Definitions beginning with "R_" are registers.
21// Definitions beginning with "B_" are bits within registers.
22// Definitions beginning with "V_" are meaningful values of bits within the registers.
23
24// Piix4PciAddressing PCI Bus Address for PIIX4
25
26#define PCI_BUS_NUMBER_PIIX4 0x00
27#define PCI_DEVICE_NUMBER_PIIX4 7
28#define PCI_FUNCTION_NUMBER_PIIX4_PMC 3
29
30// IchPciAddressing PCI Bus Address for ICH.
31
32#define PCI_BUS_NUMBER_ICH 0x00
33#define PCI_DEVICE_NUMBER_ICH 31
34#define PCI_FUNCTION_NUMBER_ICH_LPC 0
35#define PCI_FUNCTION_NUMBER_ICH_PMC 2
36
37#define V_ICH_PCI_VENDOR_ID 0x8086
38#define V_PIIX4_PMC_PCI_DEVICE_ID 0x7113
39#define V_VLV_PMC_PCI_DEVICE_ID 0x0F1C
40#define V_CHT_PMC_PCI_DEVICE_ID 0x229C
41
42// IchAcpiCntr Control for the ICH's ACPI Counter.
43
44#define R_PIIX4_PM_BASE 0x40
45#define B_PIIX4_PM_BASE_BAR 0x0000FFC0
46#define R_PIIX4_PMREGMISC 0x80
47#define B_PIIX4_PMREGMISC_PMIOSE 0x1
48
49// IchAcpiCntr Control for the ICH's ACPI Counter.
50
51#define R_ICH_ACPI_BASE 0x40
52#define B_ICH_ACPI_BASE_BAR 0x0000FF80
53#define R_ICH_ACPI_CNTL 0x44
54#define B_ICH_ACPI_CNTL_ACPI_EN 0x80
55
56#define R_ICH_BAR2_BASE 0x20
57#define B_ICH_BAR2_BASE_BAR 0x0000FFC0
58#define B_ICH_BAR2_BASE_BAR_EN 0x1
59
60// Pre Intel Sunrisepoint
61
62#define R_ICH_LPC_ACPI_BASE R_ICH_ACPI_BASE
63#define B_ICH_LPC_ACPI_BASE_BAR B_ICH_ACPI_BASE_BAR
64#define R_ICH_LPC_ACPI_CNTL R_ICH_ACPI_CNTL
65#define B_ICH_LPC_ACPI_CNTL_ACPI_EN B_ICH_ACPI_CNTL_ACPI_EN
66
67// Intel Sunrisepoint
68
69#define R_ICH_PMC_ACPI_BASE R_ICH_ACPI_BASE
70#define B_ICH_PMC_ACPI_BASE_BAR B_ICH_ACPI_BASE_BAR
71#define R_ICH_PMC_ACPI_CNTL R_ICH_ACPI_CNTL
72#define B_ICH_PMC_ACPI_CNTL_ACPI_EN B_ICH_ACPI_CNTL_ACPI_EN
73
74// Intel Coffee Lake
75
76#define R_ICH_PMC_BAR2_BASE R_ICH_BAR2_BASE
77#define B_ICH_PMC_BAR2_BASE_BAR B_ICH_BAR2_BASE_BAR
78#define B_ICH_PMC_BAR2_BASE_BAR_EN B_ICH_BAR2_BASE_BAR_EN
79
80// Intel Braswell
81
82#define R_BRSW_PMC_ACPI_BASE 0x40
83#define B_BRSW_PMC_ACPI_BASE_BAR 0xFFFFFE00
84
85// AMD Bolton (AMD Bolton Register Reference Guide 3.03)
86
87#define R_AMD_ACPI_MMIO_BASE 0xFED80000
88#define R_AMD_ACPI_MMIO_PMIO_BASE 0x300
89#define R_AMD_ACPI_PM_TMR_BLOCK 0x64
90
91// IchAcpiTimer The ICH's ACPI Timer.
92
93#define R_ACPI_PM1_TMR 0x08
94#define V_ACPI_TMR_FREQUENCY 3579545
95#define V_ACPI_PM1_TMR_MAX_VAL 0x01000000
96
98#define PCI_PIIX4_PMC_ADDRESS(Register) \
99 ((UINTN)(PCI_LIB_ADDRESS (PCI_BUS_NUMBER_PIIX4, PCI_DEVICE_NUMBER_PIIX4, PCI_FUNCTION_NUMBER_PIIX4_PMC, (Register))))
100
102#define PCI_ICH_LPC_ADDRESS(Register) \
103 ((UINTN)(PCI_LIB_ADDRESS (PCI_BUS_NUMBER_ICH, PCI_DEVICE_NUMBER_ICH, PCI_FUNCTION_NUMBER_ICH_LPC, (Register))))
104
106#define PCI_ICH_PMC_ADDRESS(Register) \
107 ((UINTN)(PCI_LIB_ADDRESS (PCI_BUS_NUMBER_ICH, PCI_DEVICE_NUMBER_ICH, PCI_FUNCTION_NUMBER_ICH_PMC, (Register))))
108
109#endif // GENERIC_ICH_H