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 /*
4  * This file is created based on Intel Alder Lake Processor SA Datasheet
5  * Document number: 619503
6  * Chapter number: 3
7  */
8 
10 #include <soc/iomap.h>
11 #include <soc/romstage.h>
12 #include <soc/systemagent.h>
13 
15 {
16  static const struct sa_mmio_descriptor soc_fixed_pci_resources[] = {
17  { MCHBAR, MCH_BASE_ADDRESS, MCH_BASE_SIZE, "MCHBAR" },
18  { DMIBAR, DMI_BASE_ADDRESS, DMI_BASE_SIZE, "DMIBAR" },
19  { EPBAR, EP_BASE_ADDRESS, EP_BASE_SIZE, "EPBAR" },
20  };
21 
22  static const struct sa_mmio_descriptor soc_fixed_mch_resources[] = {
23  { REGBAR, REG_BASE_ADDRESS, REG_BASE_SIZE, "REGBAR" },
25  };
26 
27  /* Set Fixed MMIO address into PCI configuration space */
28  sa_set_pci_bar(soc_fixed_pci_resources,
29  ARRAY_SIZE(soc_fixed_pci_resources));
30  /* Set Fixed MMIO address into MCH base address */
31  sa_set_mch_bar(soc_fixed_mch_resources,
32  ARRAY_SIZE(soc_fixed_mch_resources));
33  /* Enable PAM registers */
35 }
#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