coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
data_fabric.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef AMD_PICASSO_DATA_FABRIC_H
4 #define AMD_PICASSO_DATA_FABRIC_H
5 
6 #include <types.h>
7 
8 /* D18F0 - Fabric Configuration registers */
9 
10 /* SoC-specific bits in D18F0_MMIO_CTRL0 */
11 #define DF_MMIO_NP BIT(12)
12 
13 #define IOMS0_FABRIC_ID 9
14 
15 #define NUM_NB_MMIO_REGS 8
16 
17 #define D18F0_VGAEN 0x80
18 #define VGA_ADDR_ENABLE BIT(0)
19 
20 #define D18F0_DRAM_HOLE_CTL 0x104
21 #define DRAM_HOLE_CTL_VALID BIT(0)
22 #define DRAM_HOLE_CTL_BASE_SHFT 24
23 #define DRAM_HOLE_CTL_BASE (0xff << DRAM_HOLE_CTL_BASE_SHFT)
24 
25 #define D18F0_DRAM_BASE0 0x110
26 #define DRAM_BASE_REG_VALID BIT(0)
27 #define DRAM_BASE_HOLE_EN BIT(1)
28 #define DRAM_BASE_INTLV_CH_SHFT 4
29 #define DRAM_BASE_INTLV_CH (0xf << DRAM_BASE_INTLV_CH_SHFT)
30 #define DRAM_BASE_INTLV_SEL_SHFT 8
31 #define DRAM_BASE_INTLV_SEL (0x7 << DRAM_BASE_INTLV_SEL_SHFT)
32 #define DRAM_BASE_ADDR_SHFT 12
33 #define DRAM_BASE_ADDR (0xfffff << DRAM_BASE_ADDR_SHFT)
34 
35 #define D18F0_DRAM_LIMIT0 0x114
36 #define DRAM_LIMIT_DST_ID_SHFT 0
37 #define DRAM_LIMIT_DST_ID (0xff << DRAM_LIMIT_DST_ID_SHFT)
38 #define DRAM_LIMIT_INTLV_NUM_SOCK_SHFT 8
39 #define DRAM_LIMIT_INTLV_NUM_SOCK (0x1 << DRAM_LIMIT_INTLV_NUM_SOCK_SHFT)
40 #define DRAM_LIMIT_INTLV_NUM_DIE_SHFT 10
41 #define DRAM_LIMIT_INTLV_NUM_DIE (0x3 << DRAM_LIMIT_INTLV_NUM_DIE_SHFT)
42 #define DRAM_LIMIT_ADDR_SHFT 12
43 #define DRAM_LIMIT_ADDR (0xfffff << DRAM_LIMIT_ADDR_SHFT)
44 
45 #define PICASSO_NUM_DRAM_REG 2
46 
47 #define DF_DRAM_BASE(dram_map_pair) ((dram_map_pair) * 2 * sizeof(uint32_t) \
48  + D18F0_DRAM_BASE0)
49 #define DF_DRAM_LIMIT(dram_map_pair) ((dram_map_pair) * 2 * sizeof(uint32_t) \
50  + D18F0_DRAM_LIMIT0)
51 
52 void data_fabric_set_mmio_np(void);
53 
54 #endif /* AMD_PICASSO_DATA_FABRIC_H */
void data_fabric_set_mmio_np(void)
Definition: data_fabric.c:15