1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
10 #include <asm/cb_sysinfo.h>
11 #include <asm/global_data.h>
13 int board_early_init_r(void)
16 * Make sure PCI bus is enumerated so that peripherals on the PCI bus
17 * can be discovered by their drivers
24 #ifdef CONFIG_SMBIOS_PARSER
25 int show_board_info(void)
27 const struct smbios_entry *smbios = smbios_entry(lib_sysinfo.smbios_start, lib_sysinfo.smbios_size);
32 const struct smbios_header *bios = smbios_header(smbios, SMBIOS_BIOS_INFORMATION);
33 const struct smbios_header *system = smbios_header(smbios, SMBIOS_SYSTEM_INFORMATION);
34 const struct smbios_type0 *t0 = (struct smbios_type0 *)bios;
35 const struct smbios_type1 *t1 = (struct smbios_type1 *)system;
40 const char *bios_ver = smbios_string(bios, t0->bios_ver);
41 const char *bios_date = smbios_string(bios, t0->bios_release_date);
42 const char *model = smbios_string(system, t1->product_name);
43 const char *manufacturer = smbios_string(system, t1->manufacturer);
45 if (!model || !manufacturer || !bios_ver)
48 printf("Vendor: %s\n", manufacturer);
49 printf("Model: %s\n", model);
50 printf("BIOS Version: %s\n", bios_ver);
52 printf("BIOS date: %s\n", bios_date);
57 #ifdef CONFIG_OF_CONTROL
58 DECLARE_GLOBAL_DATA_PTR;
60 model = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
63 printf("Model: %s\n", model);
70 static struct splash_location coreboot_splash_locations[] = {
73 .storage = SPLASH_STORAGE_VIRTIO,
74 .flags = SPLASH_STORAGE_RAW,
79 int splash_screen_prepare(void)
81 return splash_source_load(coreboot_splash_locations,
82 ARRAY_SIZE(coreboot_splash_locations));