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 <string.h>
6 #include <cbfs.h>
7 
9  { 1, 0, -1 }, /* USB HUB 1 */
10  { 0, 0, -1 }, /* Unused */
11  { 0, 0, -1 }, /* Unused */
12  { 0, 0, -1 }, /* Unused */
13  { 0, 0, -1 }, /* Unused */
14  { 0, 0, -1 }, /* Unused */
15  { 0, 0, -1 }, /* Unused */
16  { 0, 0, -1 }, /* Unused */
17  { 1, 0, -1 }, /* USB HUB 2 */
18  { 1, 0, -1 }, /* Camera */
19  { 0, 0, -1 }, /* Unused */
20  { 0, 0, -1 }, /* Unused */
21  { 0, 0, -1 }, /* Unused */
22  { 0, 0, -1 }, /* Unused */
23 };
24 
25 void mainboard_get_spd(spd_raw_data *spd, bool id_only)
26 {
27  void *spd_file;
28  size_t spd_file_len = 0;
29  spd_file = cbfs_map("spd.bin", &spd_file_len);
30  if (spd_file && spd_file_len >= 1024) {
31  int i;
32  for (i = 0; i < 4; i++)
33  memcpy(&spd[i], spd_file + 256 * i, 128);
34  }
35 }
void * memcpy(void *dest, const void *src, size_t n)
Definition: memcpy.c:7
static void * cbfs_map(const char *name, size_t *size_out)
Definition: cbfs.h:246
u8 spd_raw_data[256]
Definition: ddr3.h:156
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