Angel Pons | 4b42983 | 2020-04-02 23:48:50 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 2 | |
Angel Pons | 6237175 | 2021-03-27 21:13:44 +0100 | [diff] [blame] | 3 | #ifndef NORTHBRIDGE_INTEL_HASWELL_HASWELL_H |
| 4 | #define NORTHBRIDGE_INTEL_HASWELL_HASWELL_H |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 5 | |
Angel Pons | 9fa1418 | 2021-03-27 20:32:16 +0100 | [diff] [blame] | 6 | #include <device/device.h> |
| 7 | #include <northbridge/intel/common/fixed_bars.h> |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 8 | |
Angel Pons | a3cb322 | 2020-09-14 13:15:19 +0200 | [diff] [blame] | 9 | #include "memmap.h" |
Angel Pons | 9fa1418 | 2021-03-27 20:32:16 +0100 | [diff] [blame] | 10 | #include "registers/dmibar.h" |
| 11 | #include "registers/epbar.h" |
| 12 | #include "registers/host_bridge.h" |
| 13 | #include "registers/mchbar.h" |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 14 | |
| 15 | /* Device 0:0.0 PCI configuration space (Host Bridge) */ |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 16 | #define HOST_BRIDGE PCI_DEV(0, 0, 0) |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 17 | |
Angel Pons | 76b8bc2 | 2020-07-23 02:32:27 +0200 | [diff] [blame] | 18 | /* Device 0:1.0 PCI configuration space (PCIe Graphics) */ |
| 19 | |
Angel Pons | ae99950 | 2020-11-05 01:58:34 +0100 | [diff] [blame] | 20 | #define PEG_CAP 0xa2 |
| 21 | #define PEG_DCAP 0xa4 |
| 22 | |
| 23 | #define PEG_LCAP 0xac |
| 24 | |
| 25 | #define PEG_DSTS 0xaa |
| 26 | |
| 27 | #define PEG_SLOTCAP 0xb4 |
| 28 | |
Angel Pons | 76b8bc2 | 2020-07-23 02:32:27 +0200 | [diff] [blame] | 29 | #define PEG_DCAP2 0xc4 /* 32bit */ |
| 30 | |
Angel Pons | ae99950 | 2020-11-05 01:58:34 +0100 | [diff] [blame] | 31 | #define PEG_LCTL2 0xd0 |
| 32 | |
| 33 | #define PEG_VC0RCTL 0x114 |
| 34 | |
Angel Pons | 76b8bc2 | 2020-07-23 02:32:27 +0200 | [diff] [blame] | 35 | #define PEG_ESD 0x144 /* 32bit */ |
| 36 | #define PEG_LE1D 0x150 /* 32bit */ |
| 37 | #define PEG_LE1A 0x158 /* 64bit */ |
| 38 | |
Angel Pons | ae99950 | 2020-11-05 01:58:34 +0100 | [diff] [blame] | 39 | #define PEG_UESTS 0x1c4 |
| 40 | #define PEG_UESEV 0x1cc |
| 41 | #define PEG_CESTS 0x1d0 |
| 42 | |
| 43 | #define PEG_L0SLAT 0x22c |
| 44 | |
| 45 | #define PEG_AFE_PM_TMR 0xc28 |
| 46 | |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 47 | /* Device 0:2.0 PCI configuration space (Graphics Device) */ |
| 48 | |
| 49 | #define MSAC 0x62 /* Multi Size Aperture Control */ |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 50 | |
Angel Pons | e220e31 | 2020-07-22 00:55:38 +0200 | [diff] [blame] | 51 | #define ARCHDIS 0xff0 /* DMA Remap Engine Policy Control */ |
| 52 | #define DMAR_LCKDN (1 << 31) |
| 53 | #define SPCAPCTRL (1 << 25) |
| 54 | #define L3HIT2PEND_DIS (1 << 20) |
| 55 | #define PRSCAPDIS (1 << 2) |
| 56 | #define GLBIOTLBINV (1 << 1) |
| 57 | #define GLBCTXTINV (1 << 0) |
| 58 | |
Angel Pons | 73fa035 | 2020-07-03 12:29:03 +0200 | [diff] [blame] | 59 | void mb_late_romstage_setup(void); /* optional */ |
Angel Pons | 2e25ac6 | 2020-07-03 12:06:04 +0200 | [diff] [blame] | 60 | |
Angel Pons | e816829 | 2020-07-03 11:42:22 +0200 | [diff] [blame] | 61 | void haswell_early_initialization(void); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 62 | void haswell_late_initialization(void); |
Tristan Corrick | 334be32 | 2018-12-17 22:10:21 +1300 | [diff] [blame] | 63 | void haswell_unhide_peg(void); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 64 | |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 65 | void report_platform_info(void); |
Aaron Durbin | 76c3700 | 2012-10-30 09:03:43 -0500 | [diff] [blame] | 66 | |
Matt DeVillier | 85d98d9 | 2018-03-04 01:41:23 -0600 | [diff] [blame] | 67 | struct acpi_rsdp; |
Furquan Shaikh | 0f007d8 | 2020-04-24 06:41:18 -0700 | [diff] [blame] | 68 | unsigned long northbridge_write_acpi_tables(const struct device *device, unsigned long start, |
Angel Pons | 1db5bc7 | 2020-01-15 00:49:03 +0100 | [diff] [blame] | 69 | struct acpi_rsdp *rsdp); |
Matt DeVillier | 85d98d9 | 2018-03-04 01:41:23 -0600 | [diff] [blame] | 70 | |
Angel Pons | 6237175 | 2021-03-27 21:13:44 +0100 | [diff] [blame] | 71 | #endif /* NORTHBRIDGE_INTEL_HASWELL_HASWELL_H */ |