coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mainboard.c File Reference
#include <string.h>
#include <types.h>
#include <device/device.h>
#include <console/console.h>
#include <drivers/intel/gma/int15.h>
#include <option.h>
#include <superio/hwm5_conf.h>
#include <superio/nuvoton/common/hwm.h>
Include dependency graph for mainboard.c:

Go to the source code of this file.

Data Structures

struct  fan_speed
 
struct  temperature
 

Macros

#define FAN_CRUISE_CONTROL_DISABLED   0
 
#define FAN_CRUISE_CONTROL_SPEED   1
 
#define FAN_CRUISE_CONTROL_THERMAL   2
 
#define FAN_SPEED_5625   0
 

Functions

static void hwm_setup (void)
 
static void mainboard_enable (struct device *dev)
 
static void mainboard_init (void *chip_info)
 

Variables

static u16 hwm_base = 0xa00
 
struct fan_speed fan_speeds []
 
struct temperature temperatures []
 
struct chip_operations mainboard_ops
 

Macro Definition Documentation

◆ FAN_CRUISE_CONTROL_DISABLED

#define FAN_CRUISE_CONTROL_DISABLED   0

Definition at line 16 of file mainboard.c.

◆ FAN_CRUISE_CONTROL_SPEED

#define FAN_CRUISE_CONTROL_SPEED   1

Definition at line 17 of file mainboard.c.

◆ FAN_CRUISE_CONTROL_THERMAL

#define FAN_CRUISE_CONTROL_THERMAL   2

Definition at line 18 of file mainboard.c.

◆ FAN_SPEED_5625

#define FAN_SPEED_5625   0

Definition at line 19 of file mainboard.c.

Function Documentation

◆ hwm_setup()

static void hwm_setup ( void  )
static

◆ mainboard_enable()

static void mainboard_enable ( struct device dev)
static

Definition at line 127 of file mainboard.c.

References GMA_INT15_ACTIVE_LFP_INT_LVDS, GMA_INT15_BOOT_DISPLAY_DEFAULT, GMA_INT15_PANEL_FIT_DEFAULT, hwm_setup(), and install_intel_vga_int15_handler().

Here is the call graph for this function:

◆ mainboard_init()

static void mainboard_init ( void chip_info)
static

Definition at line 133 of file mainboard.c.

References BIOS_DEBUG, BIOS_ERR, device::enabled, get_uint_option(), NULL, pcidev_on_root(), printk, and snprintf().

Here is the call graph for this function:

Variable Documentation

◆ fan_speeds

struct fan_speed fan_speeds[]
Initial value:
= {
{ 0x3c, 5625 }, { 0x41, 5192 }, { 0x47, 4753 }, { 0x4e, 4326 },
{ 0x56, 3924 }, { 0x5f, 3552 }, { 0x69, 3214 }, { 0x74, 2909 },
{ 0x80, 2636 }, { 0x8d, 2393 }, { 0x9b, 2177 }, { 0xaa, 1985 },
{ 0xba, 1814 }, { 0xcb, 1662 }, { 0xdd, 1527 }, { 0xf0, 1406 }
}

Definition at line 14 of file mainboard.c.

Referenced by hwm_setup().

◆ hwm_base

u16 hwm_base = 0xa00
static

Definition at line 14 of file mainboard.c.

Referenced by hwm_setup().

◆ mainboard_ops

struct chip_operations mainboard_ops
Initial value:
= {
.init = mainboard_init,
.enable_dev = mainboard_enable,
}
static void mainboard_init(void *chip_info)
Definition: mainboard.c:133
static void mainboard_enable(struct device *dev)
Definition: mainboard.c:127

Definition at line 133 of file mainboard.c.

◆ temperatures

struct temperature temperatures[]
Initial value:
= {
{ 30, 86 }, { 33, 91 }, { 36, 96 }, { 39, 102 },
{ 42, 107 }, { 45, 113 }, { 48, 118 }, { 51, 123 },
{ 54, 129 }, { 57, 134 }, { 60, 140 }, { 63, 145 },
{ 66, 150 }, { 69, 156 }, { 72, 161 }, { 75, 167 }
}

Definition at line 14 of file mainboard.c.

Referenced by hwm_setup().