coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
early_init.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <device/pci_ops.h>
7 
9 {
10  u16 reg16;
11  reg16 = pci_read_config16(PCI_DEV(0, 0x1f, 0), 0xa4);
12  reg16 |= (1 << 13); // WOL Enable Override (WOL_EN_OVRD)
13  pci_write_config16(PCI_DEV(0, 0x1f, 0), 0xa4, reg16);
14 }
15 
17  {1, 0, 0},
18  {1, 0, 0},
19  {1, 0, 1},
20  {1, 0, 1},
21  {1, 0, 2},
22  {1, 0, 2},
23  {1, 0, 3},
24  {1, 0, 3},
25  {1, 0, 4},
26  {1, 0, 4},
27  {1, 0, 6},
28  {1, 0, 5},
29  {1, 0, 5},
30  {1, 0, 6},
31 };
32 
33 void mainboard_get_spd(spd_raw_data *spd, bool id_only)
34 {
35  read_spd(&spd[0], 0x50, id_only);
36  read_spd(&spd[2], 0x52, id_only);
37 }
u8 spd_raw_data[256]
Definition: ddr3.h:156
static __always_inline u16 pci_read_config16(const struct device *dev, u16 reg)
Definition: pci_ops.h:52
static __always_inline void pci_write_config16(const struct device *dev, u16 reg, u16 val)
Definition: pci_ops.h:70
void mainboard_get_spd(spd_raw_data *spd, bool id_only)
Definition: early_init.c:25
const struct southbridge_usb_port mainboard_usb_ports[]
Definition: early_init.c:8
void read_spd(spd_raw_data *spd, u8 addr, bool id_only)
Definition: raminit.c:138
#define PCI_DEV(SEGBUS, DEV, FN)
Definition: pci_type.h:14
uint16_t u16
Definition: stdint.h:48