coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
romstage.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <arch/hpet.h>
4 #include <stdint.h>
6 #if CONFIG(USE_NATIVE_RAMINIT)
8 #else
10 #endif
12 
13 #if !CONFIG(USE_NATIVE_RAMINIT)
15 {
16  struct pei_data pei_data_template = {
18  .mchbar = CONFIG_FIXED_MCHBAR_MMIO_BASE,
19  .dmibar = CONFIG_FIXED_DMIBAR_MMIO_BASE,
20  .epbar = CONFIG_FIXED_EPBAR_MMIO_BASE,
21  .pciexbar = CONFIG_ECAM_MMCONF_BASE_ADDRESS,
22  .smbusbar = CONFIG_FIXED_SMBUS_IO_BASE,
23  .wdbbar = 0x4000000,
24  .wdbsize = 0x1000,
25  .hpet_address = HPET_BASE_ADDRESS,
26  .rcba = (uintptr_t)DEFAULT_RCBA,
29  .thermalbase = 0xfed08000,
30  .system_type = 0, // 0 Mobile, 1 Desktop/Server
31  .tseg_size = CONFIG_SMM_TSEG_SIZE,
32  .spd_addresses = { 0xa0, 0x00, 0xa2, 0x00 },
33  .ts_addresses = { 0x00, 0x00, 0x00, 0x00 },
34  .ec_present = 0,
35  .gbe_enable = 1,
36  .max_ddr3_freq = 1333,
37  .usb_port_config = {
38 #define USB_CONFIG(enabled, current, ocpin) { enabled, ocpin, 0x040 * current }
39 #include "usb.h"
40  },
41  };
42  *pei_data = pei_data_template;
43 }
44 
45 int mainboard_should_reset_usb(int s3resume)
46 {
47  return !s3resume;
48 }
49 #endif
#define HPET_BASE_ADDRESS
Definition: hpet.h:6
#define DEFAULT_PMBASE
Definition: iomap.h:14
void mainboard_fill_pei_data(struct pei_data *pei_data)
Definition: romstage.c:14
int mainboard_should_reset_usb(int s3resume)
Definition: romstage.c:45
#define PEI_VERSION
Definition: pei_data.h:9
#define DEFAULT_GPIOBASE
Definition: pch.h:22
#define DEFAULT_RCBA
Definition: rcba.h:6
static u16 pmbase
Definition: smi.c:27
unsigned long uintptr_t
Definition: stdint.h:21
uint8_t spd_addresses[4]
Definition: pei_data.h:60
uint32_t tseg_size
Definition: pei_data.h:59
uint32_t system_type
Definition: pei_data.h:58
uint32_t gpiobase
Definition: pei_data.h:55
uint32_t pei_version
Definition: pei_data.h:43
uint32_t thermalbase
Definition: pei_data.h:33