aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/intel/haswell/mchbar_regs.h
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-01-15 00:49:03 +0100
committerPatrick Georgi <pgeorgi@google.com>2020-03-15 12:54:00 +0000
commit1db5bc7dac2bb592708f26dede339ffdf3246567 (patch)
treed8636a114ebd6ef6830a016de15c92b21f0b740d /src/northbridge/intel/haswell/mchbar_regs.h
parent3663d55a23fb64ea88dd1fd18ae4b0ce29e71a61 (diff)
nb/intel/haswell: Tidy up code and comments
- Reformat some lines of code - Put names to all used MCHBAR registers - Move MCHBAR registers into a separate file, for future expansion - Rewrite several comments - Use C-style comments for consistency - Rewrite some hex constants - Use HOST_BRIDGE instead of PCI_DEV(0, 0, 0) Tested, it does not change the binary of Asrock B85M Pro4. Change-Id: I926289304acb834f9b13cd7902801798f8ee478a Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/38434 Reviewed-by: David Hendricks <david.hendricks@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/northbridge/intel/haswell/mchbar_regs.h')
-rw-r--r--src/northbridge/intel/haswell/mchbar_regs.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/northbridge/intel/haswell/mchbar_regs.h b/src/northbridge/intel/haswell/mchbar_regs.h
new file mode 100644
index 0000000000..dfc0f7becf
--- /dev/null
+++ b/src/northbridge/intel/haswell/mchbar_regs.h
@@ -0,0 +1,61 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2008 coresystems GmbH
+ * Copyright (C) 2011 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __HASWELL_MCHBAR_REGS_H__
+#define __HASWELL_MCHBAR_REGS_H__
+
+/* Register definitions */
+#define MAD_CHNL 0x5000 /* Address Decoder Channel Configuration */
+#define MAD_DIMM_CH0 0x5004 /* Address Decode Channel 0 */
+#define MAD_DIMM_CH1 0x5008 /* Address Decode Channel 1 */
+#define MAD_DIMM_CH2 0x500c /* Address Decode Channel 2 (unused on HSW) */
+#define MC_INIT_STATE_G 0x5030
+#define MRC_REVISION 0x5034 /* MRC Revision */
+
+#define MC_LOCK 0x50fc /* Memory Controlller Lock register */
+
+#define GFXVTBAR 0x5400 /* Base address for IGD */
+#define EDRAMBAR 0x5408 /* Base address for eDRAM */
+#define VTVC0BAR 0x5410 /* Base address for PEG, USB, SATA, etc. */
+#define INTRDIRCTL 0x5418 /* Interrupt Redirection Control (PAIR) */
+#define GDXCBAR 0x5420 /* Generic Debug eXternal Connection */
+
+/* PAVP message register. Bit 0 locks PAVP settings, and bits [31..20] are an offset. */
+#define MMIO_PAVP_MSG 0x5500
+
+/* Some power MSRs are also represented in MCHBAR */
+#define MCH_PKG_POWER_LIMIT_LO 0x59a0
+#define MCH_PKG_POWER_LIMIT_HI 0x59a4
+
+#define MCH_DDR_POWER_LIMIT_LO 0x58e0
+#define MCH_DDR_POWER_LIMIT_HI 0x58e4
+
+#define SSKPD 0x5d10 /* 64-bit scratchpad register */
+#define BIOS_RESET_CPL 0x5da8 /* 8-bit */
+
+#define MC_BIOS_DATA 0x5e04 /* Miscellaneous information for BIOS */
+#define SAPMCTL 0x5f00
+
+#define HDAUDRID 0x6008
+#define UMAGFXCTL 0x6020
+#define VDMBDFBARKVM 0x6030
+#define VDMBDFBARPAVP 0x6034
+#define VTDTRKLCK 0x63fc
+#define REQLIM 0x6800
+#define DMIVCLIM 0x7000
+#define CRDTLCK 0x77fc
+
+#endif /* __HASWELL_MCHBAR_REGS_H__ */