coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
systemagent.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <device/device.h>
5 #include <soc/iomap.h>
6 #include <soc/romstage.h>
7 #include <soc/systemagent.h>
8 
10 {
11  static const struct sa_mmio_descriptor soc_fixed_pci_resources[] = {
12  { MCHBAR, MCH_BASE_ADDRESS, MCH_BASE_SIZE, "MCHBAR" },
13  { DMIBAR, DMI_BASE_ADDRESS, DMI_BASE_SIZE, "DMIBAR" },
14  { EPBAR, EP_BASE_ADDRESS, EP_BASE_SIZE, "EPBAR" },
15  };
16 
17  static const struct sa_mmio_descriptor soc_fixed_mch_resources[] = {
18  { REGBAR, REG_BASE_ADDRESS, REG_BASE_SIZE, "REGBAR" },
20  };
21 
22  /* Set Fixed MMIO address into PCI configuration space */
23  sa_set_pci_bar(soc_fixed_pci_resources,
24  ARRAY_SIZE(soc_fixed_pci_resources));
25  /* Set Fixed MMIO address into MCH base address */
26  sa_set_mch_bar(soc_fixed_mch_resources,
27  ARRAY_SIZE(soc_fixed_mch_resources));
28  /* Enable PAM registers */
30 }
#define REGBAR
Definition: systemagent.h:25
void systemagent_early_init(void)
Definition: systemagent.c:14
#define ARRAY_SIZE(a)
Definition: helpers.h:12
void sa_set_mch_bar(const struct sa_mmio_descriptor *fixed_set_resources, size_t count)
void sa_set_pci_bar(const struct sa_mmio_descriptor *fixed_set_resources, size_t count)
#define MCHBAR
Definition: host_bridge.h:7
#define DMIBAR
Definition: host_bridge.h:33
#define EPBAR
Definition: host_bridge.h:6
#define EDRAMBAR
Definition: mchbar.h:19
#define REG_BASE_ADDRESS
Definition: iomap.h:67
#define REG_BASE_SIZE
Definition: iomap.h:68
#define DMI_BASE_ADDRESS
Definition: iomap.h:37
#define EP_BASE_ADDRESS
Definition: iomap.h:40
#define MCH_BASE_ADDRESS
Definition: iomap.h:82
#define DMI_BASE_SIZE
Definition: memmap.h:8
#define EP_BASE_SIZE
Definition: memmap.h:10
#define EDRAM_BASE_ADDRESS
Definition: memmap.h:12
#define MCH_BASE_SIZE
Definition: memmap.h:6
#define EDRAM_BASE_SIZE
Definition: memmap.h:13
static void enable_pam_region(void)
Definition: early_init.c:37