blob: 6faf78798c5b697e933d100b0ead13585a388214 [file] [log] [blame]
Angel Pons4b429832020-04-02 23:48:50 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Aaron Durbin76c37002012-10-30 09:03:43 -05002
Angel Pons62371752021-03-27 21:13:44 +01003#ifndef NORTHBRIDGE_INTEL_HASWELL_HASWELL_H
4#define NORTHBRIDGE_INTEL_HASWELL_HASWELL_H
Aaron Durbin76c37002012-10-30 09:03:43 -05005
Angel Pons9fa14182021-03-27 20:32:16 +01006#include <device/device.h>
7#include <northbridge/intel/common/fixed_bars.h>
Aaron Durbin76c37002012-10-30 09:03:43 -05008
Angel Ponsa3cb3222020-09-14 13:15:19 +02009#include "memmap.h"
Angel Pons9fa14182021-03-27 20:32:16 +010010#include "registers/dmibar.h"
11#include "registers/epbar.h"
12#include "registers/host_bridge.h"
13#include "registers/mchbar.h"
Aaron Durbin76c37002012-10-30 09:03:43 -050014
15/* Device 0:0.0 PCI configuration space (Host Bridge) */
Angel Pons1db5bc72020-01-15 00:49:03 +010016#define HOST_BRIDGE PCI_DEV(0, 0, 0)
Aaron Durbin76c37002012-10-30 09:03:43 -050017
Angel Pons76b8bc22020-07-23 02:32:27 +020018/* Device 0:1.0 PCI configuration space (PCIe Graphics) */
19
Angel Ponsae999502020-11-05 01:58:34 +010020#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 Pons76b8bc22020-07-23 02:32:27 +020029#define PEG_DCAP2 0xc4 /* 32bit */
30
Angel Ponsae999502020-11-05 01:58:34 +010031#define PEG_LCTL2 0xd0
32
33#define PEG_VC0RCTL 0x114
34
Angel Pons76b8bc22020-07-23 02:32:27 +020035#define PEG_ESD 0x144 /* 32bit */
36#define PEG_LE1D 0x150 /* 32bit */
37#define PEG_LE1A 0x158 /* 64bit */
38
Angel Ponsae999502020-11-05 01:58:34 +010039#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 Durbin76c37002012-10-30 09:03:43 -050047/* Device 0:2.0 PCI configuration space (Graphics Device) */
48
49#define MSAC 0x62 /* Multi Size Aperture Control */
Aaron Durbin76c37002012-10-30 09:03:43 -050050
Angel Ponse220e312020-07-22 00:55:38 +020051#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 Pons73fa0352020-07-03 12:29:03 +020059void mb_late_romstage_setup(void); /* optional */
Angel Pons2e25ac62020-07-03 12:06:04 +020060
Angel Ponse8168292020-07-03 11:42:22 +020061void haswell_early_initialization(void);
Aaron Durbin76c37002012-10-30 09:03:43 -050062void haswell_late_initialization(void);
Tristan Corrick334be322018-12-17 22:10:21 +130063void haswell_unhide_peg(void);
Aaron Durbin76c37002012-10-30 09:03:43 -050064
Aaron Durbin76c37002012-10-30 09:03:43 -050065void report_platform_info(void);
Aaron Durbin76c37002012-10-30 09:03:43 -050066
Matt DeVillier85d98d92018-03-04 01:41:23 -060067struct acpi_rsdp;
Furquan Shaikh0f007d82020-04-24 06:41:18 -070068unsigned long northbridge_write_acpi_tables(const struct device *device, unsigned long start,
Angel Pons1db5bc72020-01-15 00:49:03 +010069 struct acpi_rsdp *rsdp);
Matt DeVillier85d98d92018-03-04 01:41:23 -060070
Angel Pons62371752021-03-27 21:13:44 +010071#endif /* NORTHBRIDGE_INTEL_HASWELL_HASWELL_H */