cc50770cd0
Add support for the WTAS ACPI BIOS configuration table as per the connectivity document: 559910_Intel_Connectivity_Platforms_BIOS_Guidelines_Rev6_4.pdf BUG=b:193665559 TEST=Generated SAR file with the WTAS related configuration values and verified that the SSDT has the WTAS ACPI table. Change-Id: I42cf3cba7974e6db0e05de30846ef103a15fd584 Signed-off-by: Sugnan Prabhu S <sugnan.prabhu.s@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57061 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
79 lines
1.7 KiB
C
79 lines
1.7 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef _SAR_H_
|
|
#define _SAR_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
#define MAX_ANT_GAINS_REVISION 2
|
|
#define MAX_DENYLIST_ENTRY 16
|
|
#define MAX_DSAR_SET_COUNT 3
|
|
#define MAX_GEO_OFFSET_REVISION 3
|
|
#define MAX_PROFILE_COUNT 4
|
|
#define MAX_SAR_REVISION 2
|
|
#define REVISION_SIZE 1
|
|
#define SAR_REV0_CHAINS_COUNT 2
|
|
#define SAR_REV0_SUBBANDS_COUNT 5
|
|
#define SAR_FILE_REVISION 1
|
|
#define SAR_STR_PREFIX "$SAR"
|
|
#define SAR_STR_PREFIX_SIZE 4
|
|
|
|
struct geo_profile {
|
|
uint8_t revision;
|
|
uint8_t chains_count;
|
|
uint8_t bands_count;
|
|
uint8_t wgds_table[0];
|
|
} __packed;
|
|
|
|
struct sar_profile {
|
|
uint8_t revision;
|
|
uint8_t dsar_set_count;
|
|
uint8_t chains_count;
|
|
uint8_t subbands_count;
|
|
uint8_t sar_table[0];
|
|
} __packed;
|
|
|
|
struct gain_profile {
|
|
uint8_t revision;
|
|
uint8_t mode;
|
|
uint8_t chains_count;
|
|
uint8_t bands_count;
|
|
uint8_t ppag_table[0];
|
|
} __packed;
|
|
|
|
struct avg_profile {
|
|
uint8_t revision;
|
|
uint8_t tas_selection;
|
|
uint8_t tas_list_size;
|
|
uint8_t deny_list_entry[MAX_DENYLIST_ENTRY];
|
|
} __packed;
|
|
|
|
struct sar_header {
|
|
char marker[SAR_STR_PREFIX_SIZE];
|
|
uint8_t version;
|
|
uint16_t offsets[0];
|
|
} __packed;
|
|
|
|
/* Wifi SAR limit table structure */
|
|
union wifi_sar_limits {
|
|
struct {
|
|
struct sar_profile *sar;
|
|
struct geo_profile *wgds;
|
|
struct gain_profile *ppag;
|
|
struct avg_profile *wtas;
|
|
};
|
|
void *profile[MAX_PROFILE_COUNT];
|
|
};
|
|
|
|
/*
|
|
* Retrieve the wifi ACPI configuration data from CBFS and decode it
|
|
* sar_limits: Pointer to wifi_sar_limits where the resulted data is stored
|
|
*
|
|
* Returns: 0 on success, -1 on errors (The .hex file doesn't exist, or the decode failed)
|
|
*/
|
|
int get_wifi_sar_limits(union wifi_sar_limits *sar_limits);
|
|
|
|
#define WIFI_SAR_CBFS_DEFAULT_FILENAME "wifi_sar_defaults.hex"
|
|
|
|
const char *get_wifi_sar_cbfs_filename(void);
|
|
|
|
#endif /* _SAR_H_ */
|