blob: bcfcf440edaeb1534d2f558b7d668cd07985d84d [file] [log] [blame]
Kyösti Mälkki991a71d2015-02-22 00:12:43 +02001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2007 Advanced Micro Devices, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
Kyösti Mälkki991a71d2015-02-22 00:12:43 +020014 */
15
16typedef struct amdfam10_sysconf_t sys_info_conf_t;
17
18/* FIXME */
Kyösti Mälkkid383d192015-03-19 16:49:47 +020019u32 amdfam10_nodeid(device_t dev);
Kyösti Mälkki991a71d2015-02-22 00:12:43 +020020extern device_t __f1_dev[];
21
22struct dram_base_mask_t {
23 u32 base; //[47:27] at [28:8]
24 u32 mask; //[47:27] at [28:8] and enable at bit 0
25};
26
27struct dram_base_mask_t get_dram_base_mask(u32 nodeid);
28
Kyösti Mälkkid383d192015-03-19 16:49:47 +020029u32 get_ht_c_index(struct bus *link);
30void store_ht_c_conf_bus(struct bus *link);
Kyösti Mälkki991a71d2015-02-22 00:12:43 +020031
Kyösti Mälkkid383d192015-03-19 16:49:47 +020032void set_config_map_reg(struct bus *link);
33void clear_config_map_reg(struct bus *link);
Kyösti Mälkki991a71d2015-02-22 00:12:43 +020034
35
36void store_conf_io_addr(u32 nodeid, u32 linkn, u32 reg, u32 index,
37 u32 io_min, u32 io_max);
38
39void store_conf_mmio_addr(u32 nodeid, u32 linkn, u32 reg, u32 index,
40 u32 mmio_min, u32 mmio_max);
41
42
43u32 get_io_addr_index(u32 nodeid, u32 linkn);
44u32 get_mmio_addr_index(u32 nodeid, u32 linkn);
45
46void set_io_addr_reg(device_t dev, u32 nodeid, u32 linkn, u32 reg,
47 u32 io_min, u32 io_max);
48
49void set_mmio_addr_reg(u32 nodeid, u32 linkn, u32 reg, u32 index, u32 mmio_min, u32 mmio_max, u32 nodes);