blob: 30b4abd0a724f6e16276521da71a64f2211e20f7 [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"
Angel Ponsd6c45382021-03-27 21:24:57 +010014#include "registers/pcie_graphics.h"
Aaron Durbin76c37002012-10-30 09:03:43 -050015
16/* Device 0:0.0 PCI configuration space (Host Bridge) */
Angel Pons1db5bc72020-01-15 00:49:03 +010017#define HOST_BRIDGE PCI_DEV(0, 0, 0)
Aaron Durbin76c37002012-10-30 09:03:43 -050018
Aaron Durbin76c37002012-10-30 09:03:43 -050019/* Device 0:2.0 PCI configuration space (Graphics Device) */
20
21#define MSAC 0x62 /* Multi Size Aperture Control */
Aaron Durbin76c37002012-10-30 09:03:43 -050022
Angel Ponse220e312020-07-22 00:55:38 +020023#define ARCHDIS 0xff0 /* DMA Remap Engine Policy Control */
24#define DMAR_LCKDN (1 << 31)
25#define SPCAPCTRL (1 << 25)
26#define L3HIT2PEND_DIS (1 << 20)
27#define PRSCAPDIS (1 << 2)
28#define GLBIOTLBINV (1 << 1)
29#define GLBCTXTINV (1 << 0)
30
Angel Pons73fa0352020-07-03 12:29:03 +020031void mb_late_romstage_setup(void); /* optional */
Angel Pons2e25ac62020-07-03 12:06:04 +020032
Angel Ponse8168292020-07-03 11:42:22 +020033void haswell_early_initialization(void);
Aaron Durbin76c37002012-10-30 09:03:43 -050034void haswell_late_initialization(void);
Tristan Corrick334be322018-12-17 22:10:21 +130035void haswell_unhide_peg(void);
Aaron Durbin76c37002012-10-30 09:03:43 -050036
Angel Pons567ece42022-05-06 21:56:48 +020037void dmi_early_init(void);
38void peg_dmi_recipe(const bool is_peg, const pci_devfn_t dev);
39
Aaron Durbin76c37002012-10-30 09:03:43 -050040void report_platform_info(void);
Aaron Durbin76c37002012-10-30 09:03:43 -050041
Matt DeVillier85d98d92018-03-04 01:41:23 -060042struct acpi_rsdp;
Furquan Shaikh0f007d82020-04-24 06:41:18 -070043unsigned long northbridge_write_acpi_tables(const struct device *device, unsigned long start,
Angel Pons1db5bc72020-01-15 00:49:03 +010044 struct acpi_rsdp *rsdp);
Matt DeVillier85d98d92018-03-04 01:41:23 -060045
Angel Pons62371752021-03-27 21:13:44 +010046#endif /* NORTHBRIDGE_INTEL_HASWELL_HASWELL_H */