coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ssdt.c File Reference
#include <superio/common/ssdt.h>
#include <device/device.h>
#include <device/pnp.h>
#include <acpi/acpigen.h>
#include <acpi/acpi.h>
#include <console/console.h>
#include <types.h>
#include <string.h>
Include dependency graph for ssdt.c:

Go to the source code of this file.

Data Structures

struct  superio_dev
 

Functions

static const struct superio_devsuperio_guess_function (const struct device *dev)
 
static bool has_resources (const struct device *dev)
 
static void ldn_gen_resources (const struct device *dev)
 
static void ldn_gen_resources_use (const struct device *dev)
 
const char * superio_common_ldn_acpi_name (const struct device *dev)
 
static const char * name_from_hid (const char *hid)
 
void superio_common_fill_ssdt_generator (const struct device *dev)
 

Variables

static const struct superio_dev superio_devs []
 
static const u8 io_idx [] = {PNP_IDX_IO0, PNP_IDX_IO1, PNP_IDX_IO2, PNP_IDX_IO3}
 
static const u8 irq_idx [] = {PNP_IDX_IRQ0, PNP_IDX_IRQ1}
 

Function Documentation

◆ has_resources()

static bool has_resources ( const struct device dev)
static

Definition at line 63 of file ssdt.c.

References ARRAY_SIZE, resource::base, io_idx, irq_idx, probe_resource(), and resource::size.

Referenced by superio_common_fill_ssdt_generator().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ldn_gen_resources()

static void ldn_gen_resources ( const struct device dev)
static

Definition at line 81 of file ssdt.c.

References acpigen_write_io16(), acpigen_write_irq(), ARRAY_SIZE, resource::base, base, io_idx, irq_idx, probe_resource(), and resource::size.

Referenced by superio_common_fill_ssdt_generator().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ldn_gen_resources_use()

static void ldn_gen_resources_use ( const struct device dev)
static

Definition at line 110 of file ssdt.c.

References acpigen_write_name_integer(), ARRAY_SIZE, resource::base, io_idx, name, probe_resource(), resource::size, and snprintf().

Referenced by superio_common_fill_ssdt_generator().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name_from_hid()

static const char* name_from_hid ( const char *  hid)
static

Definition at line 141 of file ssdt.c.

References ACPI_HID_COM, ACPI_HID_FDC, ACPI_HID_KEYBOARD, ACPI_HID_LPT, ACPI_HID_MOUSE, ACPI_HID_PNP, ARRAY_SIZE, name, and strcmp().

Referenced by superio_common_fill_ssdt_generator().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ superio_common_fill_ssdt_generator()

◆ superio_common_ldn_acpi_name()

const char* superio_common_ldn_acpi_name ( const struct device dev)

Definition at line 128 of file ssdt.c.

References pnp_path::device, name, device::path, device_path::pnp, and snprintf().

Here is the call graph for this function:

◆ superio_guess_function()

static const struct superio_dev* superio_guess_function ( const struct device dev)
static

Definition at line 30 of file ssdt.c.

References ARRAY_SIZE, resource::base, io_idx, irq_idx, NULL, probe_resource(), resource::size, and superio_devs.

Referenced by superio_common_fill_ssdt_generator().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ io_idx

const u8 io_idx[] = {PNP_IDX_IO0, PNP_IDX_IO1, PNP_IDX_IO2, PNP_IDX_IO3}
static

◆ irq_idx

const u8 irq_idx[] = {PNP_IDX_IRQ0, PNP_IDX_IRQ1}
static

Definition at line 28 of file ssdt.c.

Referenced by has_resources(), ldn_gen_resources(), and superio_guess_function().

◆ superio_devs

const struct superio_dev superio_devs[]
static
Initial value:
= {
{ACPI_HID_FDC, {0x3f0, 0x3f2, 0x3f7}, {6, } },
{ACPI_HID_KEYBOARD, {60, 64, }, {1, } },
{ACPI_HID_MOUSE, {60, 64, }, {12, } },
{ACPI_HID_COM, {0x3f8, 0x2f8, 0x3e8, 0x2e8}, {4, 3} },
{ACPI_HID_LPT, {0x378, }, {7, } },
}
#define ACPI_HID_FDC
Definition: acpi.h:145
#define ACPI_HID_COM
Definition: acpi.h:148
#define ACPI_HID_LPT
Definition: acpi.h:149
#define ACPI_HID_MOUSE
Definition: acpi.h:147
#define ACPI_HID_KEYBOARD
Definition: acpi.h:146

Definition at line 1 of file ssdt.c.

Referenced by superio_guess_function().