coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mainboard.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #include <device/device.h>
5 #include <smbios.h>
6 
7 #if CONFIG(GENERATE_SMBIOS_TABLES)
8 static int mainboard_smbios_data(struct device *dev, int *handle,
9  unsigned long *current)
10 {
11  int len = 0;
12 
13  // add IPMI Device Information
14  len += smbios_write_type38(
15  current, handle,
17  0x20, // IPMI Version
18  0x20, // I2C address
19  0xff, // no NV storage
20  0, // IO port interface address
21  0,
22  0); // no IRQ
23 
24  return len;
25 }
26 #endif
27 
28 static void mainboard_enable(struct device *dev)
29 {
33 #if CONFIG(GENERATE_SMBIOS_TABLES)
34  dev->ops->get_smbios_data = mainboard_smbios_data;
35 #endif
36 }
37 
40 };
struct chip_operations mainboard_ops
Definition: mainboard.c:19
int smbios_write_type38(unsigned long *current, int *handle, const enum smbios_bmc_interface_type interface_type, const u8 ipmi_rev, const u8 i2c_addr, const u8 nv_addr, const u64 base_addr, const u8 base_modifier, const u8 irq)
Definition: smbios.c:1064
void install_intel_vga_int15_handler(int active_lfp_, int pfit_, int display_, int panel_type_)
Definition: int15.c:101
@ GMA_INT15_BOOT_DISPLAY_DEFAULT
Definition: int15.h:6
@ GMA_INT15_ACTIVE_LFP_NONE
Definition: int15.h:24
@ GMA_INT15_PANEL_FIT_DEFAULT
Definition: int15.h:17
static int mainboard_smbios_data(struct device *dev, int *handle, unsigned long *current)
Definition: mainboard.c:18
static void mainboard_enable(struct device *dev)
Definition: mainboard.c:28
@ SMBIOS_BMC_INTERFACE_KCS
Definition: smbios.h:933
void(* enable_dev)(struct device *dev)
Definition: device.h:24
Definition: device.h:107
struct device_operations * ops
Definition: device.h:143