coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
chip.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef _SOC_CHIP_H_
4 #define _SOC_CHIP_H_
5 
6 #include <stdint.h>
7 #include <fsp/util.h>
8 #include <soc/pci_devs.h>
9 #include <soc/pm.h>
10 
11 ///
12 /// MRC Flags bits
13 ///
14 #define MRC_FLAG_ECC_EN BIT0
15 #define MRC_FLAG_SCRAMBLE_EN BIT1
16 #define MRC_FLAG_MEMTEST_EN BIT2
17 
18 /* 0b DDR "fly-by" topology else 1b DDR "tree" topology */
19 #define MRC_FLAG_TOP_TREE_EN BIT3
20 
21 /* If set ODR signal is asserted to DRAM devices on writes */
22 #define MRC_FLAG_WR_ODT_EN BIT4
23 
25  /*
26  * MemoryInit:
27  *
28  * The following fields come from FspUpdVpd.h and are defined as PCDs
29  * for the FSP binary. Data for these fields comes from the board's
30  * devicetree.cb file which gets processed into static.c and then
31  * built into the coreboot image. The fields below contain retain
32  * the FSP PCD field name.
33  */
34 
35  uint32_t FspReservedMemoryLength; /* FSP reserved memory in bytes */
36 
37  uint32_t Flags; /* Bitmap of MRC_FLAG_XXX defs above */
38  uint32_t tRAS; /* ACT to PRE command period in picoseconds */
39 
40  /* Delay from start of internal write transaction to internal read
41  * command in picoseconds
42  */
44 
45  /* ACT to ACT command period (JESD79 specific to page size 1K/2K) in
46  * picoseconds
47  */
49 
50  /* Four activate window (JESD79 specific to page size 1K/2K) in
51  * picoseconds
52  */
54  uint8_t DramWidth; /* 0=x8, 1=x16, others=RESERVED */
55 
56  /* 0=DDRFREQ_800, 1=DDRFREQ_1066, others=RESERVED. Only 533MHz SKU
57  * support 1066 memory
58  */
60  uint8_t DramType; /* 0=DDR3,1=DDR3L, others=RESERVED */
61 
62  /* bit[0] RANK0_EN, bit[1] RANK1_EN, others=RESERVED */
64  uint8_t ChanMask; /* bit[0] CHAN0_EN, others=RESERVED */
65  uint8_t ChanWidth; /* 1=x16, others=RESERVED */
66 
67  /* 0, 1, 2 (mode 2 forced if ecc enabled), others=RESERVED */
69 
70  /* 1=1.95us, 2=3.9us, 3=7.8us, others=RESERVED. REFRESH_RATE */
72  uint8_t SrTemp; /* 0=normal, 1=extended, others=RESERVED */
73 
74  /* 0=34ohm, 1=40ohm, others=RESERVED. RON_VALUE Select MRS1.DIC driver
75  * impedance control.
76  */
78  uint8_t DramRttNomVal; /* 0=40ohm, 1=60ohm, 2=120ohm, others=RSVD */
79  uint8_t DramRttWrVal; /* 0=off others=RESERVED */
80 
81  /* 0=off, 1=60ohm, 2=120ohm, 3=180ohm, others=RESERVED */
83  uint8_t SocWrRonVal; /* 0=27ohm, 1=32ohm, 2=40ohm, others=RESERVED */
84  uint8_t SocWrSlewRate; /* 0=2.5V/ns, 1=4V/ns, others=RESERVED */
85 
86  /* 0=512Mb, 1=1Gb, 2=2Gb, 3=4Gb, others=RESERVED */
88  uint8_t tCL; /* DRAM CAS Latency in clocks */
89 
90  /* ECC scrub interval in milliseconds 1..255 (0 works as feature
91  * disable)
92  */
94 
95  /* Number of 32B blocks read for ECC scrub 2..16 */
97 
98  uint8_t SmmTsegSize; /* SMM size in MiB */
99 };
100 
101 #endif
unsigned int uint32_t
Definition: stdint.h:14
unsigned char uint8_t
Definition: stdint.h:8
uint8_t SmmTsegSize
Definition: chip.h:98
uint8_t ChanMask
Definition: chip.h:64
uint8_t DramRttNomVal
Definition: chip.h:78
uint8_t DramRonVal
Definition: chip.h:77
uint8_t DramRttWrVal
Definition: chip.h:79
uint8_t EccScrubBlkSize
Definition: chip.h:96
uint32_t tRAS
Definition: chip.h:38
uint8_t SocWrRonVal
Definition: chip.h:83
uint8_t DramDensity
Definition: chip.h:87
uint32_t tWTR
Definition: chip.h:43
uint8_t DramWidth
Definition: chip.h:54
uint32_t tRRD
Definition: chip.h:48
uint8_t DramSpeed
Definition: chip.h:59
uint8_t SrTemp
Definition: chip.h:72
uint32_t tFAW
Definition: chip.h:53
uint32_t FspReservedMemoryLength
Definition: chip.h:35
uint8_t DramType
Definition: chip.h:60
uint8_t EccScrubInterval
Definition: chip.h:93
uint8_t AddrMode
Definition: chip.h:68
uint8_t SocWrSlewRate
Definition: chip.h:84
uint8_t RankMask
Definition: chip.h:63
uint8_t ChanWidth
Definition: chip.h:65
uint8_t SocRdOdtVal
Definition: chip.h:82
uint32_t Flags
Definition: chip.h:37