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 
3 #include <device/device.h>
6 #include <smbios.h>
7 
8 #if CONFIG(GENERATE_SMBIOS_TABLES)
9 static int mainboard_smbios_data(struct device *dev, int *handle,
10  unsigned long *current)
11 {
12  int len = 0;
13 
14  // add IPMI Device Information
15  len += smbios_write_type38(
16  current, handle,
18  0x20, // IPMI Version
19  0x20, // I2C address
20  0xff, // no NV storage
21  0, // IO port interface address
22  0,
23  0); // no IRQ
24 
25  return len;
26 }
27 #endif
28 
29 static void mainboard_enable(struct device *dev)
30 {
34 #if CONFIG(GENERATE_SMBIOS_TABLES)
35  dev->ops->get_smbios_data = mainboard_smbios_data;
36 #endif
37 }
38 
41 };
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:29
@ 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