coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
acpi.c File Reference
#include <acpi/acpi_device.h>
#include <acpi/acpigen.h>
#include <acpi/acpigen_pci.h>
#include <console/console.h>
#include <device/pci_ids.h>
#include <sar.h>
#include <stdlib.h>
#include <wrdd.h>
#include "chip.h"
#include "wifi.h"
#include "wifi_private.h"
Include dependency graph for acpi.c:

Go to the source code of this file.

Macros

#define DOMAIN_TYPE_WIFI   0x7
 
#define MAX_DSM_FUNCS   2
 
#define WIFI_ACPI_NAME_MAX_LEN   5
 
#define ACPI_DSM_OEM_WIFI_UUID   "F21202BF-8F78-4DC6-A5B3-1F738E285ADE"
 
#define ACPI_DSD_DMA_PROPERTY_UUID   "70D24161-6DD5-4C9E-8070-705531292865"
 
#define ACPI_DSM_RFIM_WIFI_UUID   "7266172C-220B-4B29-814F-75E4DD26B5FD"
 

Functions

__weak int get_wifi_sar_limits (union wifi_sar_limits *sar_limits)
 
void wifi_emit_dsm (struct dsm_profile *dsm)
 
static void wifi_dsm_srd_active_channels (void *args)
 
static void wifi_dsm_indonasia_5Ghz_band_enable (void *args)
 
static void wifi_dsm_supported_ultra_high_band (void *args)
 
static void wifi_dsm_regulatory_configurations (void *args)
 
static void wifi_dsm_uart_configurations (void *args)
 
static void wifi_dsm_ukrane_russia_11ax_enable (void *args)
 
static void wifi_dsm_unii4_control_enable (void *args)
 
static void wifi_dsm_ddrrfim_func3_cb (void *ptr)
 
static const uint8_tsar_fetch_set (const struct sar_profile *sar, size_t set_num)
 
static const uint8_twgds_fetch_set (struct geo_profile *wgds, size_t set_num)
 
static const uint8_tppag_fetch_set (struct gain_profile *ppag, size_t set_num)
 
static void sar_emit_wrds (const struct sar_profile *sar)
 
static void sar_emit_ewrd (const struct sar_profile *sar)
 
static void sar_emit_wgds (struct geo_profile *wgds)
 
static void sar_emit_ppag (struct gain_profile *ppag)
 
static void sar_emit_wtas (struct avg_profile *wtas)
 
static void emit_sar_acpi_structures (const struct device *dev, struct dsm_profile *dsm)
 
static void wifi_ssdt_write_device (const struct device *dev, const char *path)
 
static void wifi_ssdt_write_properties (const struct device *dev, const char *scope)
 
void wifi_pcie_fill_ssdt (const struct device *dev)
 
const char * wifi_pcie_acpi_name (const struct device *dev)
 
void wifi_cnvi_fill_ssdt (const struct device *dev)
 

Variables

static void(* wifi_dsm_callbacks [])(void *)
 
static void(* wifi_dsm2_callbacks [])(void *)
 

Macro Definition Documentation

◆ ACPI_DSD_DMA_PROPERTY_UUID

#define ACPI_DSD_DMA_PROPERTY_UUID   "70D24161-6DD5-4C9E-8070-705531292865"

Definition at line 34 of file acpi.c.

◆ ACPI_DSM_OEM_WIFI_UUID

#define ACPI_DSM_OEM_WIFI_UUID   "F21202BF-8F78-4DC6-A5B3-1F738E285ADE"

Definition at line 31 of file acpi.c.

◆ ACPI_DSM_RFIM_WIFI_UUID

#define ACPI_DSM_RFIM_WIFI_UUID   "7266172C-220B-4B29-814F-75E4DD26B5FD"

Definition at line 37 of file acpi.c.

◆ DOMAIN_TYPE_WIFI

#define DOMAIN_TYPE_WIFI   0x7

Definition at line 17 of file acpi.c.

◆ MAX_DSM_FUNCS

#define MAX_DSM_FUNCS   2

Definition at line 20 of file acpi.c.

◆ WIFI_ACPI_NAME_MAX_LEN

#define WIFI_ACPI_NAME_MAX_LEN   5

Definition at line 28 of file acpi.c.

Function Documentation

◆ emit_sar_acpi_structures()

static void emit_sar_acpi_structures ( const struct device dev,
struct dsm_profile dsm 
)
static

◆ get_wifi_sar_limits()

__weak int get_wifi_sar_limits ( union wifi_sar_limits sar_limits)

Definition at line 39 of file acpi.c.

Referenced by emit_sar_acpi_structures().

Here is the caller graph for this function:

◆ ppag_fetch_set()

static const uint8_t* ppag_fetch_set ( struct gain_profile ppag,
size_t  set_num 
)
static

Definition at line 212 of file acpi.c.

References gain_profile::bands_count, and gain_profile::ppag_table.

Referenced by sar_emit_ppag().

Here is the caller graph for this function:

◆ sar_emit_ewrd()

◆ sar_emit_ppag()

static void sar_emit_ppag ( struct gain_profile ppag)
static

◆ sar_emit_wgds()

static void sar_emit_wgds ( struct geo_profile wgds)
static

◆ sar_emit_wrds()

static void sar_emit_wrds ( const struct sar_profile sar)
static

◆ sar_emit_wtas()

static void sar_emit_wtas ( struct avg_profile wtas)
static

◆ sar_fetch_set()

static const uint8_t* sar_fetch_set ( const struct sar_profile sar,
size_t  set_num 
)
static

Definition at line 198 of file acpi.c.

References sar_profile::chains_count, sar_profile::sar_table, and sar_profile::subbands_count.

Referenced by sar_emit_ewrd(), and sar_emit_wrds().

Here is the caller graph for this function:

◆ wgds_fetch_set()

static const uint8_t* wgds_fetch_set ( struct geo_profile wgds,
size_t  set_num 
)
static

Definition at line 205 of file acpi.c.

References geo_profile::bands_count, and geo_profile::wgds_table.

Referenced by sar_emit_wgds().

Here is the caller graph for this function:

◆ wifi_cnvi_fill_ssdt()

void wifi_cnvi_fill_ssdt ( const struct device dev)

Definition at line 644 of file acpi.c.

References acpi_device_path(), device::bus, bus::dev, device::path, and wifi_ssdt_write_properties().

Here is the call graph for this function:

◆ wifi_dsm_ddrrfim_func3_cb()

static void wifi_dsm_ddrrfim_func3_cb ( void ptr)
static

Definition at line 155 of file acpi.c.

References acpigen_write_return_integer().

Here is the call graph for this function:

◆ wifi_dsm_indonasia_5Ghz_band_enable()

static void wifi_dsm_indonasia_5Ghz_band_enable ( void args)
static

Definition at line 72 of file acpi.c.

References acpigen_write_return_integer(), args, and dsm_profile::support_indonesia_5g_band.

Here is the call graph for this function:

◆ wifi_dsm_regulatory_configurations()

static void wifi_dsm_regulatory_configurations ( void args)
static

Definition at line 99 of file acpi.c.

References acpigen_write_return_integer(), args, and dsm_profile::regulatory_configurations.

Here is the call graph for this function:

◆ wifi_dsm_srd_active_channels()

static void wifi_dsm_srd_active_channels ( void args)
static

Definition at line 59 of file acpi.c.

References acpigen_write_return_integer(), args, and dsm_profile::disable_active_sdr_channels.

Here is the call graph for this function:

◆ wifi_dsm_supported_ultra_high_band()

static void wifi_dsm_supported_ultra_high_band ( void args)
static

Definition at line 89 of file acpi.c.

References acpigen_write_return_integer(), args, and dsm_profile::support_ultra_high_band.

Here is the call graph for this function:

◆ wifi_dsm_uart_configurations()

static void wifi_dsm_uart_configurations ( void args)
static

Definition at line 109 of file acpi.c.

References acpigen_write_return_integer(), args, and dsm_profile::uart_configurations.

Here is the call graph for this function:

◆ wifi_dsm_ukrane_russia_11ax_enable()

static void wifi_dsm_ukrane_russia_11ax_enable ( void args)
static

Definition at line 138 of file acpi.c.

References acpigen_write_return_integer(), args, and dsm_profile::enablement_11ax.

Here is the call graph for this function:

◆ wifi_dsm_unii4_control_enable()

static void wifi_dsm_unii4_control_enable ( void args)
static

Definition at line 148 of file acpi.c.

References acpigen_write_return_integer(), args, and dsm_profile::unii_4.

Here is the call graph for this function:

◆ wifi_emit_dsm()

void wifi_emit_dsm ( struct dsm_profile dsm)

Definition at line 183 of file acpi.c.

References ACPI_DSM_OEM_WIFI_UUID, acpigen_write_dsm(), ARRAY_SIZE, count, NULL, dsm_profile::supported_functions, and wifi_dsm_callbacks.

Here is the call graph for this function:

◆ wifi_pcie_acpi_name()

const char* wifi_pcie_acpi_name ( const struct device dev)

Definition at line 634 of file acpi.c.

References dev_path_encode(), snprintf(), and WIFI_ACPI_NAME_MAX_LEN.

Here is the call graph for this function:

◆ wifi_pcie_fill_ssdt()

void wifi_pcie_fill_ssdt ( const struct device dev)

◆ wifi_ssdt_write_device()

static void wifi_ssdt_write_device ( const struct device dev,
const char *  path 
)
static

Definition at line 519 of file acpi.c.

References acpi_device_write_uid(), acpigen_pop_len(), acpigen_write_ADR_pci_device(), acpigen_write_device(), acpigen_write_name_string(), device::chip_ops, and chip_operations::name.

Referenced by wifi_pcie_fill_ssdt().

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

◆ wifi_ssdt_write_properties()

Variable Documentation

◆ wifi_dsm2_callbacks

void(* wifi_dsm2_callbacks[])(void *) ( void )
static
Initial value:
= {
NULL,
NULL,
NULL,
}
static void wifi_dsm_ddrrfim_func3_cb(void *ptr)
Definition: acpi.c:155
#define NULL
Definition: stddef.h:19

Definition at line 176 of file acpi.c.

Referenced by wifi_ssdt_write_properties().

◆ wifi_dsm_callbacks

void(* wifi_dsm_callbacks[])(void *) ( void )
static
Initial value:
= {
NULL,
}
static void wifi_dsm_unii4_control_enable(void *args)
Definition: acpi.c:148
static void wifi_dsm_supported_ultra_high_band(void *args)
Definition: acpi.c:89
static void wifi_dsm_uart_configurations(void *args)
Definition: acpi.c:109
static void wifi_dsm_srd_active_channels(void *args)
Definition: acpi.c:59
static void wifi_dsm_indonasia_5Ghz_band_enable(void *args)
Definition: acpi.c:72
static void wifi_dsm_regulatory_configurations(void *args)
Definition: acpi.c:99
static void wifi_dsm_ukrane_russia_11ax_enable(void *args)
Definition: acpi.c:138

Definition at line 161 of file acpi.c.

Referenced by wifi_emit_dsm(), and wifi_ssdt_write_properties().