2 * This file is part of the coreboot project.
4 * Copyright (C) 2012 The Chromium OS Authors. All rights reserved.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; version 2 of
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #include <arch/romcc_io.h>
23 #include <northbridge/intel/sandybridge/pcie_config.c>
26 void intel_pch_finalize_smm(void)
28 /* Set SPI opcode menu */
29 RCBA16(0x3894) = SPI_OPPREFIX;
30 RCBA16(0x3896) = SPI_OPTYPE;
31 RCBA32(0x3898) = SPI_OPMENU_LOWER;
32 RCBA32(0x389c) = SPI_OPMENU_UPPER;
35 RCBA32_OR(0x3804, (1 << 15));
37 /* TCLOCKDN: TC Lockdown */
38 RCBA32_OR(0x0050, (1 << 31));
40 /* BIOS Interface Lockdown */
41 RCBA32_OR(0x3410, (1 << 0));
43 /* Function Disable SUS Well Lockdown */
44 RCBA_AND_OR(8, 0x3420, ~0U, (1 << 7));
47 pcie_or_config16(PCH_LPC_DEV, 0xa0, 1 << 4);
50 pcie_or_config8(PCH_LPC_DEV, 0xa6, (1 << 1) | (1 << 2));
53 RCBA32(0x21a4) = RCBA32(0x21a4);
54 pcie_write_config32(PCI_DEV(0, 27, 0), 0x74,
55 pcie_read_config32(PCI_DEV(0, 27, 0), 0x74));