soc/intel/xeon_sp/spr: Drop microcode constraints
[coreboot2.git] / src / include / sar.h
blob8d712dec816aab30a18c6630ba06525ae5e0a624
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #ifndef _SAR_H_
3 #define _SAR_H_
5 #include <fw_config.h>
6 #include <stdint.h>
8 #define MAX_ANT_GAINS_REVISION 2
9 #define MAX_DENYLIST_ENTRY 16
10 #define MAX_DSAR_SET_COUNT 3
11 #define MAX_GEO_OFFSET_REVISION 3
12 #define MAX_PROFILE_COUNT 5
13 #define MAX_SAR_REVISION 2
14 #define REVISION_SIZE 1
15 #define SAR_REV0_CHAINS_COUNT 2
16 #define SAR_REV0_SUBBANDS_COUNT 5
17 #define SAR_FILE_REVISION 1
18 #define SAR_STR_PREFIX "$SAR"
19 #define SAR_STR_PREFIX_SIZE 4
21 struct geo_profile {
22 uint8_t revision;
23 uint8_t chains_count;
24 uint8_t bands_count;
25 uint8_t wgds_table[];
26 } __packed;
28 struct sar_profile {
29 uint8_t revision;
30 uint8_t dsar_set_count;
31 uint8_t chains_count;
32 uint8_t subbands_count;
33 uint8_t sar_table[];
34 } __packed;
36 struct gain_profile {
37 uint8_t revision;
38 uint8_t mode;
39 uint8_t chains_count;
40 uint8_t bands_count;
41 uint8_t ppag_table[];
42 } __packed;
44 struct avg_profile {
45 uint8_t revision;
46 uint8_t tas_selection;
47 uint8_t tas_list_size;
48 uint16_t deny_list_entry[MAX_DENYLIST_ENTRY];
49 } __packed;
51 struct dsm_profile {
52 uint32_t supported_functions;
53 uint32_t disable_active_sdr_channels;
54 uint32_t support_indonesia_5g_band;
55 uint32_t support_ultra_high_band;
56 uint32_t regulatory_configurations;
57 uint32_t uart_configurations;
58 uint32_t enablement_11ax;
59 uint32_t unii_4;
62 struct sar_header {
63 char marker[SAR_STR_PREFIX_SIZE];
64 uint8_t version;
65 uint16_t offsets[];
66 } __packed;
68 /* Wifi SAR limit table structure */
69 union wifi_sar_limits {
70 struct {
71 struct sar_profile *sar;
72 struct geo_profile *wgds;
73 struct gain_profile *ppag;
74 struct avg_profile *wtas;
75 struct dsm_profile *dsm;
77 void *profile[MAX_PROFILE_COUNT];
81 * Retrieve the wifi ACPI configuration data from CBFS and decode it
82 * sar_limits: Pointer to wifi_sar_limits where the resulted data is stored
84 * Returns: 0 on success, -1 on errors (The .hex file doesn't exist, or the decode failed)
86 int get_wifi_sar_limits(union wifi_sar_limits *sar_limits);
88 #define WIFI_SAR_CBFS_DEFAULT_FILENAME "wifi_sar_defaults.hex"
90 const char *get_wifi_sar_cbfs_filename(void);
92 char *get_wifi_sar_fw_config_filename(const struct fw_config_field *field);
94 #endif /* _SAR_H_ */