coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
finalize.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
device/pci_ops.h
>
4
#include "
sandybridge.h
"
5
6
void
intel_sandybridge_finalize_smm
(
void
)
7
{
8
pci_or_config16
(
HOST_BRIDGE
,
GGC
, 1 << 0);
9
pci_or_config16
(
HOST_BRIDGE
,
PAVPC
, 1 << 2);
10
pci_or_config32
(
HOST_BRIDGE
,
DPR
, 1 << 0);
11
pci_or_config32
(
HOST_BRIDGE
,
MESEG_MASK
,
MELCK
);
12
pci_or_config32
(
HOST_BRIDGE
,
REMAPBASE
, 1 << 0);
13
pci_or_config32
(
HOST_BRIDGE
,
REMAPLIMIT
, 1 << 0);
14
pci_or_config32
(
HOST_BRIDGE
,
TOM
, 1 << 0);
15
pci_or_config32
(
HOST_BRIDGE
,
TOUUD
, 1 << 0);
16
pci_or_config32
(
HOST_BRIDGE
,
BDSM
, 1 << 0);
17
pci_or_config32
(
HOST_BRIDGE
,
BGSM
, 1 << 0);
18
pci_or_config32
(
HOST_BRIDGE
,
TSEGMB
, 1 << 0);
19
pci_or_config32
(
HOST_BRIDGE
,
TOLUD
, 1 << 0);
20
21
mchbar_setbits32
(
PAVP_MSG
, 1 << 0);
/* PAVP */
22
mchbar_setbits32
(
SAPMCTL
, 1 << 31);
/* SA PM */
23
mchbar_setbits32
(
UMAGFXCTL
, 1 << 0);
/* UMA GFX */
24
mchbar_setbits32
(
VTDTRKLCK
, 1 << 0);
/* VTDTRK */
25
mchbar_setbits32
(
REQLIM
, 1 << 31);
26
mchbar_setbits32
(
DMIVCLIM
, 1 << 31);
27
mchbar_setbits32
(
CRDTLCK
, 1 << 0);
28
29
/* Memory Controller Lockdown */
30
mchbar_write8
(
MC_LOCK
, 0x8f);
31
32
/* Read+write the following */
33
mchbar_setbits32
(
VDMBDFBARKVM
, 0);
34
mchbar_setbits32
(
VDMBDFBARPAVP
, 0);
35
mchbar_setbits32
(
HDAUDRID
, 0);
36
}
REMAPLIMIT
#define REMAPLIMIT
Definition:
e7505.h:36
REMAPBASE
#define REMAPBASE
Definition:
e7505.h:35
mchbar_setbits32
#define mchbar_setbits32(addr, set)
Definition:
fixed_bars.h:58
mchbar_write8
static __always_inline void mchbar_write8(const uintptr_t offset, const uint8_t value)
Definition:
fixed_bars.h:26
GGC
#define GGC
Definition:
host_bridge.h:9
TOLUD
#define TOLUD
Definition:
host_bridge.h:61
TOUUD
#define TOUUD
Definition:
host_bridge.h:57
BDSM
#define BDSM
Definition:
host_bridge.h:58
PAVPC
#define PAVPC
Definition:
host_bridge.h:26
TOM
#define TOM
Definition:
host_bridge.h:56
DPR
#define DPR
Definition:
host_bridge.h:27
BGSM
#define BGSM
Definition:
host_bridge.h:59
SAPMCTL
#define SAPMCTL
Definition:
mchbar.h:65
VDMBDFBARPAVP
#define VDMBDFBARPAVP
Definition:
mchbar.h:70
VDMBDFBARKVM
#define VDMBDFBARKVM
Definition:
mchbar.h:69
REQLIM
#define REQLIM
Definition:
mchbar.h:72
UMAGFXCTL
#define UMAGFXCTL
Definition:
mchbar.h:68
HDAUDRID
#define HDAUDRID
Definition:
mchbar.h:67
VTDTRKLCK
#define VTDTRKLCK
Definition:
mchbar.h:71
DMIVCLIM
#define DMIVCLIM
Definition:
mchbar.h:73
MC_LOCK
#define MC_LOCK
Definition:
mchbar.h:16
CRDTLCK
#define CRDTLCK
Definition:
mchbar.h:74
pci_ops.h
pci_or_config32
static __always_inline void pci_or_config32(const struct device *dev, u16 reg, u32 ormask)
Definition:
pci_ops.h:191
pci_or_config16
static __always_inline void pci_or_config16(const struct device *dev, u16 reg, u16 ormask)
Definition:
pci_ops.h:180
intel_sandybridge_finalize_smm
void intel_sandybridge_finalize_smm(void)
Definition:
finalize.c:6
MESEG_MASK
#define MESEG_MASK
Definition:
host_bridge.h:27
TSEGMB
#define TSEGMB
Definition:
host_bridge.h:48
MELCK
#define MELCK
Definition:
host_bridge.h:28
PAVP_MSG
#define PAVP_MSG
Definition:
mchbar.h:495
sandybridge.h
HOST_BRIDGE
@ HOST_BRIDGE
Definition:
reg_access.h:23
src
northbridge
intel
sandybridge
finalize.c
Generated by
1.9.1