blob: a7716a507f774db0e92da0f2d61a4bc368de28d5 [file] [log] [blame]
Angel Pons89ab2502020-04-03 01:22:28 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2/* This file is part of the coreboot project. */
Vladimir Serbinenko94930e22014-08-24 22:40:33 +02003
4#include <stdint.h>
Vladimir Serbinenko94930e22014-08-24 22:40:33 +02005#include <cpu/x86/lapic.h>
Furquan Shaikh76cedd22020-05-02 10:24:23 -07006#include <acpi/acpi.h>
Edward O'Callaghan77757c22015-01-04 21:33:39 +11007#include <northbridge/intel/sandybridge/sandybridge.h>
Arthur Heymans4c81d442018-01-29 12:14:37 +01008#include <northbridge/intel/sandybridge/raminit.h>
Edward O'Callaghan77757c22015-01-04 21:33:39 +11009#include <northbridge/intel/sandybridge/raminit_native.h>
10#include <southbridge/intel/bd82x6x/pch.h>
Patrick Rudolphe8e66f42016-02-06 17:42:42 +010011#include <southbridge/intel/common/gpio.h>
Vladimir Serbinenko94930e22014-08-24 22:40:33 +020012#include <cpu/x86/msr.h>
Vladimir Serbinenko94930e22014-08-24 22:40:33 +020013
Arthur Heymans4c81d442018-01-29 12:14:37 +010014void mainboard_fill_pei_data(struct pei_data *pei_data)
15{
16 struct pei_data pei_data_template = {
17 .pei_version = PEI_VERSION,
18 .mchbar = (uintptr_t)DEFAULT_MCHBAR,
19 .dmibar = (uintptr_t)DEFAULT_DMIBAR,
20 .epbar = DEFAULT_EPBAR,
21 .pciexbar = CONFIG_MMCONF_BASE_ADDRESS,
22 .smbusbar = SMBUS_IO_BASE,
23 .wdbbar = 0x4000000,
24 .wdbsize = 0x1000,
25 .hpet_address = CONFIG_HPET_ADDRESS,
26 .rcba = (uintptr_t)DEFAULT_RCBABASE,
27 .pmbase = DEFAULT_PMBASE,
28 .gpiobase = DEFAULT_GPIOBASE,
29 .thermalbase = 0xfed08000,
30 .system_type = 0, // 0 Mobile, 1 Desktop/Server
31 .tseg_size = CONFIG_SMM_TSEG_SIZE,
32 .spd_addresses = { 0xa0, 0x00,0xa2,0x00 },
33 .ts_addresses = { 0x00, 0x00, 0x00, 0x00 },
34 .ec_present = 1,
35 .gbe_enable = 1,
36 // 0 = leave channel enabled
37 // 1 = disable dimm 0 on channel
38 // 2 = disable dimm 1 on channel
39 // 3 = disable dimm 0+1 on channel
40 .dimm_channel0_disabled = 2,
41 .dimm_channel1_disabled = 2,
42 .max_ddr3_freq = 1333,
43 .usb_port_config = {
44 { 1, 0, 0x0040 },
45 { 1, 1, 0x0080 },
46 { 1, 3, 0x0080 },
47 { 1, 3, 0x0080 },
48 { 1, 0, 0x0080 },
49 { 1, 0, 0x0080 },
50 { 1, 2, 0x0040 },
51 { 1, 2, 0x0040 },
52 { 1, 6, 0x0080 },
53 { 1, 5, 0x0080 },
54 { 1, 6, 0x0080 },
55 { 1, 6, 0x0080 },
56 { 1, 7, 0x0080 },
57 { 1, 6, 0x0080 },
58 },
59 };
60 *pei_data = pei_data_template;
61}
62
Kyösti Mälkkie258b9a2016-11-18 19:59:23 +020063void mainboard_get_spd(spd_raw_data *spd, bool id_only)
Jan Tatjeb8743082016-06-04 19:29:03 +020064{
Kyösti Mälkkie258b9a2016-11-18 19:59:23 +020065 read_spd (&spd[0], 0x50, id_only);
66 read_spd (&spd[2], 0x51, id_only);
Vladimir Serbinenko94930e22014-08-24 22:40:33 +020067}
Vladimir Serbinenko609bd942016-01-31 14:00:54 +010068
Arthur Heymans4c81d442018-01-29 12:14:37 +010069int mainboard_should_reset_usb(int s3resume)
70{
71 return !s3resume;
72}